:root {
  color-scheme: light;
  --app-width: 430px;
  --bg: #eef1f5;
  --screen: #f7f8fb;
  --surface: #ffffff;
  --surface-soft: #f2f4f8;
  --line: #e8ecf2;
  --text: #101828;
  --muted: #7a8494;
  --brand: #55a7ff;
  --brand-dark: #348fff;
  --ok: #16805f;
  --danger: #d93d32;
  --shadow: 0 18px 50px rgba(17, 24, 39, 0.08);
  --card-shadow: 0 8px 24px rgba(17, 24, 39, 0.035);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  font-weight: 400 !important;
}

html,
body {
  margin: 0;
  min-width: 320px;
  height: 100%;
  min-height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
  overflow-x: hidden;
  overscroll-behavior-y: none;
  font-size: 15px;
  letter-spacing: 0;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  border: 0;
  letter-spacing: 0;
}

.phone-app {
  width: min(100vw, var(--app-width));
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--screen);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  overflow-x: hidden;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.08), var(--shadow);
}

.app-screen {
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  position: relative;
  overflow: hidden;
}

.app-header {
  display: none;
  padding: calc(14px + env(safe-area-inset-top)) 18px 12px;
  align-items: center;
  justify-content: space-between;
  background: rgba(246, 247, 251, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(220, 226, 234, 0.8);
  z-index: 5;
}

.app-header small {
  color: var(--muted);
  font-size: 12px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 25px;
  line-height: 1.1;
  font-weight: 800;
}

h2 {
  font-size: 22px;
  line-height: 1.2;
  font-weight: 800;
}

h3 {
  font-size: 15px;
  font-weight: 760;
}

.screen-body {
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px 14px calc(108px + env(safe-area-inset-bottom, 0px));
  transform: translateY(var(--pull-offset, 0px));
  transition: none;
  overscroll-behavior-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

.screen-body.is-pulling {
  transition: none;
}

.screen-body.pull-refresh-instant-reset {
  transition: none !important;
}

.screen-body.is-pull-settling {
  transition-duration: 420ms;
  transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
}

.screen-body.pull-refresh-unlocking {
  touch-action: pan-y;
  overscroll-behavior-y: auto;
}

.pull-refresh-indicator {
  position: fixed;
  top: calc(12px + env(safe-area-inset-top));
  left: 50%;
  z-index: 30;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(218, 225, 236, 0.9);
  box-shadow: 0 10px 26px rgba(20, 31, 49, 0.12);
  font-size: 13px;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -18px);
  transition: opacity 180ms ease, transform 320ms cubic-bezier(0.16, 1, 0.3, 1), border-color 160ms ease;
}

.pull-refresh-indicator::before {
  content: "";
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2px solid rgba(85, 167, 255, 0.24);
  border-top-color: var(--brand);
}

.pull-refresh-indicator.active {
  opacity: 1;
  transform: translate(-50%, 0);
}

.pull-refresh-indicator.ready {
  border-color: rgba(85, 167, 255, 0.3);
}

.pull-refresh-indicator.loading::before {
  animation: pull-refresh-spin 820ms linear infinite;
}

@keyframes pull-refresh-spin {
  to {
    transform: rotate(360deg);
  }
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.auth-screen {
  height: 100vh;
  height: 100dvh;
  min-height: 100dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: calc(24px + env(safe-area-inset-top)) 22px calc(24px + env(safe-area-inset-bottom));
  display: grid;
  place-items: center;
}

.auth-card {
  width: 100%;
  display: grid;
  gap: 16px;
}

.app-logo,
.avatar {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--brand);
  color: #fff;
  font-size: 28px;
  font-weight: 900;
  overflow: hidden;
}

.avatar-upload {
  position: relative;
  flex: 0 0 auto;
  cursor: pointer;
  border: 2px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 8px 22px rgba(31, 45, 61, 0.12);
}

.avatar-upload::after {
  content: "换";
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(85, 167, 255, 0.92);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  border: 1px solid rgba(255, 255, 255, 0.9);
}

.avatar-upload.busy {
  opacity: 0.7;
}

.avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.auth-title {
  display: grid;
  gap: 7px;
}

.auth-title p {
  color: var(--brand);
  font-weight: 800;
}

.auth-title span,
.hero-block p,
.section-title span,
.status-line,
.work-card small,
.wallet-card p,
.plan small,
.account-card p {
  color: var(--muted);
  font-size: 13px;
}

.segmented {
  height: 48px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  background: var(--surface-soft);
  border-radius: 14px;
}

.seg {
  border-radius: 11px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.seg.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

input,
textarea,
select {
  width: 100%;
  min-height: 48px;
  border: 1px solid transparent;
  border-radius: 18px;
  background: var(--surface-soft);
  color: var(--text);
  padding: 13px 15px;
  outline: none;
}

textarea {
  resize: vertical;
  line-height: 1.5;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--brand);
  background: var(--surface);
  box-shadow: 0 0 0 4px rgba(85, 167, 255, 0.1);
}

.creator-flow {
  width: 100%;
  min-width: 0;
  display: grid;
  gap: 10px;
}

.hero-block,
.step-block,
.wallet-card,
.account-card,
.work-card {
  width: 100%;
  max-width: 100%;
  background: var(--surface);
  border: 1px solid rgba(232, 236, 242, 0.9);
  border-radius: 8px;
  padding: 15px;
  box-shadow: var(--card-shadow);
}

.hero-block {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--surface);
  color: var(--text);
  border-color: transparent;
  padding: 8px 2px 10px;
  box-shadow: none;
}

.hero-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.hero-meta {
  flex: 0 0 auto;
  max-width: 58%;
  display: grid;
  justify-items: end;
  gap: 5px;
}

.hero-meta span {
  border-radius: 999px;
  padding: 4px 8px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.studio-model-name,
.model-badge {
  width: fit-content;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 900;
}

.studio-model-name {
  background: #eef5ff;
  color: var(--brand);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.model-badge {
  background: #eef4ff;
  color: var(--brand);
}

@media (max-width: 340px) {
  .hero-block {
    flex-wrap: wrap;
  }

  .hero-meta {
    width: 100%;
    max-width: 100%;
    grid-auto-flow: column;
    justify-content: end;
  }
}

.hero-block p {
  color: rgba(255, 255, 255, 0.78);
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

#accountView .section-title h3 {
  color: var(--brand);
}

.section-title.title-blue h3 {
  color: var(--brand);
}

.page-title {
  padding: 4px 2px 12px;
}

.prompt-block {
  display: grid;
  gap: 12px;
}

.prompt-field {
  position: relative;
}

.prompt-block textarea {
  min-height: 158px;
  width: 100%;
  padding-bottom: 58px;
  border-radius: 12px;
  font-size: 15px;
  line-height: 1.65;
}

.compact-settings {
  margin-top: 0;
}

.creator-picks {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.creator-pick {
  min-width: 0;
  min-height: 64px;
  display: grid;
  gap: 5px;
  align-content: center;
  justify-items: start;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--card-shadow);
}

.creator-pick strong {
  color: var(--brand);
  font-size: 14px;
  font-weight: 760;
}

.creator-pick span {
  max-width: 100%;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.creator-pick span:empty {
  display: none;
}

.creator-pick.active {
  border-color: rgba(85, 167, 255, 0.36);
  background: #eef4ff;
  box-shadow: 0 8px 24px rgba(85, 167, 255, 0.1);
}

.ai-prompt-button {
  position: absolute;
  right: 10px;
  bottom: 10px;
  min-height: 34px;
  width: auto;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--brand);
  font-size: 12px;
  box-shadow: none;
}

.creator-panel {
  margin-top: 0;
}

.asset-strip,
.template-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  overflow: visible;
  padding-bottom: 0;
}

.asset-chip {
  min-width: 0;
  min-height: 0;
  position: relative;
  display: grid;
  align-items: start;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 6px;
  user-select: none;
  touch-action: manipulation;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.asset-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.asset-chip:has(input:checked),
.asset-chip.selected {
  border-color: var(--brand);
  background: #eef4ff;
  box-shadow: 0 0 0 2px rgba(85, 167, 255, 0.18), 0 10px 24px rgba(85, 167, 255, 0.14);
  transform: translateY(-1px);
}

.asset-chip:has(input:checked) .asset-thumb,
.asset-chip.selected .asset-thumb {
  border-color: rgba(85, 167, 255, 0.68);
}

.asset-selected-mark {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 18px;
  font-weight: 900 !important;
  line-height: 1;
  opacity: 0;
  transform: scale(0.72);
  box-shadow: 0 8px 18px rgba(85, 167, 255, 0.34);
  pointer-events: none;
  transition: opacity 0.14s ease, transform 0.16s cubic-bezier(0.16, 1, 0.3, 1);
}

.asset-chip:has(input:checked) .asset-selected-mark,
.asset-chip.selected .asset-selected-mark {
  opacity: 1;
  transform: scale(1);
}

.asset-delete {
  position: absolute;
  top: 8px;
  right: 8px;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(217, 45, 32, 0.95);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: 0.16s ease;
  box-shadow: 0 6px 14px rgba(217, 45, 32, 0.22);
}

.asset-chip.show-delete .asset-delete {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.asset-thumb {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid rgba(232, 236, 242, 0.9);
  background: #edf1f6;
}

.asset-view {
  position: absolute;
  left: 8px;
  bottom: 8px;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.asset-thumb.empty {
  display: grid;
  place-items: center;
  color: var(--muted);
}

.asset-viewer-overlay {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(8, 13, 24, 0.82);
}

.asset-viewer-overlay.hidden {
  display: none;
}

.asset-viewer-mask {
  position: absolute;
  inset: 0;
}

.asset-viewer-sheet {
  position: relative;
  z-index: 1;
  width: min(100%, 430px);
  max-height: 88vh;
  display: grid;
  gap: 10px;
}

.asset-viewer-image {
  width: 100%;
  max-height: calc(88vh - 64px);
  object-fit: contain;
  border-radius: 8px;
  background: #0f172a;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.38);
}

.asset-viewer-close {
  position: absolute;
  top: -12px;
  right: -8px;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: #111827;
  font-size: 24px;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
}

.asset-viewer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
}

.asset-viewer-actions strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #111827;
}

.asset-viewer-download {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 7px 13px;
  border-radius: 8px;
  background: #55a7ff;
  color: #fff;
  font-weight: 800;
}

.upload-action {
  width: 100%;
  min-height: 50px;
  margin-top: 8px;
  border: 1px dashed #cbd4e1;
  border-radius: 8px;
  background: #fafbfc;
  padding: 10px 13px;
  display: grid;
  gap: 3px;
}

.asset-generate-action {
  appearance: none;
  cursor: pointer;
  text-align: left;
  color: var(--ink);
  border-style: solid;
  background: linear-gradient(135deg, #fff8e8, #f3f8ff);
}

.asset-generate-action strong {
  display: block;
}

.upload-action small {
  color: var(--muted);
}

.asset-hint {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.upload-action.busy {
  border-color: var(--brand);
  background: #eef4ff;
}

.file-hidden {
  display: none;
}

.template {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: var(--surface-soft);
  color: var(--text);
  font-weight: 700;
  font-size: 13px;
  line-height: 1.2;
}

.template-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-height: 210px;
  overflow-y: auto;
  padding-right: 2px;
}

.template.active {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.setting-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}

.setting-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.primary,
.secondary,
.icon-button,
.danger-button {
  min-height: 48px;
  border-radius: 16px;
  font-weight: 780;
  cursor: pointer;
}

.primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 12px 26px rgba(85, 167, 255, 0.18);
}

.primary:hover {
  background: var(--brand-dark);
}

.secondary {
  border: 1px solid rgba(232, 236, 242, 0.9);
  background: var(--surface);
  color: var(--text);
}

.icon-button {
  width: 44px;
  min-height: 44px;
  background: var(--surface);
  color: var(--brand);
  border: 1px solid var(--line);
}

.danger-button {
  width: 100%;
  color: var(--danger);
  background: #fff2f1;
}

button:disabled {
  opacity: 0.65;
  cursor: wait;
}

.sticky-submit {
  position: static;
  width: 100%;
  margin-top: 2px;
  box-shadow: 0 14px 30px rgba(85, 167, 255, 0.22);
}

.main-create-wrap {
  position: relative;
  display: grid;
}

.main-create-button {
  min-height: 58px;
  font-size: 17px;
  border-radius: 18px;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.main-create-button * {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.tab-item[data-view="studioView"],
.tab-item[data-view="studioView"] * {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.status-line {
  min-height: 16px;
  margin-top: 6px;
  font-size: 12px;
}

.status-line.ok {
  color: var(--ok);
}

.status-line.error,
.error {
  color: var(--danger);
}

.works-list {
  display: grid;
  gap: 10px;
}

.auto-create-card {
  display: grid;
  gap: 10px;
  margin: 0 0 12px;
  padding: 12px;
  border: 1px solid rgba(85, 167, 255, 0.16);
  border-radius: 16px;
  background:
    radial-gradient(circle at 92% 0%, rgba(255, 203, 87, 0.20), transparent 32%),
    linear-gradient(135deg, #ffffff, #f3f8ff);
  box-shadow: 0 10px 26px rgba(21, 37, 72, 0.07);
}

.auto-create-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.auto-create-head div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.auto-create-head strong {
  color: #101828;
  font-size: 15px;
  font-weight: 500;
}

.auto-create-head span,
.auto-create-status {
  color: #667085;
  font-size: 12px;
}

.auto-voice-btn {
  width: 42px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border-radius: 999px;
  background: #55a7ff;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 8px 18px rgba(85, 167, 255, 0.18);
}

.auto-voice-btn.listening {
  background: #ef4444;
  box-shadow: 0 0 0 6px rgba(239, 68, 68, 0.12);
}

.auto-create-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 68px;
  gap: 8px;
}

.auto-create-input input {
  min-height: 40px;
  border-radius: 12px;
  background: #fff;
  font-size: 13px;
}

.auto-create-input button {
  min-height: 40px;
  border-radius: 12px;
  background: #55a7ff;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
}

.auto-create-status {
  min-height: 17px;
  line-height: 1.4;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.auto-create-status.ok {
  color: #16805f;
}

.auto-create-status.error {
  color: #d93d32;
}

.auto-agent-open {
  overflow: hidden;
}

.auto-agent-overlay {
  position: fixed;
  inset: 0;
  z-index: 86;
  display: grid;
  place-items: center;
  padding: calc(14px + env(safe-area-inset-top, 0px)) 14px calc(14px + env(safe-area-inset-bottom, 0px));
}

.auto-agent-overlay.hidden {
  display: none;
}

.studio-agent-inline {
  position: static;
  inset: auto;
  z-index: auto;
  display: block;
  padding: 0;
}

.studio-agent-inline .auto-agent-panel {
  width: 100%;
  max-height: none;
  min-height: calc(100dvh - 156px);
  grid-template-rows: auto minmax(210px, 1fr) auto auto auto;
  border-radius: 0;
  box-shadow: none;
  animation: none;
}

.auto-agent-manual-btn {
  width: auto;
  min-width: 82px;
  height: 34px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: #55a7ff;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.auto-agent-mask {
  position: absolute;
  inset: 0;
  background: rgba(8, 13, 24, 0.56);
  backdrop-filter: blur(6px);
}

.auto-agent-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 430px);
  max-height: min(86vh, 720px);
  display: grid;
  grid-template-rows: auto minmax(150px, 1fr) auto auto auto;
  gap: 12px;
  overflow: hidden;
  padding: 16px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 88% 6%, rgba(255, 202, 71, 0.22), transparent 30%),
    linear-gradient(180deg, #ffffff, #f6f9ff);
  box-shadow: 0 26px 72px rgba(8, 13, 24, 0.34);
  animation: recharge-sheet-in 0.2s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.auto-agent-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.auto-agent-head div {
  display: grid;
  gap: 3px;
}

.auto-agent-head span {
  color: #55a7ff;
  font-size: 12px;
  font-weight: 760;
}

.auto-agent-head strong {
  color: #101828;
  font-size: 16px;
  font-weight: 600;
}

.auto-agent-head button {
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border-radius: 999px;
  background: #eef2f7;
  color: #475467;
  font-size: 22px;
}

.auto-agent-head .auto-agent-manual-btn {
  width: 30px;
  height: 30px;
  min-width: 30px;
  min-height: 30px;
  padding: 0;
  background: rgba(85, 167, 255, 0.12);
  color: #55a7ff;
  font-size: 17px;
  line-height: 1;
  font-weight: 900;
}

.auto-agent-head .auto-agent-clear-btn {
  width: auto;
  min-width: 58px;
  padding: 0 11px;
  background: #f2f4f7;
  color: #344054;
  font-size: 12px;
}

.auto-agent-log {
  min-height: 180px;
  display: grid;
  align-content: start;
  gap: 9px;
  overflow: auto;
  padding: 12px;
  border: 1px solid rgba(196, 207, 222, 0.92);
  border-radius: 18px;
  background: rgba(241, 245, 251, 0.88);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.74);
}

.auto-agent-task-list {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(218, 226, 238, 0.78);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.84);
}

.auto-agent-task-list.hidden {
  display: none;
}

.auto-agent-task-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.auto-agent-task-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.auto-agent-task-head strong {
  color: #101828;
  font-size: 13px;
  font-weight: 900;
}

.auto-agent-task-head span,
.auto-agent-task-head button {
  color: #667085;
  font-size: 11px;
  font-weight: 700;
}

.auto-agent-task-head button {
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #edf5ff;
  color: #55a7ff;
}

.auto-agent-task {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 9px;
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  border-radius: 14px;
  background: #f6f9ff;
}

.auto-agent-task.active {
  border-color: rgba(85, 167, 255, 0.28);
  background: #eef5ff;
}

.auto-agent-task-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #55a7ff;
  box-shadow: 0 0 0 4px rgba(85, 167, 255, 0.12);
}

.auto-agent-task.success .auto-agent-task-dot {
  background: #12b76a;
  box-shadow: 0 0 0 4px rgba(18, 183, 106, 0.12);
}

.auto-agent-task.error .auto-agent-task-dot {
  background: #f04438;
  box-shadow: 0 0 0 4px rgba(240, 68, 56, 0.12);
}

.auto-agent-task.waiting .auto-agent-task-dot {
  background: #f79009;
  box-shadow: 0 0 0 4px rgba(247, 144, 9, 0.14);
}

.auto-agent-task strong {
  display: block;
  color: #101828;
  font-size: 12px;
  font-weight: 900;
}

.auto-agent-task p {
  margin: 2px 0 0;
  color: #667085;
  font-size: 11px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auto-agent-task em {
  color: #55a7ff;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.auto-agent-msg {
  max-width: 88%;
  display: grid;
  gap: 3px;
}

.auto-agent-msg.auto-agent-rich {
  max-width: 96%;
}

.auto-agent-msg.user {
  justify-self: end;
}

.auto-agent-msg span {
  color: #98a2b3;
  font-size: 11px;
}

.auto-agent-msg p {
  position: relative;
  overflow: hidden;
  margin: 0;
  padding: 10px 12px;
  border-radius: 14px;
  background: #eef4ff;
  color: #173153;
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-line;
}

.auto-agent-preview-card,
.auto-agent-video-progress,
.auto-agent-video-result {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(218, 226, 238, 0.86);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

.auto-agent-preview-card strong,
.auto-agent-video-progress strong,
.auto-agent-video-result strong {
  display: block;
  color: #101828;
  font-size: 13px;
  font-weight: 900;
}

.auto-agent-preview-card small,
.auto-agent-video-progress small,
.auto-agent-video-result small {
  display: block;
  margin-top: 2px;
  color: #667085;
  font-size: 11px;
  line-height: 1.35;
}

.auto-agent-preview-card img {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 12px;
  background: #eef2f7;
}

.auto-agent-video-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.auto-agent-video-progress-head span {
  color: #55a7ff;
  font-size: 12px;
  font-weight: 900;
}

.auto-agent-video-progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8eef8;
}

.auto-agent-video-progress-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #55a7ff, #20c7ff);
  transition: width 0.35s ease;
}

.auto-agent-video-result video {
  width: 100%;
  max-height: 320px;
  border-radius: 14px;
  background: #020617;
}

.auto-agent-msg.working {
  max-width: 94%;
}

.auto-agent-msg.working p {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(85, 167, 255, 0.14);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0)) 0 0 / 52% 100% no-repeat,
    linear-gradient(135deg, #eef5ff, #eaf8ff);
  box-shadow: 0 8px 20px rgba(85, 167, 255, 0.08);
  animation: agent-working-shine 1.65s ease-in-out infinite, agent-working-breathe 1.35s ease-in-out infinite;
}

.auto-agent-msg.working p em {
  position: relative;
  z-index: 1;
  font-style: normal;
}

.auto-agent-msg.done p::after {
  content: "?";
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  margin-left: 7px;
  border-radius: 999px;
  background: #dcfce7;
  color: #16805f;
  font-size: 11px;
  font-weight: 900;
}

.auto-agent-dots {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-width: 23px;
  vertical-align: middle;
}

.auto-agent-dots i {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: #55a7ff;
  box-shadow: 0 0 0 3px rgba(85, 167, 255, 0.08);
  animation: agent-dot-jump 0.92s ease-in-out infinite;
}

.auto-agent-dots i:nth-child(2) {
  animation-delay: 0.14s;
}

.auto-agent-dots i:nth-child(3) {
  animation-delay: 0.28s;
}

.auto-agent-msg.user p {
  background: #55a7ff;
  color: #fff;
}

.auto-agent-msg.ok p {
  background: #ecfdf3;
  color: #16805f;
}

.auto-agent-msg.error p {
  background: #fff1f2;
  color: #d93d32;
}

.auto-agent-confirm {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(85, 167, 255, 0.16);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 250, 255, 0.92));
  box-shadow: 0 12px 26px rgba(85, 167, 255, 0.08);
}

