:root {
  color-scheme: light;
  --ink: #111114;
  --ink-soft: #3c3c43;
  --muted: #777985;
  --line: rgba(60, 60, 67, 0.16);
  --panel: rgba(255, 255, 255, 0.78);
  --paper: #f5f7fb;
  --dark: #050507;
  --blue: #0071e3;
  --shadow: 0 28px 80px rgba(20, 24, 34, 0.12);
  --radius-lg: 28px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100dvh;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 8%, rgba(0, 113, 227, 0.16), transparent 28rem),
    radial-gradient(circle at 84% 18%, rgba(190, 220, 255, 0.7), transparent 30rem),
    linear-gradient(180deg, #fbfbfd 0%, var(--paper) 46%, #fff 100%);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  text-rendering: geometricPrecision;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  opacity: 0.24;
  background-image:
    linear-gradient(rgba(17, 17, 20, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 17, 20, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, #000, transparent 82%);
}

button {
  border: 0;
  font: inherit;
}

h2,
p {
  margin: 0;
}

.app-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
  width: calc(100% - 24px);
  height: 100dvh;
  max-width: 100%;
  margin: 0 auto;
  overflow-x: hidden;
  padding: 18px 0;
}

.glass-nav {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(1500px, 100%);
  margin: 0 auto;
  padding: 10px 12px 10px 18px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.64);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(26px) saturate(180%);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  overflow: hidden;
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-dot {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 9px;
  background: url("/static/assets/suying-ai-icon-blue.svg") center / cover no-repeat;
  box-shadow: 0 12px 28px rgba(0, 113, 227, 0.2);
}

.brand-text {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  line-height: 1;
}

.brand-name {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system,
    BlinkMacSystemFont, sans-serif;
  font-weight: 800;
}

.brand-ai {
  color: var(--blue);
  font-family: "SF Pro Text", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.86em;
  font-weight: 750;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

[data-auth-nav] {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.nav-link,
.page-mark {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 16px;
  overflow: hidden;
  border: 1px solid rgba(0, 113, 227, 0.18);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(236, 246, 255, 0.56)),
    rgba(0, 113, 227, 0.07);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    0 10px 28px rgba(0, 113, 227, 0.08);
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  transition:
    transform 220ms var(--ease),
    border-color 220ms var(--ease),
    background 220ms var(--ease),
    box-shadow 220ms var(--ease),
    color 220ms var(--ease);
  backdrop-filter: blur(18px) saturate(160%);
}

.nav-link::before,
.page-mark::before {
  position: absolute;
  inset: 1px 1px auto;
  height: 46%;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.68), transparent);
  content: "";
  pointer-events: none;
}

.nav-link:hover,
.nav-link:focus-visible,
.page-mark:hover {
  border-color: rgba(0, 113, 227, 0.34);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(221, 239, 255, 0.7)),
    rgba(0, 113, 227, 0.13);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.94),
    0 14px 34px rgba(0, 113, 227, 0.16);
  color: #005bb8;
  outline: none;
  transform: translateY(-1px);
}

.glass-nav .nav-link,
.glass-nav .status-pill,
.glass-nav .auth-user-trigger {
  border-color: rgba(0, 113, 227, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(236, 246, 255, 0.56)),
    rgba(0, 113, 227, 0.07);
  color: var(--blue);
}

.glass-nav .nav-link:hover,
.glass-nav .nav-link:focus-visible,
.glass-nav .auth-user-trigger:hover,
.glass-nav .auth-user-trigger:focus-visible {
  border-color: rgba(0, 113, 227, 0.34);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(221, 239, 255, 0.7)),
    rgba(0, 113, 227, 0.13);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.94),
    0 14px 34px rgba(0, 113, 227, 0.16);
  color: #005bb8;
  outline: none;
  transform: translateY(-1px);
}

.auth-logout {
  cursor: pointer;
}

.auth-menu {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.auth-user-trigger {
  cursor: pointer;
}

.auth-menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 40;
  display: grid;
  gap: 6px;
  min-width: 132px;
  padding: 8px;
  border: 1px solid rgba(0, 113, 227, 0.18);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(233, 244, 255, 0.72)),
    rgba(255, 255, 255, 0.76);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 22px 58px rgba(0, 113, 227, 0.14),
    0 14px 42px rgba(20, 24, 34, 0.1);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px) scale(0.98);
  transform-origin: top right;
  transition:
    opacity 180ms var(--ease),
    transform 180ms var(--ease);
  backdrop-filter: blur(22px) saturate(170%);
}

.auth-menu::after {
  position: absolute;
  right: 0;
  bottom: -10px;
  width: 100%;
  height: 10px;
  content: "";
}

.auth-menu:hover .auth-menu-panel,
.auth-menu:focus-within .auth-menu-panel,
.auth-menu.open .auth-menu-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.auth-menu-item {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(0, 113, 227, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.54);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  transition:
    transform 200ms var(--ease),
    border-color 200ms var(--ease),
    background 200ms var(--ease),
    color 200ms var(--ease),
    box-shadow 200ms var(--ease);
}

