/* ==========================================================================
   ?? ? ????????????? (Light Luxury Studio)
   ========================================================================== */

:root {
  /* ??????? + ?????????????? */
  --bg-main: #f6f8fa;
  --bg-main-end: #f1f5f9;
  --bg-card: #ffffff;
  --bg-card-solid: #ffffff;
  --bg-card-hover: #ffffff;
  --bg-input: #f2f5f8;

  --text-main: #111827;
  --text-sub: #4b5563;
  --text-muted: #9ca3af;

  /* ??????? ? ??? */
  --brand-primary: #0d6e87;
  --brand-blue: #1a7fb5;
  --brand-deep: #14596d;
  --brand-glow: rgba(13, 110, 135, 0.14);
  --brand-gradient: linear-gradient(135deg, #0d6e87 0%, #1a7fb5 100%);
  --brand-sub-gradient: linear-gradient(135deg, rgba(13, 110, 135, 0.08) 0%, rgba(26, 127, 181, 0.05) 100%);

  /* ?????????? / ???? / ?????? */
  --theme-bg-spot-top: rgba(13, 110, 135, 0.06);
  --theme-bg-spot-bottom: rgba(26, 127, 181, 0.04);
  --theme-surface: #f1f8fa;
  --theme-surface-accent: #e3f0f4;
  --theme-border-soft: rgba(0, 0, 0, 0.05);
  --theme-success: #10b981;
  --theme-success-deep: #047857;

  --border-light: rgba(0, 0, 0, 0.06);
  --border-focus: rgba(13, 110, 135, 0.38);
  --card-border: 1px solid rgba(0, 0, 0, 0.06);

  --danger: #ef4444;
  --success: #10b981;

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);

  /* ???????????????? */
  --header-h: calc(54px + var(--safe-top));
  --tabbar-h: calc(66px + var(--safe-bottom));
  --page-pad-x: 14px;
  --page-pad-y: 12px;
  --content-min-h: calc(100dvh - var(--header-h) - var(--tabbar-h) - var(--page-pad-y) * 2);

  /* ??????????????????? */
  --brand-tint-04: color-mix(in srgb, var(--brand-primary) 4%, transparent);
  --brand-tint-06: color-mix(in srgb, var(--brand-primary) 6%, transparent);
  --brand-tint-07: color-mix(in srgb, var(--brand-primary) 7%, transparent);
  --brand-tint-08: color-mix(in srgb, var(--brand-primary) 8%, transparent);
  --brand-tint-10: color-mix(in srgb, var(--brand-primary) 10%, transparent);
  --brand-tint-12: color-mix(in srgb, var(--brand-primary) 12%, transparent);
  --brand-tint-14: color-mix(in srgb, var(--brand-primary) 14%, transparent);
  --brand-tint-15: color-mix(in srgb, var(--brand-primary) 15%, transparent);
  --brand-tint-16: color-mix(in srgb, var(--brand-primary) 16%, transparent);
  --brand-tint-18: color-mix(in srgb, var(--brand-primary) 18%, transparent);
  --brand-tint-20: color-mix(in srgb, var(--brand-primary) 20%, transparent);
  --brand-tint-22: color-mix(in srgb, var(--brand-primary) 22%, transparent);
  --brand-tint-25: color-mix(in srgb, var(--brand-primary) 25%, transparent);
  --brand-tint-30: color-mix(in srgb, var(--brand-primary) 30%, transparent);
  --brand-tint-35: color-mix(in srgb, var(--brand-primary) 35%, transparent);
  --brand-shadow-soft: 0 8px 28px color-mix(in srgb, var(--brand-primary) 8%, transparent);
  --brand-shadow-btn: 0 8px 20px color-mix(in srgb, var(--brand-primary) 22%, transparent);
}