.auto-agent-confirm.hidden {
  display: none;
}

.auto-agent-confirm-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.auto-agent-confirm-head span {
  color: #55a7ff;
  font-size: 13px;
  font-weight: 800;
}

.auto-agent-confirm-head strong {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(85, 167, 255, 0.08);
  color: #55a7ff;
  font-size: 11px;
  font-weight: 800;
}

.auto-agent-plan-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.auto-agent-plan-meta span {
  min-width: 0;
  padding: 8px 9px;
  border-radius: 12px;
  background: #fff;
  color: #475467;
  font-size: 11px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auto-agent-asset-choices {
  display: grid;
  gap: 7px;
}

.auto-agent-asset-choices.hidden {
  display: none;
}

.auto-agent-asset-choice {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(218, 226, 238, 0.82);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.86);
}

.auto-agent-asset-choice > span {
  color: #55a7ff;
  font-size: 12px;
  font-weight: 800;
}

.auto-agent-asset-choice select {
  min-width: 0;
  min-height: 34px;
  border: 0;
  border-radius: 10px;
  background: #f5f8fc;
  color: #101828;
  font-size: 12px;
  font-weight: 700;
}

.auto-agent-prompt-editor {
  display: grid;
  gap: 6px;
}

.auto-agent-prompt-editor span {
  color: #667085;
  font-size: 12px;
  font-weight: 700;
}

.auto-agent-prompt-editor textarea {
  width: 100%;
  min-height: 98px;
  resize: vertical;
  border-radius: 14px;
  background: #fff;
  font-size: 13px;
  line-height: 1.55;
}

.auto-agent-confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 8px;
}

.auto-agent-confirm-actions button {
  min-height: 40px;
  border-radius: 13px;
  font-size: 13px;
  font-weight: 800;
}

.auto-agent-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "input"
    "voice";
  align-items: center;
  justify-items: center;
  gap: 18px;
  padding-bottom: 24px;
}

.auto-agent-overlay.auto-agent-has-draft .auto-agent-input {
  display: none;
}

.auto-agent-input textarea {
  grid-area: input;
  min-height: 56px;
  max-height: 138px;
  border: 1px solid rgba(196, 207, 222, 0.92);
  border-radius: 14px;
  background: #f6f8fc;
  font-size: 13px;
  line-height: 1.45;
  resize: none;
  overflow-y: hidden;
  padding: 10px 12px;
}

.auto-agent-input textarea.is-scrollable {
  overflow-y: auto;
}

.auto-agent-input button {
  min-height: 56px;
  border-radius: 14px;
  background: #55a7ff;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
}

.voice-input-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  border: 1px solid rgba(85, 167, 255, 0.24) !important;
  border-radius: 999px;
  background: rgba(85, 167, 255, 0.1) !important;
  color: #55a7ff !important;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  box-shadow: 0 8px 20px rgba(85, 167, 255, 0.12);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.voice-input-button.listening {
  background: #55a7ff !important;
  color: #fff !important;
  animation: mic-listening-pulse 1.05s ease-in-out infinite;
}

.auto-agent-voice-btn {
  grid-area: voice;
  gap: 6px;
  min-width: 168px;
  width: 168px;
  min-height: 48px !important;
  height: 48px;
  padding: 0 18px;
  overflow: hidden;
  justify-self: center;
  margin-top: 92px;
  margin-bottom: 2px;
  background: linear-gradient(135deg, #55a7ff 0%, #7aa7ff 100%) !important;
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.48) !important;
  box-shadow: 0 10px 22px rgba(85, 167, 255, 0.24);
  transform: translateZ(0);
  transition: transform 150ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.auto-agent-inline-actions {
  display: flex;
  justify-content: center;
  margin-top: -4px;
}

.auto-agent-inline-actions.hidden {
  display: none;
}

.auto-agent-inline-actions button {
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(242, 244, 247, 0.92);
  color: #667085;
  font-size: 11px;
  font-weight: 760;
}

.auto-agent-voice-btn .voice-mic-label {
  font-size: 14px;
  font-weight: 900;
  opacity: 0.95;
}

.auto-agent-voice-btn strong {
  display: none;
}

.auto-agent-voice-btn.pressing {
  transform: scale(0.98);
  filter: brightness(1.03);
}

.auto-agent-voice-btn.listening {
  transform: scale(0.97);
}

.auto-voice-wave-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 54px;
  margin: 2px auto 8px;
  padding: 10px 18px;
  width: min(210px, 76%);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(248, 251, 255, 0.96), rgba(239, 246, 255, 0.88));
  border: 1px solid rgba(11, 94, 215, 0.12);
  box-shadow: 0 14px 34px rgba(11, 94, 215, 0.12);
}

.auto-voice-wave-panel.hidden {
  display: none;
}

.auto-voice-wave-panel span {
  display: block;
  width: 5px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(180deg, #0b5ed7, #5aa7ff);
  animation: agent-voice-wave 820ms ease-in-out infinite;
}

.auto-voice-wave-panel span:nth-child(2) {
  animation-delay: 80ms;
}

.auto-voice-wave-panel span:nth-child(3) {
  animation-delay: 160ms;
}

.auto-voice-wave-panel span:nth-child(4) {
  animation-delay: 240ms;
}

.auto-voice-wave-panel span:nth-child(5) {
  animation-delay: 320ms;
}

.auto-voice-wave-panel span:nth-child(6) {
  animation-delay: 400ms;
}

.auto-voice-wave-panel span:nth-child(7) {
  animation-delay: 480ms;
}

.voice-wave {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 28px;
  height: 20px;
  opacity: 0.9;
}

.voice-wave i {
  display: block;
  width: 3px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
  transform-origin: 50% 50%;
  opacity: 0.72;
}

.voice-input-button.listening .voice-wave i {
  animation: voice-wave-bar 760ms ease-in-out infinite;
}

.voice-input-button.listening .voice-wave i:nth-child(2) {
  animation-delay: 90ms;
}

.voice-input-button.listening .voice-wave i:nth-child(3) {
  animation-delay: 180ms;
}

.voice-input-button.listening .voice-wave i:nth-child(4) {
  animation-delay: 270ms;
}

.voice-input-button.listening .voice-wave i:nth-child(5) {
  animation-delay: 360ms;
}

.manual-prompt-voice {
  position: absolute;
  right: 126px;
  bottom: 10px;
  min-width: 38px;
  min-height: 36px;
}

.works-switch {
  height: 44px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  margin-bottom: 12px;
  border-radius: 16px;
  background: var(--surface-soft);
  transform: translateY(var(--works-pull-offset, 0px));
  transition: transform 280ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 180ms ease;
  will-change: transform;
}

#worksView.works-pull-visual .works-switch {
  transition: none;
  border-color: transparent;
  box-shadow: none;
}

#worksView.works-pull-ready .works-switch {
  border-color: transparent;
  box-shadow: none;
}

.works-switch button {
  border-radius: 13px;
  background: transparent;
  color: var(--muted);
  font-weight: 760;
}

.works-switch button.active {
  background: var(--surface);
  color: var(--brand);
  box-shadow: 0 6px 18px rgba(17, 24, 39, 0.06);
}

.works-section {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.compact-title {
  margin-bottom: 0;
  padding: 0 2px;
}

.work-card {
  display: grid;
  gap: 11px;
}

.work-title {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  flex-wrap: nowrap;
}

.work-author {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.work-author strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.2;
  font-weight: 760;
}

.work-author img,
.work-author span {
  flex: 0 0 45px;
  width: 45px;
  height: 45px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  object-fit: cover;
  background: var(--brand);
  color: #fff;
  font-size: 16px;
  font-weight: 900;
}

.work-title > small {
  flex: 0 0 auto;
  white-space: nowrap;
  font-size: 11px;
  color: var(--muted);
}

.work-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.work-card p,
.work-card code {
  overflow-wrap: anywhere;
}

.work-prompt {
  display: grid;
  gap: 7px;
}

.work-prompt summary {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--text);
  line-height: 1.35;
  font-size: 14px;
  list-style: none;
  -webkit-tap-highlight-color: transparent;
}

.work-prompt summary::-webkit-details-marker {
  display: none;
}

.work-prompt summary span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.work-prompt summary small {
  min-width: 34px;
  color: var(--brand);
  font-size: 0;
  font-weight: 760;
  text-align: right;
  white-space: nowrap;
}

.work-prompt summary small::after {
  content: "展开";
  font-size: 12px;
}

.work-prompt[open] summary small::after {
  content: "收起";
}

.work-prompt p {
  margin: 0;
  padding: 10px;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.work-card code {
  color: var(--brand);
  font-size: 12px;
}

.work-card img,
.work-card video {
  width: 100%;
  aspect-ratio: 9 / 16;
  max-height: 460px;
  object-fit: cover;
  border-radius: 8px;
  background: #000;
}

.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  max-height: 460px;
  overflow: hidden;
  border-radius: 8px;
  background: #000;
}

.work-card .video-frame img,
.work-card .video-frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-height: none;
  aspect-ratio: auto;
  border-radius: 0;
  object-fit: cover;
  background: #000;
}

.work-card .video-frame video {
  z-index: 0;
  opacity: 0;
  pointer-events: none;
}

.work-card .video-frame .video-cover {
  z-index: 1;
  opacity: 1;
  transition: opacity 140ms ease-out;
  will-change: opacity;
  background: linear-gradient(135deg, #eef6ff 0%, #f6f7fb 48%, #e9edff 100%);
}

.video-frame.video-loading video {
  opacity: 0;
}

.video-frame.video-visible video,
.video-frame.playing video {
  opacity: 1;
  pointer-events: auto;
}

.video-frame.video-visible .video-cover,
.video-frame.playing.video-visible .video-cover {
  opacity: 0;
  pointer-events: none;
}

.video-frame.video-loading .video-cover,
.video-frame.video-buffering:not(.video-visible) .video-cover,
.video-frame.playing:not(.video-visible) .video-cover {
  opacity: 1;
  pointer-events: auto;
}

.video-frame.playing .video-play {
  display: none;
}

.video-frame.video-loading .video-play,
.video-frame.video-buffering .video-play {
  opacity: 0;
  pointer-events: none;
}

.result-video {
  pointer-events: none;
}

.video-frame.cover-failed .video-cover {
  opacity: 1;
}

.video-play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 58px;
  height: 58px;
  min-height: 58px;
  padding: 0;
  transform: translate(-50%, -50%);
  border: 0;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.72);
  color: #fff;
  font-size: 14px;
  font-weight: 780;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(8px);
}

.video-pause-indicator {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  display: none;
  width: 56px;
  height: 56px;
  min-height: 56px;
  padding: 0;
  transform: translate(-50%, -50%);
  border: 0;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.72);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.2);
  backdrop-filter: blur(8px);
}

.video-pause-indicator::before,
.video-pause-indicator::after {
  content: "";
  position: absolute;
  top: 17px;
  width: 7px;
  height: 22px;
  border-radius: 3px;
  background: #fff;
}

.video-pause-indicator::before {
  left: 19px;
}

.video-pause-indicator::after {
  right: 19px;
}

.video-frame.video-paused .video-pause-indicator {
  display: block;
}

.video-subtitle-overlay {
  position: absolute;
  left: 50%;
  bottom: 52px;
  z-index: 4;
  max-width: min(86%, 360px);
  padding: 7px 12px;
  transform: translateX(-50%);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.58);
  color: #fff;
  font-size: 15px;
  font-weight: 760;
  line-height: 1.35;
  text-align: center;
  letter-spacing: 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.42);
  pointer-events: none;
  backdrop-filter: blur(8px);
}

.video-subtitle-overlay.hidden {
  display: none;
}

.social-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(54px, 1fr));
  gap: 6px;
}

.social-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 34px;
  padding: 0 6px;
  border-radius: 999px;
  border: 1px solid rgba(232, 236, 242, 0.9);
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
  text-decoration: none;
}

.social-stat {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 34px;
  padding: 0 6px;
  border-radius: 999px;
  background: #f4f7fb;
  color: #64748b;
  font-size: 12px;
  font-weight: 720;
  white-space: nowrap;
}

.social-button b,
.social-stat b {
  font: inherit;
}

.social-icon {
  width: 15px;
  height: 15px;
  display: inline-block;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.social-icon-wechat {
  fill: currentColor;
  stroke: none;
}

.social-icon-timeline {
  stroke-width: 1.6;
}

.social-button.active {
  color: var(--brand);
  background: #eef4ff;
  border-color: rgba(85, 167, 255, 0.28);
}

.comment-list {
  display: grid;
  gap: 6px;
}

.comment-list p {
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
}

.comment-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.comment-form input {
  min-height: 40px;
  border-radius: 999px;
}

.comment-form button {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-weight: 760;
}

.wallet-card {
  display: grid;
  gap: 9px;
  margin-bottom: 12px;
}

.wallet-card small {
  color: var(--brand);
  font-weight: 760;
}

#billingStatus {
  display: none;
}

.plan-list {
  display: grid;
  gap: 10px;
}

.ledger-list {
  display: grid;
  gap: 8px;
  max-height: 360px;
  overflow-y: auto;
}

.ledger-item {
  min-height: 56px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--surface-soft);
}

.ledger-item div {
  min-width: 0;
}

.ledger-item strong,
.ledger-item small {
  display: block;
}