.auth-menu-item:hover,
.auth-menu-item:focus-visible {
  border-color: rgba(0, 113, 227, 0.24);
  background: rgba(0, 113, 227, 0.11);
  box-shadow: 0 10px 26px rgba(0, 113, 227, 0.1);
  color: #005bb8;
  outline: none;
  transform: translateY(-1px);
}

.nav-divider {
  width: 1px;
  height: 22px;
  margin-left: 4px;
  background: rgba(60, 60, 67, 0.16);
}

.page-mark {
  cursor: default;
}

.status-pill {
  display: none;
  min-width: 112px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.studio-board {
  display: grid;
  grid-template-columns: minmax(340px, 390px) minmax(0, 1fr);
  align-items: stretch;
  gap: 14px;
  min-height: 0;
  width: min(1500px, 100%);
  margin: 0 auto;
}

.studio-intro {
  display: flex;
  flex-direction: column;
  justify-content: stretch;
  min-width: 0;
  min-height: 0;
}

.intro-blank {
  display: none;
}

.control-card,
.image-panel {
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(28px) saturate(180%);
}

.control-card {
  position: relative;
  overflow: auto;
  max-height: 100%;
  border-radius: var(--radius-lg);
  padding: 16px;
}

.control-card::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 255, 255, 0.88), transparent 32%),
    radial-gradient(circle at 100% 20%, rgba(0, 113, 227, 0.14), transparent 34%);
}

.control-card > * {
  position: relative;
}

.control-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

.control-head p,
.issue-panel span,
.panel-title span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.control-head strong {
  display: block;
  margin-top: 4px;
  font-size: clamp(21px, 1.7vw, 26px);
  line-height: 1.12;
}

.live-dot {
  width: 11px;
  height: 11px;
  margin-top: 5px;
  border-radius: 50%;
  background: #34c759;
  box-shadow: 0 0 0 6px rgba(52, 199, 89, 0.14), 0 0 26px rgba(52, 199, 89, 0.54);
}

.line-switch {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 8px;
  padding: 5px;
  border: 1px solid rgba(60, 60, 67, 0.13);
  border-radius: 999px;
  background: rgba(242, 242, 247, 0.72);
}

.line-option {
  min-width: 0;
  min-height: 34px;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 13px;
  font-weight: 850;
  transition:
    background 260ms var(--ease),
    box-shadow 260ms var(--ease),
    color 260ms var(--ease),
    transform 260ms var(--ease);
}

.line-option.active {
  background: rgba(0, 113, 227, 0.1);
  color: var(--blue);
  box-shadow: inset 0 0 0 1px rgba(0, 113, 227, 0.16);
}

.line-option:hover {
  transform: translateY(-1px);
}

.project-switch {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 6px;
  border: 1px solid rgba(60, 60, 67, 0.13);
  border-radius: 20px;
  background: rgba(242, 242, 247, 0.74);
}

.project {
  min-width: 0;
  min-height: 40px;
  padding: 5px 4px;
  border-radius: 13px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background 260ms var(--ease), box-shadow 260ms var(--ease), transform 260ms var(--ease);
}

.project span {
  display: block;
  font-size: 12px;
  font-weight: 850;
}

.project small {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.project.active {
  background: rgba(0, 113, 227, 0.1);
  color: var(--blue);
  box-shadow: inset 0 0 0 1px rgba(0, 113, 227, 0.16);
}

.project.active small {
  color: rgba(0, 113, 227, 0.72);
}

.project:hover {
  transform: translateY(-1px);
}

.issue-panel {
  margin-top: 8px;
  padding: 10px;
  border: 1px solid rgba(60, 60, 67, 0.12);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.54);
}

.issue-panel p {
  min-height: 28px;
  margin-top: 6px;
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.45;
}

.hero-cta,
.download-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.download-row {
  margin-top: 10px;
}

.primary-action,
.ghost-action,
.secondary-action {
  flex: 1 1 calc(50% - 5px);
  min-height: 35px;
  padding: 0 12px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
  transition:
    transform 280ms var(--ease),
    background 280ms var(--ease),
    border-color 280ms var(--ease),
    color 280ms var(--ease),
    opacity 280ms var(--ease);
}

.primary-action {
  background: var(--dark);
  color: #fff;
}

.ghost-action,
.secondary-action {
  border: 1px solid rgba(60, 60, 67, 0.18);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
}

.primary-action:hover {
  background: #222228;
  transform: translateY(-1px);
}

.control-card .primary-action {
  border: 1px solid rgba(0, 113, 227, 0.24);
  background: rgba(0, 113, 227, 0.1);
  color: var(--blue);
}

.control-card .primary-action:hover {
  border-color: rgba(0, 113, 227, 0.38);
  background: rgba(0, 113, 227, 0.14);
  color: #005bb8;
}

.ghost-action:hover,
.secondary-action:hover {
  border-color: rgba(0, 113, 227, 0.34);
  color: #005bb8;
  transform: translateY(-1px);
}

.primary-action:disabled,
.ghost-action:disabled,
.secondary-action:disabled,
.panel-action:disabled,
.line-option:disabled,
.project:disabled {
  cursor: not-allowed;
  opacity: 0.46;
  transform: none;
}

.secondary-action {
  padding-inline: 12px;
}

.stage-section {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: minmax(0, 1fr);
  gap: 14px;
  min-width: 0;
  min-height: 0;
  padding: 0;
}