/* ?? ???????? ? ??????????? ?? */
body[data-industry-theme="general"] {
  --brand-primary: #8b6f52;
  --brand-blue: #b8956e;
  --brand-deep: #6b5344;
  --brand-glow: rgba(139, 111, 82, 0.15);
  --brand-gradient: linear-gradient(135deg, #8b6f52 0%, #b8956e 100%);
  --brand-sub-gradient: linear-gradient(135deg, rgba(139, 111, 82, 0.08) 0%, rgba(184, 149, 110, 0.05) 100%);
  --border-focus: rgba(139, 111, 82, 0.36);
  --bg-main: #faf8f5;
  --bg-main-end: #f5f1eb;
  --theme-bg-spot-top: rgba(139, 111, 82, 0.06);
  --theme-bg-spot-bottom: rgba(184, 149, 110, 0.04);
  --theme-surface: #faf7f3;
  --theme-surface-accent: #f3ebe2;
}

/* ?? ???????? ? ?????? ?? */
body[data-industry-theme="media"] {
  --brand-primary: #d95545;
  --brand-blue: #e8846f;
  --brand-deep: #b83d32;
  --brand-glow: rgba(217, 85, 69, 0.14);
  --brand-gradient: linear-gradient(135deg, #d95545 0%, #e8846f 100%);
  --brand-sub-gradient: linear-gradient(135deg, rgba(217, 85, 69, 0.08) 0%, rgba(232, 132, 111, 0.05) 100%);
  --border-focus: rgba(217, 85, 69, 0.36);
  --bg-main: #fdf9f8;
  --bg-main-end: #faf3f1;
  --theme-bg-spot-top: rgba(217, 85, 69, 0.06);
  --theme-bg-spot-bottom: rgba(232, 132, 111, 0.04);
  --theme-surface: #fdf5f3;
  --theme-surface-accent: #faeae6;
}

/* ?? ???????? ? ???? ?? */
body[data-industry-theme="speech"] {
  --brand-primary: #0d6e87;
  --brand-blue: #1a7fb5;
  --brand-deep: #14596d;
  --brand-glow: rgba(13, 110, 135, 0.14);
  --brand-gradient: linear-gradient(135deg, #0d6e87 0%, #1a7fb5 100%);
  --brand-sub-gradient: linear-gradient(135deg, rgba(13, 110, 135, 0.08) 0%, rgba(26, 127, 181, 0.05) 100%);
  --border-focus: rgba(13, 110, 135, 0.38);
  --bg-main: #f6fafb;
  --bg-main-end: #eef5f7;
  --theme-bg-spot-top: rgba(13, 110, 135, 0.06);
  --theme-bg-spot-bottom: rgba(26, 127, 181, 0.04);
  --theme-surface: #f1f8fa;
  --theme-surface-accent: #e3f0f4;
}

/* ?? ????????? ? ????? ?? */
body[data-industry-theme="beauty"] {
  --brand-primary: #c06b76;
  --brand-blue: #dba8ad;
  --brand-deep: #9a4f59;
  --brand-glow: rgba(192, 107, 118, 0.15);
  --brand-gradient: linear-gradient(135deg, #c06b76 0%, #dba8ad 100%);
  --brand-sub-gradient: linear-gradient(135deg, rgba(192, 107, 118, 0.08) 0%, rgba(219, 168, 173, 0.05) 100%);
  --border-focus: rgba(192, 107, 118, 0.36);
  --bg-main: #fdf8f8;
  --bg-main-end: #faf2f3;
  --theme-bg-spot-top: rgba(192, 107, 118, 0.06);
  --theme-bg-spot-bottom: rgba(219, 168, 173, 0.04);
  --theme-surface: #fdf3f4;
  --theme-surface-accent: #f8e8ea;
}

/* ?? ???????? ? ????? ?? */
body[data-industry-theme="fitness"] {
  --brand-primary: #1a8f52;
  --brand-blue: #52b788;
  --brand-deep: #167a45;
  --brand-glow: rgba(26, 143, 82, 0.14);
  --brand-gradient: linear-gradient(135deg, #1a8f52 0%, #52b788 100%);
  --brand-sub-gradient: linear-gradient(135deg, rgba(26, 143, 82, 0.08) 0%, rgba(82, 183, 136, 0.05) 100%);
  --border-focus: rgba(26, 143, 82, 0.36);
  --bg-main: #f4faf6;
  --bg-main-end: #ecf5f0;
  --theme-bg-spot-top: rgba(26, 143, 82, 0.06);
  --theme-bg-spot-bottom: rgba(82, 183, 136, 0.04);
  --theme-surface: #f0faf4;
  --theme-surface-accent: #e0f2e8;
}

/* ?? ????????? ? ?????? ?? */
body[data-industry-theme="interior"] {
  --brand-primary: #a67c52;
  --brand-blue: #c9a882;
  --brand-deep: #7d5c3a;
  --brand-glow: rgba(166, 124, 82, 0.14);
  --brand-gradient: linear-gradient(135deg, #a67c52 0%, #c9a882 100%);
  --brand-sub-gradient: linear-gradient(135deg, rgba(166, 124, 82, 0.08) 0%, rgba(201, 168, 130, 0.05) 100%);
  --border-focus: rgba(166, 124, 82, 0.36);
  --bg-main: #faf8f4;
  --bg-main-end: #f4efe8;
  --theme-bg-spot-top: rgba(166, 124, 82, 0.06);
  --theme-bg-spot-bottom: rgba(201, 168, 130, 0.04);
  --theme-surface: #f8f4ee;
  --theme-surface-accent: #f0e8de;
}

/* ?? ???????? ? ???? ?? */
body[data-industry-theme="catering"] {
  --brand-primary: #d9732e;
  --brand-blue: #e8a55a;
  --brand-deep: #b85e1f;
  --brand-glow: rgba(217, 115, 46, 0.14);
  --brand-gradient: linear-gradient(135deg, #d9732e 0%, #e8a55a 100%);
  --brand-sub-gradient: linear-gradient(135deg, rgba(217, 115, 46, 0.08) 0%, rgba(232, 165, 90, 0.05) 100%);
  --border-focus: rgba(217, 115, 46, 0.36);
  --bg-main: #fdf9f5;
  --bg-main-end: #faf3eb;
  --theme-bg-spot-top: rgba(217, 115, 46, 0.06);
  --theme-bg-spot-bottom: rgba(232, 165, 90, 0.04);
  --theme-surface: #fdf5ec;
  --theme-surface-accent: #faebd9;
}

/* ?? ???????? ? ????? ?? */
body[data-industry-theme="education"] {
  --brand-primary: #2f5fd4;
  --brand-blue: #5b8fd9;
  --brand-deep: #2349a8;
  --brand-glow: rgba(47, 95, 212, 0.14);
  --brand-gradient: linear-gradient(135deg, #2f5fd4 0%, #5b8fd9 100%);
  --brand-sub-gradient: linear-gradient(135deg, rgba(47, 95, 212, 0.08) 0%, rgba(91, 143, 217, 0.05) 100%);
  --border-focus: rgba(47, 95, 212, 0.36);
  --bg-main: #f6f8fc;
  --bg-main-end: #eef2f9;
  --theme-bg-spot-top: rgba(47, 95, 212, 0.06);
  --theme-bg-spot-bottom: rgba(91, 143, 217, 0.04);
  --theme-surface: #f0f4fb;
  --theme-surface-accent: #e2eaf6;
}

/* ?? ???????? ? ????? ?? */
body[data-industry-theme="property"] {
  --brand-primary: #334e68;
  --brand-blue: #4d7299;
  --brand-deep: #243a52;
  --brand-glow: rgba(51, 78, 104, 0.15);
  --brand-gradient: linear-gradient(135deg, #334e68 0%, #4d7299 100%);
  --brand-sub-gradient: linear-gradient(135deg, rgba(51, 78, 104, 0.08) 0%, rgba(77, 114, 153, 0.05) 100%);
  --border-focus: rgba(51, 78, 104, 0.38);
  --bg-main: #f6f8fa;
  --bg-main-end: #edf1f5;
  --theme-bg-spot-top: rgba(51, 78, 104, 0.05);
  --theme-bg-spot-bottom: rgba(77, 114, 153, 0.04);
  --theme-surface: #f1f4f8;
  --theme-surface-accent: #e6ebf2;
}

/* ?? ????????? ? ????? ?? */
body[data-industry-theme="fashion"] {
  --brand-primary: #9a2347;
  --brand-blue: #c9a06a;
  --brand-deep: #7a1c38;
  --brand-glow: rgba(154, 35, 71, 0.14);
  --brand-gradient: linear-gradient(135deg, #9a2347 0%, #c9a06a 100%);
  --brand-sub-gradient: linear-gradient(135deg, rgba(154, 35, 71, 0.08) 0%, rgba(201, 160, 106, 0.05) 100%);
  --border-focus: rgba(154, 35, 71, 0.36);
  --bg-main: #fdf8f9;
  --bg-main-end: #f9f1f3;
  --theme-bg-spot-top: rgba(154, 35, 71, 0.06);
  --theme-bg-spot-bottom: rgba(201, 160, 106, 0.04);
  --theme-surface: #fdf3f5;
  --theme-surface-accent: #f8e8ec;
}

/* ?? ????????? ? ????? ?? */
body[data-industry-theme="wedding"] {
  --brand-primary: #c9897a;
  --brand-blue: #deb5a8;
  --brand-deep: #a66a5c;
  --brand-glow: rgba(201, 137, 122, 0.15);
  --brand-gradient: linear-gradient(135deg, #c9897a 0%, #deb5a8 100%);
  --brand-sub-gradient: linear-gradient(135deg, rgba(201, 137, 122, 0.08) 0%, rgba(222, 181, 168, 0.05) 100%);
  --border-focus: rgba(201, 137, 122, 0.36);
  --bg-main: #fdf9f7;
  --bg-main-end: #faf3ef;
  --theme-bg-spot-top: rgba(201, 137, 122, 0.06);
  --theme-bg-spot-bottom: rgba(222, 181, 168, 0.04);
  --theme-surface: #fdf5f1;
  --theme-surface-accent: #faece6;
}

/* ?? ????????? ? ????? ?? */
body[data-industry-theme="parenting"] {
  --brand-primary: #d9955c;
  --brand-blue: #e8bc8f;
  --brand-deep: #b8733a;
  --brand-glow: rgba(217, 149, 92, 0.14);
  --brand-gradient: linear-gradient(135deg, #d9955c 0%, #e8bc8f 100%);
  --brand-sub-gradient: linear-gradient(135deg, rgba(217, 149, 92, 0.08) 0%, rgba(232, 188, 143, 0.05) 100%);
  --border-focus: rgba(217, 149, 92, 0.36);
  --bg-main: #fdfaf6;
  --bg-main-end: #faf4ec;
  --theme-bg-spot-top: rgba(217, 149, 92, 0.06);
  --theme-bg-spot-bottom: rgba(232, 188, 143, 0.04);
  --theme-surface: #fdf6ee;
  --theme-surface-accent: #faecd9;
}

/* ?? ????????? ? ????? ?? */
body[data-industry-theme="auto"] {
  --brand-primary: #2d5ea8;
  --brand-blue: #5a6d85;
  --brand-deep: #1e4078;
  --brand-glow: rgba(45, 94, 168, 0.14);
  --brand-gradient: linear-gradient(135deg, #2d5ea8 0%, #5a6d85 100%);
  --brand-sub-gradient: linear-gradient(135deg, rgba(45, 94, 168, 0.08) 0%, rgba(90, 109, 133, 0.05) 100%);
  --border-focus: rgba(45, 94, 168, 0.36);
  --bg-main: #f6f8fb;
  --bg-main-end: #eef2f7;
  --theme-bg-spot-top: rgba(45, 94, 168, 0.06);
  --theme-bg-spot-bottom: rgba(90, 109, 133, 0.04);
  --theme-surface: #f1f4f8;
  --theme-surface-accent: #e6ebf2;
}

/* ?? ???????? ? ???? ?? */
body[data-industry-theme="travel"] {
  --brand-primary: #2f6b52;
  --brand-blue: #4a9470;
  --brand-deep: #1f4d3a;
  --brand-glow: rgba(47, 107, 82, 0.14);
  --brand-gradient: linear-gradient(135deg, #2f6b52 0%, #4a9470 100%);
  --brand-sub-gradient: linear-gradient(135deg, rgba(47, 107, 82, 0.08) 0%, rgba(74, 148, 112, 0.05) 100%);
  --border-focus: rgba(47, 107, 82, 0.36);
  --bg-main: #f4f9f6;
  --bg-main-end: #edf4ef;
  --theme-bg-spot-top: rgba(47, 107, 82, 0.06);
  --theme-bg-spot-bottom: rgba(74, 148, 112, 0.04);
  --theme-surface: #f0f7f3;
  --theme-surface-accent: #e0ede6;
}

/* ?? ???????????? ? ???? ?? */
body[data-industry-theme="finance"] {
  --brand-primary: #1e3a5f;
  --brand-blue: #4a7ab8;
  --brand-deep: #152d4a;
  --brand-glow: rgba(30, 58, 95, 0.14);
  --brand-gradient: linear-gradient(135deg, #1e3a5f 0%, #4a7ab8 100%);
  --brand-sub-gradient: linear-gradient(135deg, rgba(30, 58, 95, 0.08) 0%, rgba(74, 122, 184, 0.05) 100%);
  --border-focus: rgba(30, 58, 95, 0.38);
  --bg-main: #f5f7fa;
  --bg-main-end: #edf1f6;
  --theme-bg-spot-top: rgba(30, 58, 95, 0.05);
  --theme-bg-spot-bottom: rgba(74, 122, 184, 0.04);
  --theme-surface: #f0f3f8;
  --theme-surface-accent: #e4eaf2;
}

/* ?? ????????????? ? ????? ?? */
body[data-industry-theme="photo"] {
  --brand-primary: #7d6e5c;
  --brand-blue: #b8956a;
  --brand-deep: #5c5044;
  --brand-glow: rgba(125, 110, 92, 0.14);
  --brand-gradient: linear-gradient(135deg, #7d6e5c 0%, #b8956a 100%);
  --brand-sub-gradient: linear-gradient(135deg, rgba(125, 110, 92, 0.08) 0%, rgba(184, 149, 106, 0.05) 100%);
  --border-focus: rgba(125, 110, 92, 0.36);
  --bg-main: #faf8f5;
  --bg-main-end: #f3efe9;
  --theme-bg-spot-top: rgba(125, 110, 92, 0.06);
  --theme-bg-spot-bottom: rgba(184, 149, 106, 0.04);
  --theme-surface: #f8f5f1;
  --theme-surface-accent: #f0e9e0;
}

/* ?? ????????????? ? ????? ?? */
body[data-industry-theme="pet"] {
  --brand-primary: #c48824;
  --brand-blue: #8faa3a;
  --brand-deep: #9a6b1a;
  --brand-glow: rgba(196, 136, 36, 0.14);
  --brand-gradient: linear-gradient(135deg, #c48824 0%, #8faa3a 100%);
  --brand-sub-gradient: linear-gradient(135deg, rgba(196, 136, 36, 0.08) 0%, rgba(143, 170, 58, 0.05) 100%);
  --border-focus: rgba(196, 136, 36, 0.36);
  --bg-main: #fdfaf4;
  --bg-main-end: #f8f4e8;
  --theme-bg-spot-top: rgba(196, 136, 36, 0.06);
  --theme-bg-spot-bottom: rgba(143, 170, 58, 0.04);
  --theme-surface: #faf6ec;
  --theme-surface-accent: #f3ecd8;
}

/* 行业主题色 · 名局（高端私享圈层：冷杉黑青 + 沉香木色 + 象牙棉卡 + 哑光铂金） */
body[data-industry-theme="boss_circle"] {
  --brand-primary: #15221d;
  --brand-blue: #bfa175;
  --brand-deep: #0b1411;
  --brand-glow: rgba(191, 161, 117, 0.22);
  --brand-gradient: linear-gradient(135deg, #15221d 0%, #22372e 55%, #bfa175 100%);
  --brand-sub-gradient: linear-gradient(135deg, rgba(21, 34, 29, 0.07) 0%, rgba(191, 161, 117, 0.08) 100%);
  --border-focus: rgba(191, 161, 117, 0.5);
  --bg-main: #f5f4ef;
  --bg-main-end: #eae7dc;
  --theme-bg-spot-top: rgba(191, 161, 117, 0.10);
  --theme-bg-spot-bottom: rgba(21, 34, 29, 0.06);
  --theme-surface: #faf9f5;
  --theme-surface-accent: #ece7db;
}

body[data-industry-theme="boss_circle"] .card-top .section-title {
  letter-spacing: 0.03em;
  font-weight: 700;
}

body[data-industry-theme="boss_circle"] .scene-card {
  border-color: rgba(21, 34, 29, 0.08);
  box-shadow: 0 4px 16px rgba(11, 20, 17, 0.03);
}

body[data-industry-theme="boss_circle"] .scene-card:hover {
  border-color: rgba(191, 161, 117, 0.4);
  box-shadow: 0 8px 24px rgba(21, 34, 29, 0.08);
}

body[data-industry-theme="boss_circle"] .scene-card-tag {
  background: rgba(191, 161, 117, 0.12);
  color: #8c6c3e;
  border: 1px solid rgba(191, 161, 117, 0.25);
  font-weight: 600;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: "Plus Jakarta Sans", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.35s ease;
}

/* ???????? */
.app-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% -20%, var(--theme-bg-spot-top) 0%, transparent 60%),
    radial-gradient(circle at 100% 80%, var(--theme-bg-spot-bottom) 0%, transparent 50%),
    linear-gradient(180deg, var(--bg-main) 0%, var(--bg-main-end) 100%);
  transition: background 0.35s ease;
}

.bg-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
}

.spot-1 {
  width: 280px;
  height: 280px;
  top: -60px;
  left: -40px;
  background: var(--brand-primary);
  opacity: 0.12;
}

.spot-2 {
  width: 240px;
  height: 240px;
  top: 45%;
  right: -50px;
  background: var(--brand-blue);
  opacity: 0.1;
}

.bg-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(0, 0, 0, 0.02) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(0, 0, 0, 0.02) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* App ???? */
#app {
  position: relative;
  z-index: 1;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
}

.view-panel {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ==================== 1. ?????? ==================== */
#view-auth {
  position: relative;
  overflow: hidden;
}

/* ??????????????????????? */
#view-auth.is-gate {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  padding: calc(12px + var(--safe-top)) 14px calc(12px + var(--safe-bottom));
}

#view-auth.is-gate .auth-container {
  width: 100%;
  max-width: 420px;
  min-height: auto;
  margin: auto;
  padding: 18px 16px 14px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
  gap: 12px;
}

#view-auth.is-gate .auth-logo-wrap {
  width: 64px;
  height: 64px;
  margin-bottom: 8px;
}

#view-auth.is-gate .brand-logo-img {
  width: 64px;
  height: 64px;
  border-radius: 16px;
}

#view-auth.is-gate .brand-title {
  font-size: 22px;
}

#view-auth.is-gate .auth-features {
  display: none;
}

.auth-gate-close {
  margin: 2px auto 0;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 12px;
}

.auth-gate-close:active {
  color: var(--text-sub);
}

.auth-container {
  flex: 1;
  padding: calc(20px + var(--safe-top)) 20px calc(20px + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  animation: authIn 0.45s ease-out;
  min-height: 100vh;
  box-sizing: border-box;
}

@keyframes authIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.auth-hero {
  text-align: center;
}

.auth-logo-wrap {
  position: relative;
  width: 88px;
  height: 88px;
  margin: 0 auto 14px;
}

.auth-logo-wrap::before {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 26px;
  background: var(--brand-glow);
  filter: blur(12px);
  z-index: 0;
  opacity: 0.75;
}

.brand-logo-img {
  position: relative;
  z-index: 1;
  display: block;
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 20px;
  border: none;
  box-shadow: 0 10px 24px color-mix(in srgb, var(--brand-primary) 16%, transparent);
}

.auth-eyebrow {
  margin: 0 0 4px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--brand-primary);
}

.brand-title {
  font-size: 26px;
  font-weight: 800;
  margin: 0 0 4px;
  letter-spacing: 0.02em;
  color: var(--text-main);
}

.brand-subtitle {
  font-size: 13px;
  color: var(--text-sub);
  margin: 0 0 10px;
  letter-spacing: 0.01em;
}

.auth-features {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--border-light);
  border-radius: 999px;
  font-size: 11px;
  color: var(--text-sub);
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.auth-features .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--brand-primary);
  opacity: 0.55;
}

.auth-card {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 22px;
  padding: 18px 16px 20px;
  box-shadow:
    0 18px 40px rgba(26, 80, 90, 0.08),
    0 2px 0 rgba(255, 255, 255, 0.9) inset;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #eaf4f6;
  border: 1px solid var(--border-light);
  padding: 4px;
  border-radius: 14px;
  margin-bottom: 18px;
}

.tab-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  padding: 11px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 11px;
  cursor: pointer;
  transition: all 0.22s ease;
}

.tab-btn.active {
  background: #ffffff;
  color: var(--brand-deep);
  box-shadow: 0 3px 10px rgba(26, 80, 90, 0.08);
}

.form-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.input-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.input-field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-sub);
  padding-left: 2px;
}

.input-field label em {
  font-style: normal;
  font-weight: 400;
  color: var(--text-muted);
  margin-left: 4px;
}

.input-box {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.field-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  pointer-events: none;
  transition: color 0.2s;
  z-index: 2;
}

.input-box input,
.input-box select {
  width: 100%;
  height: 48px;
  background: #f5fafb;
  border: 1px solid rgba(26, 80, 90, 0.1);
  border-radius: 14px;
  padding-left: 42px !important;
  padding-right: 44px !important;
  color: var(--text-main);
  font-size: 15px;
  outline: none;
  transition: all 0.2s ease;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}

.input-box input::placeholder {
  color: #a7b9c0;
}

.input-box input:focus,
.input-box select:focus {
  background: #ffffff;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 4px var(--brand-glow);
}

.input-box:focus-within .field-icon {
  color: var(--brand-primary);
}

.btn-eye {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
}

.btn-eye:active {
  color: var(--brand-primary);
  background: rgba(31, 168, 146, 0.08);
}

.btn-submit {
  height: 50px;
  margin-top: 6px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #22b89f 0%, #1fa892 45%, #2f8fba 100%);
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(31, 168, 146, 0.28);
  transition: transform 0.15s ease, opacity 0.2s ease, box-shadow 0.2s ease;
}

.btn-submit:active {
  transform: scale(0.985);
  box-shadow: 0 6px 16px rgba(31, 168, 146, 0.22);
}

.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ??????????? */
.field-invalid-shake {
  animation: fieldShake 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

.field-invalid-shake input,
.field-invalid-shake textarea {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.18) !important;
}

@keyframes fieldShake {
  10%, 90% { transform: translate3d(-2px, 0, 0); }
  20%, 80% { transform: translate3d(3px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-3px, 0, 0); }
  40%, 60% { transform: translate3d(3px, 0, 0); }
}

/* ???????????? */
.btn-tool.is-copied,
.btn-article-primary.is-copied,
.btn-modal-act.is-copied {
  background: #ecfdf5 !important;
  border-color: #10b981 !important;
  color: #047857 !important;
  transform: scale(0.98);
  transition: all 0.2s ease;
}

.auth-footnote {
  margin: 0;
  text-align: center;
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ==================== 2. ? Shell ?? ==================== */
.shell {
  padding-bottom: calc(var(--tabbar-h) + 8px);
  min-width: 0;
}

/* ?? Header */
.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: calc(54px + var(--safe-top));
  padding-top: var(--safe-top);
  padding-left: 16px;
  padding-right: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-light);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.header-home {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  color: inherit;
  font: inherit;
  text-align: left;
}

.header-home:active {
  opacity: 0.82;
}

.app-logo-img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 2px 8px color-mix(in srgb, var(--brand-primary) 18%, transparent);
  flex-shrink: 0;
}

.header-brand-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.app-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.industry-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  border: none;
  background: transparent;
  color: var(--brand-primary);
  font-size: 11.5px;
  font-weight: 600;
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.credit-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  background: var(--brand-sub-gradient);
  border: 1px solid var(--brand-tint-20);
  border-radius: 20px;
  color: var(--brand-primary);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.credit-pill.is-guest {
  background: var(--brand-gradient);
  color: #fff;
  border-color: transparent;
}

.btn-logout {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--border-light);
  background: #ffffff;
  color: var(--text-sub);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-logout:active {
  background: #f1f5f9;
}

.btn-admin-cfg {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--brand-tint-25);
  background: var(--brand-sub-gradient);
  color: var(--brand-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.btn-admin-cfg:active {
  background: rgba(31, 168, 146, 0.18);
}

.admin-cfg-dialog {
  max-width: 380px;
  max-height: 88vh;
  overflow-y: auto;
  align-items: stretch;
  text-align: left;
}

.admin-cfg-section {
  margin-bottom: 16px;
}

.admin-cfg-section-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--brand-deep);
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px dashed var(--brand-tint-20);
}

.admin-cfg-tip {
  text-align: left;
  margin-bottom: 14px;
}

.admin-cfg-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 4px;
}

.admin-cfg-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-sub);
  margin-top: 4px;
}

.admin-cfg-input {
  width: 100%;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border-light);
  background: var(--bg-input);
  padding: 0 12px;
  font-size: 13px;
  color: var(--text-main);
  outline: none;
}

.admin-cfg-input:focus {
  border-color: var(--border-focus);
}

.admin-cfg-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2.4'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 34px;
  cursor: pointer;
}

.admin-cfg-mask {
  margin: 2px 0 0;
  font-size: 11px;
  color: var(--text-muted);
  word-break: break-all;
}

/* ???? Viewport */
.page-viewport {
  padding: var(--page-pad-y) var(--page-pad-x);
  min-width: 0;
  box-sizing: border-box;
}

.page-content.active {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  animation: pageFadeIn 0.25s ease-out;
}

@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-content[data-page="create"] {
  min-height: var(--content-min-h);
  padding-bottom: 4px;
}

.page-content[data-page="gallery"] {
  gap: 10px;
  min-height: var(--content-min-h);
  padding-bottom: 4px;
}

.page-content[data-page="chat"].active {
  height: var(--content-min-h);
  min-height: var(--content-min-h);
  max-height: var(--content-min-h);
  gap: 0;
  overflow: hidden;
}

/* 陪伴聊天：整屏沉浸（藏站点顶栏 + 底栏） */
body.chat-immersive .app-header,
body.chat-immersive .bottom-nav {
  display: none !important;
}

body.chat-immersive .shell {
  padding-bottom: 0;
}

body.chat-immersive .page-viewport {
  padding: 0;
  height: 100dvh;
  min-height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
}

body.chat-immersive .page-content[data-page="chat"].active {
  height: 100%;
  min-height: 100%;
  max-height: 100%;
  width: 100%;
}