.ledger-item small {
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.ledger-amount {
  text-align: right;
  white-space: nowrap;
}

.ledger-amount.income strong {
  color: var(--ok);
}

.ledger-amount.expense strong {
  color: var(--danger);
}

.empty-state.compact {
  min-height: 58px;
}

.model-options {
  display: grid;
  gap: 10px;
}

.recharge-plans {
  display: grid;
  gap: 8px;
}

.pricing-list {
  display: none;
}

.gold-balance-line {
  min-height: 48px;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 0;
  border-radius: 8px;
  background: #fff7df;
  color: #7a4d00;
  text-align: left;
  cursor: pointer;
}

.gold-balance-line::after {
  content: "兑换";
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(255, 184, 0, 0.16);
  color: #9a6a00;
  font-size: 12px;
  font-weight: 760;
}

.gold-balance-line span {
  color: #9a6a00;
  font-size: 13px;
}

.gold-balance-line strong {
  font-size: 18px;
  font-weight: 780;
}

.gold-convert-open {
  overflow: hidden;
}

.gold-convert-sheet {
  position: fixed;
  inset: 0;
  z-index: 83;
  display: grid;
  align-items: start;
  justify-items: center;
  padding: calc(82px + env(safe-area-inset-top, 0px)) 14px 18px;
}

.gold-convert-sheet.hidden {
  display: none;
}

.gold-convert-mask {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(4px);
}

.gold-convert-card {
  position: relative;
  z-index: 1;
  width: min(100%, 390px);
  display: grid;
  gap: 13px;
  padding: 17px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.26);
  animation: recharge-sheet-in 0.18s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.gold-convert-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.gold-convert-head div {
  display: grid;
  gap: 4px;
}

.gold-convert-head strong {
  color: #101828;
  font-size: 18px;
  font-weight: 500;
}

.gold-convert-head small {
  color: #667085;
  font-size: 12px;
}

.gold-convert-head button {
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border-radius: 999px;
  background: #f3f6fb;
  color: #475467;
  font-size: 22px;
  line-height: 1;
}

.gold-convert-rate {
  min-height: 92px;
  display: grid;
  gap: 8px;
  align-content: center;
  padding: 14px;
  border-radius: 16px;
  background:
    radial-gradient(circle at 88% 18%, rgba(255, 214, 92, 0.36), transparent 34%),
    linear-gradient(135deg, #fff8e8, #f6fbff);
}

.gold-convert-rate span {
  color: #9a6a00;
  font-size: 14px;
  font-weight: 760;
}

.gold-convert-rate strong {
  color: #101828;
  font-size: 24px;
  font-weight: 500;
}

.gold-convert-card .convert-gold-button {
  width: 100%;
  min-height: 48px;
  border-radius: 14px;
}

.reward-limit-hint {
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.retry-panel {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 10px 0 4px;
  padding: 9px 10px;
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 8px;
  background: #fff8e8;
}

.retry-panel small {
  min-width: 0;
  color: #7a4d00;
  font-size: 12px;
  line-height: 1.3;
}

.retry-submit-button {
  min-height: 34px;
  white-space: nowrap;
}

.reward-task-summary {
  display: grid;
  gap: 7px;
  padding: 10px 12px;
  border: 1px solid rgba(232, 236, 242, 0.95);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.reward-task-summary:empty {
  display: none;
}

.task-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.reward-task-summary strong {
  color: var(--ink);
  font-size: 13px;
}

.reward-task-summary p {
  margin: 0;
  color: #475569;
  font-size: 12px;
  line-height: 1.45;
}

.task-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.task-summary-grid span {
  min-width: 0;
  padding: 7px 6px;
  border-radius: 8px;
  background: #f4f7fb;
  color: #64748b;
  font-size: 11px;
  line-height: 1.25;
  text-align: center;
}

.task-summary-grid b {
  display: block;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.1;
}

.task-meter {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8edf5;
}

.task-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #55a7ff 0%, #14b8a6 100%);
}

.task-meter.gold span {
  background: linear-gradient(90deg, #f59e0b 0%, #22c55e 100%);
}

.convert-gold-button {
  min-height: 42px;
  border-radius: 8px;
  background: #1f2937;
  color: #fff;
  font-weight: 760;
}

.account-ad-slot {
  margin-bottom: 12px;
}

.reward-task-list {
  display: grid;
  gap: 9px;
}

.reward-task-card {
  display: grid;
  gap: 9px;
  padding: 11px;
  border: 1px solid #e7edf5;
  border-radius: 8px;
  background: #fff;
}

.reward-task-card.done,
.reward-task-card.locked {
  background: #f8fafc;
}

.reward-task-top,
.reward-task-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.reward-task-top > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.reward-task-top strong {
  font-size: 14px;
  line-height: 1.25;
}

.reward-task-top small,
.reward-task-bottom small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.reward-task-tags {
  flex: 0 0 auto;
  display: grid;
  justify-items: end;
  gap: 4px;
}

.reward-task-tags span {
  padding: 3px 7px;
  border-radius: 999px;
  background: #eef6ff;
  color: #55a7ff;
  font-size: 11px;
  font-weight: 760;
}

.reward-task-card.done .reward-task-tags span,
.reward-task-card.locked .reward-task-tags span {
  background: #edf2f7;
  color: #64748b;
}

.reward-task-tags em {
  color: #0f766e;
  font-size: 12px;
  font-style: normal;
  font-weight: 760;
}

.reward-task-bottom button {
  min-width: 68px;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 12px;
  font-weight: 760;
}

.reward-task-bottom button:disabled {
  background: #d8dee8;
  color: #64748b;
}

.ledger-panel {
  display: grid;
  gap: 10px;
}

.ledger-filters {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.ledger-filters::-webkit-scrollbar {
  display: none;
}

.ledger-filters button {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid #e5ebf3;
  border-radius: 999px;
  background: #fff;
  color: #64748b;
  font-size: 12px;
  font-weight: 740;
}

.ledger-filters button.active {
  border-color: rgba(85, 167, 255, 0.25);
  background: #eef6ff;
  color: #55a7ff;
}

.ad-card {
  display: grid;
  gap: 9px;
  padding: 13px;
  border: 1px solid #e7edf5;
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff 0%, #f7fbff 100%);
  box-shadow: var(--card-shadow);
}

.ad-media {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 58%;
  border-radius: 8px;
  background: #f6f1e8;
  border: 1px solid rgba(159, 104, 36, 0.16);
}

.ad-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ad-highlights span {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  background: #fff7e8;
  color: #8a4b1d;
  font-size: 11px;
  font-weight: 720;
  border: 1px solid rgba(159, 104, 36, 0.16);
}

.ad-card-reward {
  cursor: pointer;
  touch-action: manipulation;
}

.ad-card-reward:active {
  transform: scale(0.992);
}

.ad-card-reward:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.ad-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ad-label-row span {
  min-width: 38px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #d6e3f4;
  border-radius: 999px;
  color: #3f6f9f;
  font-size: 11px;
}

.ad-label-row small,
.ad-card p {
  color: var(--muted);
}

.ad-card strong {
  font-size: 16px;
  line-height: 1.3;
  font-weight: 780;
}

.ad-card p {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
}

.ad-cta {
  justify-self: start;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 13px;
  font-weight: 760;
}

.daan-brand-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  color: #25140b;
}

.daan-brand-overlay.hidden {
  display: none;
}

.daan-brand-open {
  overflow: hidden;
}

.daan-brand-mask {
  position: absolute;
  inset: 0;
  background: rgba(12, 9, 6, 0.58);
}

.daan-brand-sheet {
  position: relative;
  z-index: 1;
  width: min(100%, 460px);
  max-height: 92vh;
  overflow-y: auto;
  border-radius: 22px 22px 0 0;
  background: #fffaf2;
  box-shadow: 0 -18px 44px rgba(20, 12, 7, 0.26);
}

.daan-brand-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(25, 18, 12, 0.62);
  color: #fff;
  font-size: 24px;
  line-height: 1;
}

.daan-brand-hero {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 58%;
  display: block;
  background: #f6f1e8;
}

.daan-brand-content {
  display: grid;
  gap: 12px;
  padding: 17px 16px calc(22px + env(safe-area-inset-bottom));
}

.daan-brand-content small {
  color: #9a6a34;
  font-size: 12px;
  font-weight: 760;
}

.daan-brand-content h3 {
  margin: 0;
  font-size: 24px;
  line-height: 1.18;
  color: #4a1f12;
}

.daan-brand-content p {
  margin: 0;
  color: #5f4128;
  font-size: 14px;
  line-height: 1.68;
}

.daan-brand-points {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.daan-brand-points span {
  min-height: 42px;
  display: flex;
  align-items: center;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fff3dd;
  color: #753911;
  font-size: 12px;
  font-weight: 760;
  border: 1px solid rgba(159, 104, 36, 0.18);
}

.daan-brand-content strong {
  color: #8a2f18;
  font-size: 12px;
}

.pricing-item,
.recharge-plan {
  min-height: 56px;
  display: grid;
  gap: 4px;
  padding: 11px 12px;
  border-radius: 8px;
  background: var(--surface-soft);
}

.pricing-item small,
.recharge-plan small,
.payment-box small {
  color: var(--muted);
}

.recharge-plans {
  position: relative;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px solid rgba(232, 236, 242, 0.9);
  transition: box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.recharge-plans.recharge-highlight {
  border-color: rgba(85, 167, 255, 0.35);
  background: #f4f8ff;
  box-shadow: 0 0 0 4px rgba(85, 167, 255, 0.12);
}

.recharge-plan {
  border: 1px solid transparent;
  color: var(--text);
  text-align: left;
}

.payment-box {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 8px;
  background: var(--surface-soft);
}

.payment-title {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.payment-close,
.payment-cancel {
  min-height: 34px;
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  font-size: 13px;
  font-weight: 720;
  border: 1px solid rgba(232, 236, 242, 0.9);
}

.payment-close {
  padding: 0 12px;
}

.payment-cancel {
  width: 100%;
}

.payment-box img {
  justify-self: center;
  width: 180px;
  height: 180px;
  border-radius: 10px;
  background: #fff;
}

.model-option {
  min-height: 64px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: var(--surface-soft);
}

.model-option input {
  width: 20px;
  min-height: 20px;
  accent-color: var(--brand);
}

.model-option span {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.model-option strong {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.model-option em {
  flex: 0 0 auto;
  color: var(--brand);
  font-size: 12px;
  font-style: normal;
  font-weight: 760;
  white-space: nowrap;
}

.model-option small {
  color: var(--muted);
  line-height: 1.35;
}

.model-option:has(input:checked) {
  border-color: var(--brand);
  background: #eef4ff;
}

.account-fold {
  padding: 0;
  overflow: hidden;
}

.account-fold summary {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 15px;
  cursor: pointer;
  list-style: none;
}

.account-fold summary::-webkit-details-marker {
  display: none;
}

.account-fold summary h3 {
  color: var(--brand);
}

.account-fold summary span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 680;
}

.account-fold[open] summary {
  border-bottom: 1px solid rgba(232, 236, 242, 0.9);
}

.account-fold[open] summary .fold-arrow {
  color: var(--brand);
}

.account-fold[open] summary .fold-arrow::before {
  content: "收起";
  font-size: 13px;
}

.account-fold[open] summary .fold-arrow {
  font-size: 0;
}

.account-fold[open] summary .fold-icon {
  color: var(--muted);
  font-size: 18px;
}

.account-fold[open] summary .fold-icon::before {
  content: none;
}

.fold-content {
  padding: 12px 14px 14px;
}

.reward-panel {
  display: grid;
  gap: 8px;
}

.reward-primary-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.reward-action {
  min-height: 58px;
  display: grid;
  gap: 3px;
  align-content: center;
  justify-items: start;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--text);
}

.reward-action strong {
  color: var(--brand);
  font-weight: 760;
}

.reward-action small {
  color: var(--muted);
  font-weight: 680;
}

.reward-video-box {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
}

.reward-video-screen {
  min-height: 116px;
  display: grid;
  place-items: center;
  gap: 6px;
  border-radius: 8px;
  background: #111827;
  color: #fff;
}

.reward-video-screen span {
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
}

.reward-video-screen strong {
  font-size: 32px;
}

.reward-progress {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-soft);
}

.reward-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
  transition: width 0.2s ease;
}

.reward-ad-open {
  overflow: hidden;
}

.reward-ad-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  background: #080b12;
  color: #fff;
}

.reward-ad-overlay.hidden {
  display: none;
}

.reward-ad-overlay.red-packet-mode .reward-ad-shell {
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 229, 138, 0.24), transparent 30%),
    linear-gradient(180deg, #b81722 0%, #7f1018 58%, #22060a 100%);
}

.reward-ad-shell {
  position: relative;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  padding: max(18px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom));
  background: #080b12;
  overflow: hidden;
}

.reward-ad-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #080b12;
}

.reward-ad-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 11, 18, 0.2) 0%, rgba(8, 11, 18, 0.12) 38%, rgba(8, 11, 18, 0.92) 100%);
}

.reward-ad-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.reward-ad-media img.hidden {
  display: none;
}

.reward-ad-shell > :not(.reward-ad-media) {
  position: relative;
  z-index: 1;
}

.reward-ad-top,
.reward-ad-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.reward-ad-top span {
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.86);
  font-size: 12px;
  font-weight: 760;
}

.reward-ad-top strong {
  min-width: 54px;
  text-align: right;
  color: #fff;
  font-size: 18px;
  font-weight: 900;
}

.reward-ad-creative {
  display: grid;
  align-content: center;
  gap: 16px;
  padding: 28px 2px;
  align-self: end;
}

.reward-ad-creative small {
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 760;
}

.reward-ad-creative h3 {
  margin: 0;
  color: #fff;
  font-size: clamp(30px, 9vw, 48px);
  line-height: 1.08;
  font-weight: 900;
}

.reward-ad-creative p {
  max-width: 28em;
  margin: 0;
  color: rgba(255, 255, 255, 0.74);
  font-size: 16px;
  line-height: 1.65;
}

.reward-ad-bottom {
  padding-top: 16px;
}

.reward-ad-bottom > div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.reward-ad-bottom strong {
  color: #fff;
  font-size: 15px;
  font-weight: 850;
}

.reward-ad-bottom span {
  color: #ffcf66;
  font-size: 13px;
  font-weight: 850;
}

.reward-ad-bottom button {
  flex: 0 0 auto;
  min-width: 82px;
  min-height: 42px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #111827;
  font-weight: 850;
}

.reward-ad-bottom button:disabled {
  background: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.52);
}

.reward-ad-progress {
  margin-top: 18px;
  background: rgba(255, 255, 255, 0.14);
}

.gold-reward-celebration {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  padding: 24px;
  overflow: hidden;
  background: rgba(8, 11, 18, 0.9);
  text-align: center;
}

.gold-reward-celebration.hidden {
  display: none;
}

.gold-shine {
  position: absolute;
  left: 50%;
  top: 44%;
  width: 170px;
  height: 170px;
  border-radius: 999px;
  transform: translate(-50%, -50%);
  box-shadow:
    0 0 42px rgba(255, 214, 92, 0.5),
    0 0 120px rgba(255, 176, 30, 0.34);
  opacity: 0;
}

.gold-coin-rain {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.gold-coin-rain span,
.gold-pile i {
  display: block;
  width: 28px;
  height: 28px;
  border: 2px solid #ffe48a;
  border-radius: 999px;
  background: #f7b825;
  box-shadow:
    inset 0 -4px 0 rgba(152, 88, 8, 0.28),
    inset 0 3px 0 rgba(255, 255, 255, 0.42),
    0 8px 18px rgba(255, 184, 37, 0.26);
}

.gold-coin-rain span {
  position: absolute;
  top: -46px;
  opacity: 0;
}

.gold-coin-rain span::after,
.gold-pile i::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 8px;
  height: 14px;
  border-radius: 999px;
  border: 2px solid rgba(151, 90, 12, 0.42);
  transform: translate(-50%, -50%);
}

.gold-coin-rain span:nth-child(1) { left: 11%; animation-delay: 0.04s; }
.gold-coin-rain span:nth-child(2) { left: 24%; animation-delay: 0.18s; }
.gold-coin-rain span:nth-child(3) { left: 37%; animation-delay: 0.1s; }
.gold-coin-rain span:nth-child(4) { left: 51%; animation-delay: 0.26s; }
.gold-coin-rain span:nth-child(5) { left: 66%; animation-delay: 0.12s; }
.gold-coin-rain span:nth-child(6) { left: 79%; animation-delay: 0.3s; }
.gold-coin-rain span:nth-child(7) { left: 18%; animation-delay: 0.42s; }
.gold-coin-rain span:nth-child(8) { left: 45%; animation-delay: 0.48s; }
.gold-coin-rain span:nth-child(9) { left: 71%; animation-delay: 0.5s; }
.gold-coin-rain span:nth-child(10) { left: 88%; animation-delay: 0.38s; }

.gold-pile {
  position: relative;
  width: min(240px, 72vw);
  height: 118px;
  margin-top: 16px;
}

.gold-pile i {
  position: absolute;
  opacity: 0;
}

.gold-pile i:nth-child(1) { left: 21%; bottom: 0; width: 54px; height: 54px; }
.gold-pile i:nth-child(2) { left: 39%; bottom: 3px; width: 62px; height: 62px; }
.gold-pile i:nth-child(3) { left: 57%; bottom: 0; width: 50px; height: 50px; }
.gold-pile i:nth-child(4) { left: 31%; bottom: 38px; width: 46px; height: 46px; }
.gold-pile i:nth-child(5) { left: 50%; bottom: 45px; width: 48px; height: 48px; }
.gold-pile i:nth-child(6) { left: 15%; bottom: 28px; width: 42px; height: 42px; }
.gold-pile i:nth-child(7) { left: 67%; bottom: 30px; width: 42px; height: 42px; }
.gold-pile i:nth-child(8) { left: 42%; bottom: 78px; width: 38px; height: 38px; }