.image-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
  padding: 14px;
  will-change: transform, opacity;
}

.image-panel.page-enter-next {
  animation: resultPageInNext 420ms var(--ease) both;
}

.image-panel.page-enter-prev {
  animation: resultPageInPrev 420ms var(--ease) both;
}

.panel-title {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 3px 4px 10px;
}

.panel-side {
  display: grid;
  justify-items: end;
  gap: 8px;
  min-width: min(230px, 48%);
}

.panel-title h2 {
  margin-top: 2px;
  font-size: clamp(22px, 2vw, 32px);
  letter-spacing: 0;
}

.panel-title small {
  max-width: 48%;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
  text-align: right;
}

.panel-side small {
  max-width: none;
}

.panel-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.panel-action {
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid rgba(60, 60, 67, 0.15);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--ink);
  cursor: pointer;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
  transition:
    transform 240ms var(--ease),
    border-color 240ms var(--ease),
    background 240ms var(--ease),
    color 240ms var(--ease),
    opacity 240ms var(--ease);
}

.panel-action.primary {
  border-color: rgba(0, 113, 227, 0.24);
  background: rgba(0, 113, 227, 0.1);
  color: var(--blue);
}

.panel-action:hover {
  border-color: rgba(0, 113, 227, 0.34);
  background: rgba(0, 113, 227, 0.12);
  color: #005bb8;
  transform: translateY(-1px);
}

.result-page-arrow {
  position: absolute;
  top: 50%;
  z-index: 12;
  display: grid;
  place-items: center;
  width: 42px;
  height: 78px;
  border: 1px solid rgba(0, 113, 227, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 16px 46px rgba(20, 24, 34, 0.12);
  color: var(--blue);
  cursor: pointer;
  font-size: 42px;
  font-weight: 600;
  line-height: 1;
  transform: translateY(-50%);
  transition:
    transform 240ms var(--ease),
    border-color 240ms var(--ease),
    background 240ms var(--ease),
    box-shadow 240ms var(--ease);
  backdrop-filter: blur(22px) saturate(170%);
}

.result-page-arrow:hover {
  border-color: rgba(0, 113, 227, 0.3);
  background: rgba(235, 245, 255, 0.88);
  box-shadow: 0 20px 58px rgba(0, 113, 227, 0.16);
  transform: translateY(-50%) scale(1.02);
}

.result-page-arrow.previous {
  left: -6px;
}

.result-page-arrow.next {
  right: -6px;
}

.image-slot {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  flex: 1;
  min-height: 0;
  border: 1px solid rgba(60, 60, 67, 0.12);
  border-radius: 22px;
  background: #fff;
}

.image-slot.loading::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, 0.62) 46%, transparent 72%);
  animation: shimmer 1.35s infinite;
  transform: translateX(-100%);
}

.image-slot img {
  display: none;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center center;
  opacity: 1;
  filter: none;
}

.image-slot.has-image img {
  display: block;
}

.image-slot.has-image .empty-state {
  display: none;
}

.empty-state {
  display: grid;
  gap: 14px;
  place-items: center;
  color: var(--muted);
  font-weight: 800;
}

.empty-state span {
  width: 72px;
  height: 72px;
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.24)),
    radial-gradient(circle at 30% 25%, rgba(0, 113, 227, 0.3), transparent 48%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.78), 0 18px 38px rgba(0, 0, 0, 0.09);
}

.hidden {
  display: none !important;
}

.auth-shell {
  grid-template-rows: auto minmax(0, 1fr);
}

.auth-board {
  display: grid;
  place-items: center;
  min-height: 0;
  padding: 10px;
}

.auth-card {
  width: min(460px, 100%);
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(28px) saturate(180%);
}

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

.auth-copy {
  max-width: 38ch;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.6;
}

.auth-form {
  display: grid;
  gap: 13px;
  margin-top: 20px;
}

.auth-form label {
  display: grid;
  gap: 7px;
}

.auth-form label span,
.profile-item span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.auth-form input,
.auth-form select {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(60, 60, 67, 0.14);
  border-radius: 16px;
  outline: none;
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  transition: border-color 180ms var(--ease), box-shadow 180ms var(--ease), background 180ms var(--ease);
}

.auth-form select {
  appearance: none;
}

.auth-form input:focus,
.auth-form select:focus {
  border-color: rgba(0, 113, 227, 0.48);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.1);
}

.register-type-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 5px;
  border: 1px solid rgba(60, 60, 67, 0.13);
  border-radius: 20px;
  background: rgba(242, 242, 247, 0.74);
}

.register-type-switch label {
  display: grid;
  gap: 3px;
  min-height: 62px;
  padding: 12px;
  border-radius: 16px;
  cursor: pointer;
  text-align: center;
}

.register-type-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.register-type-switch label:has(input:checked) {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.08);
}

.register-type-switch span {
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}

.register-type-switch small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.organization-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}

.organization-fields[hidden] {
  display: none;
}

.auth-message {
  display: none;
  min-height: 18px;
  color: #b42318;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.5;
}

.auth-message.visible {
  display: block;
}

.auth-message.success {
  color: #12805c;
}