body.chat-immersive .app-bg {
  opacity: 0.2;
}

/* ???????? */
.scene-home {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 12px;
  min-width: 0;
  animation: pageFadeIn 0.25s ease;
}

.create-guide-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--border-light);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.03);
}

.create-guide-strip[hidden] {
  display: none;
}

.create-guide-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-primary);
  box-shadow: 0 0 0 4px var(--brand-tint-12);
  flex-shrink: 0;
}

.create-guide-text {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--text-sub);
  font-weight: 600;
}

.brand-home-card {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  border: 1px solid var(--brand-tint-15);
  border-radius: 14px;
  padding: 12px;
  background: linear-gradient(135deg, var(--brand-tint-08), rgba(255, 255, 255, 0.9));
  cursor: pointer;
  color: inherit;
  font: inherit;
}

.brand-home-card:active {
  transform: scale(0.99);
}

.brand-home-card.is-ready {
  background: #ffffff;
  border-color: var(--border-light);
}

.brand-home-icon {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: #fff;
  color: var(--brand-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px var(--brand-tint-10);
}

.brand-home-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-home-body strong {
  font-size: 13.5px;
  color: var(--text-main);
  font-weight: 700;
}

.brand-home-body span {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.brand-home-action {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--brand-primary);
}

.page-content {
  display: none;
}

/* ??????????? */
.industry-nav-wrap {
  width: 100%;
  overflow: hidden;
  margin-top: -2px;
  margin-bottom: 2px;
}

.industry-nav-scroll {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 8px;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
}

.industry-nav-scroll::-webkit-scrollbar {
  display: none; /* Chrome, Safari */
}

.industry-nav-item {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-sub);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
  user-select: none;
  outline: none;
}

.industry-nav-item:hover {
  color: var(--text-main);
  border-color: var(--brand-tint-30);
}

.industry-nav-item.active {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

.industry-nav-item .ind-nav-status {
  font-size: 10px;
  font-weight: 500;
  padding: 1px 5px;
  border-radius: 10px;
  background: #f1f5f9;
  color: var(--text-muted);
}

.industry-nav-item.active .ind-nav-status {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

.industry-nav-item.is-locked {
  opacity: 0.65;
  background: #fcfdfe;
}

/* ???? Hero Banner */
.speech-hero-banner {
  position: relative;
  background: linear-gradient(135deg, #ffffff 0%, var(--theme-surface) 100%);
  border: 1px solid var(--theme-border-soft);
  border-radius: var(--radius-md);
  padding: 18px 16px 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px color-mix(in srgb, var(--brand-primary) 4%, transparent);
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.speech-hero-banner::after {
  content: "";
  position: absolute;
  top: -30px;
  right: -30px;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: var(--brand-primary);
  filter: blur(40px);
  opacity: 0.12;
  pointer-events: none;
  transition: background 0.3s ease;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--brand-sub-gradient);
  border: 1px solid var(--border-focus);
  color: var(--brand-deep);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 8px;
}

.hero-title {
  margin: 0 0 6px;
  font-size: 17.5px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.hero-quote {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-sub);
  line-height: 1.5;
}

/* ???? Header */
.scene-home-head {
  margin-top: 4px;
  margin-bottom: 0;
}

.scene-home-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.scene-home-desc {
  margin: 2px 0 0;
  font-size: 11.5px;
  color: var(--text-muted);
}

.scene-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.scene-loading {
  grid-column: 1 / -1;
  margin: 20px 0;
  text-align: center;
  font-size: 13px;
  color: var(--text-sub);
}

.scene-card {
  position: relative;
  text-align: left;
  border: 1px solid var(--border-light);
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 14px 12px 12px;
  min-height: 100px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 6px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.scene-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: var(--brand-primary);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.scene-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px var(--brand-glow);
  border-color: var(--brand-tint-30);
}

.scene-card:hover::before {
  opacity: 1;
}

.scene-card:active {
  transform: scale(0.97);
  border-color: var(--brand-primary);
}

.scene-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}

.scene-card strong {
  font-size: 15px;
  color: var(--text-main);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
  flex: 1;
  min-width: 0;
  word-break: break-word;
}

.scene-card em {
  font-style: normal;
  font-size: 12px;
  color: var(--text-sub);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.scene-card-tag {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--brand-deep);
  background: var(--brand-sub-gradient);
  border: 1px solid var(--brand-tint-20);
  border-radius: 999px;
  padding: 2px 8px;
  letter-spacing: 0.01em;
  flex-shrink: 0;
  white-space: nowrap;
  margin-top: 1px;
}

.scene-form-top {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 4px;
}

.btn-back-scenes {
  flex-shrink: 0;
  height: 34px;
  padding: 0 10px 0 6px;
  border-radius: 10px;
  border: 1px solid var(--border-light);
  background: #fff;
  color: var(--text-sub);
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.scene-form-title-wrap {
  min-width: 0;
  padding-top: 2px;
}

.scene-form-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
}

.scene-form-desc {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--text-sub);
}

.scene-field + .scene-field {
  margin-top: 12px;
}

.industry-dialog {
  align-items: stretch;
  text-align: left;
  width: 90%;
  max-width: 320px;
  max-height: min(80vh, 560px);
  padding: 20px 16px 16px;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  overflow: hidden;
}

/* ?? .confirm-dialog ???????????????? */
.confirm-dialog.industry-dialog {
  align-items: stretch;
  text-align: left;
  padding: 20px 16px 16px;
  max-height: min(82vh, 580px);
}

.industry-dialog .confirm-title {
  flex-shrink: 0;
  font-size: 16.5px;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 4px;
  text-align: left;
}

.industry-dialog .admin-cfg-tip {
  flex-shrink: 0;
  margin: 0 0 12px;
  font-size: 11.5px;
  color: var(--text-sub);
  text-align: left;
  line-height: 1.45;
}

.industry-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1 1 auto;
  min-height: 100px;
  margin-bottom: 0;
  max-height: min(58vh, 460px);
  overflow-y: auto;
  padding: 4px 4px 8px 0;
  -webkit-overflow-scrolling: touch;
}

.confirm-dialog.industry-dialog .confirm-btn-row {
  flex-shrink: 0;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border-light);
}

.confirm-dialog.industry-dialog .btn-confirm-ok {
  height: 46px;
  font-size: 14px;
}

.industry-list::-webkit-scrollbar {
  width: 4px;
}

.industry-list::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 4px;
}

.industry-option {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border-light);
  background: #ffffff;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.16s ease;
  text-align: left;
  gap: 12px;
  box-sizing: border-box;
}

.industry-option:hover {
  background: #f8fafc;
  border-color: rgba(0, 0, 0, 0.12);
}

.industry-option.active {
  border-color: var(--brand-primary);
  background: var(--brand-sub-gradient);
}

.industry-option .ind-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.industry-option .ind-meta span:first-child {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main);
}

.industry-option.active .ind-meta span:first-child {
  color: var(--brand-deep);
}

.industry-option .ind-sub {
  font-size: 11px;
  color: var(--text-sub);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.industry-option .ind-badge {
  flex-shrink: 0;
  font-style: normal;
  font-size: 10.5px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: var(--text-muted);
  white-space: nowrap;
  margin-top: 1px;
}

.industry-option.active .ind-badge {
  background: var(--brand-primary);
  color: #ffffff;
}

.industry-option.is-locked {
  opacity: 0.6;
  background: #fafafa;
}

/* UI ???? */
.ui-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  box-sizing: border-box;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02), 0 6px 18px -4px color-mix(in srgb, var(--brand-primary) 5%, transparent);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.section-title svg {
  color: var(--brand-primary);
}

.sub-badge {
  font-size: 11px;
  color: var(--brand-primary);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-light);
  padding: 2px 8px;
  border-radius: 999px;
}

.btn-text {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
  padding: 2px 4px;
  transition: color 0.15s ease;
}

.btn-text:active {
  color: var(--brand-primary);
}

/* ??? Textarea */
.textarea-wrapper {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.textarea-wrapper textarea {
  width: 100%;
  min-height: 84px;
  max-height: 220px;
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  color: var(--text-main);
  font-size: 13.5px;
  line-height: 1.55;
  resize: none;
  outline: none;
  overflow-y: auto;
  word-break: break-word;
  overflow-wrap: anywhere;
  transition: border-color 0.2s ease, height 0.12s ease;
  -webkit-overflow-scrolling: touch;
}

.textarea-wrapper textarea:focus {
  border-color: var(--border-focus);
}

.prompt-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 2px;
}

.prompt-hint {
  font-size: 11px;
  color: var(--text-muted);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.prompt-count {
  flex-shrink: 0;
  font-size: 11px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.prompt-count.warn {
  color: #c47a2c;
}

.prompt-count.full {
  color: #c24b4b;
}

/* ?? Chips ?? */
.scroll-chips-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding: 4px 1px;
  margin: 2px 0 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.scroll-chips-wrap::-webkit-scrollbar {
  display: none;
}

.chip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: 14px;
  color: var(--text-sub);
  padding: 5px 11px;
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.16s ease;
  white-space: nowrap;
  outline: none;
  user-select: none;
}

.chip:hover {
  background: #ffffff;
  color: var(--text-main);
  border-color: rgba(0, 0, 0, 0.15);
}

.chip:active {
  background: var(--brand-sub-gradient);
  border-color: var(--brand-primary);
  color: var(--brand-deep);
  transform: scale(0.97);
}

.chip.active {
  background: var(--brand-sub-gradient);
  border-color: var(--brand-primary);
  color: var(--brand-deep);
  font-weight: 600;
  box-shadow: 0 2px 8px var(--brand-glow);
}

/* ??? Grid (????) */
.ref-row {
  display: flex;
  gap: 10px;
}

.ref-box {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-sm);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.ref-box.add-btn {
  border: 1px dashed var(--border-focus);
  background: rgba(31, 168, 146, 0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--brand-primary);
  cursor: pointer;
}

.ref-box.add-btn span {
  font-size: 10px;
  color: var(--text-sub);
}

.ref-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ref-box .btn-del-ref {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* ???? */
.ratio-pills {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.pill-opt {
  background: #f0f8f9;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-sub);
  padding: 8px 0;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pill-opt.active {
  background: rgba(31, 168, 146, 0.14);
  border-color: var(--brand-primary);
  color: var(--brand-deep);
  font-weight: 600;
}

.card-hint {
  margin: -2px 0 2px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ?????? */
.action-bar {
  margin-top: 4px;
}

/* ??????????????? */
.create-config-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: var(--content-min-h);
  max-height: 1600px;
  padding-bottom: 8px;
  min-width: 0;
  box-sizing: border-box;
  opacity: 1;
  transform: translateY(0);
  transition: max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.35s ease,
              transform 0.4s ease,
              margin 0.35s ease,
              padding 0.35s ease;
  overflow: visible;
}

.create-config-panel.is-collapsed {
  max-height: 0 !important;
  min-height: 0 !important;
  opacity: 0 !important;
  transform: translateY(-20px) !important;
  margin: 0 !important;
  padding: 0 !important;
  pointer-events: none;
  overflow: hidden;
}

.config-collapsed-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  margin-bottom: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
  animation: pageFadeIn 0.3s ease;
}

.collapsed-info {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
  margin-right: 10px;
}

.collapsed-tag {
  font-size: 11px;
  font-weight: 600;
  color: var(--brand-deep);
  background: rgba(31, 168, 146, 0.12);
  border: 1px solid rgba(31, 168, 146, 0.25);
  border-radius: 6px;
  padding: 2px 7px;
  white-space: nowrap;
  flex-shrink: 0;
}

.collapsed-prompt {
  font-size: 12.5px;
  color: var(--text-sub);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-expand-config {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 10px;
  border: 1px solid var(--border-focus);
  background: #ffffff;
  color: var(--brand-primary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.btn-expand-config:active {
  background: rgba(31, 168, 146, 0.08);
  transform: scale(0.97);
}

.api-tip {
  margin: 0 0 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(224, 75, 92, 0.08);
  border: 1px solid rgba(224, 75, 92, 0.2);
  color: var(--danger);
  font-size: 12.5px;
  line-height: 1.4;
}

.btn-draw {
  width: 100%;
  height: 52px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--brand-gradient);
  color: #ffffff;
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-draw:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.btn-draw:active {
  transform: scale(0.98);
  opacity: 0.92;
}

.btn-draw em {
  font-style: normal;
  font-weight: 400;
  font-size: 12px;
  opacity: 0.85;
}

.btn-draw:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* ==================== ?????? ==================== */
.result-panel {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-width: 0;
  box-sizing: border-box;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.4);
  animation: pageFadeIn 0.3s ease;
}

.result-loading {
  padding: 38px 20px 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

/* ??????? */
.loader-visual {
  position: relative;
  width: 76px;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.water-ripple {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px solid rgba(31, 168, 146, 0.45);
  background: rgba(31, 168, 146, 0.06);
  animation: rippleExpand 2.6s cubic-bezier(0.1, 0.8, 0.3, 1) infinite;
  pointer-events: none;
}

.water-ripple.ring-2 {
  animation-delay: 1.3s;
}

@keyframes rippleExpand {
  0% {
    transform: scale(0.65);
    opacity: 0.9;
    border-color: rgba(31, 168, 146, 0.6);
  }
  100% {
    transform: scale(1.6);
    opacity: 0;
    border-color: rgba(47, 143, 186, 0);
  }
}

.loader-orbit {
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 2px dashed rgba(31, 168, 146, 0.35);
  animation: orbitRotate 10s linear infinite;
}

@keyframes orbitRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.loader-core {
  position: relative;
  z-index: 2;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: transparent;
  padding: 0;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: logoPulse 2.2s ease-in-out infinite alternate;
}

.loader-logo {
  width: 100%;
  height: 100%;
  border-radius: 14px;
  object-fit: cover;
  box-shadow: 0 8px 20px color-mix(in srgb, var(--brand-primary) 20%, transparent);
}

@keyframes logoPulse {
  0% { transform: scale(0.96); box-shadow: 0 6px 18px rgba(31, 168, 146, 0.18); }
  100% { transform: scale(1.04); box-shadow: 0 12px 28px rgba(31, 168, 146, 0.32); }
}

/* ???????? */
.loading-copy {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.loading-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--brand-deep);
  background: rgba(31, 168, 146, 0.1);
  border: 1px solid rgba(31, 168, 146, 0.22);
  border-radius: 999px;
  padding: 2px 10px;
  letter-spacing: 0.02em;
  margin-bottom: 2px;
}

.loading-title {
  margin: 0;
  font-size: 15.5px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.loading-msg {
  margin: 0;
  font-size: 12.5px;
  color: var(--brand-primary);
  line-height: 1.45;
  min-height: 1.45em;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.loading-copy.is-changing .loading-title,
.loading-copy.is-changing .loading-msg {
  opacity: 0.3;
  transform: translateY(2px);
}

/* ??????? */
.progress-container {
  width: min(240px, 78vw);
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
}

.progress-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(31, 168, 146, 0.12);
  padding: 1.5px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #1fa892 0%, #2f8fba 60%, #34d399 100%);
  transition: width 0.4s cubic-bezier(0.2, 0.8, 0.25, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(31, 168, 146, 0.3);
}

.progress-shimmer {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.55) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  animation: shimmerFlow 1.6s infinite ease-in-out;
}

@keyframes shimmerFlow {
  0% { left: -100%; }
  100% { left: 100%; }
}

.progress-meta {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2px;
}

.progress-label {
  font-size: 11.5px;
  color: var(--text-sub);
}

.progress-pct {
  margin: 0;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--brand-deep);
  letter-spacing: 0.02em;
}

.result-done {
  display: flex;
  flex-direction: column;
}

.result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px 10px;
}

.result-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-deep);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(31, 168, 146, 0.18);
}

.result-ratio {
  font-size: 11px;
  color: var(--text-muted);
  background: #f0f8f9;
  border: 1px solid var(--border-light);
  border-radius: 999px;
  padding: 3px 9px;
}

.result-stage {
  position: relative;
  margin: 0 12px;
  border-radius: 14px;
  overflow: hidden;
  background: transparent;
  border: none;
}

.result-stage img {
  width: 100%;
  display: block;
  max-height: 58vh;
  object-fit: contain;
  background: transparent;
  border-radius: 14px;
}

.btn-stage-zoom {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  background: rgba(255, 255, 255, 0.92);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(26, 80, 90, 0.12);
}

.result-prompt-wrap {
  margin: 12px 14px 0;
}

.result-prompt {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-main);
  word-break: break-word;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-height: 4.65em;
  transition: max-height 0.2s ease;
}

.result-prompt.expanded {
  display: block;
  -webkit-line-clamp: unset;
  line-clamp: unset;
  max-height: 180px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.btn-prompt-expand {
  margin-top: 6px;
  padding: 0 4px;
  border: none;
  background: none;
  color: var(--brand-primary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.result-toolbar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px 14px;
}

.result-actions-secondary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.result-actions-primary {
  display: block;
}

.btn-tool.full-btn {
  width: 100%;
}

.btn-tool {
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--border-light);
  background: #ffffff;
  color: var(--text-main);
  font-size: 12.5px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-tool:active {
  background: #f0f8f9;
}

.btn-tool.primary {
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-blue));
  border-color: transparent;
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 4px 12px var(--brand-glow);
}

.btn-tool.primary:active {
  opacity: 0.92;
}

.result-error {
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
}

.error-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--danger);
}