.red-envelope {
  position: relative;
  z-index: 1;
  display: none;
  width: 178px;
  height: 136px;
  margin-top: 12px;
  border-radius: 18px 18px 24px 24px;
  background: linear-gradient(180deg, #f3423d 0%, #b70f1a 100%);
  box-shadow: inset 0 -10px 0 rgba(100, 8, 18, 0.24), 0 18px 50px rgba(175, 14, 26, 0.42);
}

.red-envelope::before {
  content: "";
  position: absolute;
  inset: 0;
  clip-path: polygon(0 0, 50% 52%, 100% 0, 100% 100%, 0 100%);
  background: linear-gradient(180deg, rgba(255, 208, 83, 0.26), rgba(255, 255, 255, 0));
}

.red-envelope span {
  position: absolute;
  left: 50%;
  top: -18px;
  width: 126px;
  height: 58px;
  border-radius: 18px 18px 8px 8px;
  background: linear-gradient(180deg, #ff645d, #d91422);
  transform: translateX(-50%);
  transform-origin: 50% 100%;
  box-shadow: 0 12px 22px rgba(86, 6, 14, 0.18);
}

.red-envelope i {
  position: absolute;
  left: 50%;
  top: 42px;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffe18a, #f4ad22);
  transform: translateX(-50%);
  box-shadow: inset 0 -5px 0 rgba(145, 82, 7, 0.22);
}

.red-envelope i::after {
  content: "开";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #8a1c0d;
  font-size: 24px;
  font-style: normal;
  font-weight: 900;
}

.reward-ad-overlay.red-packet-mode .gold-pile {
  display: none;
}

.reward-ad-overlay.red-packet-mode .red-envelope {
  display: block;
}

.gold-reward-celebration strong {
  position: relative;
  z-index: 1;
  color: #ffe48a;
  font-size: 42px;
  line-height: 1;
  font-weight: 900;
  text-shadow: 0 8px 28px rgba(247, 184, 37, 0.42);
  opacity: 0;
}

.gold-reward-celebration p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 16px;
  font-weight: 760;
  opacity: 0;
}

.gold-reward-celebration.celebrating .gold-shine {
  animation: gold-shine-pop 1.55s ease both;
}

.gold-reward-celebration.celebrating .gold-coin-rain span {
  animation: gold-coin-fall 1.45s cubic-bezier(0.16, 0.9, 0.34, 1) both;
}

.gold-reward-celebration.celebrating .gold-pile i {
  animation: gold-pile-pop 0.72s cubic-bezier(0.18, 1.35, 0.36, 1) both;
}

.reward-ad-overlay.red-packet-mode .gold-reward-celebration.celebrating .red-envelope {
  animation: red-envelope-pop 0.78s cubic-bezier(0.18, 1.35, 0.36, 1) both;
}

.reward-ad-overlay.red-packet-mode .gold-reward-celebration.celebrating .red-envelope span {
  animation: red-envelope-open 0.86s 0.18s cubic-bezier(0.18, 1.2, 0.38, 1) both;
}

.gold-reward-celebration.celebrating .gold-pile i:nth-child(2) { animation-delay: 0.04s; }
.gold-reward-celebration.celebrating .gold-pile i:nth-child(3) { animation-delay: 0.08s; }
.gold-reward-celebration.celebrating .gold-pile i:nth-child(4) { animation-delay: 0.12s; }
.gold-reward-celebration.celebrating .gold-pile i:nth-child(5) { animation-delay: 0.16s; }
.gold-reward-celebration.celebrating .gold-pile i:nth-child(6) { animation-delay: 0.1s; }
.gold-reward-celebration.celebrating .gold-pile i:nth-child(7) { animation-delay: 0.14s; }
.gold-reward-celebration.celebrating .gold-pile i:nth-child(8) { animation-delay: 0.22s; }

.gold-reward-celebration.celebrating strong {
  animation: gold-amount-pop 0.78s 0.28s cubic-bezier(0.18, 1.28, 0.38, 1) both;
}

.gold-reward-celebration.celebrating p {
  animation: gold-copy-rise 0.58s 0.46s ease both;
}

@keyframes gold-shine-pop {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.58);
  }
  32% {
    opacity: 1;
  }
  100% {
    opacity: 0.72;
    transform: translate(-50%, -50%) scale(1.32);
  }
}

@keyframes gold-coin-fall {
  0% {
    opacity: 0;
    transform: translateY(-20px) rotate(-24deg) scale(0.7);
  }
  14% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(74vh) rotate(240deg) scale(1);
  }
}

@keyframes gold-pile-pop {
  0% {
    opacity: 0;
    transform: translateY(26px) scale(0.72);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes red-envelope-pop {
  0% {
    opacity: 0;
    transform: translateY(28px) scale(0.72);
  }
  58% {
    opacity: 1;
    transform: translateY(-5px) scale(1.05);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes red-envelope-open {
  0% {
    transform: translateX(-50%) rotateX(0deg);
  }
  100% {
    transform: translateX(-50%) rotateX(64deg) translateY(-10px);
  }
}

@keyframes gold-amount-pop {
  0% {
    opacity: 0;
    transform: translateY(18px) scale(0.7);
  }
  68% {
    opacity: 1;
    transform: translateY(-4px) scale(1.06);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes gold-copy-rise {
  0% {
    opacity: 0;
    transform: translateY(12px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.plan {
  min-height: 62px;
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 8px;
  background: var(--surface-soft);
}

.account-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.account-user {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 14px;
}

.account-user > div:last-child {
  min-width: 0;
}

.membership-card {
  position: relative;
  display: grid;
  gap: 12px;
  margin: 0 0 12px;
  padding: 16px;
  border: 1px solid rgba(85, 167, 255, 0.18);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(85, 167, 255, 0.12), rgba(255, 255, 255, 0.94) 46%),
    #fff;
  box-shadow: 0 18px 48px rgba(39, 91, 148, 0.1);
  overflow: hidden;
}

.membership-card::after {
  content: "";
  position: absolute;
  right: -34px;
  top: -42px;
  width: 132px;
  height: 132px;
  border-radius: 999px;
  background: rgba(85, 167, 255, 0.14);
  pointer-events: none;
}

.membership-card-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.membership-kicker {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(85, 167, 255, 0.12);
  color: var(--brand);
  font-size: 11px;
  font-weight: 850;
}

.membership-card h3 {
  margin: 8px 0 4px;
  color: #111827;
  font-size: 20px;
  line-height: 1.15;
}

.membership-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.membership-badge {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  min-width: 54px;
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eef3f8;
  color: #687386;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.membership-badge.active {
  background: linear-gradient(135deg, var(--brand), #7567ff);
  color: #fff;
}

.membership-daily {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(85, 167, 255, 0.14);
}

.membership-daily span,
.membership-daily small,
.membership-plan small,
.membership-plan-tags span {
  color: var(--muted);
  font-size: 11px;
}

.membership-daily strong {
  display: block;
  margin-top: 3px;
  color: #111827;
  font-size: 15px;
}

.membership-daily small {
  display: block;
  margin-top: 4px;
  line-height: 1.35;
}

.membership-daily button,
.membership-plan button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 12px;
  font-weight: 850;
}

.membership-daily button:disabled,
.membership-plan button:disabled {
  background: #dbe4ef;
  color: #8491a3;
}

.membership-plans {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.membership-plan {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(220, 228, 240, 0.92);
}

.membership-plan.current {
  border-color: rgba(85, 167, 255, 0.42);
  box-shadow: inset 0 0 0 1px rgba(85, 167, 255, 0.12);
}

.membership-plan span:first-child {
  display: inline-flex;
  width: fit-content;
  min-height: 20px;
  align-items: center;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(85, 167, 255, 0.1);
  color: var(--brand);
  font-size: 10px;
  font-weight: 900;
}

.membership-plan strong {
  display: block;
  margin: 7px 0 4px;
  color: #111827;
  font-size: 15px;
  line-height: 1.25;
}

.membership-plan-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.membership-plan-tags span {
  padding: 4px 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.04);
}

.membership-plan button {
  width: 100%;
}

.membership-confirm-sheet {
  position: fixed;
  inset: 0;
  z-index: 84;
  display: grid;
  align-items: start;
  justify-items: center;
  padding: calc(78px + env(safe-area-inset-top, 0px)) 14px 18px;
}

.membership-confirm-sheet.hidden {
  display: none;
}

.membership-confirm-mask {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(5px);
}

.membership-confirm-card {
  position: relative;
  z-index: 1;
  width: min(100%, 390px);
  display: grid;
  gap: 13px;
  padding: 17px;
  border: 1px solid rgba(85, 167, 255, 0.18);
  border-radius: 22px;
  background:
    radial-gradient(circle at 12% 0%, rgba(85, 167, 255, 0.16), transparent 34%),
    #fff;
  box-shadow: 0 22px 62px rgba(15, 23, 42, 0.24);
  animation: recharge-sheet-in 0.18s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.membership-confirm-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.membership-confirm-head div {
  display: grid;
  gap: 5px;
}

.membership-confirm-head span {
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(85, 167, 255, 0.1);
  color: var(--brand);
  font-size: 11px;
  font-weight: 850;
}

.membership-confirm-head strong {
  color: #101828;
  font-size: 18px;
  line-height: 1.25;
}

.membership-confirm-head button {
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border-radius: 999px;
  background: #f3f6fb;
  color: #475467;
  font-size: 22px;
}

.membership-confirm-details {
  display: grid;
  gap: 8px;
  padding: 13px;
  border-radius: 16px;
  background: rgba(85, 167, 255, 0.08);
  border: 1px solid rgba(85, 167, 255, 0.14);
}

.membership-confirm-details div {
  display: flex;
  align-items: center;
  gap: 9px;
}

.membership-confirm-details span {
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}

.membership-confirm-details strong {
  color: #111827;
  font-size: 16px;
}

.membership-confirm-details small {
  color: #667085;
  font-size: 12px;
  line-height: 1.45;
}

.membership-confirm-benefits {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.membership-confirm-benefits span {
  padding: 6px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.04);
  color: #475467;
  font-size: 12px;
}

.membership-confirm-cost {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  background: #f8fbff;
}

.membership-confirm-cost span {
  color: #667085;
  font-size: 12px;
}

.membership-confirm-cost span.warn {
  color: #d92d20;
  font-weight: 800;
}

.membership-confirm-cost strong {
  color: #111827;
  font-size: 17px;
  font-weight: 900;
}

.membership-confirm-actions {
  display: grid;
  grid-template-columns: 0.9fr 1.2fr;
  gap: 9px;
}

.membership-confirm-actions button {
  min-height: 46px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 850;
}

.membership-confirm-actions .ghost {
  background: #f3f6fb;
  color: #475467;
}

.membership-confirm-actions .primary {
  background: var(--brand);
  color: #fff;
}

.membership-confirm-actions .primary:disabled {
  background: #dbe4ef;
  color: #8491a3;
}

.recharge-shortcut {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--brand);
  color: white;
  font-size: 14px;
  font-weight: 760;
}

.recharge-shortcut:active {
  transform: scale(0.98);
}

.tabbar {
  position: fixed;
  left: 50%;
  right: auto;
  bottom: 0;
  transform: translate3d(-50%, 0, 0);
  width: min(100vw, var(--app-width));
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  background: rgba(255, 255, 255, 0.86);
  border-top: 1px solid rgba(232, 236, 242, 0.9);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  z-index: 80;
  contain: layout paint;
  will-change: transform;
}

.tab-item {
  min-height: 52px;
  border-radius: 18px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

.tab-item.active {
  background: #edf5ff;
  color: var(--brand);
}

.empty-state {
  min-height: 88px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: var(--surface-soft);
  border-radius: 8px;
}

.hidden {
  display: none !important;
}

#toast {
  position: fixed;
  left: 50%;
  bottom: calc(104px + env(safe-area-inset-bottom));
  transform: translate(-50%, 14px) scale(0.98);
  width: auto;
  max-width: min(calc(100vw - 28px), 390px);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
  border: 1px solid rgba(218, 225, 236, 0.95);
  border-radius: 999px;
  padding: 10px 16px 10px 12px;
  opacity: 0;
  transition: opacity 0.18s ease, transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 90;
  text-align: left;
  pointer-events: none;
  box-shadow: 0 14px 38px rgba(15, 23, 42, 0.16);
  backdrop-filter: blur(16px);
}

#toast strong {
  max-width: min(310px, calc(100vw - 98px));
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 800 !important;
  line-height: 1.25;
}

.toast-dot {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(85, 167, 255, 0.12);
  color: var(--brand);
}

.toast-dot::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 0 4px currentColor;
  opacity: 0.82;
}

#toast.success .toast-dot {
  background: rgba(85, 167, 255, 0.12);
  color: var(--brand);
}

#toast.error {
  border-color: rgba(217, 61, 50, 0.18);
  background: rgba(255, 250, 250, 0.98);
}

#toast.error .toast-dot {
  background: rgba(217, 61, 50, 0.1);
  color: var(--danger);
}

#toast.info .toast-dot {
  background: rgba(122, 132, 148, 0.12);
  color: var(--muted);
}

#toast.show {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

@media (max-width: 430px) {
  .phone-app {
    width: 100vw;
    box-shadow: none;
  }
}

/* ====== 底部导航栏图标 ====== */
.tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: 6px 0 4px;
  font-size: 10px;
  font-weight: 800;
  transition: color 0.2s ease;
}
.tab-item > span:not(.tab-icon) {
  font-size: 10px;
  line-height: 1.2;
  font-weight: 700;
}
.tab-icon {
  font-size: 20px;
  line-height: 1;
  margin-bottom: -2px;
  transition: transform 0.2s ease;
}
.tab-logo-icon {
  width: 48px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
  margin-top: -2px;
  margin-bottom: -2px;
}
.tab-logo-icon img {
  width: 46px;
  height: 32px;
  display: block;
  object-fit: contain;
}
.tab-item.active .tab-logo-icon {
  background: transparent;
  box-shadow: none;
}
.tab-graphic-icon {
  position: relative;
  width: 48px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #8a94a6;
  background: transparent;
  box-shadow: none;
  overflow: visible;
  margin-top: -2px;
  margin-bottom: -2px;
}
.tab-item.active .tab-graphic-icon {
  color: #5f78f3;
}
.tab-work-icon::before {
  content: "";
  width: 18px;
  height: 13px;
  display: block;
  border: 1.7px solid currentColor;
  border-radius: 5px;
  background: linear-gradient(135deg, rgba(85, 167, 255, 0.12), rgba(109, 85, 242, 0.08));
}
.tab-work-icon::after {
  content: "";
  position: absolute;
  left: 24px;
  top: 13px;
  width: 0;
  height: 0;
  border-top: 3.8px solid transparent;
  border-bottom: 3.8px solid transparent;
  border-left: 5.8px solid currentColor;
}
.tab-account-icon::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 50%;
  width: 8px;
  height: 8px;
  border: 1.7px solid currentColor;
  border-radius: 999px;
  transform: translateX(-50%);
  background: transparent;
}
.tab-account-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 9px;
  width: 20px;
  height: 9px;
  border: 1.7px solid currentColor;
  border-radius: 10px 10px 7px 7px;
  transform: translateX(-50%);
}
.tab-item.active .tab-icon {
  transform: scale(1.12);
}
.tab-item:active .tab-icon {
  transform: scale(0.9);
}

/* ====== 作品卡片优化 ====== */
.works-list { display: grid; gap: 14px; }
.works-load-more {
  min-height: 42px;
  border-radius: 14px;
  background: #eef5ff;
  color: #55a7ff;
  font-size: 13px;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(85, 167, 255, 0.12);
}
.work-card {
  padding: 14px;
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(15,23,42,0.04);
  border: 1px solid rgba(232,236,242,0.7);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.work-card:hover {
  box-shadow: 0 4px 16px rgba(15,23,42,0.06);
  border-color: rgba(23,105,255,0.12);
}
.work-author img, .work-author span {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  font-size: 14px;
}
.model-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f0f5ff, #e8f0fe);
  color: var(--brand);
  font-size: 11px;
  font-weight: 700;
  border: 1px solid rgba(23,105,255,0.15);
}
.work-card .error {
  padding: 8px 12px;
  border-radius: 8px;
  background: #fef2f2;
  color: #dc2626;
  font-size: 12px;
  line-height: 1.4;
  border: 1px solid #fee2e2;
}
.work-prompt summary:hover { color: var(--brand); }
.video-frame { cursor: pointer; }
.video-play { transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease; }
.video-play:hover {
  background: rgba(17,24,39,0.82);
  box-shadow: 0 16px 34px rgba(15,23,42,0.22);
  transform: translate(-50%,-50%) scale(1.06);
}
.video-play:active { transform: translate(-50%,-50%) scale(0.96); }
.work-card .video-frame video { transition: none; }
.social-bar { display: flex; flex-wrap: wrap; }
.social-button { transition: all 0.15s ease; cursor: pointer; }
.social-button:hover {
  border-color: rgba(23,105,255,0.2);
  background: #fafbff;
  color: var(--brand);
}
.social-button:active { transform: scale(0.97); }
.download-social { color: #059669; }
.download-social:hover {
  border-color: rgba(5,150,105,0.25);
  background: #ecfdf5;
  color: #059669;
}
.comment-list {
  padding-left: 2px;
  border-left: 2px solid rgba(23,105,255,0.15);
  margin-left: 4px;
  padding-left: 10px;
}
.comment-list p strong { color: var(--brand); font-weight: 720; margin-right: 4px; }
.comment-form input { transition: border-color 0.15s ease, box-shadow 0.15s ease; }
.comment-form input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(23,105,255,0.1);
  outline: none;
}
.comment-form button { transition: background 0.15s ease, transform 0.1s ease; }
.comment-form button:hover { background: #1a56db; }
.comment-form button:active { transform: scale(0.96); }
.empty-state {
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 48px 20px;
  text-align: center;
}
.empty-state::before {
  content: "??";
  font-size: 36px;
  opacity: 0.5;
}
.empty-state.compact { padding: 32px 16px; font-size: 13px; }
.work-card button.secondary {
  border-radius: 10px;
  background: linear-gradient(135deg, #f0f5ff, #e8f0fe);
  color: var(--brand);
  font-weight: 700;
  border: 1px solid rgba(23,105,255,0.12);
  transition: all 0.15s ease;
}
.work-card button.secondary:hover {
  background: linear-gradient(135deg, #e0ebff, #d4e4fe);
  border-color: rgba(23,105,255,0.25);
}
.work-card button.secondary:active { transform: scale(0.98); }
.work-card > small {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--brand);
  font-weight: 700;
  font-size: 12px;
  animation: pulse-text 1.4s ease-in-out infinite;
}
@keyframes pulse-text {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}


/* ====== 登录页全新视觉 ====== */
.auth-screen {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-height: 100dvh;
  padding: 0 24px calc(22px + env(safe-area-inset-bottom));
  display: grid;
  grid-template-rows: auto 1fr;
  align-items: start;
  justify-items: stretch;
  place-items: initial;
  overflow: hidden;
  background: #f7f9fc;
}

.auth-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(247, 249, 252, 0.96) 52%, #eef2f7 100%),
    linear-gradient(135deg, rgba(44, 108, 255, 0.12), rgba(108, 92, 231, 0.08));
}

.auth-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.035) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.72), transparent 78%);
}