.auth-submit {
  width: 100%;
  margin-top: 2px;
}

.auth-foot {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.auth-foot a {
  color: var(--blue);
  font-weight: 850;
  text-decoration: none;
}

.profile-board {
  display: grid;
  grid-template-columns: minmax(320px, 0.84fr) minmax(360px, 1.16fr);
  align-items: stretch;
  gap: 14px;
  width: min(980px, 100%);
  margin: auto;
}

.profile-card {
  width: 100%;
}

.profile-main,
.profile-side {
  display: flex;
  flex-direction: column;
}

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

.profile-item {
  min-width: 0;
  padding: 15px;
  border: 1px solid rgba(60, 60, 67, 0.1);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.52);
}

.profile-item strong {
  display: block;
  margin-top: 8px;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.35;
}

.wallet-card {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(60, 60, 67, 0.1);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(238, 247, 255, 0.78)),
    rgba(255, 255, 255, 0.72);
  color: var(--ink);
  box-shadow: 0 18px 42px rgba(0, 113, 227, 0.08);
}

.wallet-card span,
.plan-panel span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.wallet-card strong {
  display: block;
  margin-top: 4px;
  color: var(--blue);
  font-size: 28px;
  line-height: 1.1;
}

.wallet-card p {
  max-width: 34ch;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.6;
}

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

.plan-panel {
  display: grid;
  grid-template-columns: minmax(120px, auto) minmax(180px, 1fr);
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  padding: 14px;
  border-radius: 20px;
  border: 1px solid rgba(60, 60, 67, 0.1);
  background: rgba(255, 255, 255, 0.68);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.plan-panel strong {
  display: block;
  margin-top: 5px;
  font-size: 18px;
}

.plan-panel .secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 132px;
  min-height: 40px;
  padding: 0 18px;
  border-color: rgba(0, 113, 227, 0.24);
  background: rgba(0, 113, 227, 0.1);
  color: var(--blue);
  text-decoration: none;
}

.cost-panel,
.transaction-panel {
  margin-top: 14px;
}

.cost-panel h2,
.transaction-panel h2 {
  margin-bottom: 10px;
  font-size: 16px;
}

.cost-list,
.transaction-list {
  display: grid;
  gap: 8px;
}

.cost-list div,
.transaction-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid rgba(60, 60, 67, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.54);
}

.cost-list span,
.transaction-item span,
.transaction-list p {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.cost-list strong,
.transaction-item strong,
.transaction-item b {
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.transaction-item strong {
  display: block;
  margin-bottom: 4px;
}

.transaction-item b {
  white-space: nowrap;
}

.transaction-item b.credit {
  color: #12805c;
}

.transaction-item b.debit {
  color: #b42318;
}

.admin-board {
  display: grid;
  grid-template-columns: minmax(520px, 1.18fr) minmax(360px, 0.82fr);
  align-items: stretch;
  gap: 16px;
  width: min(1180px, 100%);
  margin: 0 auto;
}

.admin-shell {
  height: auto;
  min-height: 100dvh;
  overflow: auto;
}

.admin-card {
  width: 100%;
}

.admin-form {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 0;
}

.admin-adjust-panel {
  position: sticky;
  top: 10px;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  max-height: min(760px, calc(100dvh - 170px));
  overflow: hidden;
}

.admin-form-fields {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
  overscroll-behavior: contain;
}

.admin-form-fields label {
  gap: 6px;
}

.admin-form-fields input {
  min-height: 44px;
}

.admin-actions {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 10px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(60, 60, 67, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.7));
}

.admin-actions .primary-action,
.admin-actions .secondary-action {
  min-height: 44px;
  padding: 0 18px;
}

.admin-users-panel {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  min-height: min(760px, calc(100dvh - 118px));
}

.admin-users-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-users-head .auth-head {
  margin-bottom: 0;
}

.admin-users-head .secondary-action {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 18px;
}

.admin-users-summary {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(0, 113, 227, 0.14);
  border-radius: 18px;
  background: rgba(0, 113, 227, 0.08);
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
}

.admin-users-list {
  display: grid;
  align-content: start;
  gap: 10px;
  margin-top: 14px;
  min-height: 0;
  max-height: calc(100dvh - 340px);
  overflow-y: auto;
  padding-right: 4px;
  overscroll-behavior: contain;
}

.admin-users-list > p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.admin-user-row {
  cursor: pointer;
  display: grid;
  grid-template-columns: minmax(160px, 1.2fr) repeat(2, minmax(110px, 0.8fr));
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(60, 60, 67, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.58);
  transition: border-color 160ms var(--ease), background 160ms var(--ease), box-shadow 160ms var(--ease);
}

.admin-user-row:hover,
.admin-user-row.selected {
  border-color: rgba(0, 113, 227, 0.34);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: inset 0 0 0 1px rgba(0, 113, 227, 0.12), 0 10px 28px rgba(0, 113, 227, 0.08);
}

.admin-user-main strong,
.admin-user-metric b {
  display: block;
  color: var(--ink);
  font-size: 14px;
  font-weight: 950;
}

.admin-user-main span,
.admin-user-metric span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.admin-search {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.admin-search span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.admin-search input {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid rgba(60, 60, 67, 0.13);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.66);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 850;
  outline: none;
}

.admin-search input:focus {
  border-color: rgba(0, 113, 227, 0.42);
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.08);
}