.error-msg {
  margin: 0 0 8px;
  font-size: 12.5px;
  color: var(--text-sub);
  line-height: 1.5;
}

.error-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  width: 100%;
  max-width: 280px;
}

.error-actions .btn-tool {
  flex: 1;
  padding: 0 12px;
}

/* ==================== 3. ?? Gallery ==================== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
  min-width: 0;
}

.gallery-grid.is-image-grid {
  gap: 11px;
}

.gallery-grid.is-article-list {
  grid-template-columns: 1fr;
  gap: 10px;
}

/* ==================== 4. ???? Profile ==================== */
.page-content[data-page="profile"] {
  padding-top: 4px;
  padding-bottom: 0;
  min-height: var(--content-min-h);
}

.profile-page {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  gap: 16px;
  padding-bottom: 12px;
  min-width: 0;
  animation: pageFadeIn 0.25s ease;
}

.profile-main-view {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 14px;
  min-height: 0;
}

/* ?? Hero ?? */
.profile-hero.ui-card {
  padding: 18px 16px 16px;
  gap: 14px;
  border-radius: var(--radius-lg);
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.04);
}

.profile-hero-top {
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
}

.profile-avatar-wrap {
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
}

.profile-avatar {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: var(--brand-gradient);
  color: #ffffff;
  font-size: 22px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 8px 20px var(--brand-glow);
  overflow: hidden;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 2px solid #ffffff;
}

.profile-avatar-wrap:hover .profile-avatar {
  transform: scale(1.03);
}

.profile-avatar.has-img {
  color: transparent;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.12);
}

.profile-avatar-letter {
  line-height: 1;
}

.profile-avatar.has-img .profile-avatar-letter {
  display: none;
}

.profile-avatar-badge {
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--brand-deep);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.profile-hero-info {
  flex: 1;
  min-width: 0;
}

.profile-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.profile-nickname {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
  letter-spacing: -0.2px;
}

.profile-vip-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  background: var(--brand-sub-gradient);
  color: var(--brand-deep);
  border: 1px solid var(--brand-tint-18);
  letter-spacing: 0.2px;
}

.profile-mobile {
  margin: 4px 0 0;
  font-size: 12px;
  color: #64748b;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.btn-profile-edit-quick {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
  font-family: inherit;
}

.btn-profile-edit-quick:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: rgba(100, 116, 139, 0.4);
}

.btn-profile-edit-quick:active {
  transform: scale(0.96);
}

/* ??? */
.profile-assets-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-items: stretch;
}

.asset-card {
  padding: 12px 12px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  gap: 6px;
  min-height: 94px;
  box-sizing: border-box;
  font-family: inherit;
  text-align: left;
  color: inherit;
  position: relative;
  transition: all 0.18s ease;
}

.asset-card.asset-credits {
  background: linear-gradient(135deg, rgba(238, 242, 255, 0.8) 0%, rgba(248, 250, 252, 0.95) 100%);
  border-color: rgba(99, 102, 241, 0.18);
}

button.asset-card.is-clickable {
  cursor: pointer;
}

button.asset-card.is-clickable:hover {
  border-color: var(--brand-tint-22);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.08);
}

button.asset-card.is-clickable:active {
  transform: scale(0.98);
  background: #f1f5f9;
}

.asset-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.asset-label {
  font-size: 11.5px;
  color: var(--text-sub);
  font-weight: 600;
  line-height: 1.35;
  flex: 1;
  min-width: 0;
}

.asset-badge {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.05);
  color: #64748b;
  flex-shrink: 0;
  font-weight: 600;
  white-space: nowrap;
}

.asset-badge.is-link {
  color: var(--brand-primary);
  background: var(--brand-tint-10);
}

.asset-body {
  display: flex;
  align-items: baseline;
  gap: 3px;
  margin: 1px 0;
}

.asset-num {
  font-size: 23px;
  font-weight: 800;
  color: var(--brand-deep);
  line-height: 1;
  letter-spacing: -0.5px;
  font-variant-numeric: tabular-nums;
}

.asset-unit {
  font-size: 11.5px;
  color: #64748b;
  font-weight: 600;
}

.asset-foot {
  font-size: 10.5px;
  color: #94a3b8;
  line-height: 1.4;
  word-break: break-word;
}

/* ?????? */
.profile-menu-group {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-radius: var(--radius-lg);
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 3px 18px rgba(15, 23, 42, 0.03);
}

.profile-group-title {
  font-size: 11.5px;
  font-weight: 700;
  color: #94a3b8;
  margin-bottom: 2px;
  padding-left: 4px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.profile-menu-item {
  width: 100%;
  display: grid;
  grid-template-columns: 40px 1fr 18px;
  align-items: center;
  gap: 12px;
  padding: 11px 10px;
  border-radius: 12px;
  background: #f8fafc;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: all 0.16s ease;
  border: 1px solid rgba(226, 232, 240, 0.7);
  box-sizing: border-box;
}

.profile-menu-item:hover {
  background: #f1f5f9;
  border-color: rgba(203, 213, 225, 0.9);
}

.profile-menu-item:active {
  background: #e2e8f0;
  transform: scale(0.99);
}

.profile-menu-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--brand-sub-gradient);
  color: var(--brand-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.profile-menu-icon.is-brand {
  background: linear-gradient(135deg, rgba(254, 243, 199, 0.9) 0%, rgba(253, 230, 138, 0.5) 100%);
  color: #b45309;
}

.profile-menu-icon.is-credits {
  background: linear-gradient(135deg, rgba(224, 231, 255, 0.9) 0%, rgba(199, 210, 254, 0.6) 100%);
  color: #4338ca;
}

.profile-menu-icon.is-account {
  background: linear-gradient(135deg, rgba(241, 245, 249, 0.95) 0%, rgba(226, 232, 240, 0.7) 100%);
  color: #334155;
}

.profile-menu-icon.is-admin {
  background: linear-gradient(135deg, rgba(209, 250, 229, 0.9) 0%, rgba(167, 243, 208, 0.6) 100%);
  color: #047857;
}

.profile-menu-item:hover .profile-menu-icon {
  transform: scale(1.05);
}

.profile-menu-body {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.profile-menu-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.profile-menu-title {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.35;
  flex: 1;
  min-width: 0;
}

.profile-menu-badge {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--brand-tint-10);
  color: var(--brand-deep);
  font-weight: 600;
  flex-shrink: 0;
}

.profile-brand-state-badge {
  font-size: 10.5px;
  padding: 1px 7px;
  border-radius: 999px;
  flex-shrink: 0;
  white-space: nowrap;
  background: rgba(148, 163, 184, 0.15);
  color: #64748b;
  font-weight: 600;
}

.profile-brand-state-badge.is-ready {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
}

.profile-menu-desc {
  display: -webkit-box;
  margin-top: 3px;
  font-size: 12px;
  color: #64748b;
  line-height: 1.4;
  -webkit-line-clamp: 1;
  line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.profile-menu-arrow {
  flex-shrink: 0;
  color: #94a3b8;
  justify-self: end;
  transition: transform 0.15s ease;
}

.profile-menu-item:hover .profile-menu-arrow {
  transform: translateX(2px);
  color: #475569;
}

/* ????????? */
.profile-info-card {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.profile-info-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.profile-info-item .info-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #f1f5f9;
  color: var(--brand-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.profile-info-item .info-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.profile-info-item .info-text strong {
  font-size: 12.5px;
  color: var(--text-main);
  font-weight: 600;
}

.profile-info-item .info-text span {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
}

.profile-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  margin-top: auto;
  padding: 8px 0 4px;
  flex-shrink: 0;
}

.btn-profile-logout {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: #ffffff;
  color: var(--text-sub);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
}

.btn-profile-logout:active {
  background: #fee2e2;
  color: var(--danger);
  border-color: rgba(239, 68, 68, 0.2);
}

.profile-sub-view {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
  padding-bottom: calc(72px + var(--safe-bottom));
  animation: pageFadeIn 0.25s ease;
}

.sub-page-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 0 4px;
}

.sub-page-back {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 6px 8px 6px 4px;
  margin-left: -4px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--brand-primary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.sub-page-back:active {
  background: var(--brand-tint-08);
}

.sub-page-title {
  flex: 1;
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--text-main);
}

/* ==================== ?????? ==================== */
.credits-summary-card {
  padding: 16px;
  background: linear-gradient(135deg, var(--brand-tint-08) 0%, #ffffff 70%);
  border: 1px solid var(--brand-tint-14);
}

.credits-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.credits-summary-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-sub);
}

.credits-summary-hint {
  font-size: 11px;
  color: #94a3b8;
}

.credits-summary-body {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.credits-summary-num {
  font-size: 32px;
  font-weight: 800;
  color: var(--brand-deep);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.credits-summary-unit {
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
}

.credits-log-card {
  padding: 14px 14px 12px;
}

.credits-log-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.credits-log-title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
}

.credits-log-total {
  font-size: 12px;
  color: #94a3b8;
  font-weight: 500;
}

.credits-log-list {
  display: flex;
  flex-direction: column;
}

.credits-log-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.05);
}

.credits-log-item:last-child {
  border-bottom: none;
}

.credits-log-main {
  flex: 1;
  min-width: 0;
}

.credits-log-type-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.credits-log-type {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

.credits-log-type-tag {
  display: inline-flex;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  background: #f1f5f9;
  color: #64748b;
}

.credits-log-type-tag.is-income {
  background: color-mix(in srgb, var(--theme-success) 14%, transparent);
  color: var(--theme-success-deep);
}

.credits-log-type-tag.is-expense {
  background: var(--brand-tint-10);
  color: var(--brand-deep);
}

.credits-log-remark {
  margin: 0 0 4px;
  font-size: 12px;
  line-height: 1.45;
  color: #64748b;
  word-break: break-word;
}

.credits-log-time {
  font-size: 11px;
  color: #94a3b8;
}

.credits-log-side {
  flex-shrink: 0;
  text-align: right;
}

.credits-log-amount {
  display: block;
  font-size: 15px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.credits-log-amount.is-plus {
  color: var(--theme-success-deep, #059669);
}

.credits-log-amount.is-minus {
  color: #e11d48;
}

.credits-log-balance {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  color: #94a3b8;
}

.credits-log-empty {
  padding: 28px 12px;
  text-align: center;
}

.credits-empty-title {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 700;
  color: #334155;
}

.credits-empty-desc {
  margin: 0;
  font-size: 12px;
  color: #94a3b8;
}

.credits-log-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 0;
  font-size: 12px;
  color: #64748b;
}

.credits-loading-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-primary);
  animation: articlePulse 1.2s ease-in-out infinite;
}

.btn-credits-more {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 10px 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 10px;
  background: #f8fafc;
  color: #475569;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}

.btn-credits-more:active {
  background: #f1f5f9;
}

.btn-credits-more:disabled {
  opacity: 0.55;
  cursor: wait;
}

/* ==================== ?????? ==================== */
.sub-page-header-text {
  flex: 1;
  min-width: 0;
}

.sub-page-header-text .sub-page-title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
}

.sub-page-desc {
  margin: 2px 0 0;
  font-size: 11.5px;
  color: #94a3b8;
  line-height: 1.4;
}

/* ???????? Tab ??? */
.account-segment-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  background: #f1f5f9;
  border-radius: 12px;
  margin-bottom: 2px;
  border: 1px solid rgba(226, 232, 240, 0.8);
}

.account-segment-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.account-segment-tab svg {
  color: #94a3b8;
  transition: color 0.15s ease;
}

.account-segment-tab:hover {
  color: #1e293b;
}

.account-segment-tab.active {
  background: #ffffff;
  color: var(--brand-deep);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
  font-weight: 700;
}

.account-segment-tab.active svg {
  color: var(--brand-primary);
}

.account-tab-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: pageFadeIn 0.22s ease;
}

.account-tab-panel[hidden] {
  display: none !important;
}

.account-card {
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  border-radius: var(--radius-lg);
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.03);
}

/* ????? */
.account-avatar-studio {
  padding: 16px;
}

.avatar-studio-layout {
  display: flex;
  align-items: center;
  gap: 16px;
}

.avatar-studio-stage {
  position: relative;
  flex-shrink: 0;
}

.account-avatar-preview {
  width: 76px;
  height: 76px;
  border-radius: 22px;
  background: var(--brand-gradient);
  color: #ffffff;
  font-size: 28px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border: 3px solid #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.account-avatar-preview:hover {
  transform: scale(1.02);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.16);
}

.account-avatar-preview.has-img {
  color: transparent;
}

.account-avatar-preview.has-img .account-avatar-letter {
  display: none;
}

.avatar-hover-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.account-avatar-preview:hover .avatar-hover-overlay {
  opacity: 1;
}

.avatar-uploading-mask {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  z-index: 2;
}

.avatar-spin-dot {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: articleSpinner 0.75s linear infinite;
}

.btn-avatar-camera {
  position: absolute;
  right: -4px;
  bottom: -4px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--brand-deep);
  color: #ffffff;
  border: 2.5px solid #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.btn-avatar-camera:hover {
  transform: scale(1.08);
  background: var(--brand-primary);
}

.btn-avatar-camera:active {
  transform: scale(0.92);
}

.avatar-studio-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.avatar-studio-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.avatar-studio-title {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}

.avatar-format-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  background: #f1f5f9;
  color: #64748b;
  letter-spacing: 0.3px;
}