.auth-bg::after {
  content: "";
  position: absolute;
  left: 24px;
  right: 24px;
  top: calc(116px + env(safe-area-inset-top));
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(85, 167, 255, 0.32), transparent);
}

/* Logo */
.auth-top {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  padding-top: calc(42px + env(safe-area-inset-top));
  padding-bottom: 18px;
}

.auth-logo-wrap {
  position: relative;
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
}

.auth-logo-inner {
  position: relative;
  z-index: 2;
  width: 70px;
  height: 70px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.1);
  overflow: hidden;
}

.auth-logo-inner img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  display: block;
}

.auth-logo-ring {
  position: absolute;
  z-index: 1;
  width: 92px;
  height: 92px;
  border-radius: 24px;
  border: 1px solid rgba(85, 167, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.84);
  animation: logo-breathe 3.6s ease-in-out infinite;
}

@keyframes logo-breathe {
  0%, 100% { transform: scale(1); opacity: 0.62; }
  50% { transform: scale(1.08); opacity: 0.24; }
}

/* 卡片 */
.auth-card {
  position: relative;
  z-index: 1;
  width: min(100%, calc(100vw - 48px));
  max-width: 100%;
  min-width: 0;
  justify-self: stretch;
  align-self: start;
  display: grid;
  gap: 14px;
  padding: 26px 20px 18px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.1);
  backdrop-filter: blur(18px);
}

.auth-brand-tag {
  color: #55a7ff;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0;
  text-transform: uppercase;
  margin: 0;
}

.auth-brand-title {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.1;
  color: #0f172a;
  margin: 0;
}

.auth-sub {
  color: #5b6472;
  font-size: 13px;
  line-height: 1.6;
  margin: 0;
  padding-bottom: 2px;
}

/* Feature 标签 */
.auth-features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  padding: 10px 0;
  border-top: 1px solid rgba(226, 232, 240, 0.84);
  border-bottom: 1px solid rgba(226, 232, 240, 0.84);
}

.auth-features span {
  padding: 0 8px;
  border-radius: 0;
  background: transparent;
  color: #334155;
  font-size: 11px;
  font-weight: 760;
  text-align: center;
  white-space: nowrap;
}

.auth-features span + span {
  border-left: 1px solid rgba(226, 232, 240, 0.95);
}

/* 输入框 */
.auth-inputs {
  display: grid;
  gap: 11px;
}

.input-field {
  position: relative;
  display: grid;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  z-index: 1;
  width: 28px;
  text-align: left;
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0;
  font-weight: 820;
  color: #64748b;
  pointer-events: none;
  opacity: 0.48;
  transition: opacity 0.2s ease;
}

.input-field input {
  width: 100%;
  min-height: 50px;
  padding: 0 14px 0 54px;
  border-radius: 8px;
  border: 1px solid rgba(203, 213, 225, 0.92);
  background: rgba(248, 250, 252, 0.86);
  font-size: 15px;
  color: #0f172a;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.input-field input:focus {
  border-color: #55a7ff;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(85, 167, 255, 0.1);
  outline: none;
}

.input-field input:focus + .input-icon,
.input-field input:focus ~ .input-icon {
  opacity: 0.85;
}

/* 登录按钮 */
.auth-card .primary {
  min-height: 50px;
  border-radius: 8px;
  background: linear-gradient(135deg, #55a7ff 0%, #6d55f2 100%);
  color: #fff;
  font-size: 15px;
  font-weight: 820;
  border: 0;
  box-shadow: 0 14px 30px rgba(82, 111, 239, 0.28);
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.auth-card .primary:hover {
  background: linear-gradient(135deg, #4f9eff 0%, #624bf0 100%);
  box-shadow: 0 18px 36px rgba(82, 111, 239, 0.34);
  transform: translateY(-1px);
}

.auth-card .primary:active {
  transform: translateY(0) scale(0.98);
}

/* 协议 */
.auth-footer {
  text-align: center;
  color: #8a94a6;
  font-size: 11px;
  line-height: 1.5;
  margin: 0;
}

/* 入场动画 */
.auth-logo-wrap,
.auth-brand-tag,
.auth-brand-title,
.auth-sub,
.segmented,
.auth-inputs,
.auth-card .primary,
.auth-footer {
  opacity: 1;
  transform: none;
  animation: none;
}

.auth-logo-wrap { animation-delay: 0.05s; }
.auth-brand-tag { animation-delay: 0.12s; }
.auth-brand-title { animation-delay: 0.18s; }
.auth-sub { animation-delay: 0.24s; }
.auth-features { animation-delay: 0.30s; }
.segmented { animation-delay: 0.36s; }
.auth-inputs { animation-delay: 0.42s; }
.auth-card .primary { animation-delay: 0.48s; }
.auth-footer { animation-delay: 0.54s; }

@keyframes auth-fade-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* ====== 创作页优化 ====== */

/* 模型状态栏 */
.hero-block {
  min-height: auto;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  background: transparent;
  padding: 4px 2px 4px;
  box-shadow: none;
  border: 0;
  border-radius: 0;
}

.hero-status-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--surface);
  border-radius: 999px;
  border: 1px solid rgba(232, 236, 242, 0.8);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.4);
  animation: status-pulse 2s ease-in-out infinite;
}

@keyframes status-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.studio-model-name {
  background: transparent !important;
  padding: 0 !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  color: var(--text) !important;
  border-radius: 0 !important;
}

.status-divider {
  width: 1px;
  height: 14px;
  background: rgba(203, 212, 225, 0.5);
}

.duration-badge {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

/* 提示词区 */
.prompt-block .section-title h3 {
  font-size: 16px;
  line-height: 1.4;
}

.title-hint {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  margin-top: 2px;
}

.prompt-field textarea {
  min-height: 120px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1.5px solid rgba(203, 212, 225, 0.6);
  background: #fff;
  font-size: 14px;
  line-height: 1.6;
  resize: vertical;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.prompt-field textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(85, 167, 255, 0.1);
  outline: none;
}

.prompt-field textarea::placeholder {
  color: #b0bec5;
  line-height: 1.8;
}

.ai-prompt-button {
  display: flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, #f0f5ff, #e8f0fe) !important;
  border: 1px solid rgba(85, 167, 255, 0.12) !important;
  font-weight: 700 !important;
  transition: all 0.15s ease;
}

.ai-prompt-button:hover {
  background: linear-gradient(135deg, #e0ebff, #d4e4fe) !important;
  border-color: rgba(85, 167, 255, 0.25) !important;
}

.ai-icon {
  font-size: 14px;
}

/* 人物/场景/模板 选择卡 */
.creator-picks {
  gap: 8px;
}

.creator-pick {
  min-height: 72px;
  display: grid;
  gap: 3px;
  align-content: center;
  justify-items: center;
  text-align: center;
  padding: 14px 8px;
  border-radius: 14px;
  border: 1.5px solid rgba(232, 236, 242, 0.7);
  background: var(--surface);
  transition: all 0.2s ease;
  cursor: pointer;
}

.creator-pick:hover {
  border-color: rgba(85, 167, 255, 0.2);
  background: #fafbff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}

.creator-pick:active {
  transform: translateY(0) scale(0.98);
}

.creator-pick.active {
  border-color: rgba(85, 167, 255, 0.4);
  background: #eef4ff;
  box-shadow: 0 4px 16px rgba(85, 167, 255, 0.12);
}

.pick-icon {
  font-size: 22px;
  line-height: 1;
}

.creator-pick strong {
  font-size: 13px;
  font-weight: 800;
}

.pick-label {
  font-size: 10px;
  color: var(--muted);
  font-weight: 600;
  min-height: 14px;
}

/* 生成按钮 */
.main-create-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 56px;
  font-size: 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, #55a7ff, #55a7ff) !important;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.main-create-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(85, 167, 255, 0.3) !important;
}

.main-create-button:active {
  transform: translateY(0) scale(0.98);
}

.btn-icon {
  font-size: 16px;
}

/* 模板区 */
.template-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-height: 240px;
  overflow-y: auto;
  gap: 8px;
}

.template {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1.5px solid transparent;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  transition: all 0.15s ease;
}

.template:hover {
  border-color: rgba(85, 167, 255, 0.3);
  background: #f4f8ff;
}

.template.active {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 4px 14px rgba(85, 167, 255, 0.25);
}

/* 上传区 */
.upload-action {
  border-radius: 10px;
  transition: all 0.15s ease;
}

.upload-action:hover {
  border-color: var(--brand);
  background: #f0f5ff;
}

/* section标题区 */
.step-block .section-title {
  margin-bottom: 2px;
}

.section-title h3 {
  font-weight: 800;
}

/* 面板展开动画 */
.creator-panel {
  animation: panel-slide 0.25s ease;
}

@keyframes panel-slide {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 全屏按钮 */
.video-fullscreen {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 4;
  width: 44px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: rgba(17, 24, 39, 0.55);
  color: #fff;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: background 0.15s ease, transform 0.15s ease;
}

.video-fullscreen:hover {
  background: rgba(17, 24, 39, 0.78);
  transform: scale(1.1);
}

.video-fullscreen:active {
  transform: scale(0.95);
}

.video-fullscreen-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: #000;
  color: #fff;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  overscroll-behavior: none;
}

.video-fullscreen-overlay.hidden {
  display: none;
}

.fullscreen-open {
  overflow: hidden;
  touch-action: none;
}

.fullscreen-track {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 300vh;
  height: 300dvh;
  contain: layout paint;
  backface-visibility: hidden;
  transform-style: preserve-3d;
  will-change: transform;
  transform: translate3d(0, -100vh, 0);
  transform: translate3d(0, -100dvh, 0);
}

.fullscreen-slide {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  display: grid;
  place-items: center;
  background: #000;
  overflow: hidden;
  contain: layout paint size;
  transform: translateZ(0);
  will-change: transform;
}

.fullscreen-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.28), transparent 22%, transparent 72%, rgba(0, 0, 0, 0.22));
  opacity: 0.72;
}

.fullscreen-slide.empty {
  background: #030712;
}

.fullscreen-slide.empty::before {
  content: "";
  width: 58px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.fullscreen-slide video {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  object-fit: cover;
  background: #000;
  transform: translateZ(0);
  backface-visibility: hidden;
  contain: paint;
  will-change: transform;
}

.fullscreen-close,
.fullscreen-play {
  position: absolute;
  z-index: 5;
  border: 0;
  color: #fff;
  background: rgba(17, 24, 39, 0.58);
  backdrop-filter: blur(8px);
}

.fullscreen-close {
  top: calc(env(safe-area-inset-top, 0px) + 14px);
  right: 14px;
  width: 38px;
  height: 38px;
  min-height: 38px;
  padding: 0;
  border-radius: 999px;
  font-size: 24px;
  line-height: 1;
}

.fullscreen-counter {
  position: absolute;
  left: 14px;
  top: calc(env(safe-area-inset-top, 0px) + 18px);
  z-index: 5;
  min-width: 42px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.46);
  color: #fff;
  font-size: 12px;
  text-align: center;
  backdrop-filter: blur(8px);
}

.fullscreen-info {
  position: absolute;
  left: 16px;
  right: 86px;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 18px);
  z-index: 5;
  display: grid;
  gap: 8px;
  color: #fff;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.52);
  pointer-events: none;
}

.fullscreen-author {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.fullscreen-author img,
.fullscreen-author span {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  background: rgba(255, 255, 255, 0.16);
  object-fit: cover;
}

.fullscreen-author span {
  display: grid;
  place-items: center;
  font-weight: 800;
}

.fullscreen-author strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 800;
}

.fullscreen-info p {
  max-height: 44px;
  margin: 0;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.92);
  font-size: 13px;
  line-height: 1.55;
}

.fullscreen-actions {
  position: absolute;
  right: 14px;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 24px);
  z-index: 6;
  display: grid;
  gap: 10px;
}

.fullscreen-actions button,
.fullscreen-stat {
  width: 50px;
  min-height: 50px;
  display: grid;
  place-items: center;
  gap: 3px;
  padding: 6px 4px;
  border: 0;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.42);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
}

.fullscreen-stat {
  pointer-events: none;
}

.fullscreen-actions .social-icon,
.fullscreen-stat .social-icon {
  width: 23px;
  height: 23px;
  color: rgba(255, 255, 255, 0.94);
}

.fullscreen-actions button.active .social-icon-thumb {
  color: #ff4d67;
  fill: rgba(255, 77, 103, 0.16);
  filter: drop-shadow(0 0 12px rgba(255, 77, 103, 0.45));
}

.fullscreen-actions strong,
.fullscreen-stat strong {
  font-size: 11px;
  line-height: 1;
  min-height: 11px;
}

.fullscreen-play {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  min-width: 72px;
  min-height: 72px;
  border-radius: 999px;
  font-size: 14px;
}

.video-fullscreen-overlay.dragging .fullscreen-info,
.video-fullscreen-overlay.dragging .fullscreen-actions,
.video-fullscreen-overlay.dragging .fullscreen-counter,
.video-fullscreen-overlay.dragging .fullscreen-close {
  opacity: 0.86;
  transition: opacity 0.12s ease;
}

.video-fullscreen-overlay.dragging .fullscreen-close,
.video-fullscreen-overlay.dragging .fullscreen-counter {
  backdrop-filter: none;
}

/* Account polish */
#accountView {
  gap: 12px;
  padding-top: 2px;
}

#accountView .avatar-upload::after {
  content: none;
}

#accountView .account-card {
  min-height: 122px;
  align-items: flex-start;
  padding: 18px 16px;
  border: 1px solid rgba(213, 224, 240, 0.72);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(85, 167, 255, 0.12), rgba(255, 255, 255, 0.88) 52%),
    #fff;
  box-shadow: 0 14px 34px rgba(28, 55, 90, 0.08);
}

#accountView .account-card-bg {
  opacity: 1;
  background:
    linear-gradient(120deg, rgba(85, 167, 255, 0.16), transparent 58%),
    linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(245, 249, 255, 0.84));
}

#accountView .account-user {
  align-items: center;
  gap: 13px;
}

#accountView .avatar {
  width: 66px;
  height: 66px;
  border-radius: 20px;
  border: 2px solid rgba(255, 255, 255, 0.92);
  background: linear-gradient(135deg, #55a7ff, #55a7ff);
  box-shadow: 0 12px 26px rgba(85, 167, 255, 0.2);
  font-size: 24px;
  font-weight: 500;
}

#accountView .account-user h2 {
  margin: 0 0 5px;
  color: #101828;
  font-size: 19px;
  font-weight: 500;
  letter-spacing: 0;
}

#accountView .account-user p {
  color: #667085;
  font-size: 13px;
}

#accountView .recharge-shortcut {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(85, 167, 255, 0.1);
  color: #55a7ff;
  border: 1px solid rgba(85, 167, 255, 0.12);
  box-shadow: none;
  font-size: 13px;
  font-weight: 500;
}

#accountView .recharge-shortcut span {
  font-weight: 500;
}

#accountView .wallet-card {
  padding: 18px 16px 16px;
  border: 1px solid rgba(213, 224, 240, 0.74);
  border-radius: 18px;
  background:
    linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  box-shadow: 0 10px 28px rgba(28, 55, 90, 0.06);
}

#accountView .wallet-bg {
  opacity: 1;
  background: linear-gradient(135deg, rgba(85, 167, 255, 0.1), rgba(85, 167, 255, 0));
}

#accountView .wallet-card::after {
  content: "";
}

#accountView .wallet-card small {
  color: #55a7ff !important;
  font-size: 12px !important;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

#accountView .wallet-card h2 {
  margin-top: 6px;
  color: #101828;
  font-size: 28px;
  font-weight: 500;
  letter-spacing: 0;
}

#accountView .wallet-card p {
  margin-top: 3px;
  color: #667085;
  font-size: 12px;
}

#accountView .pricing-list {
  margin-top: 12px;
}

#accountView .recharge-plans {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(213, 224, 240, 0.82);
  border-radius: 16px;
  background: #fff;
}

#accountView .recharge-plans button,
#accountView .reward-action,
#accountView .model-option,
#accountView .plan {
  border-radius: 14px;
  border: 1px solid rgba(213, 224, 240, 0.82);
  background: #fff;
  box-shadow: 0 6px 18px rgba(28, 55, 90, 0.04);
}

#accountView .account-fold {
  border: 1px solid rgba(213, 224, 240, 0.82);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 24px rgba(28, 55, 90, 0.05);
}

#accountView .account-fold summary {
  min-height: 56px;
  padding: 0 16px;
}

#accountView .account-fold summary h3 {
  color: #55a7ff;
  font-size: 15px;
  font-weight: 500;
}

#accountView .fold-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(85, 167, 255, 0.08);
  font-size: 14px;
}

#accountView .fold-arrow {
  color: #98a2b3;
  font-weight: 500;
}

#accountView .danger-button {
  min-height: 46px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(253, 162, 155, 0.5);
  color: #d92d20;
  font-weight: 500;
}

/* Studio polish */
#studioView {
  position: relative;
  gap: 12px;
  padding-top: 2px;
}

#studioView::before {
  content: "";
  position: absolute;
  left: -12px;
  right: -12px;
  top: -10px;
  height: 210px;
  border-radius: 0 0 28px 28px;
  background:
    linear-gradient(180deg, rgba(85, 167, 255, 0.12), rgba(85, 167, 255, 0)),
    linear-gradient(135deg, rgba(85, 167, 255, 0.1), rgba(255, 255, 255, 0));
  pointer-events: none;
}

#studioView .creator-flow {
  position: relative;
  z-index: 1;
  gap: 12px;
}

#studioView .creator-flow.hidden {
  display: none;
}

.studio-mode-bridge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(85, 167, 255, 0.14);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.studio-mode-bridge div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.studio-mode-bridge strong {
  color: #101828;
  font-size: 15px;
  font-weight: 800;
}

.studio-mode-bridge span {
  color: #667085;
  font-size: 12px;
  line-height: 1.35;
}

.studio-mode-bridge button {
  flex: 0 0 auto;
  min-height: 34px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

#studioView .hero-block {
  position: relative;
  padding: 0;
  background: transparent;
}