.billing-shell {
  overflow: hidden;
}

.billing-board {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto auto auto;
  gap: 14px;
  width: min(1360px, 100%);
  min-height: 0;
  margin: 0 auto;
  padding: 22px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow);
  color: var(--ink);
  backdrop-filter: blur(28px) saturate(180%);
}

.billing-head,
.billing-toolbar,
.billing-checkout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.billing-brand {
  display: flex;
  align-items: center;
  gap: 18px;
}

.billing-gem {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: radial-gradient(circle at 30% 30%, #fff, #89c2ff 36%, var(--blue) 72%);
  color: #fff;
  box-shadow: 0 14px 34px rgba(0, 113, 227, 0.22);
  font-size: 24px;
  font-weight: 950;
}

.billing-brand h1 {
  margin: 0;
  font-size: 26px;
  line-height: 1.1;
}

.billing-brand p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.billing-tabs,
.billing-cycle {
  display: inline-flex;
  padding: 5px;
  border: 1px solid rgba(60, 60, 67, 0.13);
  border-radius: 999px;
  background: rgba(242, 242, 247, 0.74);
}

.billing-tabs button,
.billing-cycle button {
  min-width: 92px;
  min-height: 42px;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 14px;
  font-weight: 900;
}

.billing-tabs button.active,
.billing-cycle button.active {
  background: rgba(255, 255, 255, 0.95);
  color: var(--ink);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.08);
}

.invite-pill,
.exchange-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 16px;
  border: 1px solid rgba(0, 113, 227, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 850;
}

.invite-pill b,
.exchange-pill b {
  color: var(--ink);
}

.billing-balance {
  min-width: 118px;
  text-align: right;
}

.billing-balance span,
.pay-box span,
.duration-box span,
.amount-box span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.billing-balance strong {
  color: var(--blue);
  font-size: 20px;
}

.billing-content {
  display: none;
  min-height: 0;
}

.billing-content.active {
  display: grid;
  gap: 18px;
}

.billing-card-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
  min-height: 0;
  overflow: auto;
  padding: 10px 4px 14px;
}

.credit-grid {
  grid-template-columns: repeat(3, minmax(260px, 1fr));
}

.billing-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 330px;
  padding: 24px 22px 20px;
  overflow: hidden;
  border: 1px solid rgba(60, 60, 67, 0.11);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.66);
  cursor: pointer;
  transition: border-color 180ms var(--ease), box-shadow 180ms var(--ease), transform 180ms var(--ease);
}

.billing-card.selected {
  border-color: rgba(0, 113, 227, 0.74);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: inset 0 0 0 1px rgba(0, 113, 227, 0.34), 0 16px 46px rgba(0, 113, 227, 0.14);
  transform: translateY(-2px);
}

.billing-card h2 {
  margin: 0;
  text-align: center;
  font-size: 21px;
}

.billing-card p {
  display: inline-flex;
  align-self: center;
  justify-content: center;
  max-width: 18ch;
  margin-top: 16px;
  padding: 6px 10px;
  border-radius: 5px;
  background: rgba(242, 242, 247, 0.82);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.35;
  text-align: center;
}

.billing-price {
  margin-top: 28px;
  text-align: center;
  color: var(--blue);
  font-size: 40px;
  font-weight: 950;
  line-height: 1;
}

.billing-price span,
.billing-price small,
.billing-card h2 small {
  color: var(--muted);
  font-size: 16px;
  font-weight: 900;
}

.billing-card button {
  min-height: 46px;
  margin-top: 34px;
  border-radius: 999px;
  background: #050505;
  color: #fff;
  cursor: pointer;
  font-size: 15px;
  font-weight: 950;
}

.billing-card.purple button {
  background: #050505;
  color: #fff;
}

.billing-card.lime button {
  background: #050505;
  color: #fff;
}

.billing-card.cyan button {
  background: #050505;
  color: #fff;
}

.billing-card.orange button {
  background: #050505;
  color: #fff;
}

.billing-card ul {
  display: grid;
  gap: 8px;
  margin: 18px 0 0;
  padding: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
  list-style: none;
}

.billing-card li::before {
  margin-right: 7px;
  color: #12805c;
  content: "✓";
}

.billing-badge {
  position: absolute;
  top: 18px;
  right: 18px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(0, 113, 227, 0.12);
  color: var(--blue);
  font-size: 11px;
  font-weight: 950;
}

.credit-card {
  min-height: 350px;
  justify-content: center;
}

.credit-card h2 {
  font-size: 44px;
}

.credit-card .billing-price {
  color: var(--blue);
  font-size: 38px;
}

.billing-checkout {
  padding-top: 18px;
  border-top: 1px solid rgba(60, 60, 67, 0.11);
}