.avatar-studio-tip {
  margin: 0;
  font-size: 11.5px;
  color: #94a3b8;
  line-height: 1.45;
}

.btn-avatar-trigger-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  margin-top: 4px;
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid var(--brand-tint-22);
  background: var(--brand-tint-10);
  color: var(--brand-deep);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
}

.btn-avatar-trigger-link:hover {
  background: var(--brand-tint-18);
}

.btn-avatar-trigger-link:active {
  transform: scale(0.97);
}

/* ???? */
.account-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(241, 245, 249, 0.9);
}

.account-card-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.account-card-title {
  font-size: 14.5px;
  font-weight: 700;
  color: #0f172a;
}

.account-card-badge {
  font-size: 10.5px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
}

.account-card-badge.is-shield {
  background: rgba(14, 165, 233, 0.1);
  color: #0284c7;
}

.account-card-hint {
  font-size: 11.5px;
  color: #94a3b8;
}

.account-card-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ?????? */
.input-field.modern {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
}

.field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.input-field.modern label {
  font-size: 12.5px;
  font-weight: 600;
  color: #334155;
  margin: 0;
}

.field-count {
  font-size: 11px;
  color: #94a3b8;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.field-secured-badge {
  font-size: 10.5px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
}

.input-field.modern .input-box {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 12px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid rgba(203, 213, 225, 0.8);
  transition: all 0.18s ease;
  box-sizing: border-box;
}

.input-field.modern .input-box:focus-within {
  background: #ffffff;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px var(--brand-tint-10);
}

.input-field.modern .input-box.readonly {
  background: #f1f5f9;
  border-color: rgba(226, 232, 240, 0.9);
  cursor: default;
}

.input-field.modern .field-icon {
  width: 17px;
  height: 17px;
  color: #94a3b8;
  flex-shrink: 0;
  transition: color 0.15s ease;
}

.input-field.modern .input-box:focus-within .field-icon {
  color: var(--brand-primary);
}

.input-field.modern input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  background: transparent;
  color: #0f172a;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  padding: 0;
}

.input-field.modern input[readonly] {
  color: #64748b;
  cursor: default;
}

.input-field.modern .field-helper {
  margin: 0;
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.4;
}

.field-error-text {
  color: #e11d48 !important;
  font-weight: 500;
  animation: fadeIn 0.18s ease;
}

/* ?????? */
.security-banner-tip {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(238, 242, 255, 0.9) 0%, rgba(224, 231, 255, 0.5) 100%);
  border: 1px solid rgba(199, 210, 254, 0.6);
  color: #3730a3;
  font-size: 12px;
  line-height: 1.45;
}

.security-banner-tip svg {
  flex-shrink: 0;
  margin-top: 1px;
  color: #4f46e5;
}

/* ?????? */
.account-form-action {
  display: flex;
  justify-content: flex-end;
  margin-top: 4px;
}

.btn-profile-save {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 42px;
  padding: 0 18px;
  border-radius: 11px;
  border: 0;
  background: var(--brand-gradient);
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 4px 14px var(--brand-glow);
  transition: all 0.18s ease;
}

.btn-profile-save:hover {
  opacity: 0.95;
  box-shadow: 0 6px 18px var(--brand-glow);
}

.btn-profile-save:active {
  transform: scale(0.97);
}

.btn-profile-save:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-profile-save.is-security {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.2);
}

.btn-profile-save.is-security:hover {
  background: linear-gradient(135deg, #334155 0%, #1e293b 100%);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.28);
}

.profile-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.profile-stat {
  padding: 10px 12px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid var(--border-light);
}

.profile-stat-value {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: var(--brand-deep);
  line-height: 1.2;
}

.profile-stat-label {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: var(--text-sub);
}

.profile-section {
  padding: 16px;
}

.profile-section-head {
  margin-bottom: 12px;
}

.profile-section-head h3 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
}

/* ???IP??????? */
.identity-type-selector {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 14px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.identity-type-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 10px 4px;
  background: #ffffff;
  border: 1.5px solid var(--border-light);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center;
  user-select: none;
  overflow: hidden;
  box-sizing: border-box;
}

.identity-type-btn:hover {
  border-color: var(--brand-tint-35);
  background: var(--brand-tint-02);
  transform: translateY(-1px);
}

.identity-type-btn.active {
  border-color: var(--brand-primary);
  background: linear-gradient(145deg, #ffffff, var(--brand-tint-06));
  box-shadow: 0 4px 12px var(--brand-tint-14), 0 0 0 1px var(--brand-primary);
}

.identity-type-btn .identity-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.identity-type-btn.active .identity-title {
  color: var(--brand-primary);
}

.identity-type-btn .identity-sub {
  font-size: 9px;
  color: var(--text-muted);
  margin-top: 3px;
  line-height: 1.25;
  max-width: 100%;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  word-break: break-all;
}

.identity-type-btn.active .identity-sub {
  color: var(--brand-deep);
  font-weight: 500;
}

/* ?? Chips */
.parse-example-chips {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 10px;
}

.example-chips-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

.example-chip {
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 600;
  color: var(--brand-deep);
  background: #ffffff;
  border: 1px solid var(--brand-tint-20);
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.18s ease;
  line-height: 1.4;
}

.example-chip:hover, .example-chip:active {
  background: var(--brand-primary);
  color: #ffffff;
  border-color: var(--brand-primary);
  transform: translateY(-1px);
}

/* ???????? */
.intro-input-wrapper {
  position: relative;
  width: 100%;
}

.btn-clear-intro {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 3px 7px;
  font-size: 10.5px;
  color: var(--text-muted);
  background: rgba(241, 245, 249, 0.85);
  border: 1px solid var(--border-light);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-clear-intro:hover {
  background: #fee2e2;
  color: #ef4444;
  border-color: #fca5a5;
}

.intro-highlight {
  animation: introFlash 0.6s ease-out;
}

@keyframes introFlash {
  0% { box-shadow: 0 0 0 4px var(--brand-tint-35); background: var(--brand-tint-08); }
  100% { box-shadow: none; background: #ffffff; }
}

/* ???????? */
.tone-quick-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}

.tone-chip {
  padding: 3px 8px;
  font-size: 10.5px;
  color: var(--text-sub);
  background: #ffffff;
  border: 1px dashed var(--border-light);
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tone-chip:hover, .tone-chip:active {
  color: var(--brand-primary);
  border-color: var(--brand-primary);
  background: var(--brand-tint-04);
}

.profile-section-head p {
  margin: 0;
  font-size: 12px;
  color: var(--text-sub);
  line-height: 1.45;
}

.profile-section .ai-parse-box {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--brand-tint-06), rgba(14, 165, 233, 0.04));
  border: 1px solid var(--brand-tint-18);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 14px;
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.profile-section .ai-parse-box.is-parsing {
  border-color: var(--brand-tint-35);
  box-shadow: 0 0 0 3px var(--brand-tint-08);
}

.profile-section .ai-parse-box.is-parsing::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.45) 50%, transparent 60%);
  animation: parseShimmer 1.8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes parseShimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.ai-parse-hero {
  margin-bottom: 10px;
}

.ai-parse-badge {
  display: inline-block;
  margin-bottom: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--brand-tint-12);
  color: var(--brand-primary);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.ai-parse-desc {
  margin: 6px 0 0;
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--text-sub);
}

.profile-section .ai-parse-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-main);
  margin-bottom: 0;
}

.profile-section .ai-parse-head svg {
  color: var(--brand-primary);
  flex-shrink: 0;
}

.parse-step-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 6px;
}

.parse-step {
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--border-light);
  transition: all 0.25s ease;
}

.parse-step.active {
  color: var(--brand-primary);
  background: #ffffff;
  border-color: var(--brand-tint-25);
  font-weight: 600;
}

.parse-step.done {
  color: var(--text-sub);
  background: rgba(255, 255, 255, 0.5);
}

.parse-status-text {
  margin: 0 0 8px;
  font-size: 11.5px;
  color: var(--brand-deep);
  line-height: 1.4;
}

.profile-section .ai-parse-box textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.45;
  border-radius: 10px;
  border: 1px solid var(--border-light);
  background: #ffffff;
  color: var(--text-main);
  resize: none;
  font-family: inherit;
}

.profile-section .ai-parse-box textarea:disabled {
  opacity: 0.7;
}

.profile-section .btn-ai-parse {
  margin-top: 8px;
  width: 100%;
  padding: 11px;
  border: none;
  border-radius: 10px;
  background: var(--brand-gradient);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px var(--brand-tint-22);
}

.profile-section .btn-ai-parse:disabled {
  opacity: 0.75;
  cursor: not-allowed;
}

.parse-result-card {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand-tint-08), rgba(14, 165, 233, 0.05));
  border: 1px solid var(--brand-tint-20);
  animation: parseResultIn 0.35s ease;
}

@keyframes parseResultIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.parse-result-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-deep);
}

.parse-result-head svg {
  color: var(--brand-primary);
  flex-shrink: 0;
}

.parse-result-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.parse-result-kw {
  padding: 4px 10px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid var(--border-light);
  font-size: 11.5px;
  color: var(--text-sub);
}

.parse-result-hint {
  margin: 0;
  font-size: 11px;
  color: var(--text-sub);
}

.bp-field.bp-field-filling input {
  border-color: var(--brand-primary);
  background: #ffffff;
  box-shadow: 0 0 0 3px var(--brand-tint-10);
}

.bp-field.bp-field-filled input {
  border-color: var(--brand-tint-35);
  background: var(--brand-tint-04);
  animation: bpFieldPop 0.35s ease;
}

@keyframes bpFieldPop {
  0% { transform: scale(1); }
  40% { transform: scale(1.01); }
  100% { transform: scale(1); }
}

.bp-field.bp-field-filled label::after {
  content: ' ? ???';
  font-weight: 500;
  color: var(--brand-primary);
  font-size: 11px;
}

.profile-section .brand-profile-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 18px;
}

.form-group-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  background: #f8fafc;
  border-radius: 14px;
  border: 1px solid var(--border-light);
}

.form-group-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--brand-deep);
  padding-bottom: 4px;
  border-bottom: 1px dashed var(--brand-tint-20);
  letter-spacing: 0.2px;
}

.profile-section .brand-profile-form .input-field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-sub);
}

.profile-section .brand-profile-form .input-field label em {
  font-style: normal;
  font-weight: 400;
  color: var(--text-muted);
}

.profile-section .brand-profile-form input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border-light);
  background: #f8fafc;
  color: var(--text-main);
  font-size: 13px;
}

.profile-section .brand-profile-form input:focus {
  border-color: var(--brand-primary);
  outline: none;
  background: #ffffff;
}

.btn-profile-save {
  width: 100%;
  margin-top: 12px;
  padding: 12px;
  border: none;
  border-radius: 12px;
  background: var(--brand-gradient);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.gallery-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 2px 0;
}

.gallery-type-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin: 4px 0 2px;
  padding: 4px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--border-light);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.03);
}

.gallery-type-tab {
  min-width: 0;
  appearance: none;
  border: none;
  background: transparent;
  color: var(--text-sub);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  padding: 10px 12px;
  border-radius: 11px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.gallery-type-tab.active {
  color: var(--brand-deep);
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.gallery-sections {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding-bottom: 8px;
}

.gallery-section {
  min-width: 0;
}

.gallery-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 2px 4px 8px;
}

.gallery-section-head.is-minimal {
  justify-content: flex-end;
  margin: 0 4px 8px;
}

.gallery-section-title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
}

.gallery-section-count {
  font-size: 11.5px;
  color: var(--text-muted);
  white-space: nowrap;
}

.gallery-bar-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.gallery-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
  color: var(--text-main);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gallery-count {
  font-size: 12px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--border-light);
  border-radius: 999px;
  padding: 4px 10px;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-gallery-scope {
  flex-shrink: 0;
  border: 1px solid var(--border-light);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-main);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}

.btn-gallery-scope[aria-pressed="true"] {
  border-color: var(--brand, #1a505a);
  color: var(--brand, #1a505a);
  background: rgba(26, 80, 90, 0.06);
}

.gallery-card {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.045);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.gallery-card:active {
  transform: scale(0.985);
}

.gallery-card.is-pending {
  cursor: default;
}

.gallery-card.is-pending:active {
  transform: none;
}

.gallery-card.is-article-card {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.gallery-thumb {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(160deg, #f3f7f8 0%, #e8eef1 100%);
}

.gallery-thumb img,
.gallery-card > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-card.is-list-card {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: stretch;
  min-height: 86px;
  border-radius: 16px;
}

.gallery-card.is-list-card .article-list-media {
  position: relative;
  width: 76px;
  min-height: 86px;
  background: linear-gradient(160deg, var(--theme-surface, #f1f8fa) 0%, #eef2f5 100%);
  overflow: hidden;
}

.gallery-card.is-list-card .article-list-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-card.is-list-card .article-list-media.is-placeholder,
.gallery-card.is-list-card .article-list-media.is-pending-media {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-primary);
}

.gallery-card.is-list-card .article-list-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  padding: 12px 40px 12px 12px;
}

.gallery-card.is-list-card .article-list-title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.gallery-card.is-list-card .article-list-meta {
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: 500;
}

.gallery-card.is-list-card .btn-del-img {
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  font-size: 16px;
  background: rgba(15, 23, 42, 0.06);
  color: var(--text-sub);
}

.gallery-card.is-list-card .btn-del-img:active {
  background: rgba(239, 68, 68, 0.12);
  color: var(--danger);
}

.gallery-card.is-list-card .gallery-industry-tag {
  top: 8px;
  left: 8px;
  right: auto;
  max-width: 60px;
}

.article-card-cover {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 12px;
  text-align: center;
  background: radial-gradient(circle at center, var(--brand-tint-08) 0%, rgba(240, 253, 250, 0.5) 100%);
}

.article-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand-tint-15) 0%, var(--brand-tint-08) 100%);
  color: var(--brand-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

.article-card-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 6px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card-badge {
  font-size: 10px;
  color: var(--brand-primary);
  background: #ffffff;
  border: 1px solid var(--brand-tint-25);
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 600;
  box-shadow: 0 2px 6px var(--brand-tint-08);
}

.gallery-card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: #eef6f8;
}

.pending-cover {
  aspect-ratio: 3 / 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(160deg, #f3fafb 0%, #e8f4f6 100%);
  color: var(--brand-deep);
  font-size: 12px;
  font-weight: 600;
}

.pending-cover p {
  margin: 0;
}

.pulse-ring.sm {
  width: 28px;
  height: 28px;
  border-width: 2px;
}

.gallery-card .prompt-desc {
  padding: 9px 11px 11px;
  font-size: 12px;
  color: var(--text-sub);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
  background: #ffffff;
}

.gallery-prompt {
  margin: 0;
  font-size: 11.5px;
  color: var(--text-sub);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
  min-height: 2.8em;
}

.gallery-card .btn-del-img {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.45);
  color: #fff;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.gallery-card .btn-del-img:active {
  background: rgba(224, 75, 92, 0.85);
}

/* ??? */
.gallery-empty {
  padding: 56px 20px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.gallery-empty .empty-icon-box {
  width: 72px;
  height: 72px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

.gallery-empty .empty-logo-mark {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  object-fit: cover;
  box-shadow: 0 8px 20px color-mix(in srgb, var(--brand-primary) 12%, transparent);
  animation: logoPulse 2.4s ease-in-out infinite alternate;
}

.empty-holder {
  padding: 72px 20px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 1;
}

.empty-icon-wrap {
  width: 68px;
  height: 68px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  margin-bottom: 14px;
  box-shadow: 0 6px 18px rgba(26, 80, 90, 0.05);
}

.empty-title {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 6px;
  color: var(--text-main);
}

.empty-desc {
  font-size: 12.5px;
  color: var(--text-muted);
  margin: 0 0 18px;
  line-height: 1.5;
  max-width: 240px;
}

.btn-go-create {
  padding: 10px 22px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-blue));
  border: none;
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 6px 16px var(--brand-glow);
}

.btn-go-create:active {
  transform: scale(0.97);
}

/* ==================== 4. Bottom navigation ==================== */
.bottom-nav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: min(480px, 100%);
  height: calc(66px + var(--safe-bottom));
  padding: 5px 8px var(--safe-bottom);
  box-sizing: border-box;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(24px) saturate(1.25);
  -webkit-backdrop-filter: blur(24px) saturate(1.25);
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: 0 -10px 30px rgba(15, 23, 42, 0.07);
  z-index: 40;
}

.nav-btn {
  position: relative;
  min-width: 0;
  min-height: 56px;
  padding: 3px 2px 2px;
  border: none;
  border-radius: 14px;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.15;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.2s ease, transform 0.18s ease;
}

.nav-icon {
  width: 36px;
  height: 29px;
  padding: 5px 8px;
  box-sizing: border-box;
  border-radius: 11px;
  stroke-width: 2;
  transition: transform 0.2s ease, background-color 0.2s ease, filter 0.2s ease;
}

.nav-icon.nav-icon-img {
  padding: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  background: #eaf6f6;
  box-shadow: 0 0 0 1px rgba(22, 48, 58, 0.06);
}

.nav-btn.active .nav-icon.nav-icon-img {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand-primary) 40%, white);
}