#studioView .hero-status-bar {
  width: 100%;
  min-height: 48px;
  justify-content: space-between;
  padding: 9px 13px;
  border: 1px solid rgba(213, 224, 240, 0.72);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 30px rgba(28, 55, 90, 0.07);
  backdrop-filter: blur(14px);
}

#studioView .studio-model-trigger {
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

#studioView .studio-model-trigger:active {
  transform: scale(0.985);
}

#studioView .studio-model-trigger[aria-expanded="true"] {
  border-color: rgba(85, 167, 255, 0.34);
  box-shadow: 0 14px 32px rgba(85, 167, 255, 0.12);
}

#studioView .studio-model-name {
  flex: 1;
  font-size: 14px !important;
  font-weight: 500 !important;
  color: #101828 !important;
}

#studioView .duration-badge {
  padding: 5px 10px;
  background: rgba(85, 167, 255, 0.09);
  color: #55a7ff;
  font-size: 12px;
  font-weight: 500;
}

#studioView .studio-model-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  z-index: 12;
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(213, 224, 240, 0.86);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 42px rgba(28, 55, 90, 0.14);
  backdrop-filter: blur(18px);
}

#studioView .studio-model-choice {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(213, 224, 240, 0.72);
  border-radius: 14px;
  background: #fff;
  color: #101828;
  text-align: left;
}

#studioView .studio-model-choice span {
  display: grid;
  gap: 3px;
}

#studioView .studio-model-choice strong,
#studioView .studio-model-choice em {
  font-size: 14px;
  font-weight: 500;
  font-style: normal;
}

#studioView .studio-model-choice small {
  color: #667085;
  font-size: 11px;
}

#studioView .studio-model-choice em {
  color: #98a2b3;
}

#studioView .studio-model-choice.active {
  border-color: rgba(85, 167, 255, 0.36);
  background: #f3f8ff;
}

#studioView .studio-model-choice.active em {
  color: #55a7ff;
}

/* Account recharge layout fix */
#accountView .account-card {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  column-gap: 12px;
  min-height: 116px;
}

#accountView .account-user {
  min-width: 0;
  padding-right: 0;
}

#accountView .account-user > div:last-child {
  min-width: 0;
}

#accountView .account-user h2,
#accountView .account-user p {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#accountView .recharge-shortcut {
  align-self: start;
  justify-self: end;
  margin-top: 2px;
  white-space: nowrap;
  flex: none;
}

@media (max-width: 360px) {
  #accountView .account-card {
    grid-template-columns: 1fr;
    row-gap: 14px;
  }

  #accountView .recharge-shortcut {
    justify-self: start;
    margin-left: 79px;
  }
}

#studioView .prompt-block {
  position: relative;
  overflow: hidden;
  padding: 17px 15px 15px;
  border: 1px solid rgba(213, 224, 240, 0.72);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 255, 0.94)),
    #fff;
  box-shadow: 0 16px 38px rgba(28, 55, 90, 0.08);
}

#studioView .prompt-block::after {
  content: "";
  position: absolute;
  right: -38px;
  top: -54px;
  width: 120px;
  height: 120px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(85, 167, 255, 0.1), transparent 68%);
  pointer-events: none;
}

#studioView .prompt-block .section-title {
  position: relative;
  z-index: 1;
  margin-bottom: 8px;
}

#studioView .prompt-block .section-title h3 {
  color: #101828;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0;
}

#studioView .title-hint {
  margin-top: 4px;
  color: #667085;
  font-size: 12px;
  font-weight: 400;
}

#studioView .prompt-field {
  z-index: 1;
}

#studioView .prompt-field textarea {
  min-height: 156px;
  padding: 15px 15px 54px;
  border: 1px solid rgba(213, 224, 240, 0.82);
  border-radius: 16px;
  background: #fff;
  color: #101828;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  resize: none;
}

#studioView .prompt-field textarea:focus {
  border-color: rgba(85, 167, 255, 0.45);
  box-shadow: 0 0 0 4px rgba(85, 167, 255, 0.08);
}

#studioView .prompt-field textarea::placeholder {
  color: #98a2b3;
}

#studioView .ai-prompt-button {
  right: 10px;
  bottom: 10px;
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid rgba(85, 167, 255, 0.14) !important;
  background: rgba(85, 167, 255, 0.08) !important;
  color: #55a7ff;
  font-weight: 500 !important;
}

#studioView .compact-settings {
  position: relative;
  z-index: 1;
  gap: 8px;
}

#studioView .compact-settings label {
  padding: 10px;
  border: 1px solid rgba(213, 224, 240, 0.72);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
}

#studioView .compact-settings label span {
  color: #667085;
  font-size: 11px;
  font-weight: 400;
}

#studioView .compact-settings select,
#studioView .compact-settings input {
  min-height: 34px;
  border: 0;
  border-radius: 10px;
  background: #f5f8fc;
  font-weight: 500;
}

#studioView .creator-picks {
  gap: 10px;
}

#studioView .creator-pick {
  min-height: 88px;
  border: 1px solid rgba(213, 224, 240, 0.74);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 26px rgba(28, 55, 90, 0.06);
}

#studioView .creator-pick.active {
  border-color: rgba(85, 167, 255, 0.42);
  background: linear-gradient(180deg, #f3f8ff, #fff);
  box-shadow: 0 12px 28px rgba(85, 167, 255, 0.12);
}

#studioView .pick-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: rgba(85, 167, 255, 0.08);
  font-size: 17px;
}

#studioView .creator-pick strong {
  color: #101828;
  font-size: 14px;
  font-weight: 500;
}

#studioView .pick-label {
  color: #55a7ff;
  font-size: 11px;
  font-weight: 500;
}

#studioView .main-create-button {
  min-height: 58px;
  border-radius: 18px;
  background: linear-gradient(135deg, #55a7ff, #55a7ff) !important;
  box-shadow: 0 18px 34px rgba(85, 167, 255, 0.28);
  font-size: 16px;
  font-weight: 500;
}

#studioView .creator-panel {
  border: 1px solid rgba(213, 224, 240, 0.72);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(28, 55, 90, 0.07);
}

#studioView .creator-panel .section-title h3 {
  color: #55a7ff;
  font-weight: 500;
}

#studioView .asset-chip,
#studioView .template,
#studioView .upload-action {
  border-radius: 14px;
  border-color: rgba(213, 224, 240, 0.82);
  background: #fff;
}

#studioView .template.active {
  background: linear-gradient(135deg, #55a7ff, #55a7ff);
  border-color: transparent;
  font-weight: 500;
}

#worksView {
  padding: 0 12px;
}

#worksView .works-switch {
  margin: 0 2px 12px;
}

#worksView .works-list {
  gap: 0;
}

#worksView .work-card {
  border-radius: 0;
  border-left: 0;
  border-right: 0;
  box-shadow: none;
  padding: 14px 12px;
  border-bottom: 1px solid rgba(232, 236, 242, 0.06);
}

@keyframes agent-dot-jump {
  0%, 72%, 100% {
    transform: translateY(0) scale(0.75);
    opacity: 0.45;
  }
  36% {
    transform: translateY(-5px) scale(1);
    opacity: 1;
  }
}

@keyframes agent-working-shine {
  0% {
    background-position: -65% 0, 0 0;
  }
  100% {
    background-position: 165% 0, 0 0;
  }
}

@keyframes agent-working-breathe {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-1px);
  }
}

@keyframes agent-hint-pulse {
  0%, 100% {
    transform: translateY(0);
    box-shadow: 0 8px 18px rgba(172, 111, 0, 0.16);
  }
  50% {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(172, 111, 0, 0.22);
  }
}

@keyframes mic-listening-pulse {
  0%, 100% {
    box-shadow: 0 8px 20px rgba(85, 167, 255, 0.16), 0 0 0 0 rgba(85, 167, 255, 0.28);
  }
  50% {
    box-shadow: 0 10px 26px rgba(85, 167, 255, 0.24), 0 0 0 7px rgba(85, 167, 255, 0);
  }
}

@keyframes voice-wave-bar {
  0%, 100% {
    height: 6px;
    opacity: 0.58;
  }
  35% {
    height: 17px;
    opacity: 1;
  }
  65% {
    height: 10px;
    opacity: 0.82;
  }
}

@keyframes agent-voice-wave {
  0%, 100% {
    height: 9px;
    opacity: 0.55;
    transform: translateY(0);
  }
  35% {
    height: 34px;
    opacity: 1;
    transform: translateY(-1px);
  }
  65% {
    height: 18px;
    opacity: 0.78;
    transform: translateY(1px);
  }
}


/* ====== 我的页面优化 ====== */

/* 个人信息卡 */
.account-card {
  position: relative;
  overflow: hidden;
  padding: 18px 16px;
  border-radius: 16px;
}

.account-card-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #55a7ff 0%, #55a7ff 40%, #55a7ff 100%);
  opacity: 0.06;
  pointer-events: none;
}

.account-user {
  position: relative;
  z-index: 1;
}

.account-user h2 {
  font-size: 17px;
  font-weight: 800;
}

.avatar {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, #55a7ff, #55a7ff);
  box-shadow: 0 4px 14px rgba(85, 167, 255, 0.2);
  font-size: 24px;
}

.recharge-shortcut {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 36px;
  padding: 0 16px;
  border-radius: 10px;
  background: linear-gradient(135deg, #55a7ff, #55a7ff);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  border: 0;
  box-shadow: 0 4px 12px rgba(85, 167, 255, 0.25);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.recharge-shortcut:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(85, 167, 255, 0.35);
}

.recharge-shortcut:active {
  transform: translateY(0) scale(0.97);
}

.recharge-shortcut span {
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}

/* 钱包卡片 */
.wallet-card {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  padding: 18px 16px;
}

.wallet-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #55a7ff 0%, #55a7ff 100%);
  opacity: 0.05;
  pointer-events: none;
}

.wallet-card small {
  position: relative;
  z-index: 1;
  color: #7a8494 !important;
  font-size: 11px !important;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.wallet-card h2 {
  position: relative;
  z-index: 1;
  font-size: 20px;
  font-weight: 900;
  color: var(--text);
}

.wallet-card p {
  position: relative;
  z-index: 1;
}

.wallet-card::after {
  content: "A5";
  position: absolute;
  right: 8px;
  top: 8px;
  font-size: 72px;
  font-weight: 900;
  color: var(--brand);
  opacity: 0.04;
  pointer-events: none;
  line-height: 1;
}

/* 折叠菜单 */
.account-fold {
  border-radius: 16px;
  border: 1px solid rgba(232, 236, 242, 0.6);
}

.account-fold summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
  transition: background 0.15s ease;
}

.account-fold summary::-webkit-details-marker {
  display: none;
}

.account-fold summary:hover {
  background: rgba(85, 167, 255, 0.02);
}

.fold-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.account-fold summary h3 {
  flex: 1;
  font-size: 15px;
  font-weight: 800;
}

.fold-arrow {
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
  transition: transform 0.2s ease;
}

.account-fold[open] > summary .fold-arrow {
  opacity: 0.5;
}

.fold-content {
  padding: 0 16px 16px;
}

/* 赚币面板 */
.reward-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1.5px solid rgba(232, 236, 242, 0.7);
  background: var(--surface);
  transition: all 0.15s ease;
  cursor: pointer;
}

.reward-action:hover {
  border-color: rgba(85, 167, 255, 0.2);
  background: #fafbff;
}

.reward-action strong {
  font-size: 14px;
  font-weight: 800;
}

.reward-action small {
  color: var(--brand);
  font-weight: 800;
  font-size: 14px;
}

.reward-primary-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.reward-main-action {
  min-height: 74px;
  display: grid;
  grid-template-columns: 30px 1fr;
  grid-template-areas:
    "icon title"
    "icon bonus";
  align-items: center;
  justify-content: start;
  column-gap: 9px;
  row-gap: 1px;
  padding: 12px;
}

.reward-main-action .reward-action-icon {
  grid-area: icon;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(85, 167, 255, 0.1);
  color: var(--brand);
  font-size: 13px;
  font-weight: 900;
}

.reward-main-action strong {
  grid-area: title;
  align-self: end;
  line-height: 1.15;
}

.reward-main-action small {
  grid-area: bonus;
  align-self: start;
  font-size: 12px;
}

.invite-reward-action {
  min-height: 42px;
  padding: 9px 12px;
  border-style: dashed;
  border-color: rgba(148, 163, 184, 0.35);
  background: #fbfcff;
}

.invite-reward-action span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

.invite-reward-action small {
  font-size: 12px;
}

.red-packet-action {
  border-color: rgba(229, 36, 48, 0.22);
  background: linear-gradient(135deg, #fff7ec, #fff 58%);
}

.red-packet-action:hover {
  border-color: rgba(229, 36, 48, 0.32);
  background: #fff8ee;
}

.red-packet-action strong {
  color: #b81722;
}

.red-packet-action .reward-action-icon {
  background: rgba(229, 36, 48, 0.1);
  color: #b81722;
}

.red-packet-float {
  position: fixed;
  right: max(14px, env(safe-area-inset-right));
  bottom: calc(86px + env(safe-area-inset-bottom, 0px));
  z-index: 72;
  width: 70px;
  min-height: 76px;
  display: grid;
  place-items: center;
  gap: 3px;
  padding: 10px 7px;
  border: 0;
  border-radius: 20px;
  background:
    radial-gradient(circle at 50% 24%, #ffe18a 0 16%, transparent 17%),
    linear-gradient(180deg, #ff4b45 0%, #b81722 100%);
  color: #fff9db;
  box-shadow: 0 14px 34px rgba(184, 23, 34, 0.32);
  font-weight: 900;
  transform: translateZ(0);
}

.red-packet-float::before {
  content: "";
  width: 34px;
  height: 22px;
  border-radius: 12px 12px 4px 4px;
  background: rgba(255, 214, 92, 0.9);
  box-shadow: inset 0 -4px 0 rgba(139, 76, 0, 0.18);
}

.red-packet-float span {
  font-size: 14px;
  line-height: 1;
}

.red-packet-float strong {
  font-size: 11px;
  line-height: 1.15;
}

.red-packet-float.hidden {
  display: none;
}

/* 模型选项 */
.model-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1.5px solid transparent;
  transition: all 0.15s ease;
  cursor: pointer;
}

.model-option:hover {
  border-color: rgba(85, 167, 255, 0.2);
  background: #fafbff;
}

.model-option.selected {
  border-color: var(--brand);
  background: #eef4ff;
}

/* 套餐卡片 */
.plan {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1.5px solid rgba(232, 236, 242, 0.7);
  transition: all 0.15s ease;
  cursor: pointer;
}

.plan:hover {
  border-color: rgba(85, 167, 255, 0.2);
  background: #fafbff;
}

.plan strong {
  font-size: 14px;
  font-weight: 800;
}

/* 账单明细 */
.ledger-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(232, 236, 242, 0.4);
}

.ledger-item:last-child {
  border-bottom: 0;
}

/* 退出登录 */
.danger-button {
  width: 100%;
  min-height: 46px;
  border-radius: 14px;
  background: #fff;
  color: #ef4444;
  border: 1.5px solid #fee2e2;
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.danger-button:hover {
  background: #fef2f2;
  border-color: #fecaca;
}

.danger-button:active {
  transform: scale(0.98);
}

/* 作品信息折叠区 */
.work-info-fold {
  border: 0;
  padding: 0;
}

.work-summary-line {
  display: block;
  padding: 8px 4px 4px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.4;
}

.work-summary-line::-webkit-details-marker {
  display: none;
}

.work-summary-line::after {
  content: " ?";
  color: var(--muted);
  font-size: 16px;
  margin-left: 4px;
  transition: transform 0.2s ease;
}

.work-info-fold[open] > .work-summary-line::after {
  content: " ?";
}

.work-fold-body {
  padding: 4px 0 8px;
}

.work-full-prompt {
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  margin-bottom: 6px;
}

/* 进度条 */
.progress-bar {
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: rgba(85, 167, 255, 0.1);
  overflow: hidden;
  margin: 4px 0;
}
.progress-fill {
  display: block;
  width: 40%;
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, #55a7ff, #55a7ff);
  animation: progress-slide 1.5s ease-in-out infinite;
}
@keyframes progress-slide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}

/* Account recharge sheet */
.recharge-open {
  overflow: hidden;
}

.recharge-sheet {
  position: fixed;
  inset: 0;
  z-index: 82;
  display: grid;
  align-items: start;
  justify-items: center;
  padding: calc(74px + env(safe-area-inset-top, 0px)) 14px 18px;
}

.recharge-sheet.hidden {
  display: none;
}

.recharge-sheet-mask {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(4px);
}

.recharge-sheet-card {
  position: relative;
  z-index: 1;
  width: min(100%, 430px);
  max-height: min(76vh, 620px);
  display: grid;
  gap: 12px;
  overflow: auto;
  padding: 17px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.26);
  animation: recharge-sheet-in 0.18s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes recharge-sheet-in {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.recharge-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.recharge-sheet-head div {
  display: grid;
  gap: 4px;
}

.recharge-sheet-head strong {
  color: #101828;
  font-size: 18px;
  font-weight: 500;
}

.recharge-sheet-head small {
  color: #667085;
  font-size: 12px;
}

.recharge-sheet-head button {
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border-radius: 999px;
  background: #f3f6fb;
  color: #475467;
  font-size: 22px;
  line-height: 1;
}

#accountView .recharge-sheet .recharge-plans,
.recharge-sheet .recharge-plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin: 0;
  padding: 0;
}

#accountView .recharge-sheet .recharge-plan,
.recharge-sheet .recharge-plan {
  min-height: 78px;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 6px;
  padding: 12px;
  border: 1px solid rgba(85, 167, 255, 0.18);
  border-radius: 14px;
  background:
    linear-gradient(180deg, #fff, #f5f9ff);
  color: #101828;
  box-shadow: 0 8px 18px rgba(85, 167, 255, 0.08);
}

.recharge-sheet .recharge-plan strong {
  color: #55a7ff;
  font-size: 15px;
  font-weight: 500;
}

.recharge-sheet .recharge-plan small {
  color: #667085;
  font-size: 12px;
}

.recharge-sheet .payment-box {
  margin: 0;
}

@media (max-width: 360px) {
  #accountView .recharge-sheet .recharge-plans,
  .recharge-sheet .recharge-plans {
    grid-template-columns: 1fr;
  }
}


/* ====== 浣滃搧鐢熸垚杩涘害鏉?====== */
.work-progress {
  display: grid;
  gap: 6px;
  margin: 8px 0 4px;
}
.work-progress-track {
  width: 100%;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(85, 167, 255, 0.1);
}
.work-progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #55a7ff;
  transition: width 500ms ease;
}
.work-progress-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
}