.pay-methods {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pay-method,
.duration-box div {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid rgba(18, 128, 92, 0.34);
  border-radius: 999px;
  background: rgba(18, 128, 92, 0.08);
  color: #12805c;
  box-shadow: none;
  font-weight: 950;
}

.pay-method {
  cursor: pointer;
}

.pay-method img {
  display: block;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  object-fit: contain;
}

.pay-method:not(.active) {
  border-color: rgba(60, 60, 67, 0.14);
  background: rgba(255, 255, 255, 0.62);
  color: var(--ink-soft);
}

.pay-method[data-payment="支付宝"].active {
  border-color: rgba(0, 113, 227, 0.3);
  background: rgba(0, 113, 227, 0.1);
  color: var(--blue);
}

.duration-box div {
  gap: 20px;
  border-color: rgba(60, 60, 67, 0.13);
  background: rgba(255, 255, 255, 0.64);
}

.duration-box button {
  color: var(--ink-soft);
  cursor: pointer;
  background: transparent;
  font-size: 18px;
  font-weight: 900;
}

.duration-box em {
  color: var(--muted);
  font-style: normal;
}

.amount-box {
  margin-left: auto;
  text-align: right;
}

.amount-box strong {
  color: var(--ink);
  font-size: 38px;
  line-height: 1;
}

.buy-action {
  min-width: 168px;
  min-height: 62px;
  border-radius: 999px;
  background: #050505;
  color: #fff;
  cursor: pointer;
  font-size: 18px;
  font-weight: 950;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.14);
}

.billing-safe {
  justify-self: end;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.wechat-contact-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 16px 18px;
  border: 1px solid rgba(0, 113, 227, 0.15);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(232, 245, 255, 0.74));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78), 0 18px 50px rgba(0, 113, 227, 0.08);
}

.wechat-contact-card span {
  display: inline-flex;
  margin-bottom: 7px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.wechat-contact-card strong {
  display: block;
  color: var(--ink);
  font-size: 19px;
  font-weight: 950;
  line-height: 1.15;
}

.wechat-contact-card p {
  max-width: 54ch;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.55;
}

.wechat-contact-card img {
  display: block;
  width: 148px;
  height: 148px;
  padding: 6px;
  border: 1px solid rgba(60, 60, 67, 0.12);
  border-radius: 18px;
  background: #fff;
  object-fit: cover;
  object-position: center;
}

.profile-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.profile-actions .primary-action,
.profile-actions .secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-height: 42px;
  padding: 0 18px;
  text-decoration: none;
}

.profile-actions .primary-action {
  border: 1px solid rgba(0, 113, 227, 0.24);
  background: rgba(0, 113, 227, 0.1);
  color: var(--blue);
}

.profile-actions .primary-action:hover,
.plan-panel .secondary-action:hover {
  border-color: rgba(0, 113, 227, 0.38);
  background: rgba(0, 113, 227, 0.14);
  color: #005bb8;
}

.workbench-shell {
  gap: 14px;
}

.workbench-board {
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(420px, 1.38fr) minmax(320px, 0.94fr);
  gap: 12px;
  min-height: 0;
}

.workbench-panel {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(28px) saturate(180%);
}

.source-panel,
.assistant-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
}

.preview-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
}

.workbench-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.workbench-head h1,
.workbench-head h2 {
  margin: 3px 0 0;
  font-size: clamp(22px, 1.7vw, 30px);
  line-height: 1.08;
}

.workbench-mode {
  flex: 0 0 auto;
  margin-bottom: 6px;
}

.upload-zone {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 150px;
  border: 1px dashed rgba(0, 113, 227, 0.26);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.42);
  cursor: pointer;
  transition: border-color 240ms var(--ease), background 240ms var(--ease), transform 240ms var(--ease);
}

.upload-zone:hover,
.upload-zone.dragging {
  border-color: rgba(0, 113, 227, 0.58);
  background: rgba(255, 255, 255, 0.74);
  transform: translateY(-1px);
}

.upload-zone input {
  display: none;
}

.upload-empty {
  display: grid;
  gap: 8px;
  place-items: center;
  padding: 16px;
  text-align: center;
}

.upload-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 16px;
  background: rgba(0, 113, 227, 0.1);
  color: var(--blue);
  font-size: 30px;
  font-weight: 500;
  line-height: 1;
}

.upload-empty strong {
  font-size: 14px;
}

.upload-empty p,
.file-card p,
.mode-note p,
.assistant-disclaimer {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}

.file-card {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(60, 60, 67, 0.1);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.55);
}

.file-card img {
  width: 74px;
  height: 92px;
  border-radius: 15px;
  object-fit: contain;
  background: #fff;
}

.file-card strong {
  display: block;
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.full-action {
  flex: 0 0 auto;
  width: 100%;
}

.mode-note {
  margin-top: auto;
  padding: 14px;
  border: 1px solid rgba(60, 60, 67, 0.1);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.48);
}

.mode-note span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.workbench-generate-mode .upload-zone,
.workbench-generate-mode .file-card,
.workbench-generate-mode #resetUploadBtn {
  opacity: 0.4;
  pointer-events: none;
}

.workbench-title-row,
.assistant-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.workbench-title-row small {
  padding: 9px 13px;
  border-radius: 999px;
  background: rgba(0, 113, 227, 0.1);
  color: var(--blue);
  font-size: 13px;
  font-weight: 850;
}

.preview-canvas {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  flex: 1;
  min-height: 0;
  border: 1px solid rgba(60, 60, 67, 0.12);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.52)),
    #fff;
}