.nav-btn:active {
  transform: scale(0.96);
}

.nav-btn:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: -2px;
}

.nav-btn.active {
  color: var(--brand-primary);
  font-weight: 700;
}

.nav-btn.active .nav-icon {
  background: color-mix(in srgb, var(--brand-primary) 12%, white);
  filter: drop-shadow(0 3px 7px color-mix(in srgb, var(--brand-primary) 14%, transparent));
  transform: translateY(-1px);
}

.nav-btn.active::after {
  content: "";
  position: absolute;
  bottom: 1px;
  width: 14px;
  height: 2px;
  border-radius: 999px;
  background: var(--brand-primary);
  opacity: 0.75;
}

@media (hover: hover) {
  .nav-btn:not(.active):hover {
    color: var(--text-sub);
  }
}

/* ==================== 5. ?? Modal ?? ==================== */
.image-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  animation: pageFadeIn 0.2s ease;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(26, 46, 54, 0.45);
  backdrop-filter: blur(10px);
}

.modal-dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  background: var(--bg-card-solid);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 50px rgba(26, 80, 90, 0.18);
}

.modal-close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border-light);
  color: var(--text-main);
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

  .modal-img-container img {
  width: 100%;
  max-height: 60vh;
  object-fit: contain;
  display: block;
  background: transparent;
}

.modal-footer {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-prompt-desc {
  font-size: 12.5px;
  color: var(--text-sub);
  margin: 0;
  max-height: 96px;
  overflow-y: auto;
  line-height: 1.5;
  word-break: break-word;
  overflow-wrap: anywhere;
  -webkit-overflow-scrolling: touch;
  padding-right: 2px;
}

.modal-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.modal-btn-row .btn-modal-act {
  flex: 1 1 calc(50% - 4px);
  min-width: 0;
}

.btn-modal-act {
  flex: 1;
  height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  background: #f3fafb;
  color: var(--text-main);
  font-size: 12.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  cursor: pointer;
}

.btn-modal-act.primary {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: #ffffff;
  font-weight: 600;
}

/* ???? Modal ?? */
.confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 24px;
  animation: pageFadeIn 0.2s ease;
}

.confirm-dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: min(320px, calc(100vw - 32px));
  background: var(--bg-card-solid);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 24px 20px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-sizing: border-box;
  box-shadow: 0 20px 48px rgba(26, 80, 90, 0.2);
}

.confirm-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(31, 168, 146, 0.15), rgba(47, 143, 186, 0.15));
  border: 1px solid rgba(31, 168, 146, 0.28);
  color: var(--brand-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.confirm-icon.is-warn {
  background: linear-gradient(135deg, rgba(196, 122, 44, 0.14), rgba(194, 75, 75, 0.12));
  border-color: rgba(196, 122, 44, 0.35);
  color: #c47a2c;
}

.confirm-icon.is-play {
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.12), rgba(225, 29, 72, 0.1));
  border-color: rgba(225, 29, 72, 0.28);
  color: #e11d48;
}

.confirm-btn-row.single .btn-confirm-cancel {
  display: none;
}

.confirm-btn-row.single .btn-confirm-ok {
  flex: 1;
}

.confirm-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 8px;
}

.confirm-msg {
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.5;
  margin: 0 0 20px;
}

.confirm-msg strong {
  color: var(--brand-deep);
  font-weight: 700;
}

.confirm-btn-row {
  display: flex;
  gap: 10px;
  width: 100%;
}

.btn-confirm-cancel,
.btn-confirm-ok {
  flex: 1;
  height: 42px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-confirm-cancel {
  background: #f0f6f8;
  border: 1px solid var(--border-light);
  color: var(--text-sub);
}

.btn-confirm-cancel:active {
  background: #e2eff2;
}

.btn-confirm-ok {
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-blue));
  border: none;
  color: #ffffff;
  box-shadow: 0 4px 14px var(--brand-glow);
}

.btn-confirm-ok:active {
  opacity: 0.92;
  transform: scale(0.98);
}

.confirm-icon.is-danger {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.12), rgba(220, 38, 38, 0.1));
  border-color: rgba(239, 68, 68, 0.28);
  color: var(--danger);
}

.btn-confirm-ok.is-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
}

.btn-confirm-ok.is-danger:active {
  opacity: 0.9;
}

.app-confirm-dialog .confirm-btn-row {
  gap: 12px;
}

.app-confirm-dialog .btn-confirm-cancel {
  order: 0;
}

.app-confirm-dialog .btn-confirm-ok {
  order: 1;
}

.btn-tool.highlight-poster {
  background: linear-gradient(135deg, #fff8ee, #fff2dd);
  border-color: #ffd699;
  color: #b86e00;
  font-weight: 600;
}

.btn-tool.highlight-poster:active {
  background: #ffeacc;
}

.btn-modal-act.highlight-poster {
  background: linear-gradient(135deg, #fff8ee, #fff2dd);
  border-color: #ffd699;
  color: #b86e00;
  font-weight: 600;
}

.result-actions-secondary.single-full {
  grid-column: 1 / -1;
}

.poster-dialog {
  max-width: 360px;
}

.poster-title-bar {
  padding: 14px 16px 8px;
  border-bottom: 1px solid var(--border-light);
}

.poster-title-bar h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
}

.poster-title-bar span {
  font-size: 11.5px;
  color: var(--text-sub);
}

.poster-preview-container {
  padding: 12px;
  background: #11181c;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 260px;
}

.poster-preview-container img {
  max-width: 100%;
  max-height: 52vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

.poster-preview-container img.wx-save-hint,
img.wx-save-hint {
  outline: 2px solid var(--brand-primary, #0d6e87);
  outline-offset: 4px;
  animation: wx-save-pulse 0.9s ease-in-out 2;
}

@keyframes wx-save-pulse {
  0%, 100% { outline-color: var(--brand-primary, #0d6e87); }
  50% { outline-color: transparent; }
}

/* Toast ???????? */
.toast-popup {
  position: fixed;
  left: 50%;
  bottom: calc(80px + var(--safe-bottom));
  transform: translateX(-50%);
  background: rgba(17, 24, 39, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  z-index: 200;
  max-width: 88%;
  text-align: center;
  pointer-events: none;
  animation: toastFloatIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  letter-spacing: 0.2px;
}

@keyframes toastFloatIn {
  from {
    opacity: 0;
    transform: translate(-50%, 10px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
}

/* ==========================================================================
   ?????????????????????????????????
   ========================================================================== */

/* 1. Header ?????? */
.brand-profile-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--brand-primary);
  background: var(--brand-sub-gradient);
  border: 1px solid var(--border-light);
  cursor: pointer;
  transition: all 0.2s ease;
}
.brand-profile-pill:hover, .brand-profile-pill:active {
  border-color: var(--brand-primary);
  transform: translateY(-1px);
}

/* 2. ??????????? */
.brand-sync-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  margin-bottom: 12px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--brand-tint-07) 0%, var(--theme-bg-spot-bottom) 100%);
  border: 1px dashed var(--brand-tint-25);
}
.brand-sync-info {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--brand-deep);
  font-weight: 500;
}
.brand-sync-info svg {
  color: var(--brand-primary);
  flex-shrink: 0;
}
.btn-brand-sync-act {
  background: none;
  border: none;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--brand-primary);
  text-decoration: underline;
  cursor: pointer;
  padding: 2px 4px;
}

/* 3. ?????? */
.action-bar-dual {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 10px;
  margin-top: auto;
  position: sticky;
  bottom: calc(var(--tabbar-h) + 8px);
  z-index: 6;
  padding: 16px 0 8px;
  background: linear-gradient(180deg, transparent 0%, var(--bg-main) 36%);
}

.action-bar-dual.is-single {
  grid-template-columns: 1fr;
}
.btn-optimize-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #ffffff;
  color: var(--text-main);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}
.btn-optimize-preview svg {
  color: var(--brand-primary);
}
.btn-optimize-preview:hover, .btn-optimize-preview:active {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  background: var(--brand-sub-gradient);
}

/* 4. ????????? Modal */
.confirm-dialog-wide {
  max-width: 320px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
}
.prompt-highlights-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin: 10px 0 12px;
}
.highlight-chip {
  font-size: 11px;
  padding: 4px 9px;
  border-radius: 12px;
  background: var(--brand-sub-gradient);
  color: var(--brand-deep);
  border: 1px solid var(--brand-tint-18);
  font-weight: 500;
}
.prompt-preview-card {
  text-align: left;
  background: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 12px;
}
.prompt-preview-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.prompt-preview-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-sub);
}
.btn-toggle-prompt-edit {
  background: none;
  border: none;
  font-size: 11px;
  color: var(--brand-primary);
  cursor: pointer;
  font-weight: 600;
}
.prompt-preview-content p {
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-main);
  max-height: 120px;
  overflow-y: auto;
  word-break: break-word;
}
.prompt-preview-content textarea {
  width: 100%;
  box-sizing: border-box;
  font-size: 12px;
  line-height: 1.5;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid var(--border-focus);
  background: #ffffff;
  color: var(--text-main);
  resize: vertical;
  min-height: 80px;
  font-family: inherit;
}

/* 5. ???? Modal */
.brand-profile-dialog {
  max-width: 340px;
  width: 90%;
  max-height: 88vh;
  overflow-y: auto;
  text-align: left;
  padding: 20px 16px 16px;
}
.ai-parse-box {
  background: linear-gradient(135deg, var(--brand-tint-08) 0%, rgba(2, 132, 199, 0.06) 100%);
  border: 1px dashed var(--brand-primary);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 14px;
}
.ai-parse-head {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  color: var(--brand-deep);
  margin-bottom: 6px;
}
.ai-parse-box textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 8px;
  font-size: 12px;
  line-height: 1.45;
  border-radius: 8px;
  border: 1px solid var(--border-light);
  background: #ffffff;
  color: var(--text-main);
  resize: none;
  font-family: inherit;
}
.btn-ai-parse {
  margin-top: 8px;
  width: 100%;
  padding: 8px;
  border: none;
  border-radius: 8px;
  background: var(--brand-gradient);
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s ease;
}
.btn-ai-parse:disabled {
  opacity: 0.6;
}
.brand-profile-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}
.brand-profile-form .input-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.brand-profile-form label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-sub);
}
.brand-profile-form input {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border-light);
  background: #f8fafc;
  color: var(--text-main);
  font-size: 12.5px;
}
.brand-profile-form input:focus {
  border-color: var(--brand-primary);
  outline: none;
  background: #ffffff;
}
.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* 6. ????????????? */
.poster-scheme-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: #f3f7fa;
  border-bottom: 1px solid var(--border-light);
  overflow-x: auto;
}
.scheme-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 4px 10px;
  border-radius: 14px;
  border: 1px solid var(--border-light);
  background: #ffffff;
  color: var(--text-sub);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1.2;
  transition: all 0.2s ease;
}
.scheme-btn .scheme-label {
  font-size: 12px;
  font-weight: 600;
}
.scheme-btn .scheme-hint {
  font-size: 10px;
  font-weight: 400;
  opacity: 0.85;
}
.scheme-btn.active {
  background: var(--brand-gradient);
  color: #ffffff;
  border-color: transparent;
}
.scheme-refresh-btn {
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--border-light);
  background: #ffffff;
  color: var(--brand-primary);
  cursor: pointer;
}
.poster-editor-card {
  padding: 10px 14px;
  background: #ffffff;
  border-top: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}
.poster-editor-row {
  display: grid;
  grid-template-columns: 80px 1fr;
  align-items: center;
  gap: 8px;
}
.poster-editor-row label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-sub);
}
.poster-editor-row input {
  padding: 5px 8px;
  font-size: 12px;
  border-radius: 6px;
  border: 1px solid var(--border-light);
  background: #f8fafc;
}
.poster-editor-row input:focus {
  border-color: var(--brand-primary);
  background: #ffffff;
  outline: none;
}

/* 7. ????????? Modal */
.remix-dialog {
  max-width: 320px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  text-align: left;
  padding: 20px 16px 16px;
}
.remix-source-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: #f8fafc;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  margin-bottom: 12px;
}
.remix-source-preview img {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  object-fit: cover;
}
.remix-source-info {
  flex: 1;
  min-width: 0;
}
.remix-badge {
  display: inline-block;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--brand-tint-12);
  color: var(--brand-primary);
  font-weight: 600;
}
.remix-source-info p {
  font-size: 11.5px;
  color: var(--text-sub);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.remix-options-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}
.remix-option-card {
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  background: #ffffff;
  cursor: pointer;
  transition: all 0.2s ease;
}
.remix-option-card:hover, .remix-option-card:active {
  border-color: var(--brand-primary);
  background: var(--brand-sub-gradient);
  transform: translateY(-1px);
}
.remix-opt-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.remix-opt-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}
.remix-opt-arrow {
  font-size: 12px;
  color: var(--brand-primary);
  font-weight: 600;
}
.remix-opt-desc {
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--text-sub);
}
.remix-option-loading {
  text-align: center;
  padding: 24px 0;
  font-size: 12.5px;
  color: var(--text-sub);
}

/* ==================== ?????? ==================== */
.brand-advisor-bar {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand-tint-08), rgba(14, 165, 233, 0.06));
  border: 1px solid var(--brand-tint-15);
}

.brand-advisor-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #ffffff;
  color: var(--brand-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-advisor-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.brand-advisor-title {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}

.brand-advisor-desc {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-muted);
}

.brand-advisor-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 4px;
}

.brand-advisor-link {
  border: none;
  background: transparent;
  color: var(--brand-primary);
  font-size: 12px;
  font-weight: 700;
  padding: 0;
  cursor: pointer;
}