/* ====== 鍏ㄥ睆鎸夐挳 ====== */
.video-fullscreen {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 5;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: background 0.2s ease, opacity 0.2s ease;
}
.video-fullscreen:hover {
  background: rgba(0, 0, 0, 0.65);
}

/* ====== Toast 鍔ㄧ敾澧炲己 ====== */
#toast {
  transition: opacity 0.28s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, 20px) scale(0.92); }
  to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}
#toast.show {
  animation: toast-in 0.28s cubic-bezier(0.4, 0, 0.2, 1) both;
}

/* Works polish */
#worksView {
  position: relative;
  padding-top: 2px;
}

#worksView::before {
  content: "";
  position: absolute;
  left: -12px;
  right: -12px;
  top: -8px;
  height: 150px;
  z-index: -1;
  border-radius: 0 0 26px 26px;
  background:
    radial-gradient(circle at 18% 8%, rgba(85, 167, 255, 0.12), transparent 42%),
    linear-gradient(180deg, #f6f9ff 0%, rgba(246, 249, 255, 0) 100%);
}

#worksView.works-pull-visual::before,
#worksView.works-pull-ready::before {
  opacity: 0;
}

#worksView .works-switch {
  position: sticky;
  top: 0;
  z-index: 4;
  height: 42px;
  margin: 0 0 14px;
  padding: 3px;
  border: 1px solid rgba(213, 224, 240, 0.7);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 8px 24px rgba(21, 37, 72, 0.06);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

#worksView.works-pull-visual .works-switch,
#worksView.works-pull-ready .works-switch {
  border-color: transparent;
  box-shadow: none;
}

#worksView .works-switch button {
  min-height: 34px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 400;
  color: #667085;
}

#worksView .works-switch button.active {
  background: #55a7ff;
  color: #fff;
  box-shadow: 0 8px 20px rgba(85, 167, 255, 0.22);
}

#worksView .works-list {
  gap: 14px;
}

#worksView .work-card {
  position: relative;
  gap: 9px;
  padding: 12px;
  border: 1px solid rgba(218, 226, 238, 0.72);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 32px rgba(21, 37, 72, 0.07);
  overflow: hidden;
}

#worksView .work-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(248, 251, 255, 0.45));
}

#worksView .work-card > * {
  position: relative;
  z-index: 1;
}

#worksView .work-title {
  align-items: flex-start;
  gap: 8px;
}

#worksView .work-author {
  gap: 9px;
}

#worksView .work-author img,
#worksView .work-author span {
  flex-basis: 38px;
  width: 38px;
  height: 38px;
  font-size: 14px;
  font-weight: 400;
  box-shadow: 0 6px 16px rgba(85, 167, 255, 0.18);
}

#worksView .work-author strong {
  font-size: 15px;
  font-weight: 400;
  color: #101828;
}

#worksView .work-title > small {
  max-width: 116px;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #98a2b3;
  font-size: 11px;
}

#worksView .work-meta-row {
  justify-content: flex-start;
  gap: 8px;
}

#worksView .model-badge {
  padding: 4px 9px;
  border: 0;
  background: #eef4ff;
  color: #55a7ff;
  font-size: 11px;
  font-weight: 400;
}

#worksView .work-meta-row small {
  padding: 4px 8px;
  border-radius: 999px;
  background: #f3f6fb;
  color: #667085;
  font-size: 11px;
}

#worksView .work-info-fold,
#worksView .work-prompt {
  margin: -1px 0 1px;
}

#worksView .work-summary-line,
#worksView .work-prompt summary {
  padding: 2px 1px;
  color: #344054;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
}

#worksView .work-full-prompt,
#worksView .work-prompt p {
  margin-top: 6px;
  border-radius: 12px;
  background: #f6f8fb;
  color: #667085;
  font-size: 12px;
}

#worksView .video-frame,
#worksView .work-card > img,
#worksView .work-card > video {
  max-height: 500px;
  border-radius: 16px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.12);
}

#worksView .video-play {
  width: 54px;
  height: 54px;
  min-height: 54px;
  font-size: 13px;
  font-weight: 400;
  background: rgba(16, 24, 40, 0.62);
}

#worksView .video-fullscreen {
  top: 10px;
  left: 10px;
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
  padding: 0;
  border-radius: 999px;
  font-size: 10px;
  line-height: 1;
  white-space: nowrap;
  word-break: keep-all;
  writing-mode: horizontal-tb;
  text-orientation: mixed;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(16, 24, 40, 0.52);
}

#worksView .social-bar {
  display: flex;
  gap: 6px;
  padding-top: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

#worksView .social-bar::-webkit-scrollbar {
  display: none;
}

#worksView .social-share-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding-top: 4px;
  overflow: visible;
}

#worksView .social-action-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(64px, 1fr));
  gap: 6px;
  margin-top: 2px;
  overflow: visible;
}

#worksView .social-action-row .social-button,
#worksView .social-action-row .social-stat {
  width: 100%;
  justify-content: center;
  text-align: center;
}

#worksView .social-share-row .social-button {
  min-height: 34px;
  padding: 0 10px;
  justify-content: center;
  border-radius: 14px;
  background: #eef8f1;
  color: #178d45;
  font-weight: 700;
}

#worksView .social-share-row .social-icon {
  width: 16px;
  height: 16px;
}
#worksView .social-button {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 0 11px;
  border: 0;
  background: #f4f7fb;
  color: #475467;
  font-size: 12px;
  font-weight: 400;
}

#worksView .social-button.active {
  background: #eaf2ff;
  color: #55a7ff;
}

#worksView .timeline-social,
#worksView .wechat-social {
  background: #eef8f1;
  color: #178d45;
}

#worksView .comment-form {
  padding-top: 2px;
}

#worksView .comment-form input {
  min-height: 38px;
  border: 1px solid rgba(218, 226, 238, 0.9);
  background: #f8fafc;
  font-size: 13px;
}

#worksView .comment-form button {
  min-height: 38px;
  background: #55a7ff;
  font-weight: 400;
}

#worksView .comment-list p {
  border-radius: 12px;
  background: #f6f8fb;
  font-size: 12px;
}

.share-guide {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: end center;
  padding: 18px;
}

.share-guide.hidden {
  display: none;
}

.share-guide-mask {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.34);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.share-guide-card {
  position: relative;
  width: min(100%, 390px);
  padding: 22px 18px 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.18);
  color: #101828;
}

.share-guide-close {
  position: absolute;
  right: 12px;
  top: 10px;
  width: 30px;
  height: 30px;
  min-height: 30px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #f3f6fb;
  color: #667085;
  font-size: 20px;
  font-weight: 400;
}

.share-guide-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  margin-bottom: 10px;
  border-radius: 14px;
  background: #eef4ff;
  color: #55a7ff;
  letter-spacing: 1px;
}

.share-guide-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 400;
}

.share-guide-card p {
  margin: 0;
  color: #667085;
  font-size: 14px;
  line-height: 1.55;
}

.share-guide-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 18px;
}

.share-guide-actions button {
  min-height: 42px;
  border-radius: 999px;
  font-weight: 400;
}

.account-name-row {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.account-name-row h2 {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-edit-button {
  flex: 0 0 auto;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(85, 167, 255, 0.18);
  border-radius: 999px;
  background: #eef6ff;
  color: #55a7ff;
  font-size: 12px;
  font-weight: 760;
}

.social-button.danger {
  border-color: rgba(220, 38, 38, 0.16);
  background: #fff1f2;
  color: #dc2626;
}

/* Account balance and earnings layout */
#accountView .account-card {
  min-height: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 16px;
}

#accountView .account-user {
  grid-column: 1;
  min-width: 0;
}

#accountView .account-recharge-zone {
  grid-column: 2;
  display: grid;
  gap: 5px;
  justify-items: end;
  justify-self: end;
  align-self: start;
}

#accountView .recharge-shortcut {
  min-height: 34px;
}

#accountView .account-top-balance {
  max-width: 128px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #55a7ff;
  font-size: 13px;
  line-height: 1.15;
  font-weight: 820;
  text-align: right;
}

#accountView .wallet-card {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 10px;
  align-items: center;
  margin-top: 2px;
  padding: 12px;
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(85, 167, 255, 0.08), rgba(109, 85, 242, 0.05)),
    rgba(255, 255, 255, 0.82);
  box-shadow: inset 0 0 0 1px rgba(213, 224, 240, 0.78);
}

#accountView .wallet-bg,
#accountView .wallet-card::after {
  display: none;
}

#accountView .wallet-card small {
  grid-column: 1;
  color: #55a7ff !important;
  font-size: 12px !important;
  font-weight: 760;
}

#accountView .wallet-card #billingStatus {
  grid-column: 1;
  margin: 0;
  color: #667085;
  font-size: 12px;
}

#accountView .gold-balance-line {
  grid-column: 2;
  grid-row: 1 / span 2;
  width: auto;
  min-width: 112px;
  min-height: 42px;
  grid-template-columns: minmax(0, 1fr);
  justify-items: end;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255, 247, 223, 0.88);
}

#accountView .gold-balance-line::after {
  content: none;
}

#accountView .gold-balance-line span {
  font-size: 11px;
}

#accountView .gold-balance-line strong {
  font-size: 14px;
}

#accountView .reward-limit-hint {
  grid-column: 1 / -1;
  margin: 3px 0 0;
  font-size: 11px;
}

#accountView .reward-task-summary {
  grid-column: 1 / -1;
  margin-top: 4px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.66);
}

#accountView .pricing-list {
  display: none;
}

/* Keep the center creation tab independent from global brand-color sweeps. */
.tab-item[data-view="studioView"] {
  color: var(--muted);
}

.tab-item[data-view="studioView"].active {
  color: var(--brand);
}

.tab-item[data-view="studioView"] .tab-logo-icon,
.tab-item[data-view="studioView"].active .tab-logo-icon {
  width: 48px;
  height: 34px;
  margin-top: -2px;
  margin-bottom: -2px;
  border-radius: 8px;
  background: transparent !important;
  box-shadow: none !important;
}

.tab-item[data-view="studioView"] .tab-logo-icon img {
  width: 46px;
  height: 32px;
  object-fit: contain;
}

/* Clean earnings card */
#accountView .wallet-card {
  grid-template-columns: 1fr;
  justify-items: center;
  gap: 8px;
  padding: 14px 12px;
}

#accountView .wallet-card small {
  justify-self: start;
  font-size: 24px !important;
  line-height: 1.1;
  letter-spacing: 0;
  text-transform: none;
}

#accountView .wallet-card #billingStatus,
#accountView .wallet-card .reward-limit-hint,
#accountView .wallet-card .reward-task-summary {
  display: none !important;
}

#accountView .gold-balance-line {
  grid-column: 1;
  grid-row: auto;
  width: min(320px, 100%);
  min-height: 72px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 248, 218, 0.98), rgba(255, 235, 166, 0.86));
  box-shadow: inset 0 0 0 1px rgba(244, 185, 65, 0.24), 0 10px 24px rgba(202, 137, 0, 0.08);
}

#accountView .earnings-metric {
  min-width: 0;
  flex: 1 1 0;
  display: grid;
  justify-items: center;
  gap: 5px;
}

#accountView .earnings-metric em {
  color: #9a6a00;
  font-size: 12px;
  line-height: 1;
  font-style: normal;
  font-weight: 760;
}

#accountView .earnings-divider {
  width: 1px;
  height: 34px;
  flex: 0 0 auto;
  background: rgba(154, 106, 0, 0.16);
}

#accountView .gold-balance-line strong {
  color: #7a4d00;
  font-size: 25px;
  line-height: 1;
  font-weight: 860;
}

#accountView .earnings-report {
  display: grid;
  gap: 10px;
}

#accountView .earnings-report-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

#accountView .earnings-report-grid article {
  min-width: 0;
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid rgba(232, 236, 242, 0.88);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
}

#accountView .earnings-report-grid span {
  color: #7a8494;
  font-size: 11px;
  line-height: 1.1;
}

#accountView .earnings-report-grid strong {
  color: #101828;
  font-size: 16px;
  line-height: 1.15;
  font-weight: 860;
}

#accountView .earnings-report p {
  margin: 0;
  padding: 0 2px;
  color: #7a8494;
  font-size: 12px;
  line-height: 1.45;
}

#accountView .reward-panel .reward-module-summary {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 10px;
  padding: 10px;
  border: 1px solid rgba(232, 236, 242, 0.92);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 248, 223, 0.92), rgba(255, 255, 255, 0.88));
  box-shadow: none;
}

#accountView .reward-panel .reward-module-summary:empty {
  display: none !important;
}

#accountView .reward-quota-line {
  min-width: 0;
  display: grid;
  gap: 3px;
  padding: 8px 9px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.74);
}

#accountView .reward-quota-line span {
  color: #7a8494;
  font-size: 11px;
  line-height: 1.1;
}

#accountView .reward-quota-line strong {
  color: #7a4d00 !important;
  font-size: 15px;
  line-height: 1.15;
  font-weight: 860;
  white-space: nowrap;
}

#accountView .reward-module-summary .task-meter {
  grid-column: 1 / -1;
  height: 4px;
  margin-top: 1px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(154, 106, 0, 0.12);
}

#accountView .reward-module-summary .task-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ffd45a, #f5a400);
}

/* Logo blue brand normalization */
.view-title,
.asset-add-btn,
.asset-generate-btn,
.asset-card.selected .asset-name,
.model-chip.active,
.duration-option.active,
.template-chip.active,
.auto-agent-confirm-head span,
.auto-agent-confirm-head strong,
.auto-agent-prompt-editor span,
#accountView .account-top-balance,
#accountView .wallet-card small,
#accountView .profile-edit-button,
#accountView .billing-link,
#accountView .gold-convert-entry,
.work-action.primary,
.work-stat.is-active,
.fullscreen-action.is-active {
  color: #55a7ff !important;
}

.primary,
.recharge-shortcut,
.auto-agent-input button,
.auto-agent-confirm-actions .primary,
.auto-agent-manual-btn,
.auto-agent-clear-btn,
.asset-selected-check,
.creator-submit-btn,
.download-primary,
.reward-watch-btn,
.gold-convert-primary {
  background: #55a7ff !important;
  color: #ffffff !important;
}

.primary-gradient,
.login-primary,
.studio-model-trigger,
.creator-tab-logo,
.generate-fab,
.ad-reward-primary {
  background: linear-gradient(135deg, #55a7ff 0%, #6d55f2 100%) !important;
}

.model-chip.active,
.duration-option.active,
.template-chip.active,
.asset-card.selected,
.auto-agent-confirm,
.auto-agent-prompt-editor textarea:focus {
  border-color: rgba(85, 167, 255, 0.24) !important;
  box-shadow: 0 10px 24px rgba(85, 167, 255, 0.08);
}

.auto-agent-confirm {
  gap: 8px;
  padding: 10px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 251, 255, 0.94));
}

.auto-agent-confirm-head span {
  font-size: 12px;
  line-height: 1.2;
}

.auto-agent-confirm-head strong {
  padding: 4px 7px;
  background: rgba(85, 167, 255, 0.1) !important;
  font-size: 10px;
}

.auto-agent-plan-meta {
  gap: 5px;
}

.auto-agent-plan-meta span {
  padding: 6px 7px;
  border-radius: 10px;
  background: rgba(248, 251, 255, 0.92);
  font-size: 10px;
}

.auto-agent-input {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "input"
    "voice";
  justify-items: center;
  gap: 18px;
  padding-bottom: 24px;
}

.auto-agent-input button {
  min-height: 56px;
  border-radius: 12px;
  font-size: 12px;
}

#studioView .auto-agent-input textarea {
  grid-area: input;
}

#studioView .auto-agent-input .voice-input-button {
  grid-area: voice;
  width: 168px;
  min-width: 168px;
  min-height: 48px;
  height: 48px;
  padding: 0 18px;
  justify-self: center;
  margin-top: 92px;
  margin-bottom: 2px;
  border-radius: 999px;
  background: linear-gradient(135deg, #55a7ff 0%, #7aa7ff 100%) !important;
  color: #fff !important;
  font-size: 10px;
}

#studioView .voice-input-button.listening {
  background: linear-gradient(135deg, #55a7ff 0%, #7aa7ff 100%) !important;
  color: #fff !important;
}

/* Account earnings visual balance */
#accountView .wallet-card {
  gap: 7px;
  padding: 12px;
}

#accountView .wallet-card small {
  font-size: 15px !important;
  line-height: 1.2;
  font-weight: 800 !important;
}

#accountView .gold-balance-line {
  width: min(280px, 100%);
  min-height: 58px;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 15px;
  box-shadow: inset 0 0 0 1px rgba(244, 185, 65, 0.2), 0 8px 18px rgba(202, 137, 0, 0.06);
}

#accountView .earnings-metric {
  gap: 4px;
}

#accountView .earnings-metric em {
  font-size: 11px;
  font-weight: 760;
}

#accountView .gold-balance-line strong {
  font-size: 18px;
  font-weight: 820;
}

#accountView .earnings-divider {
  height: 28px;
}

#accountView .invite-code-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 10px;
  padding: 10px 12px;
  border: 1px solid rgba(232, 236, 242, 0.92);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
}

#accountView .invite-code-card span {
  color: #7a8494;
  font-size: 12px;
}

#accountView .invite-code-card strong {
  color: #101828;
  font-size: 15px;
  font-weight: 860;
  letter-spacing: 0.04em;
}

/* Keep the works filter fixed while the feed or pull gesture moves. */
#worksView .works-switch {
  z-index: 20;
  background: rgba(255, 255, 255, 0.98);
  isolation: isolate;
  transform: none !important;
  will-change: auto;
}