.preview-canvas.loading::after,
.upload-zone.loading::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(110deg, transparent 18%, rgba(255, 255, 255, 0.62) 48%, transparent 74%);
  animation: shimmer 1.35s infinite;
  transform: translateX(-100%);
}

.preview-canvas img {
  position: absolute;
  inset: 0;
  display: none;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transform: none !important;
}

.preview-canvas.has-image img {
  display: block;
}

.canvas-label {
  position: absolute;
  left: 14px;
  top: 14px;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 24px rgba(20, 24, 34, 0.08);
}

.preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.zoom-pill {
  display: none;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 4px;
  border: 1px solid rgba(60, 60, 67, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
}

.zoom-pill button {
  width: 32px;
  height: 30px;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 18px;
}

.zoom-pill button:hover {
  background: rgba(0, 113, 227, 0.1);
}

.zoom-pill span {
  min-width: 48px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.download-current {
  flex: 0 0 auto;
}

.text-action {
  min-height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.text-action:hover {
  background: rgba(255, 255, 255, 0.62);
  color: var(--ink);
}

.chat-feed {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  overflow: auto;
  padding: 10px;
  border: 1px solid rgba(60, 60, 67, 0.1);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.42);
}

.chat-message {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  align-items: flex-start;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.62);
}

.chat-message.user {
  background: rgba(0, 113, 227, 0.08);
}

.chat-message span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.chat-message.user span {
  background: #2b2b31;
}

.chat-message p {
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.55;
  white-space: pre-wrap;
}

.quick-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.quick-chip-row button {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(60, 60, 67, 0.13);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.quick-chip-row button:hover {
  border-color: rgba(0, 113, 227, 0.34);
  color: #005bb8;
}

.prompt-box {
  display: block;
  overflow: hidden;
  border: 1px solid rgba(60, 60, 67, 0.12);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.62);
}

.prompt-box textarea {
  width: 100%;
  min-height: 98px;
  resize: none;
  border: 0;
  outline: 0;
  padding: 14px 14px 8px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  line-height: 1.45;
}

.prompt-box textarea::placeholder {
  color: rgba(119, 121, 133, 0.72);
}

.prompt-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px;
}