.brand-advisor-text {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-main);
}

.brand-portrait-card,
.brand-portrait-inline {
  padding: 12px 0 0;
  margin-top: 2px;
  border-top: 1px dashed rgba(15, 23, 42, 0.08);
}

.brand-portrait-head {
  margin-bottom: 8px;
}

.brand-portrait-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--brand-tint-10);
  color: var(--brand-primary);
  font-size: 11px;
  font-weight: 600;
}

.brand-portrait-title {
  margin: 8px 0 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
}

.brand-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-start;
}

.brand-keyword {
  padding: 5px 10px;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid var(--border-light);
  font-size: 11.5px;
  color: var(--text-sub);
  line-height: 1.35;
  max-width: 100%;
  word-break: break-word;
}

.preview-step-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 12px;
}

.preview-step {
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  color: var(--text-muted);
  background: #f1f5f9;
  transition: all 0.25s ease;
}

.preview-step.active {
  color: var(--brand-primary);
  background: var(--brand-tint-12);
  font-weight: 600;
}

.preview-step.done {
  color: var(--text-sub);
  background: #f8fafc;
}

.preview-intent-card {
  margin-bottom: 12px;
  padding: 12px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid var(--border-light);
}

.preview-intent-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-sub);
  margin-bottom: 6px;
}

.preview-intent-text {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--text-main);
}

.preview-gold-quote {
  margin: 8px 0 0;
  padding-top: 8px;
  border-top: 1px dashed var(--border-light);
  font-size: 13px;
  line-height: 1.45;
  color: var(--brand-deep);
}

.prompt-preview-card.is-collapsed .prompt-preview-content {
  display: none;
}

.prompt-preview-card .btn-toggle-prompt-edit.subtle {
  margin-top: 8px;
  font-size: 12px;
}

.result-advisor-bar {
  margin: 12px 0 4px;
  padding: 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand-tint-06), rgba(14, 165, 233, 0.04));
  border: 1px solid var(--brand-tint-12);
}

.result-advisor-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.result-advisor-badge {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--brand-tint-12);
  color: var(--brand-primary);
  font-size: 11px;
  font-weight: 600;
}

.result-advisor-sub {
  font-size: 11px;
  color: var(--text-sub);
}

.result-advisor-tips {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.advisor-tip-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid var(--border-light);
}

.advisor-tip-row p {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-main);
  flex: 1;
  min-width: 0;
}

.advisor-tip-btn {
  flex-shrink: 0;
  padding: 6px 10px;
  border: none;
  border-radius: 8px;
  background: var(--brand-gradient);
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.advisor-tip-btn.outline {
  background: #ffffff;
  color: var(--brand-primary);
  border: 1px solid var(--brand-tint-25);
}

.remix-opt-badge {
  display: inline-block;
  margin-bottom: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--brand-tint-10);
  color: var(--brand-primary);
  font-size: 10px;
  font-weight: 600;
}

.remix-opt-scenario {
  margin: 0 0 4px;
  font-size: 11px;
  color: var(--brand-deep);
  font-weight: 600;
}

.remix-opt-changes {
  margin: 6px 0 0;
  font-size: 11px;
  color: var(--text-sub);
}

.input-field.field-advisor-filled {
  padding: 8px;
  margin: -8px;
  margin-bottom: 4px;
  border-radius: 10px;
  background: var(--brand-tint-06);
  border: 1px solid var(--brand-tint-20);
  animation: advisorPulse 1.2s ease 2;
}

@keyframes advisorPulse {
  0%, 100% { box-shadow: 0 0 0 0 transparent; }
  50% { box-shadow: 0 0 0 4px var(--brand-tint-12); }
}

[hidden] {
  display: none !important;
}

/* ==================== ????? ==================== */
.create-mode-bar {
  display: flex;
  gap: 8px;
  padding: 0 4px 14px;
}

.create-mode-btn {
  flex: 1;
  height: 40px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  color: #64748b;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.create-mode-btn.active {
  background: var(--brand-gradient);
  border-color: transparent;
  color: #fff;
  box-shadow: var(--brand-shadow-btn);
}

.publish-platform-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
}

.publish-platform-bar[hidden] {
  display: none !important;
}

.publish-platform-card .card-top {
  margin-bottom: 10px;
}

.publish-platform-bar.is-in-detail {
  padding: 0;
}

.publish-platform-bar.is-in-detail .publish-platform-btns {
  width: 100%;
}

.publish-platform-label {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.publish-platform-btns {
  display: flex;
  flex: 1;
  gap: 8px;
}

.publish-platform-btn {
  flex: 1;
  height: 38px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.8);
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.publish-platform-btn.active {
  background: #fff;
  border-color: var(--brand-primary);
  color: var(--brand-deep);
  box-shadow: 0 0 0 2px var(--brand-glow);
}

.publish-platform-bar.is-compact {
  padding: 0;
  gap: 6px;
  min-width: 0;
  flex: 1;
}

.publish-platform-bar.is-compact .publish-platform-label {
  display: none;
}

.publish-platform-bar.is-compact .publish-platform-btns {
  flex: 0 1 auto;
  min-width: 0;
  gap: 6px;
}

.publish-platform-bar.is-compact .publish-platform-btn {
  flex: 0 0 auto;
  height: 30px;
  padding: 0 10px;
  font-size: 12px;
  border-radius: 999px;
  white-space: nowrap;
}

.create-config-panel.is-article-mode #card-fields.is-article-card {
  border-color: var(--brand-tint-18);
  background: linear-gradient(180deg, #ffffff 0%, var(--theme-surface-accent) 100%);
}

.create-config-panel.is-article-mode #card-fields.is-article-card .section-title {
  font-size: 15px;
}

.scene-card-article {
  background: linear-gradient(145deg, #ffffff 0%, var(--theme-surface-accent) 100%);
  border-color: var(--brand-tint-16);
}

.scene-card-article em {
  color: #64748b;
}

.scene-card-intent {
  display: inline-flex;
  margin: 4px 0 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--brand-tint-10);
  color: var(--brand-deep);
  font-size: 10.5px;
  font-weight: 600;
  font-style: normal;
}

.article-result-panel {
  margin: 0 12px 14px;
  padding: 16px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid var(--brand-tint-14);
  box-shadow: 0 8px 28px var(--brand-tint-08);
}

.article-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.article-result-head-left,
.article-result-head-right {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.article-result-head-right {
  flex-shrink: 0;
}

.article-result-badge {
  display: inline-flex;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--brand-tint-12);
  color: var(--brand-deep);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.article-intent-tag {
  font-size: 12px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.article-word-count {
  font-size: 11px;
  color: #94a3b8;
  white-space: nowrap;
}

.btn-article-edit-toggle {
  border: 1px solid var(--brand-tint-22);
  background: rgba(240, 253, 250, 0.9);
  color: var(--brand-deep);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.btn-article-edit-toggle:active {
  background: var(--brand-tint-12);
}

.article-loading {
  padding: 8px 0 4px;
}

.article-skeleton {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.article-skeleton-title,
.article-skeleton-heading,
.article-skeleton-line {
  border-radius: 8px;
  background: linear-gradient(90deg, #f1f5f9 0%, #e8f4f2 50%, #f1f5f9 100%);
  background-size: 200% 100%;
  animation: articleSkeleton 1.4s ease-in-out infinite;
}

.article-skeleton-title {
  height: 22px;
  width: 72%;
}

.article-skeleton-heading {
  height: 16px;
  width: 42%;
  margin-top: 4px;
}

.article-skeleton-line {
  height: 12px;
  width: 100%;
}

.article-skeleton-line.medium { width: 88%; }
.article-skeleton-line.short { width: 56%; }
.article-skeleton-line.long { width: 96%; }

@keyframes articleSkeleton {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.article-loading-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--brand-deep);
  font-size: 13px;
}

.article-loading-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-primary);
  animation: articlePulse 1s ease-in-out infinite;
}

@keyframes articlePulse {
  0%, 100% { opacity: 0.35; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.1); }
}

.article-preview-wrap {
  max-height: 52vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-right: 2px;
}

.article-preview {
  color: #1e293b;
  letter-spacing: 0.01em;
}

.article-preview-title-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.article-preview-title {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 21px;
  font-weight: 800;
  line-height: 1.42;
  color: #0f172a;
  letter-spacing: -0.015em;
}

.btn-copy-article-title {
  flex-shrink: 0;
  margin-top: 2px;
  padding: 5px 10px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 8px;
  background: #fff;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.btn-copy-article-title:active {
  background: #f8fafc;
  color: var(--brand-primary, #4f46e5);
}

.article-preview-section {
  position: relative;
  margin-top: 20px;
}

.article-preview-section + .article-preview-section {
  padding-top: 18px;
  border-top: 1px dashed rgba(15, 23, 42, 0.08);
}

.article-preview-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.45;
  color: var(--brand-deep);
}

.article-section-idx {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 6px;
  background: var(--brand-tint-12);
  color: var(--brand-primary);
  font-size: 11px;
  font-weight: 800;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  flex-shrink: 0;
}

.article-preview-para {
  margin: 0 0 12px;
  font-size: 14.5px;
  line-height: 1.85;
  color: #334155;
  text-align: justify;
}

.article-preview-para:last-child {
  margin-bottom: 0;
}

/* closing = 正文收尾，与正文段落同级，不再做成「金句」分区卡 */
.article-preview-closing {
  margin: 8px 0 0;
}

.article-closing-text {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.85;
  color: #334155;
  text-align: justify;
}

.article-closing-text:last-child {
  margin-bottom: 0;
}

.article-preview-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.article-tags-label {
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
  margin-right: 2px;
}

.article-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--brand-tint-08);
  border: 1px solid var(--brand-tint-14);
  color: var(--brand-deep);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.article-tag:hover {
  background: var(--brand-tint-14);
  color: var(--brand-primary);
}

.article-edit-wrap {
  margin-top: 2px;
}

.article-edit-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding: 6px 10px;
  border-radius: 8px;
  background: #f1f5f9;
}

.article-edit-tip {
  font-size: 12px;
  color: #64748b;
}

.article-body-edit {
  width: 100%;
  min-height: 280px;
  padding: 14px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 14px;
  background: #f8fafc;
  color: #1e293b;
  font-size: 14.5px;
  line-height: 1.85;
  resize: vertical;
  font-family: inherit;
  box-sizing: border-box;
  transition: border-color 0.2s, background-color 0.2s;
}

.article-body-edit:focus {
  outline: none;
  border-color: var(--brand-tint-35);
  background: #ffffff;
  box-shadow: 0 0 0 3px var(--brand-tint-12);
}

.article-publish-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.article-publish-hint-line {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 0;
  padding-top: 10px;
  border-top: 1px dashed rgba(15, 23, 42, 0.08);
  font-size: 11px;
  line-height: 1.4;
  color: #94a3b8;
  text-align: center;
}

.article-publish-hint-line span:not(.article-publish-arrow) {
  color: #64748b;
}

.article-publish-arrow {
  color: #cbd5e1;
  font-size: 10px;
}

.article-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  font-size: 11px;
  color: #64748b;
  line-height: 1.35;
}

.article-step span {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--brand-tint-12);
  color: var(--brand-deep);
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.article-actions-primary {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 0;
}

.article-actions-primary:has(#btn-share-article:not([hidden])) {
  grid-template-columns: 1fr 1fr;
}

.btn-article-primary,
.btn-article-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
  min-height: 42px;
  padding: 0 10px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.btn-article-primary {
  border: none;
  background: var(--brand-gradient);
  color: #ffffff;
  box-shadow: 0 6px 18px var(--brand-tint-22);
}

.btn-article-primary.outline {
  border: 1px solid var(--brand-tint-22);
  background: #ffffff;
  color: var(--brand-deep);
  box-shadow: none;
}

.btn-article-secondary {
  border: 1px solid var(--brand-tint-22);
  background: #ffffff;
  color: var(--brand-deep);
}

.btn-article-primary:active,
.btn-article-secondary:active {
  transform: scale(0.98);
}

.article-result-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.btn-article-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 38px;
  padding: 8px 6px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 11px;
  background: #f8fafc;
  color: #475569;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.btn-article-action:active {
  background: #f1f5f9;
}

.article-workspace {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  min-height: var(--content-min-h);
  margin: 0;
  padding: 0 0 10px;
  min-width: 0;
  box-sizing: border-box;
  background: linear-gradient(180deg, var(--theme-surface-accent) 0%, var(--bg-main) 18%, var(--bg-main) 100%);
  border-radius: 20px;
}

body.article-workspace-active .page-viewport {
  padding-top: 6px;
  padding-bottom: 4px;
}

body.article-workspace-active .page-content[data-page="create"] {
  gap: 0;
  min-height: var(--content-min-h);
  padding-bottom: 0;
}

.article-ws-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px 10px;
  flex-shrink: 0;
}

.article-ws-nav-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.article-ws-back {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 6px 10px 6px 7px;
  border: 1px solid var(--brand-tint-18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--brand-deep);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
  transition: all 0.15s ease;
}

.article-ws-back:active {
  transform: scale(0.97);
  background: var(--brand-tint-08);
}

.article-ws-status-group {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.article-ws-status {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--brand-tint-12);
  color: var(--brand-deep);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.article-workspace.is-ready .article-ws-status {
  background: color-mix(in srgb, var(--theme-success) 14%, transparent);
  color: var(--theme-success-deep);
}

.article-ws-meta-bar {
  display: flex;
  align-items: center;
  padding: 0 2px;
}

.article-ws-topic {
  margin: 0;
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.4;
  color: #0f172a;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-workspace .article-result-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  margin: 0 6px;
  padding: 0;
  border: none;
  box-shadow: none;
  background: transparent;
}

.article-workspace.is-ready .article-result-panel {
  flex: 1;
  min-height: 0;
}

.article-workspace.is-ready .article-reader-zone {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.article-workspace.is-loading .article-result-panel {
  justify-content: center;
  min-height: calc(100dvh - 220px);
}

.article-loading {
  padding: 24px 12px 32px;
  text-align: center;
}

.article-loading-visual {
  position: relative;
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
}

.article-loading-icon {
  position: relative;
  z-index: 1;
  width: 64px;
  height: 64px;
  border-radius: 0;
  background: transparent;
  border: none;
  color: var(--brand-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
}

.article-loading-ip {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  object-fit: cover;
  box-shadow: 0 8px 20px color-mix(in srgb, var(--brand-primary) 16%, transparent);
  animation: logoPulse 2.2s ease-in-out infinite alternate;
}

.article-loading-pulse {
  position: absolute;
  inset: -8px;
  border-radius: 28px;
  background: var(--brand-tint-12);
  animation: articlePulse 1.6s ease-in-out infinite;
}

.article-loading-title {
  margin: 0 0 14px;
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}

.article-loading-steps {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 18px;
}

.article-step-pill {
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(15, 23, 42, 0.06);
  transition: all 0.25s ease;
}

.article-step-pill.is-active {
  color: var(--brand-deep);
  background: var(--brand-tint-12);
  border-color: var(--brand-tint-20);
}

.article-step-pill.is-done {
  color: #64748b;
  opacity: 0.75;
}

.article-workspace.is-loading .article-skeleton {
  max-width: 320px;
  margin: 0 auto 14px;
}

.article-reader-zone {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 16px 16px 14px;
  border-radius: 20px;
  background: #ffffff;
  border: 1px solid var(--brand-tint-12);
  box-shadow: 0 10px 32px rgba(15, 23, 42, 0.05), 0 1px 3px rgba(15, 23, 42, 0.03);
  box-sizing: border-box;
}

.article-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.05);
}

.article-result-head-left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.article-result-badge {
  display: inline-flex;
  align-items: center;
  padding: 2.5px 8px;
  border-radius: 6px;
  background: var(--brand-gradient);
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.article-intent-tag {
  display: inline-flex;
  align-items: center;
  padding: 2.5px 8px;
  border-radius: 6px;
  background: var(--brand-tint-10);
  color: var(--brand-deep);
  font-size: 11px;
  font-weight: 600;
}

.article-read-time {
  font-size: 11.5px;
  color: #94a3b8;
  font-weight: 500;
}

.article-result-head-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.article-word-count {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  font-variant-numeric: tabular-nums;
}

.btn-article-edit-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  border: 1px solid var(--brand-tint-18);
  border-radius: 999px;
  background: var(--brand-tint-06);
  color: var(--brand-deep);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
}

.btn-article-edit-toggle:hover {
  background: var(--brand-tint-14);
}

.article-workspace .article-preview-wrap {
  flex: 1;
  max-height: none !important;
  min-height: 0;
  overflow-y: auto;
}

.article-workspace .article-preview-wrap.is-enter {
  animation: articleFadeIn 0.45s ease;
}

@keyframes articleFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.article-workspace .article-edit-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.article-workspace .article-body-edit {
  flex: 1;
  min-height: 220px;
}

/* ==================== ?????? ==================== */
.article-cover-block {
  flex-shrink: 0;
  margin: 0 0 18px;
  padding: 0;
}

.btn-article-header-generate {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--brand-tint-20);
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand-tint-08) 0%, rgba(255, 255, 255, 0.95) 100%);
  color: var(--brand-deep);
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.03);
  box-sizing: border-box;
}