#worksView .works-switch::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -18px;
  right: -14px;
  bottom: -10px;
  left: -14px;
  background: var(--screen);
  pointer-events: none;
}

/* Agent asset library picker */
.auto-agent-rich.asset-library {
  align-items: flex-start;
}

.auto-agent-library-card {
  width: 100%;
  border: 1px solid rgba(85, 167, 255, 0.2);
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(244,248,255,0.96));
  border-radius: 16px;
  padding: 13px;
  box-shadow: 0 12px 30px rgba(48, 113, 203, 0.1);
}

.auto-agent-library-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.auto-agent-library-head strong {
  display: block;
  color: #142033;
  font-size: 16px;
  font-weight: 700 !important;
}

.auto-agent-library-head small,
.auto-agent-library-note,
.auto-agent-library-section header small {
  color: #667085;
  font-size: 12px;
  line-height: 1.45;
}

.auto-agent-library-note {
  margin: 0 0 12px;
}

.auto-agent-library-section {
  margin-top: 12px;
}

.auto-agent-library-section header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.auto-agent-library-section header strong {
  display: block;
  color: #1d2939;
  font-size: 14px;
  font-weight: 700 !important;
}

.auto-agent-library-section header em {
  color: #55a7ff;
  font-style: normal;
  font-size: 12px;
  font-weight: 700 !important;
}

.auto-agent-library-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.auto-agent-library-item {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  padding: 5px;
  border: 1px solid #e4eaf2;
  border-radius: 12px;
  background: #fff;
  color: #1d2939;
  text-align: left;
  overflow: hidden;
}

.auto-agent-library-item img,
.auto-agent-library-thumb-empty {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 9px;
  object-fit: cover;
  background: #eef3fb;
}

.auto-agent-library-thumb-empty {
  display: grid;
  place-items: center;
  color: #98a2b3;
  font-size: 12px;
}

.auto-agent-library-item span {
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #344054;
  font-size: 11px;
  line-height: 1.25;
}

.auto-agent-library-item i {
  position: absolute;
  top: 8px;
  right: 8px;
  display: none;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #55a7ff;
  color: #fff;
  place-items: center;
  font-style: normal;
  font-size: 13px;
  font-weight: 800 !important;
  box-shadow: 0 6px 16px rgba(85, 167, 255, 0.35);
}

.auto-agent-library-item.selected {
  border-color: #55a7ff;
  box-shadow: 0 0 0 2px rgba(85, 167, 255, 0.16);
}

.auto-agent-library-item.selected i {
  display: grid;
}

.auto-agent-library-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 14px 10px;
  border: 1px dashed #d8e0ea;
  border-radius: 12px;
  color: #98a2b3;
  background: rgba(255,255,255,0.72);
  font-size: 12px;
  text-align: center;
}

.auto-agent-library-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
}

.auto-agent-library-actions button {
  min-height: 38px;
  border-radius: 999px;
  background: #eef5ff;
  color: #277bd8;
  font-size: 12px;
  font-weight: 700 !important;
}

.auto-agent-library-actions button:last-child {
  background: linear-gradient(135deg, #55a7ff, #6a80ff);
  color: #fff;
}
/* Stable hold-to-talk button with ripple */
.auto-agent-voice-btn,
#studioView .auto-agent-input .voice-input-button {
  position: relative;
  overflow: visible;
  transform: none !important;
  will-change: auto;
}

.auto-agent-voice-btn::before,
.auto-agent-voice-btn::after,
#studioView .auto-agent-input .voice-input-button::before,
#studioView .auto-agent-input .voice-input-button::after {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 999px;
  pointer-events: none;
  opacity: 0;
  border: 1px solid rgba(85, 167, 255, 0.38);
  box-shadow: 0 0 0 0 rgba(85, 167, 255, 0.22);
}

.auto-agent-voice-btn.pressing,
.auto-agent-voice-btn.listening,
#studioView .auto-agent-input .voice-input-button.pressing,
#studioView .auto-agent-input .voice-input-button.listening {
  transform: none !important;
  filter: none;
}

.auto-agent-voice-btn.pressing::before,
.auto-agent-voice-btn.listening::before,
#studioView .auto-agent-input .voice-input-button.pressing::before,
#studioView .auto-agent-input .voice-input-button.listening::before {
  animation: agent-voice-ripple 1.25s ease-out infinite;
}

.auto-agent-voice-btn.pressing::after,
.auto-agent-voice-btn.listening::after,
#studioView .auto-agent-input .voice-input-button.pressing::after,
#studioView .auto-agent-input .voice-input-button.listening::after {
  animation: agent-voice-ripple 1.25s ease-out infinite 0.42s;
}

@keyframes agent-voice-ripple {
  0% {
    opacity: 0.72;
    transform: scale(0.96);
    box-shadow: 0 0 0 0 rgba(85, 167, 255, 0.26);
  }
  72% {
    opacity: 0.1;
    transform: scale(1.2);
    box-shadow: 0 0 0 12px rgba(85, 167, 255, 0);
  }
  100% {
    opacity: 0;
    transform: scale(1.26);
    box-shadow: 0 0 0 16px rgba(85, 167, 255, 0);
  }
}
/* Agent intent clarification */
.auto-agent-intent-card {
  width: 100%;
  border: 1px solid rgba(85, 167, 255, 0.18);
  border-radius: 16px;
  padding: 14px;
  background: linear-gradient(180deg, #ffffff, #f4f8ff);
  box-shadow: 0 12px 28px rgba(48, 113, 203, 0.09);
}

.auto-agent-intent-card > strong {
  display: block;
  color: #142033;
  font-size: 15px;
  font-weight: 750 !important;
  margin-bottom: 6px;
}

.auto-agent-intent-card p {
  color: #667085;
  font-size: 12px;
  line-height: 1.55;
  margin: 0 0 10px;
}

.auto-agent-intent-examples {
  display: grid;
  gap: 6px;
  margin: 10px 0 12px;
}

.auto-agent-intent-examples span {
  display: block;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(85, 167, 255, 0.08);
  color: #344054;
  font-size: 11px;
  line-height: 1.35;
}

.auto-agent-intent-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.auto-agent-intent-actions button {
  min-height: 38px;
  border-radius: 999px;
  background: #eef5ff;
  color: #277bd8;
  font-size: 12px;
  font-weight: 700 !important;
}

.auto-agent-intent-actions button:last-child {
  background: linear-gradient(135deg, #55a7ff, #6a80ff);
  color: #fff;
}
/* Agent command/status separation */
.studio-agent-inline #autoCreateStatus {
  display: none !important;
  min-height: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

.auto-agent-panel .auto-voice-wave-panel {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 8;
  transform: translate(-50%, -50%);
  margin: 0;
  pointer-events: none;
  box-shadow: 0 16px 42px rgba(15, 35, 70, 0.16);
}

.auto-agent-panel .auto-voice-wave-panel.hidden {
  display: none !important;
}

.auto-agent-text-card {
  width: 100%;
  border: 1px solid rgba(85, 167, 255, 0.18);
  border-radius: 16px;
  padding: 14px;
  background: linear-gradient(180deg, #ffffff, #f6f9ff);
  box-shadow: 0 12px 28px rgba(48, 113, 203, 0.08);
}

.auto-agent-text-card strong {
  display: block;
  color: #142033;
  font-size: 15px;
  font-weight: 750 !important;
  margin-bottom: 6px;
}

.auto-agent-text-card p {
  margin: 0 0 10px;
  color: #667085;
  font-size: 12px;
  line-height: 1.45;
}

.auto-agent-text-card pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  padding: 12px;
  border-radius: 12px;
  background: rgba(85, 167, 255, 0.08);
  color: #1d2939;
  font: inherit;
  font-size: 12px;
  line-height: 1.6;
}
/* Agent history and voice hint */
.auto-agent-history-btn {
  position: absolute;
  right: 14px;
  bottom: 118px;
  z-index: 12;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 58px;
  height: 34px;
  min-height: 34px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(20, 32, 51, 0.82);
  color: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.22);
  backdrop-filter: blur(10px);
}

.auto-agent-history-btn.hidden {
  display: none;
}

.auto-agent-history-btn.active {
  background: linear-gradient(135deg, #55a7ff, #6a80ff);
}

.auto-agent-history-btn span {
  font-size: 11px;
  font-weight: 700 !important;
}

.auto-agent-history-btn strong {
  display: grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  font-size: 10px;
  font-weight: 800 !important;
}

.studio-agent-inline #autoAgentTaskList:not(.hidden) {
  position: absolute;
  right: 12px;
  bottom: 158px;
  z-index: 11;
  width: min(320px, calc(100% - 24px));
  max-height: min(54vh, 420px);
  overflow: auto;
  box-shadow: 0 20px 52px rgba(15, 23, 42, 0.2);
}

.auto-agent-voice-hint {
  grid-area: hint;
  margin-top: -12px;
  color: #7a8494;
  font-size: 13px;
  font-weight: 760;
  line-height: 1.2;
  text-align: center;
}

.auto-agent-input,
#studioView .auto-agent-input {
  grid-template-areas:
    "input"
    "voice"
    "hint";
}
/* Agent taller canvas and lower command input */
.studio-agent-inline .auto-agent-panel {
  min-height: calc(100dvh - 92px);
  grid-template-rows: auto minmax(274px, 1fr) auto auto auto;
}

#studioView .auto-agent-input {
  margin-top: 56px;
}

#studioView .auto-agent-overlay.auto-agent-has-draft .auto-agent-input {
  margin-top: 0;
}
/* Manual typed Agent command confirm */
#studioView .auto-agent-input,
.auto-agent-input {
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "input confirm"
    "voice voice"
    "hint hint";
  column-gap: 8px;
  row-gap: 14px;
}

.auto-agent-text-confirm {
  grid-area: confirm;
  align-self: center;
  width: 54px;
  min-width: 54px;
  height: 36px;
  min-height: 36px !important;
  padding: 0;
  border-radius: 999px !important;
  background: linear-gradient(135deg, #55a7ff, #6a80ff) !important;
  color: #fff !important;
  font-size: 12px !important;
  font-weight: 750 !important;
  box-shadow: 0 8px 18px rgba(85, 167, 255, 0.2);
}

.auto-agent-text-confirm.hidden {
  display: none;
}

.auto-agent-text-confirm:disabled {
  opacity: 0.52;
}
/* Works upload plus entry */
#worksView .works-topbar {
  position: sticky;
  top: 0;
  z-index: 25;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36px;
  gap: 7px;
  align-items: center;
  margin: 0 0 14px;
  padding: 0 0 8px;
  background: var(--screen);
}

#worksView .works-topbar .works-switch {
  position: relative;
  top: auto;
  z-index: 1;
  width: 66%;
  min-width: 190px;
  max-width: 270px;
  height: 38px;
  margin: 0;
  padding: 3px;
  transform: none !important;
}

#worksView .works-topbar .works-switch::before {
  display: none;
}

#worksView .works-topbar .works-switch button {
  min-height: 30px;
  font-size: 12px;
}

.works-upload-plus {
  width: 36px;
  height: 36px;
  min-height: 36px;
  border-radius: 999px;
  background: linear-gradient(135deg, #55a7ff, #6a80ff);
  color: #fff;
  font-size: 23px;
  line-height: 1;
  font-weight: 500 !important;
  box-shadow: 0 8px 20px rgba(85, 167, 255, 0.22);
}

.works-upload-plus.busy {
  animation: mh-upload-pulse 0.9s ease-in-out infinite;
}

@keyframes mh-upload-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.94); opacity: 0.72; }
}
/* Compact work card header: model below time */
#worksView .work-title {
  align-items: flex-start;
}

#worksView .work-side-meta {
  flex: 0 0 auto;
  max-width: 138px;
  display: grid;
  justify-items: end;
  gap: 4px;
  text-align: right;
}

#worksView .work-side-meta small {
  max-width: 138px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #98a2b3;
  font-size: 10px;
  line-height: 1.15;
}

#worksView .work-side-meta .model-badge {
  max-width: 138px;
  min-height: 0;
  padding: 2px 7px;
  border: 0;
  border-radius: 999px;
  background: rgba(85, 167, 255, 0.1);
  color: #55a7ff;
  font-size: 10px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#worksView .work-side-meta em {
  color: #667085;
  font-size: 10px;
  line-height: 1.1;
  font-style: normal;
}

#worksView .work-meta-row {
  display: none;
}
/* Prevent works feed from showing through the sticky tab gap */
#worksView .works-topbar {
  isolation: isolate;
}

#worksView .works-topbar::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -28px;
  right: -14px;
  bottom: 0;
  left: -14px;
  background: var(--screen);
  pointer-events: none;
}

#worksView .works-topbar > * {
  position: relative;
  z-index: 1;
}
/* Invite network card */
#accountView .invite-bind-card,
#accountView .invite-network-card {
  display: grid;
  gap: 9px;
  margin: 0 0 10px;
  padding: 11px 12px;
  border: 1px solid rgba(232, 236, 242, 0.92);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
}

#accountView .invite-bind-card.hidden {
  display: none;
}

#accountView .invite-bind-card > span,
#accountView .invite-network-head span {
  color: #7a8494;
  font-size: 12px;
}

#accountView .invite-bind-card > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px;
  gap: 8px;
}

#accountView .invite-bind-card input {
  min-height: 38px;
  border-radius: 12px;
  font-size: 13px;
}

#accountView .invite-bind-card button {
  min-height: 38px;
  border-radius: 12px;
  background: #55a7ff;
  color: #fff;
  font-size: 13px;
}

#accountView .invite-network-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

#accountView .invite-network-head strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #101828;
  font-size: 12px;
}

#accountView .invite-network-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

#accountView .invite-network-metrics article {
  display: grid;
  gap: 3px;
  padding: 8px;
  border-radius: 12px;
  background: #f5f8fc;
}

#accountView .invite-network-metrics em {
  color: #7a8494;
  font-size: 10px;
  font-style: normal;
}

#accountView .invite-network-metrics strong {
  color: #101828;
  font-size: 16px;
  line-height: 1.1;
}

#accountView .invite-level-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

#accountView .invite-level-list span {
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(85, 167, 255, 0.1);
  color: #348fff;
  font-size: 11px;
}
/* Account fold arrows: compact chevron symbol instead of text. */
#accountView .account-fold summary .fold-arrow {
  width: 22px;
  min-width: 22px;
  text-align: center;
  font-size: 24px;
  line-height: 1;
  font-weight: 500;
  color: #98a2b3;
  transform-origin: center;
}

#accountView .account-fold[open] summary .fold-arrow {
  font-size: 24px;
  color: #55a7ff;
  opacity: 0.72;
  transform: rotate(90deg);
}

#accountView .account-fold[open] summary .fold-arrow::before {
  content: none;
}

/* Voice button no-shift overlay v1 */
.studio-agent-inline .auto-agent-panel {
  position: relative !important;
}

.studio-agent-inline .auto-agent-panel .auto-voice-wave-panel {
  position: absolute !important;
  left: 50% !important;
  top: 46% !important;
  z-index: 18 !important;
  display: flex !important;
  width: min(210px, 76%) !important;
  min-height: 54px !important;
  margin: 0 !important;
  transform: translate(-50%, -50%) !important;
  pointer-events: none !important;
  grid-area: unset !important;
}

.studio-agent-inline .auto-agent-panel .auto-voice-wave-panel.hidden {
  display: none !important;
}

.studio-agent-inline .auto-agent-input,
.studio-agent-inline .auto-agent-voice-btn,
.studio-agent-inline .auto-agent-voice-btn.pressing,
.studio-agent-inline .auto-agent-voice-btn.listening {
  transform: none !important;
  translate: none !important;
}

/* Account recharge balance contrast v1 */
#accountView .account-recharge-zone #balanceLabel.account-top-balance {
  color: #172033 !important;
  font-weight: 900 !important;
  opacity: 1 !important;
  text-shadow: none !important;
}

/* Account balance order v1 */
#accountView .account-recharge-zone {
  gap: 7px !important;
}

#accountView .account-recharge-zone #balanceLabel.account-top-balance {
  max-width: 168px !important;
  color: #172033 !important;
  font-size: 14px !important;
  font-weight: 900 !important;
  line-height: 1.2 !important;
  opacity: 1 !important;
  text-align: right !important;
}

/* Voice button no-shift v2 */
.studio-agent-inline .auto-agent-input {
  position: relative !important;
  contain: layout paint !important;
  min-height: 230px !important;
  height: 230px !important;
  align-content: start !important;
  grid-template-rows: minmax(56px, 96px) 48px 18px !important;
  gap: 12px !important;
  padding-bottom: 0 !important;
}

.studio-agent-inline .auto-agent-input textarea {
  max-height: 96px !important;
  overflow-y: auto !important;
}

.studio-agent-inline .auto-agent-voice-btn {
  margin-top: 58px !important;
  margin-bottom: 0 !important;
  transform: none !important;
  translate: none !important;
}

.studio-agent-inline .auto-agent-voice-hint {
  margin-top: -2px !important;
}

.studio-agent-inline .auto-agent-voice-btn.pressing,
.studio-agent-inline .auto-agent-voice-btn.listening {
  transform: none !important;
  translate: none !important;
  top: auto !important;
}

.studio-agent-inline .auto-agent-panel .auto-voice-wave-panel {
  position: absolute !important;
  left: 50% !important;
  top: 42% !important;
  transform: translate(-50%, -50%) !important;
  margin: 0 !important;
  grid-area: unset !important;
  pointer-events: none !important;
}

/* Works upload plus visual v1 */
#worksView .works-upload-plus {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 36px !important;
  height: 36px !important;
  min-height: 36px !important;
  padding: 0 0 2px !important;
  border-radius: 999px !important;
  background: linear-gradient(135deg, rgba(85, 167, 255, 0.82), rgba(106, 128, 255, 0.78)) !important;
  color: #fff !important;
  font-size: 21px !important;
  line-height: 1 !important;
  font-weight: 600 !important;
  box-shadow: 0 6px 16px rgba(85, 167, 255, 0.16) !important;
}