.prompt-footer span {
  padding-left: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.generate-current {
  flex: 0 0 auto;
  min-width: 108px;
}

.assistant-disclaimer {
  text-align: center;
}

.is-busy .live-dot {
  background: #ff9500;
  box-shadow: 0 0 0 6px rgba(255, 149, 0, 0.15), 0 0 26px rgba(255, 149, 0, 0.48);
}

@keyframes shimmer {
  to {
    transform: translateX(100%);
  }
}

@keyframes resultPageInNext {
  from {
    opacity: 0;
    transform: translateX(22px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes resultPageInPrev {
  from {
    opacity: 0;
    transform: translateX(-22px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .image-panel.page-enter-next,
  .image-panel.page-enter-prev {
    animation: none;
  }
}

@media (max-width: 1100px) {
  .studio-board {
    grid-template-columns: minmax(310px, 0.46fr) minmax(0, 1fr);
  }

  .stage-section {
    gap: 10px;
  }

  .image-panel {
    padding: 10px;
  }

  .workbench-board {
    grid-template-columns: 300px minmax(360px, 1fr);
    grid-template-rows: minmax(0, 1fr) minmax(320px, 0.72fr);
  }

  .assistant-panel {
    grid-column: 1 / -1;
  }

  .billing-board {
    padding: 22px;
  }

  .billing-card-grid {
    grid-template-columns: repeat(3, minmax(220px, 1fr));
  }
}

@media (max-width: 760px) {
  body {
    overflow: auto;
  }

  .app-shell {
    gap: 10px;
    width: calc(100% - 18px);
    height: auto;
    min-height: 100dvh;
    overflow: visible;
    padding: 10px 0;
  }

  .glass-nav {
    gap: 6px;
    width: auto;
    max-width: 100%;
    padding: 8px;
    border-radius: 22px;
  }

  .brand-mark {
    max-width: 148px;
    font-size: 12px;
  }

  .nav-actions {
    gap: 6px;
  }

  [data-auth-nav] {
    gap: 6px;
  }

  .nav-link,
  .page-mark {
    min-height: 34px;
    padding: 0 8px;
    font-size: 12px;
  }

  .nav-divider,
  .page-mark {
    display: none;
  }

  .status-pill {
    min-width: auto;
    padding: 8px 12px;
    font-size: 12px;
  }

  .auth-board {
    padding: 0;
  }

  .auth-card {
    padding: 16px;
    border-radius: 22px;
  }

  .profile-board {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .admin-board {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .admin-actions {
    grid-template-columns: 1fr;
  }

  .admin-adjust-panel {
    position: static;
    display: block;
    max-height: none;
    overflow: visible;
  }

  .admin-form {
    display: grid;
    grid-template-rows: auto auto;
  }

  .admin-form-fields {
    overflow: visible;
    padding-right: 0;
  }

  .admin-users-head {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-users-head .secondary-action {
    width: 100%;
  }

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

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

  .wallet-stats {
    grid-template-columns: 1fr;
  }

  .register-type-switch,
  .organization-fields {
    grid-template-columns: 1fr;
  }

  .plan-panel {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .plan-panel .secondary-action {
    width: 100%;
  }

  .profile-actions {
    flex-direction: column;
  }

  .billing-board {
    gap: 14px;
    padding: 18px;
    border-radius: 24px;
    overflow: auto;
  }

  .billing-head,
  .billing-toolbar,
  .billing-checkout {
    align-items: stretch;
    flex-direction: column;
  }

  .billing-brand {
    align-items: flex-start;
    gap: 12px;
    width: 100%;
  }

  .billing-gem {
    width: 38px;
    height: 38px;
    border-radius: 13px;
    font-size: 21px;
  }

  .billing-brand h1 {
    font-size: 20px;
    line-height: 1.22;
    overflow-wrap: anywhere;
    word-break: keep-all;
  }

  .billing-brand p {
    margin-top: 6px;
    font-size: 10px;
    line-height: 1.45;
    letter-spacing: 0.04em;
  }

  .billing-tabs,
  .billing-cycle,
  .pay-methods,
  .invite-pill,
  .exchange-pill {
    width: 100%;
  }

  .billing-tabs button,
  .billing-cycle button,
  .pay-method {
    flex: 1;
    min-width: 0;
  }

  .invite-pill,
  .exchange-pill {
    display: block;
    min-height: auto;
    padding: 12px 14px;
    border-radius: 18px;
    line-height: 1.55;
    text-align: left;
    white-space: normal;
  }

  .billing-balance,
  .amount-box,
  .billing-safe {
    text-align: left;
  }

  .wechat-contact-card {
    grid-template-columns: 1fr;
  }

  .wechat-contact-card img {
    width: min(100%, 220px);
    height: auto;
    aspect-ratio: 1;
  }

  .billing-card-grid,
  .credit-grid {
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .billing-card {
    min-height: auto;
  }

  .amount-box {
    margin-left: 0;
  }

  .buy-action {
    width: 100%;
  }

  .studio-board {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 10px;
    width: auto;
    max-width: 100%;
  }

  .stage-section,
  .image-panel {
    width: auto;
    max-width: 100%;
  }

  .control-card {
    padding: 10px;
    border-radius: 22px;
  }

  .control-head {
    margin-bottom: 8px;
  }

  .control-head p,
  .issue-panel span,
  .panel-title span {
    font-size: 10px;
  }

  .control-head strong {
    font-size: 18px;
  }

  .live-dot {
    width: 9px;
    height: 9px;
  }

  .line-switch {
    gap: 5px;
    margin-bottom: 7px;
    padding: 4px;
  }

  .line-option {
    min-height: 32px;
    font-size: 12px;
  }

  .project-switch {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
    padding: 5px;
    border-radius: 16px;
  }

  .project {
    min-height: 42px;
    padding: 5px 4px;
    border-radius: 12px;
  }

  .project span {
    font-size: 12px;
  }

  .project small {
    font-size: 9px;
  }

  .issue-panel {
    margin-top: 8px;
    padding: 9px;
    border-radius: 15px;
  }

  .issue-panel p {
    min-height: 20px;
    margin-top: 4px;
    overflow: hidden;
    font-size: 12px;
    line-height: 1.35;
  }

  .hero-cta,
  .download-row {
    gap: 6px;
    margin-top: 8px;
  }

  .primary-action,
  .ghost-action,
  .secondary-action {
    min-height: 34px;
    padding: 0 8px;
    font-size: 12px;
  }

  .stage-section {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    gap: 8px;
  }

  .image-panel {
    min-height: 70dvh;
    padding: 8px;
    border-radius: 22px;
  }

  .panel-title {
    gap: 6px;
    padding: 3px 3px 7px;
  }

  .panel-side {
    min-width: 0;
    gap: 5px;
  }

  .panel-title h2 {
    font-size: 18px;
  }

  .panel-title small {
    max-width: 52%;
    font-size: 10px;
  }

  .panel-action {
    min-height: 27px;
    padding: 0 9px;
    font-size: 10px;
  }

  .result-page-arrow {
    width: 34px;
    height: 62px;
    font-size: 34px;
  }

  .result-page-arrow.previous {
    left: 4px;
  }

  .result-page-arrow.next {
    right: 4px;
  }

  .image-slot {
    border-radius: 16px;
  }

  .empty-state {
    gap: 8px;
    font-size: 12px;
    text-align: center;
  }

  .empty-state span {
    width: 44px;
    height: 44px;
    border-radius: 16px;
  }

  .workbench-board {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    gap: 10px;
  }

  .source-panel,
  .assistant-panel,
  .preview-panel {
    padding: 10px;
    border-radius: 22px;
  }

  .source-panel,
  .assistant-panel {
    min-height: auto;
  }

  .preview-panel {
    min-height: 72dvh;
  }

  .workbench-head h1,
  .workbench-head h2 {
    font-size: 20px;
  }

  .upload-zone {
    min-height: 126px;
    border-radius: 18px;
  }

  .preview-canvas {
    border-radius: 18px;
  }

  .preview-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .download-current,
  .zoom-pill {
    width: 100%;
    justify-content: center;
  }

  .chat-feed {
    max-height: 42dvh;
  }
}