.btn-article-header-generate:hover:not(:disabled) {
  border-color: var(--brand-tint-35);
  box-shadow: 0 4px 16px var(--brand-tint-14);
  transform: translateY(-1px);
}

.btn-article-header-generate:active:not(:disabled) {
  transform: scale(0.99);
}

.cover-gen-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--brand-gradient);
  color: #ffffff;
  flex-shrink: 0;
  box-shadow: 0 4px 12px var(--brand-tint-20);
}

.cover-gen-info {
  flex: 1;
  min-width: 0;
}

.cover-gen-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  margin-bottom: 3px;
}

.cover-gen-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
}

.cover-gen-badge {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--brand-tint-14);
  color: var(--brand-primary);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.cover-gen-desc {
  margin: 0;
  font-size: 11.5px;
  color: #64748b;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.cover-gen-action-btn {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--brand-deep);
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 700;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.btn-article-header-generate:hover .cover-gen-action-btn {
  background: var(--brand-primary);
}

.btn-article-header-generate:disabled {
  opacity: 0.6;
  cursor: wait;
}

.article-cover-loading {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--brand-tint-18);
  background: linear-gradient(135deg, var(--brand-tint-08) 0%, rgba(255, 255, 255, 0.95) 100%);
  color: var(--brand-deep);
  box-sizing: border-box;
}

.article-cover-spinner {
  width: 24px;
  height: 24px;
  border: 2.5px solid var(--brand-tint-20);
  border-top-color: var(--brand-primary);
  border-radius: 50%;
  animation: articleCoverSpin 0.8s linear infinite;
  flex-shrink: 0;
}

@keyframes articleCoverSpin {
  to { transform: rotate(360deg); }
}

.cover-loading-text-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cover-loading-title {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}

.cover-loading-sub {
  font-size: 11.5px;
  color: #64748b;
}

.article-cover-stage {
  position: relative;
  width: 100%;
  border: 1px solid var(--brand-tint-14);
  border-radius: 16px;
  overflow: hidden;
  background: #0f172a;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.08);
  box-sizing: border-box;
}

.article-cover-img-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
}

.article-cover-stage.is-wide-cover .article-cover-img-wrapper {
  aspect-ratio: 2.35 / 1;
}

.article-cover-img-wrapper img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-cover-tag-floating {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.article-cover-stage .btn-stage-zoom {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: all 0.15s ease;
}

.article-cover-stage .btn-stage-zoom:hover {
  background: rgba(15, 23, 42, 0.85);
  transform: scale(1.06);
}

.article-cover-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 10px;
}

.btn-article-cover-sub {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border: 1px solid var(--brand-tint-20);
  border-radius: 999px;
  background: #ffffff;
  color: var(--brand-deep);
  font-size: 11.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-article-cover-sub:hover {
  background: var(--brand-tint-06);
  border-color: var(--brand-tint-35);
}

.btn-article-cover-sub:disabled {
  opacity: 0.5;
  cursor: wait;
}

.btn-article-crop-square {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border: 1px solid var(--brand-tint-20);
  border-radius: 999px;
  background: var(--brand-tint-08);
  color: var(--brand-primary);
  font-size: 11.5px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-article-crop-square:hover {
  background: var(--brand-tint-16);
}

/* ==================== ??????????? ==================== */
.article-ws-footer {
  flex-shrink: 0;
  margin: 10px 6px 0;
  padding: 10px 12px calc(10px + var(--safe-bottom));
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--brand-tint-14);
  box-shadow: 0 -4px 24px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.article-publish-guide-card {
  margin-bottom: 8px;
}

.article-publish-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 10px;
  background: var(--brand-tint-06);
  border: 1px solid var(--brand-tint-10);
}

.publish-step-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.pub-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--brand-primary);
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  flex-shrink: 0;
}

.pub-step-text {
  font-size: 11.5px;
  font-weight: 600;
  color: #475569;
  white-space: nowrap;
}

.article-publish-arrow {
  color: #cbd5e1;
  font-size: 11px;
}

.article-actions-primary {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 0;
}

.article-actions-primary:has(#btn-share-article:not([hidden])) {
  grid-template-columns: 1fr 1fr;
}

.btn-article-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 12px;
  border: none;
  background: var(--brand-gradient);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 6px 18px var(--brand-tint-22);
  transition: all 0.18s ease;
  white-space: nowrap;
}

.btn-article-primary:active {
  transform: scale(0.99);
}

.btn-article-primary.is-copied {
  background: #10b981 !important;
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.3) !important;
}

.btn-article-primary.outline {
  border: 1px solid var(--brand-tint-22);
  background: #ffffff;
  color: var(--brand-deep);
  box-shadow: none;
}

.article-result-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 8px;
}

.btn-article-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 38px;
  padding: 6px 4px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 10px;
  background: #f8fafc;
  color: #475569;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-article-action:hover {
  background: #ffffff;
  border-color: var(--brand-tint-25);
  color: var(--brand-primary);
}

.btn-article-action:active {
  transform: scale(0.98);
}

/* 朋友圈配文弹层（长文附属） */
.moments-dialog {
  width: min(420px, calc(100vw - 28px));
  max-height: min(78vh, 680px);
  padding: 0;
  overflow: hidden;
}
.moments-dialog .modal-close-btn {
  top: 10px;
  right: 10px;
}
.moments-head {
  padding: 16px 44px 10px 16px;
}
.moments-head h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
}
.moments-list {
  flex: 1;
  overflow-y: auto;
  padding: 2px 14px 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  -webkit-overflow-scrolling: touch;
}
.moments-loading {
  margin: 12px 0 24px;
  padding: 24px 12px;
  text-align: center;
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.5;
}
.moments-card {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 12px;
}
.moments-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.moments-card-label {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--brand-tint-10);
  border: 1px solid var(--brand-tint-16);
  font-size: 11px;
  font-weight: 700;
  color: var(--brand-primary);
}
.moments-card-copy {
  border: none;
  background: var(--brand-gradient);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 999px;
  font-family: inherit;
  cursor: pointer;
  flex-shrink: 0;
}
.moments-card-copy:active {
  transform: scale(0.96);
}
.moments-card-text {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-main);
  white-space: pre-wrap;
  word-break: break-word;
}
.moments-card-text.is-clamped {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  overflow: hidden;
  white-space: normal;
}
.moments-card-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 7px;
  border: none;
  background: transparent;
  padding: 0;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  color: var(--brand-primary);
  cursor: pointer;
}
.moments-card-toggle i {
  font-style: normal;
  font-size: 12px;
  transition: transform 0.18s ease;
}
.moments-card-toggle[aria-expanded="true"] i {
  transform: rotate(180deg);
}
.moments-footer {
  display: flex;
  gap: 10px;
  padding: 12px 14px calc(12px + var(--safe-bottom));
  border-top: 1px solid var(--border-light);
  background: var(--bg-card-solid);
}
.moments-btn {
  flex: 1;
  min-height: 42px;
  border-radius: 12px;
  border: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.moments-btn.ghost {
  background: #fff;
  color: var(--brand-deep);
  border: 1px solid var(--border-light);
}
.moments-btn.primary {
  background: var(--brand-gradient);
  color: #fff;
}
.moments-btn:active {
  transform: scale(0.98);
}

.article-cover-sheet {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 10px calc(10px + var(--safe-bottom));
  box-sizing: border-box;
}

.article-cover-sheet[hidden] {
  display: none !important;
}

.article-cover-sheet-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  background: rgba(15, 23, 42, 0.28);
  cursor: pointer;
}

.article-cover-sheet-panel {
  position: relative;
  width: 100%;
  max-width: 420px;
  padding: 14px 14px 12px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid var(--brand-tint-12);
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.16);
}

.article-cover-sheet-text {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.55;
  color: #334155;
  text-align: center;
}

.article-cover-sheet-text strong {
  color: var(--brand-deep);
}

.article-cover-sheet-actions {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 8px;
}

.article-cover-sheet-actions .btn-article-action,
.article-cover-sheet-actions .btn-article-primary.is-compact {
  min-height: 40px;
  width: 100%;
}

.btn-article-primary.is-compact {
  min-height: 40px;
  padding: 0 12px;
  font-size: 13px;
}

.article-brand-toggle {
  display: grid;
  grid-template-columns: 18px 1fr;
  column-gap: 9px;
  align-items: center;
  padding: 11px 12px;
  border: 1px solid var(--brand-tint-14);
  border-radius: 12px;
  background: rgba(240, 253, 250, 0.65);
  color: #334155;
  font-size: 13px;
  cursor: pointer;
}

.article-brand-toggle input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--brand-primary);
}

.article-brand-toggle small {
  grid-column: 2;
  margin-top: 3px;
  color: #94a3b8;
  font-size: 11px;
  line-height: 1.45;
}

.brand-draw-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--brand-deep);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.brand-draw-toggle input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--brand-primary);
}

.btn-ai-fill-fields {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border: 1px solid var(--brand-tint-20);
  border-radius: 999px;
  background: var(--brand-sub-gradient);
  color: var(--brand-deep);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.btn-ai-fill-fields:active {
  transform: scale(0.96);
  background: var(--brand-tint-15);
}

.btn-ai-fill-fields:disabled {
  opacity: 0.65;
  cursor: wait;
}

.result-done.is-article-mode .result-head {
  padding: 10px 14px 6px;
}

.result-done.is-article-mode .result-stage {
  max-width: 220px;
  margin: 0 auto 12px;
  border: 1px solid var(--brand-tint-12);
  border-radius: 14px;
  overflow: hidden;
  background: #f8fafc;
}

.result-done.is-article-mode .result-prompt-wrap,
.result-done.is-article-mode .result-advisor-bar,
.result-done.is-article-mode .result-toolbar {
  display: none;
}

.gallery-card .gallery-mode-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.62);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
}

.gallery-card .gallery-industry-tag {
  position: absolute;
  top: 8px;
  right: 36px;
  z-index: 2;
  max-width: 46%;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(26, 80, 90, 0.78);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}

.gallery-card.is-pending .gallery-industry-tag:first-child,
.gallery-card.is-pending:not(:has(.btn-del-img)) .gallery-industry-tag {
  right: 8px;
}

.gallery-card.is-view-only {
  cursor: default;
}

.gallery-card.is-view-only:active {
  transform: none;
}

/* ==================== ????????? ==================== */
.shell,
.page-viewport,
.page-content,
.scene-home,
.create-config-panel,
.profile-page,
.result-panel,
.article-workspace {
  max-width: 100%;
}

.page-content > * {
  min-width: 0;
}

.create-config-panel .ui-card {
  min-width: 0;
}

/* ==================== ?????? ==================== */
.ref-box.add-btn {
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  padding: 0;
  margin: 0;
}

.wx-share-guide {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 12px 16px 24px;
  pointer-events: auto;
}

.wx-share-guide[hidden] {
  display: none !important;
}

.wx-share-guide-mask {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
}

.wx-share-guide-card {
  position: relative;
  z-index: 1;
  width: min(280px, calc(100vw - 48px));
  margin-top: 8px;
  margin-right: 4px;
  padding: 18px 16px 14px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.22);
  text-align: left;
}

.wx-share-guide-arrow {
  position: absolute;
  top: -6px;
  right: 10px;
  font-size: 28px;
  line-height: 1;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  animation: wx-share-bounce 1.2s ease-in-out infinite;
}

@keyframes wx-share-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.wx-share-guide-title {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}

.wx-share-guide-desc {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.55;
  color: #64748b;
}

.wx-share-guide-btn {
  width: 100%;
  height: 40px;
  border: 0;
  border-radius: 10px;
  background: #1fa892;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.wx-share-guide-btn:active {
  opacity: 0.9;
  transform: scale(0.98);
}

.btn-tool.wx-share-ready {
  border-color: rgba(31, 168, 146, 0.35);
  color: #0f766e;
}

/* seg-pills: two-option segmented choice */
.seg-pills {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.seg-pills .pill-opt {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 10px 6px;
  line-height: 1.3;
  font-family: inherit;
}

.seg-pills .pill-opt strong {
  font-size: 13px;
  font-weight: 600;
}

.seg-pills .pill-opt span {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 400;
}

.seg-pills .pill-opt.active span {
  color: var(--brand-deep);
  opacity: 0.8;
}

/* topic-helper: AI topic suggestions */
.topic-helper {
  margin-top: 10px;
  padding: 12px;
  border: 1px dashed var(--border-light);
  border-radius: var(--radius-sm);
  background: rgba(31, 168, 146, 0.05);
}

.topic-helper-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 8px;
}

.topic-helper-head strong {
  font-size: 13px;
  color: var(--brand-deep);
}

.topic-helper-head span {
  font-size: 11px;
  color: var(--text-muted);
}

.topic-helper-dirs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.topic-helper-btn {
  width: 100%;
  padding: 9px 0;
  border: 1px solid var(--brand-primary);
  border-radius: var(--radius-sm);
  background: rgba(31, 168, 146, 0.12);
  color: var(--brand-deep);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.topic-helper-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.topic-helper-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.topic-option {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 10px 12px;
  text-align: left;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: #fff;
  cursor: pointer;
  font-family: inherit;
}

.topic-option strong {
  font-size: 13px;
  color: var(--text-main, #1f2d33);
}

.topic-option span {
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-sub);
}

.topic-option.active {
  border-color: var(--brand-primary);
  background: rgba(31, 168, 146, 0.1);
}

.topic-option-best {
  border-color: rgba(31, 168, 146, 0.45);
  background: rgba(31, 168, 146, 0.06);
}

.topic-option-best strong {
  color: var(--brand-primary, #1fa892);
}
