.user-body .chat-stream-status { margin:0 0 12px 44px; color:var(--v2-muted); font-size:12px; }
.user-body .chat-stream-label { animation:chat-stream-label 2s ease-in-out infinite; }
.user-body .chat-stream-dots { display:inline-flex; align-items:center; justify-content:space-between; width:17px; margin-left:2px; vertical-align:middle; }
.user-body .chat-stream-dots i { width:3px; height:3px; border-radius:50%; background:currentColor; opacity:.35; animation:chat-stream-dot 1.2s ease-in-out infinite; }
.user-body .chat-stream-dots i:nth-child(2) { animation-delay:.2s; }
.user-body .chat-stream-dots i:nth-child(3) { animation-delay:.4s; }
@keyframes chat-stream-dot { 0%, 65%, 100% { opacity:.35; transform:translateY(0); } 25% { opacity:1; transform:translateY(-2px); } }
@keyframes chat-stream-label { 0%, 100% { opacity:1; } 50% { opacity:.72; } }
@media (prefers-reduced-motion: reduce) { .user-body .chat-stream-label, .user-body .chat-stream-dots i { animation:none !important; opacity:1; transform:none; } }
:root {
  color-scheme: light;
  --v2-bg: #f3f5f3;
  --v2-surface: #ffffff;
  --v2-surface-soft: #f7f8f7;
  --v2-surface-muted: #eef1ef;
  --v2-ink: #1d2422;
  --v2-muted: #68736f;
  --v2-soft: #8b9692;
  --v2-line: #dde3e0;
  --v2-line-strong: #cbd4d0;
  --v2-primary: #137b60;
  --v2-primary-dark: #0d624c;
  --v2-primary-soft: #e7f5ef;
  --v2-coral: #d96542;
  --v2-danger: #c94949;
  --v2-sidebar: #151b19;
  --v2-sidebar-soft: #28322e;
  --v2-shadow: 0 16px 48px rgba(24, 34, 30, .09);
}

html.theme-dark {
  color-scheme: dark;
  --v2-bg: #191f1d;
  --v2-surface: #202825;
  --v2-surface-soft: #252e2a;
  --v2-surface-muted: #2a3430;
  --v2-ink: #edf3f0;
  --v2-muted: #9ba9a3;
  --v2-soft: #74817c;
  --v2-line: #34413c;
  --v2-line-strong: #46554f;
  --v2-primary: #60caa5;
  --v2-primary-dark: #4cb48f;
  --v2-primary-soft: #183d31;
  --v2-coral: #f18a68;
  --v2-danger: #ef8585;
  --v2-sidebar: #0e1412;
  --v2-sidebar-soft: #202925;
  --v2-shadow: 0 18px 56px rgba(0, 0, 0, .25);
}

html, body.user-body { min-width: 320px; min-height: 100%; background: var(--v2-bg); color: var(--v2-ink); }
body.user-body { margin: 0; overflow-x: hidden; font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; }
html:has(body.user-body #assetDialog[open]),
body.user-body:has(#assetDialog[open]),
html:has(body.user-body #appDownloadDialog[open]),
body.user-body:has(#appDownloadDialog[open]) {
  overflow: hidden;
  overscroll-behavior: none;
}
.user-body *, .user-body *::before, .user-body *::after { box-sizing: border-box; }
.user-body button, .user-body input, .user-body textarea, .user-body select { font: inherit; letter-spacing: 0; }
.user-body button { color: inherit; }
.user-body input, .user-body textarea, .user-body select { border-color: var(--v2-line-strong); color: var(--v2-ink); background: var(--v2-surface); }
.user-body svg { width: 17px; height: 17px; stroke-width: 1.8; }
.user-body button:focus-visible, .user-body input:focus-visible, .user-body textarea:focus-visible, .user-body select:focus-visible { outline: 3px solid color-mix(in srgb, var(--v2-primary) 20%, transparent); outline-offset: 1px; }
.user-body [hidden] { display: none !important; }

/* Video library uses the shared v2 theme tokens in both light and dark modes. */
.user-body .video-library-tree,
.user-body .video-library-entries,
.user-body .video-library-card,
.user-body .video-library-series-tab-wrap,
.user-body .video-library-episode-tab-wrap {
  background: var(--v2-surface);
  border-color: var(--v2-line);
  color: var(--v2-ink);
}
.user-body .video-library-series-tab-wrap.active,
.user-body .video-library-episode-tab-wrap.active {
  background: var(--v2-primary-soft);
  border-color: var(--v2-primary);
}
.user-body .video-library-series-tab,
.user-body .video-library-episode,
.user-body .video-library-new-episode { color: var(--v2-ink); }
.user-body .video-library-series-tab-wrap .icon-button,
.user-body .video-library-episode-tab-wrap .icon-button {
  background: var(--v2-surface-soft);
  border-color: var(--v2-line-strong);
  color: var(--v2-muted);
}
.user-body .video-library-series-tab-wrap .icon-button:hover,
.user-body .video-library-episode-tab-wrap .icon-button:hover {
  background: var(--v2-surface-muted);
  color: var(--v2-ink);
}
.user-body .video-library-entries .section-heading h3,
.user-body .video-library-entries .section-heading p,
.user-body .video-library-card strong { color: var(--v2-ink); }
.user-body .video-library-card small { color: var(--v2-muted); }
.user-body .video-library-entries .empty-state {
  background: var(--v2-surface-soft);
  border-color: var(--v2-line-strong);
  color: var(--v2-muted);
}
.user-body .video-library-entries .secondary {
  background: var(--v2-surface-soft);
  border-color: var(--v2-line-strong);
  color: var(--v2-ink);
}

.user-body .chat-composer-restore {
  min-height: 42px;
  border-color: var(--v2-line-strong);
  color: var(--v2-primary);
  background: var(--v2-surface-soft);
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--v2-ink) 4%, transparent);
  transition: border-color .16s ease, color .16s ease, background-color .16s ease;
}
.user-body .chat-composer-restore:hover {
  border-color: color-mix(in srgb, var(--v2-primary) 55%, var(--v2-line-strong));
  color: var(--v2-primary-dark);
  background: var(--v2-primary-soft);
}
html.theme-dark .user-body .chat-composer-restore {
  border-color: #3a5750;
  color: #72d7b3;
  background: #1b2925;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035);
}
html.theme-dark .user-body .chat-composer-restore:hover {
  border-color: #5fc6a2;
  color: #9ce7cc;
  background: #203b32;
}

/* Theme control */
.user-body .theme-toggle { width: 64px; height: 36px; display: grid; place-items: center; flex: 0 0 auto; padding: 0; border: 1px solid var(--v2-line); border-radius: 7px; background: var(--v2-surface); }
.user-body .theme-toggle-track { position: relative; width: 52px; height: 26px; display: flex; align-items: center; justify-content: space-around; color: var(--v2-soft); }
.user-body .theme-toggle-track svg { z-index: 1; width: 14px; height: 14px; }
.user-body .theme-toggle-track b { position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 6px 0 6px 0; background: #fff0b6; box-shadow: 0 2px 7px rgba(34, 39, 36, .15); transition: transform .28s cubic-bezier(.2,.75,.25,1), background-color .2s ease; }
.user-body .theme-toggle-track svg:first-child { color: #7f5b0a; }
html.theme-dark .user-body .theme-toggle-track b { transform: translateX(26px); background: #35415f; }
html.theme-dark .user-body .theme-toggle-track svg:last-of-type { color: #d7defd; }

/* Authentication */
.user-body .auth-shell { position: relative; min-height: 100vh; display: grid; grid-template-columns: minmax(460px, 54%) minmax(360px, 46%); background: var(--v2-surface); color: var(--v2-ink); }
.user-body .auth-theme-toggle { position: fixed; top: 24px; right: 28px; z-index: 5; }
.user-body .brand-panel { min-height: 100vh; position: relative; overflow: hidden; display: flex; flex-direction: column; padding: 30px 42px; color: #f4f8f6; background: #0e1512; }
.user-body .brand-panel::after { display: none; }
.user-body .brand-lockup { z-index: 1; display: flex; align-items: center; gap: 11px; font-size: 18px; }
.user-body .brand-lockup img, .user-body .auth-mobile-brand img { width: 36px; height: 36px; object-fit: cover; border-radius: 7px; }
.user-body .brand-copy { z-index: 1; width: min(620px, 88%); margin-top: auto; padding: 50px 0 22px; }
.user-body .brand-copy > span { color: #62caa6; font-size: 12px; font-weight: 700; }
.user-body .brand-copy h1 { margin: 18px 0 14px; font-size: clamp(38px, 4.2vw, 58px); line-height: 1.22; letter-spacing: 0; }
.user-body .brand-copy p { margin: 0; color: #aab7b2; font-size: 15px; line-height: 1.8; }
.user-body .auth-mosaic { z-index: 1; width: min(610px, 88%); height: min(270px, 27vh); display: grid; grid-template-columns: 1.35fr .8fr 1fr; grid-template-rows: 1fr 1fr; gap: 8px; }
.user-body .auth-mosaic img { width: 100%; height: 100%; object-fit: cover; border: 1px solid #313d38; border-radius: 5px; filter: saturate(.88); animation: mosaic-rise .55s ease both; transition: transform .24s ease, filter .24s ease; }
.user-body .auth-mosaic img:nth-child(2) { animation-delay: .07s; }
.user-body .auth-mosaic img:nth-child(3) { animation-delay: .14s; }
.user-body .auth-mosaic img:nth-child(4) { animation-delay: .21s; }
.user-body .auth-mosaic img:hover { z-index: 2; transform: translateY(-3px); filter: saturate(1); }
.user-body .auth-mosaic .mosaic-large { grid-row: 1 / 3; }
.user-body .auth-mosaic .mosaic-tall { grid-row: 1 / 3; }
.user-body .brand-foot { z-index: 1; margin-top: 18px; color: #66736e; font-size: 9px; }
.user-body .auth-main { display: grid; place-items: center; padding: 84px 9vw 50px; background: var(--v2-surface); }
.user-body .auth-box { width: min(420px, 100%); animation: view-enter .38s ease both; }
.user-body .auth-mobile-brand { display: none; align-items: center; gap: 10px; margin-bottom: 30px; }
.user-body .segmented { width: 132px; display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin: 0 0 42px; padding: 0; border-bottom: 1px solid var(--v2-line); border-radius: 0; background: transparent; }
.user-body .segmented button { position: relative; padding: 9px 0; border: 0; border-radius: 0; color: var(--v2-muted); background: transparent; }
.user-body .segmented button.active { color: var(--v2-ink); background: transparent; box-shadow: none; font-weight: 700; }
.user-body .segmented button.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--v2-primary); }
.user-body .auth-box h2 { margin: 0 0 8px; font-size: 27px; }
.user-body .auth-box .subtle { margin: 0 0 30px; color: var(--v2-muted); }
.user-body .auth-box label { display: grid; gap: 8px; margin-bottom: 18px; color: var(--v2-muted); font-size: 12px; font-weight: 600; }
.user-body .auth-box input { width: 100%; height: 46px; padding: 0 13px; border: 1px solid var(--v2-line-strong); border-radius: 7px; outline: 0; color: var(--v2-ink); background: var(--v2-surface); }
.user-body .verification-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.user-body .verification-row .secondary { height: 46px; white-space: nowrap; color: var(--v2-primary); border-color: var(--v2-line-strong); background: var(--v2-surface); }
.user-body .auth-text-button { display: block; margin: 8px auto 0; border: 0; background: transparent; color: var(--v2-primary); font-size: 12px; cursor: pointer; }
.user-body .auth-box input:focus { border-color: var(--v2-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--v2-primary) 12%, transparent); }
.user-body .primary { border: 1px solid var(--v2-primary); border-radius: 7px; color: #fff; background: var(--v2-primary); font-weight: 750; }
.user-body .primary:hover { background: var(--v2-primary-dark); }
.user-body .wide { width: 100%; min-height: 47px; }
.user-body .error { min-height: 19px; margin: 0 0 9px; color: var(--v2-danger); font-size: 12px; }
.user-body .auth-legal { margin: 18px 0 0; text-align: center; color: var(--v2-soft); font-size: 9px; }
.user-body .auth-content-links { display: flex; justify-content: center; gap: 18px; margin-top: 22px; }
.user-body .auth-announcement { width: 100%; min-height: 56px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; margin-top: 20px; padding: 10px 12px; border: 1px solid color-mix(in srgb, var(--v2-primary) 30%, var(--v2-line)); border-radius: 7px; color: var(--v2-ink); background: var(--v2-primary-soft); text-align: left; }
.user-body .auth-announcement > svg:first-child { width: 18px; color: var(--v2-primary); }
.user-body .auth-announcement span { min-width: 0; display: grid; gap: 3px; }
.user-body .auth-announcement strong, .user-body .auth-announcement small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-body .auth-announcement strong { font-size: 12px; }
.user-body .auth-announcement small { color: var(--v2-muted); font-size: 10px; }
.user-body .auth-announcement > svg:last-child { width: 15px; color: var(--v2-muted); }
.user-body .auth-content-links button { display: inline-flex; align-items: center; gap: 6px; padding: 4px 0; border: 0; color: var(--v2-muted); background: transparent; font-size: 12px; }
.user-body .auth-content-links button:hover { color: var(--v2-primary); }
.user-body .auth-content-links svg { width: 15px; height: 15px; }

/* Application shell */
.user-body .app-shell { min-height: 100vh; display: grid; grid-template-columns: 232px minmax(0, 1fr); background: var(--v2-bg); color: var(--v2-ink); transition: grid-template-columns .2s ease; }
.user-body .sidebar { position: sticky; top: 0; z-index: 30; height: 100vh; display: flex; flex-direction: column; padding: 18px 14px; color: #f5f7f6; background: var(--v2-sidebar); }
.user-body .sidebar-brand { min-height: 54px; display: flex; align-items: center; gap: 10px; padding: 0 4px 17px; border-bottom: 1px solid #303734; }
.user-body .sidebar-brand img { width: 34px; height: 34px; flex: 0 0 34px; object-fit: cover; border-radius: 7px; }
.user-body .sidebar-brand strong { font-size: 18px; white-space: nowrap; }
.user-body .sidebar-close { width: 34px; height: 34px; display: grid; place-items: center; margin-left: auto; padding: 0; border: 0; border-radius: 6px 0 6px 0; color: #9faaa6; background: transparent; }
.user-body .sidebar-close:hover { color: white; background: var(--v2-sidebar-soft); }
.user-body .sidebar nav { display: grid; gap: 5px; padding-top: 22px; }
.user-body .nav-label { min-height: 18px; margin: 0 11px 6px; color: #77827e; font-size: 11px; }
.user-body .nav-item { width: 100%; height: 44px; display: flex; align-items: center; gap: 12px; padding: 0 12px; border: 0; border-radius: 7px; color: #aeb8b4; background: transparent; text-align: left; text-decoration: none; white-space: nowrap; }
.user-body .nav-item:hover { color: #f7faf8; background: #222926; }
.user-body .nav-item.active { color: #fff; background: #2a3531; box-shadow: inset 3px 0 #52c49d; font-weight: 700; }
.user-body .nav-item.active svg { color: #67d3ad; }
.user-body .sidebar-bottom { margin-top: auto; display: grid; gap: 9px; }
.user-body .help-row { min-height: 40px; display: flex; align-items: center; gap: 10px; padding: 0 10px; border: 0; border-radius: 6px 0 6px 0; color: #9ba6a2; background: transparent; }
.user-body .help-row:hover { color: #fff; background: var(--v2-sidebar-soft); }
.user-body .help-row svg:last-child { margin-left: auto; }
.user-body .announcement-banner { min-height: 58px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 12px; align-items: center; margin: 0 0 18px; padding: 12px 14px; border: 1px solid color-mix(in srgb, var(--v2-primary) 30%, var(--v2-line)); border-radius: 8px; color: var(--v2-ink); background: var(--v2-primary-soft); }
.user-body .announcement-banner > svg { width: 20px; color: var(--v2-primary); }
.user-body .announcement-banner strong { display: block; font-size: 13px; }
.user-body .announcement-banner p { margin: 3px 0 0; overflow: hidden; color: var(--v2-muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.user-body .announcement-action { min-height: 32px; padding: 0 11px; border: 1px solid var(--v2-primary); border-radius: 6px 0 6px 0; color: var(--v2-primary); background: transparent; font-size: 11px; white-space: nowrap; }
.user-body .announcement-action:hover { color: #fff; background: var(--v2-primary); }
.user-body .user-card { min-width: 0; display: grid; grid-template-columns: 34px minmax(0, 1fr) 30px; gap: 10px; align-items: center; margin: 0; padding: 12px 8px 0; border-top: 1px solid #303734; }
.user-body .user-card > span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: #16352b; background: #68c9a7; font-weight: 800; }
.user-body .user-card div { min-width: 0; }
.user-body .user-card strong, .user-body .user-card small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-body .user-card strong { font-size: 13px; }
.user-body .user-card small { margin-top: 3px; color: #83918b; font-size: 11px; }
.user-body .user-card button { width: 30px; height: 30px; display: grid; place-items: center; padding: 0; border: 0; color: #8e9b96; background: transparent; }
.user-body .user-card button:hover { color: #fff; }

@media (min-width: 801px) {
  .user-body .app-shell.nav-collapsed { grid-template-columns: 76px minmax(0, 1fr); }
  .user-body .nav-collapsed .sidebar { padding-inline: 10px; }
  .user-body .nav-collapsed .sidebar-brand { justify-content: center; padding-inline: 0; }
  .user-body .nav-collapsed .sidebar-brand img,
  .user-body .nav-collapsed .sidebar-brand strong,
  .user-body .nav-collapsed .nav-label,
  .user-body .nav-collapsed .nav-item span,
  .user-body .nav-collapsed .help-row span,
  .user-body .nav-collapsed .help-row svg:last-child,
  .user-body .nav-collapsed .user-card div,
  .user-body .nav-collapsed .user-card button { display: none; }
  .user-body .nav-collapsed .sidebar-close { margin-left: 0; }
  .user-body .nav-collapsed .sidebar-close svg { transform: rotate(180deg); }
  .user-body .nav-collapsed .sidebar nav { justify-items: center; }
  .user-body .nav-collapsed .nav-item,
  .user-body .nav-collapsed .help-row { width: 44px; justify-content: center; padding: 0; }
  .user-body .nav-collapsed .user-card { display: flex; justify-content: center; padding-inline: 0; }
}

.user-body .workspace { min-width: 0; padding: 0; background: var(--v2-bg); }
.user-body .workspace > header { position: sticky; top: 0; z-index: 20; height: 72px; display: flex; align-items: center; gap: 14px; margin: 0; padding: 0 28px; border-bottom: 1px solid var(--v2-line); background: color-mix(in srgb, var(--v2-surface) 96%, transparent); backdrop-filter: blur(10px); }
.user-body .page-title { min-width: 0; }
.user-body .page-title h1 { margin: 0; font-size: 19px; line-height: 1.3; }
.user-body .page-title p { margin: 3px 0 0; color: var(--v2-muted); font-size: 12px; }
.user-body .top-actions { margin-left: auto; display: flex; align-items: center; gap: 9px; }
.user-body .icon-button { width: 36px; height: 36px; display: inline-grid; place-items: center; flex: 0 0 auto; padding: 0; border: 1px solid var(--v2-line); border-radius: 7px; color: var(--v2-muted); background: var(--v2-surface); }
.user-body .icon-button:hover { border-color: var(--v2-line-strong); background: var(--v2-surface-soft); }
.user-body #menuButton { display: none; }
.user-body .credit-button { min-height: 38px; display: grid; grid-template-columns: auto auto auto auto; align-items: center; gap: 0 7px; margin: 0; padding: 0 11px; border: 1px solid color-mix(in srgb, var(--v2-primary) 24%, var(--v2-line)); border-radius: 7px; color: var(--v2-muted); background: var(--v2-primary-soft); text-align: left; }
.user-body .credit-button svg { color: var(--v2-primary); }
.user-body .credit-button strong { color: var(--v2-ink); }
.user-body .credit-button em { padding-left: 7px; border-left: 1px solid color-mix(in srgb, var(--v2-primary) 22%, var(--v2-line)); color: var(--v2-primary); font-size: 12px; font-style: normal; }
.user-body .credit-button small { grid-column: 2 / -1; display: none; font-size: 9px; }
.user-body .account-button { min-height: 38px; display: inline-flex; align-items: center; gap: 7px; padding: 0 8px 0 4px; border: 1px solid var(--v2-line); border-radius: 7px; color: var(--v2-muted); background: var(--v2-surface); }
.user-body .account-button:hover { border-color: var(--v2-primary); color: var(--v2-primary); }
.user-body .account-button > span { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; color: #16352b; background: #68c9a7; font-size: 12px; font-weight: 800; }
.user-body .account-button > svg { width: 14px; height: 14px; }
.user-body .account-menu { position: fixed; top: 62px; right: 28px; z-index: 70; width: 216px; display: grid; gap: 3px; padding: 10px; border: 1px solid var(--v2-line); border-radius: 8px; background: var(--v2-surface); box-shadow: var(--v2-shadow); }
.user-body .account-menu[hidden] { display: none; }
.user-body .account-menu > strong, .user-body .account-menu > small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-body .account-menu > strong { padding: 2px 7px; font-size: 13px; }
.user-body .account-menu > small { padding: 0 7px 8px; color: var(--v2-muted); font-size: 10px; border-bottom: 1px solid var(--v2-line); }
.user-body .account-menu > button { min-height: 35px; display: flex; align-items: center; gap: 8px; padding: 0 8px; border: 0; border-radius: 6px 0 6px 0; color: var(--v2-ink); background: transparent; font-size: 11px; text-align: left; }
.user-body .account-menu > button:hover { background: var(--v2-surface-soft); }
.user-body .account-menu > button.danger { color: var(--v2-danger); }
.user-body .page-content { width: 100%; max-width: 1540px; margin: 0 auto; padding: 24px 28px 48px; }
.user-body .view-enter { animation: view-enter .32s ease both; }
.user-body .task-row, .user-body .recent-task-card { content-visibility: auto; contain-intrinsic-size: 112px; }

/* Creation workspace */
.user-body .mode-tabs { width: fit-content; max-width: 100%; display: flex; flex-wrap: wrap; gap: 3px; margin: 0 0 18px; padding: 4px; border: 1px solid var(--v2-line); border-radius: 8px; background: var(--v2-surface-muted); }
.user-body .mode-tabs button { min-width: 112px; height: 38px; display: flex; align-items: center; justify-content: center; gap: 7px; padding: 0 14px; border: 0; border-radius: 6px 0 6px 0; color: var(--v2-muted); background: transparent; }
.user-body .mode-tabs button:hover { color: var(--v2-ink); }
.user-body .mode-tabs button.active { color: var(--v2-ink); background: var(--v2-surface); box-shadow: 0 2px 8px rgba(31, 43, 38, .09); font-weight: 700; }
.user-body .mode-tabs button.active svg { color: var(--v2-primary); }
.user-body .composer { display: grid; grid-template-columns: minmax(0, 1fr) 326px; gap: 18px; align-items: stretch; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.user-body .composer-workspace, .user-body .composer-panel { border: 1px solid var(--v2-line); border-radius: 8px; background: var(--v2-surface); }
.user-body .composer-workspace { min-width: 0; padding: 24px; }
.user-body .composer-panel { position: relative; width: 100%; min-height: 0; height: auto; padding: 20px; display: flex; flex-direction: column; align-self: stretch; }
.user-body .section-kicker { display: flex; align-items: flex-start; gap: 11px; }
.user-body .section-kicker > b { width: 24px; height: 24px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; color: var(--v2-primary); background: var(--v2-primary-soft); font-size: 11px; }
.user-body .section-kicker h2 { margin: 0; font-size: 15px; }
.user-body .section-kicker p { margin: 4px 0 0; color: var(--v2-muted); font-size: 12px; line-height: 1.6; }
.user-body .composer-assets { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 14px; margin-bottom: 24px; padding-bottom: 22px; border-bottom: 1px solid var(--v2-line); overflow: visible; }
.user-body .composer-assets > .section-kicker { grid-column: 1 / -1; }
.user-body .selected-asset-strip { min-width: 0; display: flex; gap: 10px; margin-left: 35px; padding: 0 2px 4px; overflow-x: auto; }
.user-body .selected-asset { position: relative; flex: 0 0 86px; display: grid; gap: 4px; }
.user-body .selected-asset-name { min-width: 0; overflow: hidden; color: var(--v2-primary); font-size: 10px; font-weight: 600; line-height: 1.3; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.user-body .selected-asset-media { position: relative; width: fit-content; }
.user-body .selected-asset-preview { width: 86px; height: 78px; display: grid; place-items: center; overflow: hidden; padding: 0; border: 1px solid var(--v2-line); border-radius: 7px; color: var(--v2-primary); background: var(--v2-surface-soft); }
.user-body .selected-asset-preview img { width: 100%; height: 100%; object-fit: cover; }
.user-body .selected-asset small { color: var(--v2-muted); font-size: 10px; text-align: center; }
.user-body .selected-asset-remove { position: absolute; top: -5px; right: -5px; width: 21px; height: 21px; display: grid; place-items: center; padding: 0; border: 1px solid var(--v2-line); border-radius: 50%; color: var(--v2-danger); background: var(--v2-surface); line-height: 1; }
.user-body .composer-asset-actions { display: grid; grid-template-columns: repeat(2, minmax(92px, 1fr)); gap: 7px; align-content: start; }
.user-body .composer-asset-button { min-width: 92px; min-height: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; margin: 0; padding: 0 10px; border: 1px dashed var(--v2-line-strong); border-radius: 7px; color: var(--v2-primary); background: var(--v2-surface-soft); font-size: 11px; cursor: pointer; }
.user-body .composer-asset-button:hover { border-color: var(--v2-primary); }
.user-body .composer-asset-button.disabled { opacity: .5; cursor: not-allowed; }
.user-body .composer-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.user-body .clear-button { min-height: 30px; display: flex; align-items: center; gap: 5px; padding: 0 7px; border: 0; color: var(--v2-muted); background: transparent; font-size: 11px; }
.user-body .clear-button:hover { color: var(--v2-danger); }
.user-body .prompt-box { margin: 15px 0 0; overflow: hidden; border: 1px solid var(--v2-line-strong); border-radius: 7px; background: var(--v2-surface); }
.user-body .prompt-box:focus-within { border-color: var(--v2-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--v2-primary) 10%, transparent); }
.user-body .prompt-box textarea { width: 100%; min-height: 178px; display: block; padding: 15px; border: 0; outline: 0; resize: vertical; color: var(--v2-ink); background: transparent; line-height: 1.75; }
.user-body .prompt-footer { min-height: 38px; display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; padding: 5px 12px; border-top: 1px solid var(--v2-line); color: var(--v2-muted); background: var(--v2-surface-soft); }
.user-body .prompt-footer > span { display: flex; align-items: center; gap: 5px; color: var(--v2-primary); font-size: 11px; }
.user-body .prompt-footer .composer-asset-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.user-body .prompt-footer small { margin-left: auto; }
.user-body .prompt-fullscreen-button { position: absolute; top: 6px; right: 6px; z-index: 4; width: 32px; height: 32px; display: grid; place-items: center; padding: 0; border: 1px solid var(--v2-line); border-radius: 6px 0 6px 0; color: var(--v2-muted); background: color-mix(in srgb, var(--v2-surface) 92%, transparent); box-shadow: 0 2px 10px rgba(0, 0, 0, .08); }
.user-body .prompt-fullscreen-button:hover { border-color: var(--v2-primary); color: var(--v2-primary); }
.user-body .prompt-fullscreen-button svg { width: 16px; height: 16px; }
.user-body .prompt-box > textarea { padding-right: 54px; }
.user-body .prompt-fullscreen-dialog { width: min(1120px, calc(100vw - 32px)); height: min(820px, calc(100vh - 32px)); padding: 0; overflow: hidden; border: 1px solid var(--v2-line); border-radius: 8px; color: var(--v2-ink); background: var(--v2-surface); box-shadow: var(--v2-shadow); }
.user-body .prompt-fullscreen-dialog[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.user-body .prompt-fullscreen-dialog textarea { width: 100%; min-height: 0; padding: 24px; resize: none; border: 0; outline: 0; color: var(--v2-ink); background: var(--v2-surface); font: inherit; font-size: 16px; line-height: 1.8; }
.user-body .prompt-fullscreen-footer { justify-content: space-between; border-top: 1px solid var(--v2-line); }
.user-body .prompt-fullscreen-footer small { color: var(--v2-muted); }
.user-body .panel-title { display: flex; align-items: center; gap: 8px; padding-bottom: 16px; border-bottom: 1px solid var(--v2-line); }
.user-body .panel-title svg { color: var(--v2-primary); }
.user-body .panel-title h2 { margin: 0; font-size: 15px; }
.user-body .chat-settings-title { min-width: 0; }
.user-body .image-quantity-header { box-sizing: border-box; display: flex; align-items: center; gap: 6px; margin-left: auto; padding: 1px 6px 1px 9px; border: 1px solid var(--v2-line); border-radius: 6px; background: var(--v2-surface-soft); }
.user-body .image-quantity-header[hidden] { display: none; }
.user-body .image-quantity-label,
.user-body .image-quantity-unit { color: var(--v2-muted); font-size: 12px; font-weight: 600; white-space: nowrap; }
.user-body .image-quantity-stepper { box-sizing: border-box; height: 26px; display: flex; align-items: center; padding: 0; border: 1px solid var(--v2-line); border-radius: 5px; background: var(--v2-surface); }
.user-body .image-quantity-stepper button { box-sizing: border-box; width: 25px; height: 24px; min-height: 24px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 4px; color: var(--v2-muted); background: transparent; font-size: 18px; font-weight: 500; line-height: 1; }
.user-body .image-quantity-stepper button:hover { color: var(--v2-primary); background: var(--v2-primary-soft); }
.user-body .image-quantity-stepper input { box-sizing: border-box; width: 25px; height: 24px; min-height: 24px; padding: 0; border: 0; color: var(--v2-ink); background: transparent; text-align: center; font-size: 14px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.user-body .image-quantity-stepper input::-webkit-inner-spin-button,
.user-body .image-quantity-stepper input::-webkit-outer-spin-button { margin: 0; -webkit-appearance: none; }
.user-body .image-quantity-stepper input { -moz-appearance: textfield; appearance: textfield; }
.user-body .image-quantity-stepper input:focus { outline: 2px solid color-mix(in srgb, var(--v2-primary) 35%, transparent); outline-offset: -2px; }
.user-body .image-quantity-header .image-quantity-estimate { display: none; }
.user-body .field-label { display: block; margin: 17px 0 8px; color: var(--v2-muted); font-size: 11px; font-weight: 700; }
.user-body .model-button { width: 100%; min-width: 0; display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; grid-template-rows: auto auto auto; gap: 2px 10px; align-items: center; padding: 10px; border: 1px solid var(--v2-line); border-radius: 7px; color: var(--v2-ink); background: var(--v2-surface); text-align: left; }
.user-body .model-button:hover { border-color: color-mix(in srgb, var(--v2-primary) 60%, var(--v2-line)); background: var(--v2-surface-soft); }
.user-body .model-button > svg { grid-column: 1; grid-row: 1 / 4; width: 36px; height: 36px; padding: 9px; border-radius: 7px; color: var(--v2-primary); background: var(--v2-primary-soft); }
.user-body .model-button > span { grid-column: 2; color: var(--v2-muted); font-size: 9px; }
.user-body .model-button > strong { grid-column: 2; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.user-body .model-button > small { grid-column: 2; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--v2-coral); font-size: 9px; }
.user-body .model-button > b { grid-column: 3; grid-row: 1 / 4; display: grid; place-items: center; }
.user-body .generation-options { display: grid; gap: 14px; margin-top: 16px; }
.user-body .audio-option-field { display: grid; gap: 7px; min-width: 0; color: var(--v2-muted); font-size: 11px; font-weight: 700; }
.user-body .audio-option-field select { width: 100%; min-width: 0; border: 1px solid var(--v2-line); border-radius: 6px; color: var(--v2-ink); background: var(--v2-surface); }
.user-body .audio-option-field input[type="range"] { width: 100%; accent-color: var(--v2-primary); }
.user-body .audio-option-field b { color: var(--v2-ink); font-weight: 700; }
.user-body .generation-field-voiceId { position: relative; }
.user-body .audio-voice-buttons { max-height: 132px; overflow: auto; padding-right: 2px; }
.user-body .audio-preview-button { width: 100%; min-height: 36px; margin-top: 8px; justify-content: center; }
.user-body .media-thumbnail.audio { display: grid; grid-template-rows: auto auto; gap: 4px; align-content: center; }
.user-body .media-thumbnail.audio svg { width: 24px; height: 24px; }
.user-body .generation-field { min-width: 0; margin: 0; padding: 0; border: 0; }
.user-body .generation-field legend, .user-body .reasoning-control { display: grid; gap: 7px; margin: 0 0 8px; padding: 0; color: var(--v2-muted); font-size: 11px; font-weight: 700; }
.user-body .generation-option-buttons { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.user-body .generation-field-aspectRatio .generation-option-buttons { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; }
.user-body .generation-field-quality .generation-option-buttons { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 3px; border-radius: 7px; background: var(--v2-surface-muted); }
.user-body .generation-field-duration .generation-option-buttons { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.user-body .image-quantity-control { display: flex; align-items: center; gap: 5px; color: var(--v2-muted); font-size: 10px; }
.user-body .image-quantity-control input { width: 48px; min-height: 30px; padding: 0 5px; border: 1px solid var(--v2-line); border-radius: 5px; color: var(--v2-ink); background: var(--v2-surface); font: inherit; text-align: center; }
.user-body .image-quantity-estimate { display: none; }
.user-body .generation-option-buttons button { min-height: 37px; padding: 0 5px; border: 1px solid var(--v2-line); border-radius: 6px 0 6px 0; color: var(--v2-muted); background: var(--v2-surface); font-size: 10px; }
.user-body .generation-option-buttons button:hover, .user-body .generation-option-buttons button.active { border-color: var(--v2-primary); color: var(--v2-primary); background: var(--v2-primary-soft); }
.user-body .generation-option-buttons button.active { box-shadow: inset 0 0 0 1px var(--v2-primary); font-weight: 700; }
@media (max-width: 420px) {
  .user-body .generation-field-aspectRatio .generation-option-buttons { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 340px) {
  .user-body .generation-field-aspectRatio .generation-option-buttons { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.user-body .generation-field-quality .generation-option-buttons button { border: 0; background: transparent; box-shadow: none; }
.user-body .generation-field-quality .generation-option-buttons button.active { color: var(--v2-ink); background: var(--v2-surface); box-shadow: 0 1px 5px rgba(25, 37, 32, .1); }
.user-body .reasoning-control select { width: 100%; height: 40px; padding: 0 34px 0 11px; border: 1px solid var(--v2-line); border-radius: 7px; color: var(--v2-ink); background: var(--v2-surface); }
.user-body .reasoning-control { margin-top: 16px; padding: 0; border: 0; background: transparent; }
.user-body .panel-spacer { flex: 1; min-height: 12px; }
.user-body .composer-panel:has(.generation-field-resolution) .panel-spacer,
.user-body .composer-panel:has(.generation-field-aspectRatio) .panel-spacer { min-height: clamp(16px, 3vh, 36px); }
.user-body .generate { width: 100%; min-height: 48px; display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0; padding: 0 14px; }
.user-body .generate:hover svg { animation: sparkle-turn .55s ease; }
.user-body .generate.is-loading svg { animation: process-shimmer 1.1s ease-in-out infinite; }
.user-body .submit-note { display: flex; align-items: center; justify-content: center; gap: 5px; margin: 9px 0 0; color: var(--v2-muted); font-size: 9px; }
.user-body .submit-note svg { width: 13px; height: 13px; }
.user-body .task-message { min-height: 18px; margin: 8px 0 0; color: var(--v2-muted); font-size: 11px; text-align: center; }
.user-body .task-message.error { color: var(--v2-danger); }

/* Chat mode */
.user-body .chat-tools { display: flex; align-items: center; gap: 9px; margin: 14px 0 0 35px; }
.user-body .chat-tools button { display: inline-flex; align-items: center; gap: 6px; }
.user-body .active-tasks-section { margin: 14px 0 0; padding: 12px; border: 1px solid var(--v2-line); border-radius: 7px; background: color-mix(in srgb, var(--v2-surface) 88%, transparent); }
.user-body .active-tasks-heading, .user-body .active-tasks-heading > div, .user-body .active-task-card, .user-body .active-task-copy > div { display: flex; align-items: center; }
.user-body .active-tasks-heading { justify-content: space-between; margin-bottom: 9px; }
.user-body .active-tasks-heading > div { gap: 8px; }
.user-body .active-tasks-heading strong { font-size: 13px; }
.user-body .active-tasks-heading span { color: var(--v2-muted); font-size: 10px; }
.user-body .active-tasks-heading .icon-button { width: 30px; height: 30px; min-height: 30px; }
.user-body .active-tasks-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.user-body .active-task-card { min-width: 0; gap: 10px; padding: 10px; border: 1px solid var(--v2-line); border-radius: 7px; background: var(--v2-surface); cursor: pointer; }
.user-body .active-task-card:hover { border-color: var(--v2-accent, #258b78); }
.user-body .active-task-card:focus-visible { outline: 2px solid var(--v2-accent, #258b78); outline-offset: 2px; }
.user-body .task-preview-status { display: grid; justify-items: center; gap: 12px; max-width: 100%; padding: 28px; color: #f3f7f5; text-align: center; overflow-wrap: anywhere; }
.user-body .task-preview-status > svg { width: 28px; height: 28px; color: #79d8bc; }
.user-body .task-preview-status small, .user-body .task-preview-status p { color: #c0cfc9; font-size: 13px; margin: 0; }
.user-body .task-preview-status .is-spinning { animation: task-preview-spin 1.3s linear infinite; }
@keyframes task-preview-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .user-body .task-preview-status .is-spinning { animation: none; } }
.user-body .active-task-icon { position: relative; width: 36px; height: 36px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 7px; color: var(--v2-primary); background: var(--v2-primary-soft); }
.user-body .active-task-icon svg { width: 17px; height: 17px; }
.user-body .active-task-icon span { position: absolute; right: -2px; bottom: -2px; width: 9px; height: 9px; border: 2px solid var(--v2-surface); border-radius: 50%; background: var(--v2-primary); animation: active-task-pulse 1.5s ease-in-out infinite; }
.user-body .active-task-copy { min-width: 0; flex: 1; }
.user-body .active-task-copy > div { gap: 7px; }
.user-body .active-task-copy strong, .user-body .active-task-copy p, .user-body .active-task-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-body .active-task-copy strong { font-size: 11px; }
.user-body .active-task-copy em { flex: 0 0 auto; color: var(--v2-primary); font-size: 9px; font-style: normal; }
.user-body .active-task-copy p { margin: 3px 0; color: var(--v2-ink); font-size: 11px; }
.user-body .active-task-copy small { color: var(--v2-muted); font-size: 9px; }
.user-body .active-task-copy .active-task-time { margin-top: 4px; color: var(--v2-primary); font-weight: 700; }
.user-body .active-task-card .cancel-button { width: 30px; height: 30px; min-height: 30px; flex: 0 0 auto; padding: 0; }
.user-body .active-tasks-empty { grid-column: 1 / -1; min-height: 44px; display: flex; align-items: center; justify-content: center; gap: 7px; color: var(--v2-muted); font-size: 10px; }
.user-body .active-tasks-empty svg { width: 15px; color: var(--v2-primary); }
@keyframes active-task-pulse { 50% { transform: scale(.7); opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .user-body .active-task-icon span { animation: none; } }
@media (max-width: 900px) {
  .user-body .active-tasks-section { margin-left: 0; }
  .user-body .active-tasks-list { grid-template-columns: 1fr; }
}
.user-body .chat-tools select { min-width: 180px; height: 38px; padding: 0 32px 0 10px; }
.user-body .chat-tools > span { color: var(--v2-primary); font-size: 10px; }
.user-body .chat-messages { max-height: 420px; display: grid; gap: 12px; margin: 18px 0 0 35px; padding: 15px; overflow-y: auto; border: 1px solid var(--v2-line); border-radius: 7px; background: var(--v2-surface-soft); }
.user-body .chat-message { max-width: 84%; padding: 12px 14px; border: 1px solid var(--v2-line); border-radius: 7px; background: var(--v2-surface); }
.user-body .chat-message.user { margin-left: auto; border-color: color-mix(in srgb, var(--v2-primary) 30%, var(--v2-line)); background: var(--v2-primary-soft); }
.user-body .chat-message strong { color: var(--v2-muted); font-size: 10px; }
.user-body .chat-message p { margin: 5px 0 0; line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; }
.user-body .chat-message-assets { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
.user-body .chat-message-asset { padding: 6px 9px; border: 1px solid var(--v2-line); border-radius: 6px 0 6px 0; color: var(--v2-primary); background: var(--v2-surface); font-size: 11px; }

/* Shared content views */
.user-body .recent-section { margin-top: 30px; }
.user-body .section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.user-body .section-heading h2 { margin: 0; font-size: 16px; }
.user-body .section-heading p { margin: 4px 0 0; color: var(--v2-muted); font-size: 11px; }
.user-body .recent-creation-subtitle { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.user-body .recent-creation-subtitle p { margin: 4px 0 0; }
.user-body .asset-retention-note { color: var(--v2-primary); font-size: 11px; font-weight: 600; white-space: nowrap; }
.user-body .section-heading > label, .user-body .section-heading > button { flex: 0 0 auto; }
.user-body .text-button { display: flex; align-items: center; gap: 3px; padding: 5px; border: 0; color: var(--v2-primary); background: transparent; font-size: 11px; }
.user-body .secondary, .user-body .result-button, .user-body .cancel-button { min-height: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 12px; border: 1px solid var(--v2-line); border-radius: 7px; color: var(--v2-ink); background: var(--v2-surface); }
.user-body .secondary:hover, .user-body .result-button:hover { border-color: var(--v2-primary); color: var(--v2-primary); }
.user-body .empty-state { min-height: 180px; display: grid; place-content: center; gap: 8px; border: 1px dashed var(--v2-line-strong); border-radius: 7px; color: var(--v2-muted); background: color-mix(in srgb, var(--v2-surface) 55%, transparent); text-align: center; }
.user-body .empty-state strong { color: var(--v2-ink); }
.user-body .recent-tasks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.user-body .recent-media-tasks { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.user-body .recent-task-card { min-width: 0; display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 10px; align-items: center; padding: 10px; border: 1px solid var(--v2-line); border-radius: 7px; background: var(--v2-surface); transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.user-body .recent-task-card .recent-edit-button,
.user-body .recent-task-card [data-add-video-library] { position: absolute; z-index: 4; top: auto; right: -1px; bottom: -1px; left: auto; width: auto; min-width: 92px; height: 30px; display: inline-flex; align-items: center; justify-content: center; gap: 4px; padding: 0 8px; border: 1px solid var(--v2-line); border-radius: 6px 0 6px 0; color: var(--v2-ink); background: color-mix(in srgb, var(--v2-surface) 92%, transparent); font: inherit; font-size: 12px; font-weight: 600; line-height: 1; white-space: nowrap; cursor: pointer; box-shadow: 0 1px 4px rgba(15, 25, 20, .12); }
.user-body .recent-task-card [data-add-video-library] { top: -1px; right: -1px; bottom: auto; border-radius: 0 6px 0 6px; }
.user-body .recent-task-card .recent-edit-button svg,
.user-body .recent-task-card [data-add-video-library] svg { width: 13px; height: 13px; }
.user-body .recent-task-card .recent-edit-button:hover,
.user-body .recent-task-card [data-add-video-library]:hover { color: var(--v2-primary); background: var(--v2-surface-soft); border-color: var(--v2-primary); }
.user-body .recent-task-card .recent-edit-button:focus-visible,
.user-body .recent-task-card [data-add-video-library]:focus-visible { outline: 2px solid var(--v2-primary); outline-offset: -3px; }
.user-body .recent-task-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--v2-primary) 45%, var(--v2-line)); box-shadow: 0 7px 22px rgba(24, 41, 34, .08); }
.user-body .recent-task-copy { min-width: 0; }
.user-body .recent-task-name { display: block; width: 100%; min-width: 0; padding: 5px 8px; overflow: hidden; border: 1px solid var(--v2-line); border-radius: 6px 0 6px 0; background: var(--v2-surface-soft); color: var(--v2-ink); font: inherit; font-size: 12px; font-weight: 650; text-align: left; text-overflow: ellipsis; white-space: nowrap; cursor: text; }
.user-body .recent-task-name:hover, .user-body .recent-task-name:focus-visible { border-color: var(--v2-primary); background: var(--v2-primary-soft); outline: none; }
.user-body .recent-task-copy strong, .user-body .recent-task-copy p { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-body .recent-task-copy p { margin: 4px 0; color: var(--v2-muted); font-size: 11px; }
.user-body .recent-task-copy small { color: var(--v2-primary); font-size: 10px; }
.user-body .recent-task-card > .result-button { grid-column: 1 / -1; width: 100%; min-height: 32px; }
.user-body .task-thumbnail, .user-body .recent-thumbnail { width: 100%; aspect-ratio: 16 / 10; display: grid; place-items: center; overflow: hidden; padding: 0; border: 0; border-radius: 6px 0 6px 0; color: var(--v2-primary); background: var(--v2-surface-muted); }
.user-body .task-thumbnail img, .user-body .recent-thumbnail img { width: 100%; height: 100%; object-fit: cover; }
.user-body .media-thumbnail { position: relative; }
.user-body .media-thumbnail > i[data-lucide="play"] { position: absolute; left: 50%; top: 50%; width: 25px; height: 25px; padding: 6px; transform: translate(-50%, -50%); border-radius: 50%; color: #fff; background: rgba(15, 25, 20, .72); pointer-events: none; }
.user-body .media-thumbnail > svg { position: absolute; left: 50%; top: 50%; width: 25px; height: 25px; padding: 6px; transform: translate(-50%, -50%); border-radius: 50%; color: #fff; background: rgba(15, 25, 20, .72); pointer-events: none; }
.user-body .media-thumbnail.video > span { position: absolute; right: 5px; bottom: 4px; padding: 2px 4px; border-radius: 3px; color: #fff; background: rgba(15, 25, 20, .62); font-size: 8px; }
.user-body .media-thumbnail.video:hover > i[data-lucide="play"] { background: var(--v2-primary); }
.user-body .task-list, .user-body .ledger-list { display: grid; gap: 8px; }
.user-body .task-row, .user-body .ledger-row { min-height: 74px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 14px; border: 1px solid var(--v2-line); border-radius: 7px; background: var(--v2-surface); }
.user-body .task-row > .task-thumbnail { width: 72px; }
.user-body .task-kind { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 7px; color: var(--v2-primary); background: var(--v2-primary-soft); font-weight: 700; }
.user-body .task-row p { margin: 4px 0 0; overflow: hidden; color: var(--v2-muted); text-overflow: ellipsis; white-space: nowrap; }
.user-body .task-row small { display: block; margin-top: 5px; color: var(--v2-danger); }
.user-body .task-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; flex-wrap: wrap; }
.user-body .status { padding: 5px 8px; border-radius: 12px; color: var(--v2-primary); background: var(--v2-primary-soft); font-size: 10px; white-space: nowrap; }
.user-body .cancel-button { color: var(--v2-danger); }
.user-body .credits-overview { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 28px; }
.user-body .credit-stat, .user-body .credit-recharge-card { min-height: 128px; display: flex; flex-direction: column; justify-content: center; padding: 20px 22px; border: 1px solid var(--v2-line); border-radius: 8px; color: var(--v2-ink); background: var(--v2-surface); text-align: left; }
.user-body .credit-stat span, .user-body .credit-stat small { color: var(--v2-muted); }
.user-body .credit-stat span { font-size: 11px; }
.user-body .credit-stat strong { margin: 7px 0 4px; font-size: 28px; line-height: 1; }
.user-body .credit-stat-primary { border-color: color-mix(in srgb, var(--v2-primary) 35%, var(--v2-line)); background: var(--v2-primary-soft); }
.user-body .credit-stat-primary strong { color: var(--v2-primary); }
.user-body .credit-stat small { font-size: 10px; }
.user-body .credit-recharge-card { position: relative; gap: 7px; border-color: color-mix(in srgb, var(--v2-coral) 35%, var(--v2-line)); background: color-mix(in srgb, var(--v2-coral) 8%, var(--v2-surface)); cursor: pointer; }
.user-body .credit-recharge-card > span { display: flex; align-items: center; gap: 5px; color: var(--v2-muted); font-size: 10px; }
.user-body .credit-recharge-card > strong { color: var(--v2-coral); font-size: 16px; }
.user-body .credit-recharge-card > svg:last-child { position: absolute; top: 19px; right: 19px; color: var(--v2-coral); }
.user-body .credit-recharge-card:hover { border-color: var(--v2-coral); transform: translateY(-1px); }
.user-body .credits-heading { margin-bottom: 10px; }
.user-body .ledger-account { color: var(--v2-muted); font-size: 10px; }
.user-body .ledger-toolbar { min-height: 44px; margin-bottom: 10px; }
.user-body .ledger-row { min-height: 70px; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 16px; border: 1px solid var(--v2-line); border-radius: 7px; background: var(--v2-surface); }
.user-body .ledger-row:hover { border-color: var(--v2-line-strong); }
.user-body .ledger-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 7px; }
.user-body .ledger-row.income .ledger-icon { color: var(--v2-primary); background: var(--v2-primary-soft); }
.user-body .ledger-row.expense .ledger-icon { color: var(--v2-coral); background: color-mix(in srgb, var(--v2-coral) 12%, transparent); }
.user-body .ledger-copy, .user-body .ledger-balance { min-width: 0; }
.user-body .ledger-copy strong, .user-body .ledger-copy small, .user-body .ledger-balance strong, .user-body .ledger-balance small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-body .ledger-copy strong { font-size: 12px; }
.user-body .ledger-copy small, .user-body .ledger-balance small { margin-top: 5px; color: var(--v2-muted); font-size: 10px; }
.user-body .ledger-balance { text-align: right; }
.user-body .ledger-balance strong { font-size: 12px; }
.user-body .ledger-row strong.positive { color: var(--v2-primary); }
.user-body .ledger-row strong.negative { color: var(--v2-coral); }
.user-body .balance-band { min-height: 132px; display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; padding: 24px 28px; border: 1px solid var(--v2-line); border-radius: 8px; color: var(--v2-ink); background: var(--v2-surface); }
.user-body .balance-band div { display: grid; }
.user-body .balance-band span, .user-body .balance-band small { color: var(--v2-muted); }
.user-body .balance-band strong { margin-top: 5px; font-size: 34px; }
.user-body .balance-band > svg { width: 44px; height: 44px; color: var(--v2-primary); }

/* Asset library and recharge */
.user-body .asset-toolbar { display: grid; grid-template-columns: minmax(200px, 320px) minmax(180px, 240px); gap: 16px; align-items: end; margin-bottom: 18px; }
.user-body .asset-toolbar label { display: grid; gap: 7px; margin: 0; color: var(--v2-muted); font-size: 11px; }
.user-body .asset-toolbar input, .user-body .asset-toolbar select { width: 100%; height: 40px; padding: 0 11px; border: 1px solid var(--v2-line); border-radius: 7px; color: var(--v2-ink); background: var(--v2-surface); }
.user-body .upload-button { min-height: 38px; display: inline-flex; align-items: center; gap: 7px; margin: 0; padding: 0 14px; border: 1px solid var(--v2-primary); border-radius: 7px; color: #fff; background: var(--v2-primary); cursor: pointer; }
.user-body .asset-grid, .user-body .asset-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(175px, 1fr)); gap: 12px; }
.user-body .asset-item { min-width: 0; display: grid; gap: 7px; padding: 10px; border: 1px solid var(--v2-line); border-radius: 7px; background: var(--v2-surface); }
.user-body .asset-item strong, .user-body .asset-item small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-body .asset-item small { color: var(--v2-muted); }
.user-body .asset-preview { width: 100%; aspect-ratio: 4 / 3; display: grid; place-items: center; overflow: hidden; padding: 0; border: 0; border-radius: 6px 0 6px 0; color: var(--v2-primary); background: var(--v2-surface-muted); }
.user-body .asset-preview img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s ease; }
.user-body .asset-preview:hover img { transform: scale(1.025); }
.user-body .asset-actions { display: flex; justify-content: space-between; gap: 7px; padding-top: 7px; border-top: 1px solid var(--v2-line); }
.user-body .danger-text { min-height: 36px; padding: 0 12px; border: 1px solid color-mix(in srgb, var(--v2-danger) 35%, var(--v2-line)); border-radius: 7px; color: var(--v2-danger); background: var(--v2-surface); }
.user-body .recharge-intro { min-height: 114px; display: flex; align-items: center; justify-content: space-between; gap: 30px; margin-bottom: 28px; padding: 20px 24px; border: 1px solid var(--v2-line); border-radius: 8px; background: var(--v2-surface); }
.user-body .recharge-intro > div { display: grid; }
.user-body .recharge-intro span, .user-body .recharge-intro small { color: var(--v2-muted); }
.user-body .recharge-intro strong { margin-top: 5px; font-size: 29px; }
.user-body .recharge-intro > p { display: flex; align-items: center; gap: 10px; color: var(--v2-primary); }
.user-body .plan-grid { display: grid; grid-template-columns: repeat(3, minmax(160px, 1fr)); gap: 11px; }
.user-body .plan-item { min-height: 132px; display: grid; gap: 8px; padding: 18px; border: 1px solid var(--v2-line); border-radius: 7px; background: var(--v2-surface); }
.user-body .plan-item:hover { border-color: var(--v2-primary); background: var(--v2-primary-soft); }
.user-body .plan-item b { font-size: 22px; }
.user-body .plan-item span { color: var(--v2-coral); }
.user-body .payment-status-note { margin: 0 0 14px; padding: 10px 12px; border: 1px solid #d8b96a; border-radius: 6px 0 6px 0; color: #8d6514; background: #fff8e6; font-size: 12px; }
html.theme-dark .user-body .payment-status-note { border-color: #65542a; color: #e7c36d; background: #322b1a; }

/* Dialogs */
.user-body dialog { color: var(--v2-ink); background: var(--v2-surface); }
.user-body dialog[open] { animation: modal-in .22s ease both; }
.user-body dialog::backdrop { background: rgba(7, 12, 10, .62); animation: backdrop-in .2s ease both; }
.user-body .model-dialog { width: min(680px, calc(100% - 32px)); max-height: min(720px, calc(100vh - 40px)); padding: 0; overflow: hidden; border: 1px solid var(--v2-line); border-radius: 8px; box-shadow: var(--v2-shadow); }
.user-body .dialog-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 18px 20px; border-bottom: 1px solid var(--v2-line); }
.user-body .dialog-heading h2 { margin: 0 0 4px; font-size: 17px; }
.user-body #modelDialog > .dialog-heading { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; }
.user-body #modelDialog .model-dialog-description { white-space: pre-wrap; overflow-wrap: anywhere; min-width: 0; max-height: 140px; overflow-y: auto; font-size: 13px; line-height: 1.6; align-self: center; }
.user-body #modelDialog .model-dialog-description[hidden] { display: none; }
.user-body #modelDialog #closeModelDialog { grid-column: 3; grid-row: 1; }
@media (max-width: 600px) { .user-body #modelDialog > .dialog-heading { grid-template-columns: minmax(0, 1fr) auto; } .user-body #modelDialog #closeModelDialog { grid-column: 2; } .user-body #modelDialog .model-dialog-description { grid-column: 1 / -1; grid-row: 2; max-height: 120px; } }
.user-body .dialog-heading p { margin: 0; color: var(--v2-muted); font-size: 11px; }
.user-body .model-dialog-toolbar { min-height: 66px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 11px 20px; border-bottom: 1px solid var(--v2-line); }
.user-body .model-dialog-toolbar label { height: 36px; display: flex; align-items: center; gap: 8px; margin: 0; padding: 0 10px; border: 1px solid var(--v2-line); border-radius: 7px; color: var(--v2-muted); background: var(--v2-surface-soft); }
.user-body .model-dialog-toolbar input { width: 100%; height: 32px; padding: 0; border: 0; outline: 0; color: var(--v2-ink); background: transparent; }
.user-body .model-dialog-toolbar > div { display: grid; grid-template-columns: auto auto; gap: 1px 7px; }
.user-body .model-dialog-toolbar > div span, .user-body .model-dialog-toolbar > div small { color: var(--v2-muted); font-size: 9px; }
.user-body .model-dialog-toolbar > div small { grid-column: 1 / -1; }
.user-body .model-dialog-toolbar > div strong { color: var(--v2-coral); }
.user-body .model-dialog-body { display: grid; }
.user-body .model-list { max-height: 500px; display: grid; gap: 8px; padding: 12px; overflow: auto; }
.user-body .model-option { position: relative; min-height: 72px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 5px 14px; padding: 14px 16px; border: 1px solid var(--v2-line); border-radius: 7px; color: var(--v2-ink); background: var(--v2-surface); text-align: left; }
.user-body .model-option:hover { border-color: color-mix(in srgb, var(--v2-primary) 50%, var(--v2-line)); background: var(--v2-surface-soft); }
.user-body .model-option.active { border-color: var(--v2-primary); background: var(--v2-primary-soft); box-shadow: inset 0 0 0 1px var(--v2-primary); }
.user-body .model-option.active::after { content: ""; position: absolute; top: 7px; right: 8px; width: 6px; height: 11px; border: solid var(--v2-primary); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.user-body .model-option span { color: var(--v2-muted); font-size: 11px; }
.user-body .model-option strong:last-child { grid-column: 2; grid-row: 1 / 3; align-self: center; padding-right: 20px; color: var(--v2-coral); font-size: 11px; }
.user-body .rules-dialog-body { padding: 18px 20px; }
.user-body .rules-dialog-body textarea { width: 100%; min-height: 160px; padding: 12px; border: 1px solid var(--v2-line); border-radius: 7px; color: var(--v2-ink); background: var(--v2-surface-soft); }
.user-body .dialog-footer { display: flex; justify-content: flex-end; gap: 9px; padding: 13px 20px; border-top: 1px solid var(--v2-line); }
.user-body .remote-content-dialog { width: min(600px, calc(100% - 32px)); overflow: auto; }
.user-body .app-download-dialog { width: min(680px, calc(100% - 32px)); }
.user-body .app-download-body { display: grid; grid-template-columns: 224px minmax(0, 1fr); gap: 28px; align-items: center; padding: 24px; }
.user-body .app-download-qr { display: grid; justify-items: center; gap: 10px; padding: 13px; border: 1px solid var(--v2-line); border-radius: 8px; background: #fff; }
.user-body .app-download-qr img { width: 196px; height: 196px; display: block; image-rendering: auto; }
.user-body .app-download-qr span { display: flex; align-items: center; gap: 6px; color: #53605b; font-size: 11px; font-weight: 700; }
.user-body .app-download-qr span svg { width: 15px; height: 15px; color: #137b60; }
.user-body .app-download-copy { min-width: 0; display: grid; gap: 15px; }
.user-body .app-download-brand { display: flex; align-items: center; gap: 11px; }
.user-body .app-download-brand img { width: 46px; height: 46px; border-radius: 9px; object-fit: cover; }
.user-body .app-download-brand strong, .user-body .app-download-brand span { display: block; }
.user-body .app-download-brand strong { font-size: 18px; }
.user-body .app-download-brand span { margin-top: 3px; color: var(--v2-muted); font-size: 11px; }
.user-body .app-download-copy dl { display: grid; gap: 8px; margin: 0; }
.user-body .app-download-copy dl > div { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 8px; border-bottom: 1px solid var(--v2-line); }
.user-body .app-download-copy dt { color: var(--v2-muted); font-size: 11px; }
.user-body .app-download-copy dd { margin: 0; color: var(--v2-ink); font-size: 11px; font-weight: 700; text-align: right; }
.user-body .app-download-copy > p { max-height: 66px; margin: 0; overflow: auto; color: var(--v2-muted); font-size: 11px; line-height: 1.65; }
.user-body .app-download-direct { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 16px; text-decoration: none; }
.user-body .app-download-copy > small { display: flex; align-items: center; gap: 6px; color: var(--v2-soft); font-size: 9px; }
.user-body .app-download-copy > small svg { width: 14px; height: 14px; color: var(--v2-primary); }
.user-body .remote-content-image { display: block; width: auto; height: auto; max-width: calc(100% - 40px); max-height: none; margin: 18px auto 0; border-radius: 6px 0 6px 0; object-fit: contain; }
.user-body .remote-content-body { max-height: min(420px, calc(100vh - 260px)); margin: 0; padding: 20px; overflow: auto; color: var(--v2-ink); line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; }
.user-body .asset-picker-categories { display: flex; gap: 7px; padding: 12px 16px; overflow-x: auto; border-bottom: 1px solid var(--v2-line); }
.user-body .asset-picker-category-label { align-self: center; color: var(--v2-muted); font-size: 11px; font-weight: 700; }
.user-body .asset-picker-categories button { min-height: 34px; padding: 0 11px; border: 1px solid var(--v2-line); border-radius: 6px 0 6px 0; color: var(--v2-muted); background: var(--v2-surface); white-space: nowrap; }
.user-body .asset-picker-categories button.active { border-color: var(--v2-primary); color: var(--v2-primary); background: var(--v2-primary-soft); }
.user-body .asset-picker { max-height: 520px; padding: 16px; overflow: auto; overscroll-behavior: contain; touch-action: pan-y; }
.user-body .asset-select-dialog { width: min(820px, calc(100% - 32px)); overscroll-behavior: contain; }
.user-body .asset-select-dialog .dialog-heading { align-items: center; }
.user-body .asset-select-dialog .dialog-heading > div:first-child { min-width: 0; }
.user-body .dialog-heading-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; flex: 0 0 auto; }
.user-body .dialog-heading-actions .primary { min-height: 36px; padding: 0 14px; white-space: nowrap; }
.user-body .picker-item { position: relative; cursor: pointer; transition: border-color .16s ease, box-shadow .16s ease, background .16s ease; }
.user-body .picker-item:hover { border-color: color-mix(in srgb, var(--v2-primary) 55%, var(--v2-line)); }
.user-body .picker-item:focus-visible { outline: 2px solid var(--v2-primary); outline-offset: 2px; }
.user-body .picker-item.is-selected { border-color: var(--v2-primary); background: var(--v2-primary-soft); box-shadow: inset 0 0 0 1px var(--v2-primary); }
.user-body .picker-item input { position: absolute; top: 18px; right: 18px; z-index: 3; width: 20px; height: 20px; margin: 0; accent-color: var(--v2-primary); cursor: pointer; }
.user-body .picker-preview-wrap { position: relative; min-width: 0; }
.user-body .picker-preview-wrap .asset-preview { pointer-events: none; }
.user-body .picker-zoom { position: absolute; top: 8px; left: 8px; z-index: 3; width: 30px; height: 30px; display: grid; place-items: center; padding: 0; border: 1px solid rgba(255, 255, 255, .72); border-radius: 6px 0 6px 0; color: #fff; background: rgba(15, 25, 20, .68); box-shadow: 0 2px 8px rgba(0, 0, 0, .16); }
.user-body .picker-zoom:hover, .user-body .picker-zoom:focus-visible { color: #fff; background: var(--v2-primary); }
.user-body .picker-zoom svg { width: 16px; height: 16px; }
.user-body .media-dialog { width: min(920px, calc(100% - 32px)); max-height: calc(100vh - 32px); padding: 0; overflow: hidden; border: 1px solid var(--v2-line); border-radius: 8px; box-shadow: var(--v2-shadow); }
.user-body .task-preview-dialog { width: min(1120px, calc(100% - 32px)); }
.user-body .task-preview-layout { min-height: 430px; display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(300px, .95fr); }
.user-body .media-viewer { min-height: 250px; max-height: calc(100vh - 250px); display: grid; place-items: center; overflow: auto; background: #101714; }
.user-body .media-viewer img, .user-body .media-viewer video { display: block; width: 100%; max-width: 100%; max-height: calc(100vh - 250px); object-fit: contain; }
.user-body .media-viewer audio { width: min(620px, calc(100% - 32px)); }
.user-body .media-viewer iframe { width: 100%; height: min(720px, calc(100vh - 180px)); border: 0; background: #fff; }
.user-body .media-viewer.is-zoomable { position: relative; display: block; height: min(720px, calc(100vh - 150px)); overflow: hidden; overscroll-behavior: contain; }
.user-body .media-zoom-stage { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; cursor: grab; touch-action: none; user-select: none; }
.user-body .media-zoom-stage.is-dragging { cursor: grabbing; }
.user-body .media-viewer .media-zoom-image { display: block; width: auto; height: auto; max-width: none; max-height: none; object-fit: contain; transform-origin: center center; will-change: transform; pointer-events: none; user-select: none; }
.user-body .media-zoom-toolbar { position: absolute; top: 12px; right: 12px; z-index: 5; width: max-content; display: flex; align-items: center; gap: 2px; padding: 4px; border: 1px solid rgba(255,255,255,.22); border-radius: 8px; color: #fff; background: rgba(11,18,16,.82); box-shadow: 0 8px 24px rgba(0,0,0,.24); backdrop-filter: blur(10px); }
.user-body .media-zoom-toolbar button { min-width: 34px; height: 34px; display: grid; place-items: center; padding: 0 8px; border: 0; border-radius: 6px 0 6px 0; color: inherit; background: transparent; }
.user-body .media-zoom-toolbar button:hover:not(:disabled), .user-body .media-zoom-toolbar button:focus-visible { color: #fff; background: var(--v2-primary); }
.user-body .media-zoom-toolbar button:disabled { opacity: .35; cursor: not-allowed; }
.user-body .media-zoom-toolbar svg { width: 17px; height: 17px; }
.user-body .media-zoom-toolbar .media-zoom-value { min-width: 58px; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.user-body .media-viewer.has-text-preview { display: block; place-items: initial; padding: 0; background: var(--v2-surface-soft); }
.user-body .media-text-preview { width: 100%; min-height: 360px; max-height: calc(100vh - 180px); margin: 0; padding: 24px 28px; overflow: auto; color: var(--v2-ink); background: var(--v2-surface-soft); font: 13px/1.75 Consolas, "SFMono-Regular", "Microsoft YaHei", monospace; white-space: pre-wrap; overflow-wrap: anywhere; tab-size: 2; }
html.theme-dark .user-body .media-viewer.has-text-preview,
html.theme-dark .user-body .media-text-preview { background: #17231f; }
.user-body .media-viewer.is-loading { position: relative; overflow: hidden; }
.user-body .media-loading-preview { width: 100%; height: 100%; max-height: calc(100vh - 250px); object-fit: contain; opacity: .58; filter: saturate(.72); }
.user-body .media-loading { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 7px; padding: 24px; color: #fff; background: rgba(8, 14, 12, .46); text-align: center; }
.user-body .media-loading-spinner { width: 27px; height: 27px; border: 3px solid rgba(255, 255, 255, .3); border-top-color: #fff; border-radius: 50%; animation: media-loading-spin .8s linear infinite; }
.user-body .media-loading strong { font-size: 13px; }
.user-body .media-loading small { color: rgba(255, 255, 255, .78); font-size: 10px; }
.user-body .media-load-error { display: grid; place-items: center; gap: 7px; padding: 28px; color: #fff; text-align: center; }
.user-body .media-load-error small { color: rgba(255, 255, 255, .72); }
.user-body .task-preview-info { min-width: 0; padding: 16px clamp(14px, 2vw, 24px); overflow: auto; color: var(--v2-ink); background: var(--v2-surface); }
.user-body .task-preview-dialog > .dialog-heading { display: flex; justify-content: space-between; gap: 16px; }
.user-body .task-result-name-field { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; align-items: center; padding: 4px 0 10px; border-bottom: 1px solid var(--v2-line); }
.user-body .task-result-name-field > span { color: var(--v2-muted); font-size: 13px; font-weight: 400; }
.user-body .task-result-name-field > div { min-width: 0; display: flex; justify-content: flex-end; align-items: center; gap: 5px; }
.user-body .task-result-name-field input { min-width: 0; width: 100%; padding: 7px 8px; font-size: 13px; }
.user-body .task-result-name-field button { flex: 0 0 auto; min-height: 32px; padding: 5px 8px; }
.user-body .task-result-name-field em { min-width: 0; white-space: nowrap; }
@media (max-width: 760px) {
  .user-body .task-result-name-field { grid-template-columns: 1fr; gap: 6px; }
  .user-body .task-result-name-field > div { justify-content: stretch; }
}
.user-body .task-detail { padding: 0; background: var(--v2-surface); }
.user-body .task-detail-actions { display: flex; justify-content: flex-end; gap: 12px; margin: 0; padding: 16px 28px; border-top: 1px solid var(--v2-line); background: var(--v2-surface); }
.user-body .preview-navigation { display: flex; align-items: center; justify-content: center; gap: 16px; flex: 1 0 160px; margin-right: auto; }
.user-body .preview-navigation .icon-button { flex: 0 0 40px; width: 40px; height: 40px; padding: 0; }
.user-body .preview-navigation .icon-button:disabled { opacity: .35; cursor: not-allowed; }
.user-body .preview-navigation span { min-width: 64px; color: var(--v2-muted); font-size: 13px; text-align: center; font-variant-numeric: tabular-nums; }
.user-body .asset-preview-actions { display: flex; padding: 12px 16px; border-top: 1px solid var(--v2-line); background: var(--v2-surface); }
.user-body .task-preview-dialog[open] { display: flex; flex-direction: column; }
.user-body .task-preview-dialog > .dialog-heading, .user-body .task-preview-dialog > .task-detail-actions { flex-shrink: 0; }
.user-body .task-preview-layout { overflow: auto; }
@media (max-width: 760px) {
  .user-body .task-detail-actions .preview-navigation { flex-basis: 100%; margin: 0; }
  .user-body .task-preview-layout { flex: 1 1 auto; }
}
.user-body .task-detail-list { display: grid; grid-template-columns: 1fr; gap: 0; margin: 0 0 18px; }
.user-body .task-detail-list div { min-width: 0; display: grid; grid-template-columns: minmax(76px, 1fr) minmax(0, 1fr); gap: 14px; align-items: center; min-height: 40px; padding: 5px 0; border-bottom: 1px solid var(--v2-line); }
.user-body .task-detail-list div:first-child { grid-template-columns: auto minmax(0, 1fr); }
.user-body .task-detail-list div:first-child dd { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.user-body .task-detail-list dt { color: var(--v2-muted); font-size: 13px; }
.user-body .task-detail-list dd { margin: 0; overflow-wrap: anywhere; color: var(--v2-ink); font-size: 13px; font-weight: 650; text-align: right; }
.user-body .task-detail-list div:first-child dd { overflow-wrap: normal; }
.user-body .task-preview-prompt h3 { margin: 0 0 12px; color: var(--v2-ink); font-size: 15px; }
.user-body .task-detail-prompt { margin: 0; padding: 12px 14px; max-height: 160px; overflow: auto; border: 1px solid var(--v2-line); border-radius: 8px; color: var(--v2-ink); background: var(--v2-surface-soft); line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.user-body .task-preview-dialog > .dialog-heading { color: var(--v2-ink); background: var(--v2-surface); }
.user-body .task-preview-dialog > .dialog-heading p { color: var(--v2-muted); }
.user-body .overlay { position: fixed; inset: 0; z-index: 25; background: rgba(7, 12, 10, .62); }

@keyframes view-enter { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
@keyframes modal-in { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes backdrop-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes process-shimmer { 0%, 100% { opacity: .55; transform: rotate(0); } 50% { opacity: 1; transform: rotate(16deg); } }
@keyframes media-loading-spin { to { transform: rotate(360deg); } }
@keyframes sparkle-turn { from { transform: rotate(0) scale(1); } 50% { transform: rotate(18deg) scale(1.15); } to { transform: rotate(0) scale(1); } }
@keyframes mosaic-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 1080px) {
  .user-body .auth-shell { grid-template-columns: 46% 54%; }
  .user-body .auth-main { padding-inline: 7vw; }
  .user-body .composer { grid-template-columns: minmax(0, 1fr) 292px; }
  .user-body .recent-tasks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 800px) {
  .user-body .auth-shell { display: block; min-height: 100vh; }
  .user-body .brand-panel { display: none; }
  .user-body .auth-main { min-height: 100vh; display: block; padding: 150px 22px 50px; }
  .user-body .auth-mobile-brand { display: flex; }
  .user-body .auth-theme-toggle { top: 24px; right: 26px; }
  .user-body .segmented { margin-bottom: 40px; }
  .user-body .app-shell { display: block; }
  .user-body .sidebar { position: fixed; left: 0; top: 0; width: 232px; transform: translateX(-105%); transition: transform .2s ease; box-shadow: 15px 0 40px rgba(0,0,0,.2); }
  .user-body .sidebar.open { transform: translateX(0); }
  .user-body .overlay { left: 232px; }
  .user-body .workspace > header { height: 64px; padding: 0 14px; }
  .user-body #menuButton { display: inline-grid; }
  .user-body .page-title p { display: none; }
  .user-body .page-title h1 { font-size: 17px; }
  .user-body .page-content { padding: 16px 12px 34px; }
  .user-body .announcement-banner { grid-template-columns: auto minmax(0, 1fr) auto; gap: 9px; }
  .user-body .announcement-action { grid-column: 2; justify-self: start; }
  .user-body .announcement-banner .icon-button { grid-column: 3; grid-row: 1; }
  .user-body .credit-button span, .user-body .credit-button em, .user-body .credit-button small { display: none; }
  .user-body .credit-button { display: flex; }
  .user-body .composer { grid-template-columns: 1fr; align-items: start; }
  .user-body .composer-panel { position: static; min-height: 0; height: auto; align-self: start; }
  .user-body .composer-workspace { padding: 18px; }
  .user-body .prompt-box, .user-body .chat-tools, .user-body .chat-messages, .user-body .composer.chat-mode .chat-attachment-bar { margin-left: 0; margin-right: 0; }
  .user-body .selected-asset-strip { margin-left: 0; }
  .user-body .composer-assets { grid-template-columns: 1fr; }
  .user-body .composer-asset-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .user-body .mode-tabs { width: 100%; }
  .user-body .mode-tabs button { min-width: 0; flex: 1; padding-inline: 5px; }
  .user-body .asset-toolbar { grid-template-columns: 1fr 1fr; }
  .user-body .plan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Chat stream alignment for the approved V2 workspace. */
.user-body .composer.chat-mode .chat-message { width: 100%; max-width: 760px; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; margin: 0 0 24px; padding: 0; border: 0; border-radius: 0; background: transparent; }
@media (min-width: 801px) {
  .user-body .nav-collapsed .composer.chat-mode .chat-message { max-width: 100%; }
}
.user-body .composer.chat-mode .chat-message.assistant { margin-right: auto; }
.user-body .composer.chat-mode .chat-message.user { margin-left: auto; grid-template-columns: minmax(0, 1fr) 30px; }
.user-body .composer.chat-mode .chat-avatar { position: relative; width: 30px; height: 30px; display: grid; place-items: center; overflow: hidden; border-radius: 7px; color: var(--v2-ink); background: #e2e7e4; font-size: 10px; font-weight: 800; }
.user-body .composer.chat-mode .chat-avatar svg { width: 17px; height: 17px; }
.user-body .composer.chat-mode .user-avatar img { width: 100%; height: 100%; display: block; object-fit: cover; }
.user-body .composer.chat-mode .assistant-avatar { color: var(--v2-primary); background: var(--v2-primary-soft); }
.user-body .composer.chat-mode .chat-message-body { min-width: 0; padding-top: 3px; }
.user-body .composer.chat-mode .chat-message.user .chat-avatar { grid-column: 2; grid-row: 1; }
.user-body .composer.chat-mode .chat-message.user .chat-message-body { grid-column: 1; grid-row: 1; justify-self: end; width: fit-content; max-width: min(100%, 680px); padding: 10px 14px; border: 1px solid color-mix(in srgb, var(--v2-primary) 30%, var(--v2-line)); border-radius: 8px; background: var(--v2-primary-soft); }
.user-body .composer.chat-mode .chat-message.user .chat-message-body > :last-child,
.user-body .composer.chat-mode .chat-message.user .chat-message-body > .chat-markdown > :last-child { margin-bottom: 0; }
.user-body .composer.chat-mode .chat-message-label { display: none; }
.user-body .composer.chat-mode .chat-markdown { font-size: 14px; line-height: 1.75; }
.user-body .composer.chat-mode .chat-markdown strong { color: inherit; font-size: inherit; font-weight: 700; }
.user-body .composer.chat-mode .chat-message p { margin: 0 0 10px; font-size: inherit; line-height: inherit; }
.user-body .composer.chat-mode .chat-message-assets { display: grid; grid-template-columns: minmax(0, 1fr); width: 360px; max-width: 100%; min-width: 0; gap: 7px; margin: 0 0 10px; }
.user-body .composer.chat-mode .chat-message-asset { min-width: 0; min-height: 62px; display: flex; align-items: center; gap: 9px; margin: 0; padding: 8px; color: var(--v2-ink); background: var(--v2-surface); text-align: left; }
.user-body .composer.chat-mode .chat-message-asset:hover { border-color: var(--v2-primary); }
.user-body .composer.chat-mode .chat-message-asset-row { width: 100%; min-width: 0; max-width: 100%; border-radius: 7px; }
.user-body .composer.chat-mode .chat-message-asset-row .chat-message-asset { flex: 1 1 0; overflow: hidden; }
.user-body .composer.chat-mode .chat-asset-download { width: 52px; flex: 0 0 52px; border-color: var(--v2-line); color: var(--v2-primary); background: var(--v2-surface-soft); }
.user-body .composer.chat-mode .chat-asset-download:hover { border-color: var(--v2-primary); color: var(--v2-primary-dark); background: var(--v2-primary-soft); }
.user-body .composer.chat-mode .chat-asset-download:disabled { cursor: wait; opacity: .58; color: var(--v2-muted); background: var(--v2-surface-muted); }
html.theme-dark .user-body .composer.chat-mode .chat-asset-download { border-color: #36524a; color: #72d7b3; background: #1b2925; }
html.theme-dark .user-body .composer.chat-mode .chat-asset-download:hover { border-color: #5fc6a2; color: #a0ebd0; background: #203b32; }
.user-body .composer.chat-mode .chat-message-asset > img { width: 64px; height: 46px; flex: 0 0 64px; object-fit: cover; border-radius: 5px; }
.user-body .composer.chat-mode .chat-message-asset > img:not([hidden]) + .chat-asset-fallback { display: none; }
.user-body .composer.chat-mode .chat-asset-fallback { width: 64px; height: 46px; display: grid; place-items: center; flex: 0 0 64px; border-radius: 5px; color: var(--v2-primary); background: var(--v2-primary-soft); }
.user-body .composer.chat-mode .chat-asset-copy { flex: 1 1 0; min-width: 0; }
.user-body .composer.chat-mode .chat-asset-copy strong, .user-body .composer.chat-mode .chat-asset-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-body .composer.chat-mode .chat-asset-copy strong { color: var(--v2-ink); font-size: 10px; }
.user-body .composer.chat-mode .chat-asset-copy small { margin-top: 4px; color: var(--v2-muted); font-size: 8px; }
.user-body .composer.chat-mode .process-line { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; margin-bottom: 13px; padding: 8px 10px; border-radius: 6px 0 6px 0; color: var(--v2-primary); background: var(--v2-primary-soft); font-size: 8px; }
.user-body .composer.chat-mode .process-line i { width: 18px; height: 1px; background: color-mix(in srgb, var(--v2-primary) 35%, var(--v2-line)); }
.user-body .composer.chat-mode .process-line svg { width: 13px; height: 13px; }

@media (max-width: 800px) {
  .user-body .composer.chat-mode .chat-message { grid-template-columns: 26px minmax(0, 1fr); gap: 8px; }
  .user-body .composer.chat-mode .chat-message.user { grid-template-columns: minmax(0, 1fr) 26px; }
  .user-body .composer.chat-mode .chat-avatar { width: 26px; height: 26px; }
  .user-body .composer.chat-mode .chat-message-assets { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 520px) {
  .user-body .media-text-preview { min-height: 300px; padding: 18px; font-size: 12px; }
  .user-body .app-download-dialog { width: calc(100% - 16px); }
  .user-body .app-download-body { grid-template-columns: 1fr; gap: 18px; max-height: calc(100vh - 116px); padding: 18px; overflow-y: auto; }
  .user-body .app-download-qr { width: min(224px, 100%); justify-self: center; }
  .user-body .app-download-qr img { width: min(196px, 100%); height: auto; aspect-ratio: 1; }
  .user-body .app-download-copy { gap: 12px; }
  .user-body .app-download-brand { justify-content: center; text-align: left; }
  .user-body .app-download-direct { width: 100%; }
  .user-body .workspace > header { gap: 8px; }
  .user-body .page-title { flex: 1; }
  .user-body .top-actions { gap: 6px; }
  .user-body .theme-toggle { width: 56px; }
  .user-body .credit-button { padding-inline: 8px; }
  .user-body .mode-tabs button { font-size: 11px; }
  .user-body .mode-tabs button svg { width: 14px; height: 14px; }
  .user-body .composer-workspace, .user-body .composer-panel { padding: 14px; }
  .user-body .composer-asset-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .user-body .section-kicker p { font-size: 10px; }
  .user-body .prompt-box textarea { min-height: 190px; }
  .user-body .recent-tasks { grid-template-columns: 1fr; }
  .user-body .task-row { grid-template-columns: auto minmax(0, 1fr); }
  .user-body .task-actions { grid-column: 2; justify-content: flex-start; }
  .user-body .asset-toolbar, .user-body .plan-grid { grid-template-columns: 1fr; }
  .user-body .asset-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .user-body .asset-actions { flex-direction: column; }
  .user-body .recharge-intro { align-items: flex-start; flex-direction: column; }
  .user-body .chat-tools { align-items: stretch; flex-direction: column; }
  .user-body .chat-tools select { width: 100%; }
  .user-body .model-dialog { width: calc(100% - 16px); max-height: calc(100vh - 24px); }
  .user-body .model-dialog-toolbar { grid-template-columns: 1fr; }
  .user-body .model-dialog-toolbar > div { grid-template-columns: auto auto auto; justify-content: start; }
  .user-body .model-dialog-toolbar > div small { grid-column: auto; align-self: center; }
  .user-body .model-option { grid-template-columns: 1fr; }
  .user-body .model-option strong:last-child { grid-column: 1; grid-row: auto; padding-right: 0; }
  .user-body .task-detail-list { grid-template-columns: 1fr; }
  .user-body .task-preview-layout { grid-template-columns: 1fr; min-height: 0; }
  .user-body .task-preview-info { padding: 16px; max-height: 340px; }
  .user-body .task-detail-actions { flex-wrap: wrap; padding: 12px 16px; }
  .user-body .task-detail-actions button { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
  .user-body *, .user-body *::before, .user-body *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

.user-body .chat-tool-card { width: min(100% - 50px, 680px); margin: -5px 0 18px 50px; display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 12px; align-items: start; padding: 13px; border: 1px solid var(--v2-line); border-left: 3px solid var(--v2-primary); border-radius: 8px; background: var(--v2-surface-soft); }
.user-body .chat-tool-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 7px; color: var(--v2-primary); background: var(--v2-primary-soft); }
.user-body .chat-tool-icon svg { width: 19px; }
.user-body .chat-tool-copy { min-width: 0; }
.user-body .chat-tool-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; min-height: 32px; }
.user-body .chat-tool-heading .chat-tool-actions { margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
.user-body .chat-tool-copy strong { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--v2-ink); }
.user-body .chat-tool-copy strong em { padding: 2px 6px; border-radius: 4px; color: var(--v2-primary); background: var(--v2-primary-soft); font-size: 10px; font-style: normal; }
.user-body .chat-tool-copy p { margin: 6px 0 4px; color: var(--v2-ink); font-size: 12px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.user-body .chat-tool-copy small { color: var(--v2-muted); font-size: 10px; }
.user-body .chat-tool-copy > span { display: block; margin-top: 5px; color: var(--v2-danger); font-size: 10px; }
.user-body .chat-tool-actions { display: flex; gap: 7px; }
.user-body .chat-tool-actions button { min-height: 32px; padding: 0 10px; white-space: nowrap; font-size: 11px; }
.user-body .chat-tool-card.status-failed { border-left-color: var(--v2-danger); }
@media (max-width: 700px) { .user-body .chat-tool-card { width: calc(100% - 42px); margin-left: 42px; grid-template-columns: 34px minmax(0, 1fr); } }

/* Full-screen login: Crystal Command Deck */
.user-body .auth-shell {
  --auth-accent: #68e0b7;
  --auth-accent-strong: #33c990;
  --auth-bg: #080c0f;
  --auth-panel: rgba(13, 20, 23, .9);
  --auth-panel-solid: #11191c;
  --auth-text: #f3f7f5;
  --auth-muted: #91a09d;
  --auth-line: rgba(203, 224, 217, .16);
  position: relative;
  isolation: isolate;
  width: 100%;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  align-items: center;
  gap: clamp(64px, 10vw, 170px);
  padding: 76px max(6vw, 36px);
  overflow: hidden;
  color: var(--auth-text);
  background: var(--auth-bg);
}
html.theme-light .user-body .auth-shell {
  --auth-accent: #168866;
  --auth-accent-strong: #0c7557;
  --auth-bg: #eef3f1;
  --auth-panel: rgba(255, 255, 255, .86);
  --auth-panel-solid: #fff;
  --auth-text: #12201b;
  --auth-muted: #65746f;
  --auth-line: rgba(24, 53, 43, .14);
}
.user-body .auth-shell::before { display: none; }
.user-body .auth-grid {
  position: absolute;
  z-index: -2;
  inset: 0;
  pointer-events: none;
  opacity: .38;
  background-image: linear-gradient(rgba(104, 224, 183, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(104, 224, 183, .07) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, transparent, #000 16%, #000 82%, transparent);
}
html.theme-light .user-body .auth-grid { opacity: .2; background-image: linear-gradient(rgba(22, 136, 102, .08) 1px, transparent 1px), linear-gradient(90deg, rgba(22, 136, 102, .08) 1px, transparent 1px); }
.user-body .auth-particle-canvas { position: absolute; z-index: -1; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.user-body .auth-theme-toggle { position: absolute; z-index: 3; top: 25px; right: max(3vw, 26px); }
.user-body .auth-brand-stage { min-height: 540px; display: flex; flex-direction: column; justify-content: space-between; padding: 35px 0 20px; }
.user-body .auth-brand-stage .brand-lockup { display: flex; align-items: center; gap: 15px; }
.user-body .auth-logo-shell { width: 60px; height: 60px; display: grid; place-items: center; flex: none; padding: 8px; border: 1px solid color-mix(in srgb, var(--auth-accent) 58%, transparent); border-radius: 8px; background: color-mix(in srgb, var(--auth-bg) 84%, transparent); box-shadow: 0 0 34px color-mix(in srgb, var(--auth-accent) 10%, transparent); }
.user-body .auth-logo-shell img { width: 100%; height: 100%; object-fit: contain; border-radius: 4px; }
.user-body .auth-brand-stage .brand-lockup > span:last-child { display: grid; gap: 5px; }
.user-body .auth-brand-stage .brand-lockup small { color: var(--auth-accent); font-size: 10px; font-weight: 750; }
.user-body .auth-brand-stage .brand-lockup strong { color: var(--auth-text); font-size: 25px; font-weight: 680; }
.user-body .auth-brand-stage .brand-copy { max-width: 680px; }
.user-body .auth-brand-stage .brand-copy > span { color: var(--auth-accent); font: 700 11px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; }
.user-body .auth-brand-stage .brand-copy h1 { max-width: 650px; margin: 16px 0 22px; color: var(--auth-text); font-size: 58px; line-height: 1.08; font-weight: 650; text-shadow: 0 0 34px color-mix(in srgb, var(--auth-accent) 12%, transparent); }
.user-body .auth-brand-stage .brand-copy p { max-width: 560px; margin: 0; color: var(--auth-muted); font-size: 16px; line-height: 1.85; }
.user-body .auth-signal { height: 44px; display: flex; align-items: center; gap: 5px; }
.user-body .auth-signal i { width: 3px; height: 12px; display: block; background: var(--auth-accent); opacity: .25; animation: auth-signal 1.8s ease-in-out infinite; }
.user-body .auth-signal i:nth-child(2) { height: 22px; animation-delay: -.2s; }
.user-body .auth-signal i:nth-child(3) { height: 35px; animation-delay: -.4s; }
.user-body .auth-signal i:nth-child(4) { height: 18px; animation-delay: -.6s; }
.user-body .auth-signal i:nth-child(5) { height: 29px; animation-delay: -.8s; }
.user-body .auth-signal i:nth-child(6) { height: 14px; animation-delay: -1s; }
.user-body .auth-signal i:nth-child(7) { height: 6px; animation-delay: -1.2s; }
.user-body .auth-service-status { display: flex; align-items: center; gap: 28px; color: var(--auth-muted); font-size: 10px; font-weight: 650; }
.user-body .auth-service-status span { display: flex; align-items: center; gap: 7px; }
.user-body .auth-service-status span i { width: 6px; height: 6px; border-radius: 50%; background: var(--auth-accent); box-shadow: 0 0 10px var(--auth-accent); animation: auth-status 2.1s ease-in-out infinite; }
.user-body .auth-service-status b { font-weight: 650; }
.user-body .auth-main { min-height: 0; display: block; padding: 0; background: transparent; }
.user-body .auth-box { position: relative; width: 100%; padding: 32px; border: 1px solid var(--auth-line); border-radius: 8px; color: var(--auth-text); background: var(--auth-panel); box-shadow: 0 36px 90px rgba(0, 0, 0, .4); backdrop-filter: blur(26px) saturate(120%); overflow: hidden; }
html.theme-light .user-body .auth-box { box-shadow: 0 34px 85px rgba(34, 61, 52, .16); }
.user-body .auth-box::before { content: ""; position: absolute; top: 0; right: 28px; width: 210px; height: 1px; background: linear-gradient(90deg, transparent, var(--auth-accent), transparent); box-shadow: 0 0 14px var(--auth-accent); }
.user-body .auth-box-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.user-body .auth-box-head > div > span { display: block; margin-bottom: 8px; color: var(--auth-accent); font-size: 9px; font-weight: 750; }
.user-body .auth-box-head h2 { margin: 0; color: var(--auth-text); font-size: 25px; font-weight: 650; }
.user-body .auth-box-head .subtle { margin: 8px 0 0; color: var(--auth-muted); font-size: 12px; }
.user-body .auth-box-head > small { display: flex; align-items: center; gap: 5px; padding: 6px 8px; border: 1px solid var(--auth-line); border-radius: 4px; color: var(--auth-muted); font-size: 9px; }
.user-body .auth-box-head > small i { width: 5px; height: 5px; border-radius: 50%; background: var(--auth-accent); }
.user-body .auth-box .segmented { margin: 26px 0 22px; padding: 3px; border-radius: 6px 0 6px 0; background: color-mix(in srgb, var(--auth-muted) 9%, transparent); }
.user-body .auth-box .segmented { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.user-body .auth-box .segmented button { height: 34px; border-radius: 4px; color: var(--auth-muted); font-size: 12px; }
.user-body .auth-box .segmented button.active { color: var(--auth-text); background: var(--auth-panel-solid); box-shadow: 0 2px 8px rgba(0, 0, 0, .16); }
.user-body .auth-box label { gap: 7px; margin-bottom: 16px; color: var(--auth-muted); font-size: 11px; }
.user-body .auth-box input { height: 46px; border-color: var(--auth-line); border-radius: 6px 0 6px 0; color: var(--auth-text); background: color-mix(in srgb, var(--auth-muted) 5.5%, transparent); font-size: 13px; }
.user-body .auth-box input:focus { border-color: var(--auth-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--auth-accent) 9%, transparent); }
.user-body .auth-box .verification-row .secondary { border-color: var(--auth-line); color: var(--auth-accent); background: color-mix(in srgb, var(--auth-muted) 7%, transparent); }
.user-body .auth-box .login-options { margin: 1px 0 18px; color: var(--auth-muted); }
.user-body .auth-box .login-options > label { margin: 0; color: var(--auth-muted); }
.user-body .auth-box .login-options input { width: 15px; height: 15px; accent-color: var(--auth-accent); }
.user-body .auth-box .auth-text-button { color: var(--auth-muted); }
.user-body .auth-box .auth-text-button:hover { color: var(--auth-accent); }
.user-body .auth-box #authError:empty { display: none; }
.user-body .auth-box #authError:not(:empty) { margin: 0 0 12px; }
.user-body .auth-box .primary.wide { height: 48px; border-radius: 6px 0 6px 0; color: #042117; background: var(--auth-accent); box-shadow: 0 12px 28px color-mix(in srgb, var(--auth-accent) 17%, transparent); font-size: 13px; font-weight: 750; }
html.theme-light .user-body .auth-box .primary.wide { color: #fff; }
.user-body .auth-box .primary.wide:hover { background: color-mix(in srgb, var(--auth-accent) 84%, white); transform: translateY(-1px); }
.user-body .auth-content-links { gap: 10px; margin-top: 23px; }
.user-body .auth-content-links button { color: var(--auth-muted); font-size: 10px; }
.user-body .auth-content-links button + button::before { content: ""; width: 1px; height: 10px; margin-right: 10px; background: var(--auth-line); }
.user-body .auth-content-links svg { display: none; }
.user-body .auth-legal { margin-top: 14px; color: var(--auth-muted); opacity: .76; }
.user-body .auth-announcement { border-color: var(--auth-line); color: var(--auth-text); background: color-mix(in srgb, var(--auth-accent) 8%, var(--auth-panel-solid)); }
.user-body .auth-page-footer { position: absolute; z-index: 2; left: 28px; right: 28px; bottom: 20px; display: flex; justify-content: space-between; color: var(--auth-muted); font-size: 9px; pointer-events: none; }
@keyframes auth-signal { 50% { opacity: .95; transform: scaleY(.65); } }
@keyframes auth-status { 50% { opacity: .45; box-shadow: 0 0 18px var(--auth-accent); } }

@media (max-width: 900px) {
  .user-body .auth-shell { width: 100%; min-height: 100svh; grid-template-columns: 1fr; gap: 30px; padding: 88px 24px 42px; overflow: visible; }
  .user-body .auth-brand-stage { min-height: auto; padding: 0; }
  .user-body .auth-brand-stage .brand-copy { margin-top: 42px; }
  .user-body .auth-brand-stage .brand-copy h1 { font-size: 43px; }
  .user-body .auth-signal, .user-body .auth-service-status { display: none; }
  .user-body .auth-main { width: min(440px, 100%); justify-self: center; }
  .user-body .auth-page-footer { display: none; }
}
@media (max-width: 520px) {
  .user-body .auth-shell { gap: 20px; padding: 76px 16px 28px; }
  .user-body .auth-theme-toggle { top: 20px; right: 18px; }
  .user-body .auth-logo-shell { width: 46px; height: 46px; padding: 6px; }
  .user-body .auth-brand-stage .brand-lockup strong { font-size: 20px; }
  .user-body .auth-brand-stage .brand-lockup small { font-size: 8px; }
  .user-body .auth-brand-stage .brand-copy { margin-top: 24px; }
  .user-body .auth-brand-stage .brand-copy h1 { margin: 10px 0; font-size: 30px; }
  .user-body .auth-brand-stage .brand-copy p { font-size: 13px; line-height: 1.65; }
  .user-body .auth-box { padding: 23px 20px; }
  .user-body .auth-box-head h2 { font-size: 22px; }
  .user-body .auth-box-head > small { display: none; }
  .user-body .auth-box .segmented { margin: 22px 0 18px; }
}

/* V2 alignment for history, chat and asset library */
.user-body .history-heading { margin-bottom: 4px; }
.user-body .history-load-more { display: block; min-width: 136px; margin: 18px auto 0; }
.user-body .history-load-more[hidden] { display: none; }
.user-body .history-toolbar { min-height: 50px; margin-bottom: 10px; }
.user-body .view-toolbar > .secondary { margin-left: auto; }
.user-body .filter-tabs { display: flex; gap: 2px; padding: 3px; border: 1px solid var(--v2-line); border-radius: 7px; background: var(--v2-surface-muted); }
.user-body .filter-tabs button { min-height: 34px; display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; border: 0; border-radius: 5px; color: var(--v2-muted); background: transparent; font-size: 11px; white-space: nowrap; }
.user-body .filter-tabs button span { padding: 1px 5px; border-radius: 8px; color: var(--v2-muted); background: color-mix(in srgb, var(--v2-line) 60%, transparent); font-size: 9px; }
.user-body .filter-tabs button.active { color: var(--v2-ink); background: var(--v2-surface); box-shadow: 0 1px 4px rgba(30, 43, 37, .09); font-weight: 700; }
.user-body .filter-tabs button.active span { color: var(--v2-primary); background: var(--v2-primary-soft); }
.user-body .history-table-head, .user-body .history-row { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, .9fr) 88px minmax(0, .85fr) 104px; gap: 12px; align-items: center; }
.user-body .history-table-head { padding: 0 14px 8px; color: var(--v2-muted); font-size: 10px; }
.user-body .history-table-head span:first-child { padding-left: 80px; }
.user-body .history-list { display: grid; gap: 7px; }
.user-body .history-row { position: relative; min-height: 86px; padding: 10px 14px; border: 1px solid var(--v2-line); border-radius: 7px; background: var(--v2-surface); }
.user-body .history-row:hover { border-color: var(--v2-line-strong); }
.user-body .history-work { min-width: 0; display: grid; grid-template-columns: 68px minmax(0, 1fr); gap: 10px; align-items: center; }
.user-body .history-work > .task-thumbnail, .user-body .history-work > .task-kind { width: 68px; height: 64px; }
.user-body .history-work > .task-kind { width: 68px; height: 64px; border-radius: 5px; }
.user-body .history-name { min-width: 0; }
.user-body .history-name strong, .user-body .history-name small, .user-body .history-spec strong, .user-body .history-spec small, .user-body .history-time strong, .user-body .history-time small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-body .history-name strong, .user-body .history-spec strong, .user-body .history-time strong { font-size: 11px; }
.user-body .history-name small, .user-body .history-spec small, .user-body .history-time small { margin-top: 5px; color: var(--v2-muted); font-size: 9px; }
.user-body .status-pill { width: fit-content; display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 12px; color: var(--v2-primary); background: var(--v2-primary-soft); font-size: 9px; white-space: nowrap; }
.user-body .status-pill i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.user-body .status-pill.progress { color: #9b7216; background: #fff4d9; }
.user-body .status-pill.progress i { animation: status-pulse 1.5s ease-in-out infinite; }
.user-body .status-pill.danger { color: var(--v2-danger); background: #fae9e9; }
.user-body .row-actions { display: flex; justify-content: flex-end; gap: 5px; }
.user-body .row-actions .icon-button { width: 31px; height: 31px; }
.user-body .history-error { position: absolute; left: 94px; right: 16px; bottom: 3px; color: var(--v2-danger); font-size: 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-body .recent-task-card { position: relative; grid-template-columns: 1fr; gap: 0; padding: 0; overflow: hidden; border-radius: 7px; background: var(--v2-surface); text-align: left; cursor: pointer; }
.user-body .recent-task-card.is-pending { cursor: default; }
.user-body .recent-task-card .recent-delete-button { position: absolute; top: 7px; right: 7px; z-index: 4; display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 1px solid rgba(255,255,255,.45); border-radius: 6px; background: rgba(20,24,27,.78); color: #fff; cursor: pointer; transition: background .15s, transform .15s; }
.user-body .recent-delete-button svg { width: 15px; height: 15px; pointer-events: none; }
.user-body .recent-task-card .recent-delete-button:hover { background: #bd303b; transform: translateY(-1px); }
.user-body .recent-task-card .recent-delete-button:focus-visible { outline: 2px solid var(--v2-primary); outline-offset: 2px; }
.user-body .recent-task-card .recent-delete-button:disabled { opacity: .5; cursor: wait; }
.user-body #recentTasks .recent-task-card .recent-thumbnail .recent-model-badge { max-width: calc(100% - 46px); }
.user-body .recent-task-card:hover { transform: translateY(-3px); }
.user-body .recent-task-card .recent-thumbnail, .user-body .recent-task-card > .task-kind { width: 100%; aspect-ratio: 16 / 10; height: auto; display: grid; place-items: center; overflow: hidden; border-radius: 0; background: var(--v2-surface-muted); }
.user-body .recent-task-card .recent-thumbnail img { width: 100%; height: 100%; object-fit: cover; }
.user-body .recent-task-copy { display: block; min-width: 0; padding: 11px; }
.user-body .recent-task-copy strong, .user-body .recent-task-copy p { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-body .recent-task-copy p { margin: 5px 0; color: var(--v2-muted); font-size: 10px; }
.user-body .recent-task-copy em { color: var(--v2-primary); font-size: 9px; font-style: normal; }
.user-body .recent-media-tasks .recent-task-card .recent-thumbnail,
.user-body .recent-media-tasks .recent-task-card > .task-kind { aspect-ratio: 4 / 3; }
.user-body .recent-media-tasks .recent-task-card .recent-thumbnail img { object-fit: contain; background: var(--v2-surface-muted); }
.user-body .recent-media-tasks .recent-task-copy { padding: 8px 9px 9px; }
.user-body .recent-media-tasks .recent-task-copy strong { font-size: 12px; }
.user-body .recent-media-tasks .recent-task-copy p { margin: 3px 0; font-size: 10px; }
.user-body .recent-media-tasks .recent-task-copy em { font-size: 9px; }

@media (max-width: 1100px) {
  .user-body .recent-media-tasks { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 800px) {
  .user-body .recent-media-tasks { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .user-body .recent-media-tasks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.user-body .composer.chat-mode { grid-template-columns: 248px minmax(0, 1fr) 244px; grid-template-rows: minmax(0, 1fr); height: calc(100vh - 158px); min-height: 610px; min-width: 0; overflow: hidden; border: 1px solid var(--v2-line); border-radius: 8px; background: var(--v2-surface); }
.user-body .composer.chat-mode > .conversation-rail { display: block; min-width: 0; min-height: 0; height: 100%; overflow-y: auto; padding: 14px 11px; border-right: 1px solid var(--v2-line); background: var(--v2-surface-muted); }
.user-body .composer.chat-mode > .composer-workspace { min-width: 0; min-height: 0; height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; overflow: hidden; padding: 0; border: 0; border-radius: 0; background: var(--v2-surface); }
.user-body .composer.chat-mode .composer-assets, .user-body .composer.chat-mode .composer-top, .user-body .composer.chat-mode .chat-tools { display: none; }
.user-body .composer.chat-mode .composer-assets { margin: 0; padding: 10px 16px; border-bottom: 1px solid var(--v2-line); }
.user-body .composer.chat-mode .composer-assets .section-kicker, .user-body .composer.chat-mode .composer-assets .selected-asset-strip, .user-body .composer.chat-mode .composer-assets .composer-asset-actions { display: none; }
.user-body .composer.chat-mode .composer-top { min-height: 58px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--v2-line); }
.user-body .composer.chat-mode .composer-top .section-kicker { display: none; }
.user-body .composer.chat-mode .clear-button { display: none; }
.user-body .composer.chat-mode .chat-head { min-height: 68px; display: flex; align-items: center; gap: 14px; padding: 12px 18px; border-bottom: 1px solid var(--v2-line); }
.user-body .composer.chat-mode .chat-head > div { min-width: 0; }
.user-body .composer.chat-mode .chat-head strong, .user-body .composer.chat-mode .chat-head small { display: block; }
.user-body .composer.chat-mode .chat-head strong { font-size: 16px; line-height: 1.35; }
.user-body .composer.chat-mode .chat-head small { margin-top: 5px; color: var(--v2-muted); font-size: 12px; line-height: 1.45; }
.user-body .composer.chat-mode .chat-head > button { margin-left: auto; }
.user-body .chat-head-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.user-body .chat-head-actions button { display: inline-flex; align-items: center; gap: 6px; }
.user-body .mobile-conversation-switcher, .user-body .conversation-rail-mobile-head, .user-body .conversation-rail-backdrop { display: none; }
@media (min-width: 801px) {
  .user-body .mobile-conversation-switcher { display: none !important; }
}
.user-body .composer.chat-mode .chat-messages { min-width: 0; min-height: 0; height: auto; max-height: none; display: grid; align-content: start; margin: 0; padding: 22px 18px; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; border: 0; border-radius: 0; background: color-mix(in srgb, var(--v2-surface) 88%, var(--v2-surface-muted)); }
.user-body .composer.chat-mode .chat-timeline-entry { min-width: 0; }
.user-body .composer.chat-mode .chat-tools { display: none; }
.user-body .composer.chat-mode .prompt-box { margin: 0 16px; border-radius: 8px 8px 0 0; }
.user-body .composer.chat-mode .chat-attachment-bar { min-height: 36px; display: flex; flex-direction: row; align-items: center; gap: 8px; margin: 0 16px; padding: 0 9px 6px; }
.user-body .composer.chat-mode .chat-attachment-bar button { height: 28px; min-height: 28px; }
.user-body .composer.chat-mode .chat-attachment-bar button:hover { border-color: var(--v2-primary); color: var(--v2-primary); }
.user-body .composer.chat-mode .prompt-box textarea { min-height: 74px; resize: none; }
.user-body .composer.chat-mode #chatComposerFooter { min-height: 44px; display: flex; flex-direction: row; align-items: center; gap: 8px; margin: 0 16px 14px; padding: 6px 8px; border: 1px solid var(--v2-line-strong); border-top: 0; border-radius: 0 0 8px 8px; background: var(--v2-surface); }
.user-body .composer.chat-mode #chatComposerFooter:focus-within { border-color: var(--v2-primary); }
.user-body .composer.chat-mode #chatComposerFooter .inline-model,
.user-body .composer.chat-mode #chatComposerFooter .reasoning-inline,
.user-body .composer.chat-mode #chatComposerFooter .send-button { box-sizing: border-box; height: 32px; min-height: 32px; max-height: 32px; margin: 0; }
.user-body .composer.chat-mode #chatComposerFooter .inline-model { display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; border: 1px solid transparent; border-radius: 6px 0 6px 0; color: var(--v2-primary); background: var(--v2-primary-soft); font-size: 12px; line-height: 1; }
.user-body .composer.chat-mode #chatComposerFooter .inline-model svg { width: 16px; height: 16px; flex: 0 0 16px; }
.user-body .composer.chat-mode #chatComposerFooter .inline-model strong { font-size: 12px; font-weight: 700; line-height: 1; }
.user-body .composer.chat-mode #chatComposerFooter .reasoning-inline { display: inline-flex; align-items: center; gap: 6px; padding: 0 8px; border: 1px solid var(--v2-line); border-radius: 6px 0 6px 0; color: var(--v2-muted); background: var(--v2-surface); font-size: 12px; line-height: 1; white-space: nowrap; }
.user-body .composer.chat-mode #chatComposerFooter .reasoning-inline select { height: 30px; min-height: 30px; padding: 0 18px 0 4px; border: 0; border-radius: 0; color: var(--v2-ink); background: transparent; font-size: 12px; line-height: 1; }
.user-body .composer.chat-mode #chatComposerFooter .send-button { width: 32px; margin-left: auto; display: inline-grid; place-items: center; border-color: var(--v2-primary); color: #fff; background: var(--v2-primary); }
.user-body .composer.chat-mode #chatComposerFooter .send-button svg { width: 15px; height: 15px; }
.user-body .composer.chat-mode > .composer-panel { min-width: 0; min-height: 0; height: 100%; position: static; padding: 16px; overflow-x: hidden; overflow-y: auto; border: 0; border-left: 1px solid var(--v2-line); border-radius: 0; background: color-mix(in srgb, var(--v2-surface) 92%, var(--v2-surface-muted)); }
.user-body .composer.chat-mode > .composer-panel > :not(#chatContextContent) { display: none; }
.user-body .composer.chat-mode .chat-context-content { display: block; }
.user-body .chat-context-content .context-heading { display: flex; align-items: center; gap: 7px; padding-bottom: 13px; border-bottom: 1px solid var(--v2-line); }
.user-body .chat-context-content .context-heading svg { color: var(--v2-primary); }
.user-body .chat-context-content .context-heading strong { font-size: 13px; }
.user-body .chat-context-content dl { display: grid; gap: 9px; margin: 14px 0; }
.user-body .chat-context-content dl div { display: flex; justify-content: space-between; gap: 10px; font-size: 10px; }
.user-body .chat-context-content dt { color: var(--v2-muted); }
.user-body .chat-context-content dd { margin: 0; text-align: right; }
.user-body .context-assets { display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; gap: 7px; }
.user-body .context-assets button { width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; overflow: hidden; display: flex; align-items: center; gap: 8px; padding: 7px; border: 1px solid var(--v2-line); border-radius: 6px 0 6px 0; color: var(--v2-ink); background: var(--v2-surface); text-align: left; }
.user-body .context-asset-icon { width: 36px; height: 32px; display: grid; place-items: center; flex: 0 0 36px; border-radius: 4px; color: var(--v2-primary); background: var(--v2-primary-soft); }
.user-body .context-assets button > span:last-child { min-width: 0; flex: 1; overflow: hidden; }
.user-body .context-asset-summary { color: var(--v2-muted); font-size: 12px; }
.user-body .context-assets strong, .user-body .context-assets small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-body .context-assets strong { font-size: 9px; }
.user-body .context-assets small { margin-top: 3px; color: var(--v2-muted); font-size: 8px; }
.user-body .context-empty, .user-body .conversation-empty { color: var(--v2-muted); font-size: 10px; }
.user-body .context-price { margin-top: 16px; padding: 11px; border: 1px solid #f0dcc9; border-radius: 7px; background: #fff9f1; }
.user-body .context-price span, .user-body .context-price strong, .user-body .context-price small { display: block; }
.user-body .context-price span { color: var(--v2-muted); font-size: 8px; }
.user-body .context-price strong { margin-top: 4px; color: var(--v2-coral); font-size: 12px; }
.user-body .context-price small { margin-top: 4px; color: var(--v2-muted); font-size: 8px; }
.user-body .conversation-primary-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.user-body .new-chat, .user-body .import-chat { width: 100%; height: 42px; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 0 8px; border: 1px solid var(--v2-primary); border-radius: 8px; color: var(--v2-primary); background: var(--v2-surface); font-size: 12px; font-weight: 700; white-space: nowrap; }
.user-body .import-chat { border-color: var(--v2-line-strong); color: var(--v2-ink); }
.user-body .new-chat:hover, .user-body .import-chat:hover { border-color: var(--v2-primary); color: var(--v2-primary); background: var(--v2-primary-soft); }
.user-body .new-chat svg, .user-body .import-chat svg { width: 16px; height: 16px; flex: 0 0 16px; }
.user-body .conversation-rail > p { margin: 22px 10px 10px; color: var(--v2-muted); font-size: 12px; line-height: 1.4; font-weight: 650; }
.user-body .conversation-entry { position: relative; min-width: 0; margin-bottom: 8px; border: 1px solid var(--v2-line-strong); border-radius: 8px; background: var(--v2-surface); }
.user-body .conversation-entry.active { border-color: var(--v2-primary); background: var(--v2-primary-soft); }
.user-body .conversation-item { width: 100%; min-width: 0; min-height: 64px; display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 9px; align-items: center; padding: 10px 40px 10px 10px; border: 0; border-radius: 8px; color: var(--v2-muted); background: transparent; text-align: left; }
.user-body .conversation-item:hover { background: color-mix(in srgb, var(--v2-ink) 5%, transparent); }
.user-body .conversation-item.active { color: var(--v2-ink); background: transparent; }
.user-body .conversation-item > span { min-width: 0; }
.user-body .conversation-item strong, .user-body .conversation-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-body .conversation-item > svg, .user-body .conversation-item > i svg { width: 19px; height: 19px; }
.user-body .conversation-item strong { font-size: 13px; line-height: 1.45; }
.user-body .conversation-item small { margin-top: 5px; color: var(--v2-muted); font-size: 11px; line-height: 1.35; }
.user-body .conversation-menu-trigger { position: absolute; z-index: 2; top: 50%; right: 6px; width: 30px; height: 30px; display: grid; place-items: center; padding: 0; transform: translateY(-50%); border: 0; border-radius: 6px 0 6px 0; color: var(--v2-muted); background: transparent; }
.user-body .conversation-menu-trigger:hover, .user-body .conversation-menu-trigger[aria-expanded="true"] { color: var(--v2-ink); background: color-mix(in srgb, var(--v2-surface) 72%, transparent); }
.user-body .conversation-menu-trigger svg { width: 18px; height: 18px; }
.user-body .conversation-action-menu { position: absolute; z-index: 18; top: calc(50% + 19px); right: 6px; width: 148px; display: grid; gap: 3px; padding: 6px; border: 1px solid var(--v2-line-strong); border-radius: 8px; background: var(--v2-surface); box-shadow: 0 10px 28px rgba(20, 35, 28, .18); }
.user-body .conversation-action-menu.menu-up { top: auto; bottom: calc(50% + 19px); }
.user-body .conversation-action-menu button { width: 100%; min-height: 35px; display: flex; align-items: center; gap: 8px; padding: 0 9px; border: 0; border-radius: 6px 0 6px 0; color: var(--v2-ink); background: transparent; font-size: 12px; text-align: left; }
.user-body .conversation-action-menu button:hover { background: var(--v2-surface-soft); }
.user-body .conversation-action-menu button.danger { color: var(--v2-danger); }
.user-body .conversation-action-menu button.danger:hover { background: color-mix(in srgb, var(--v2-danger) 9%, transparent); }
.user-body .conversation-action-menu svg { width: 16px; height: 16px; }

.user-body .composer.chat-mode .chat-processing { margin-top: -12px; }
.user-body .composer.chat-mode .chat-processing.is-thinking .assistant-avatar { overflow: visible; animation: chat-avatar-pulse 1.8s ease-in-out infinite; }
.user-body .composer.chat-mode .chat-processing.is-thinking .assistant-avatar::before { content: ""; position: absolute; inset: -4px; border: 1px solid color-mix(in srgb, var(--v2-primary) 54%, transparent); border-radius: 10px; opacity: 0; animation: chat-avatar-ring 1.8s ease-out infinite; }
.user-body .composer.chat-mode .chat-processing.is-thinking .assistant-avatar svg { animation: chat-avatar-think 1.4s ease-in-out infinite; }
.user-body .composer.chat-mode .chat-processing .chat-message-body { padding: 12px 14px; border: 1px solid var(--v2-line); border-radius: 8px; background: var(--v2-surface); }
.user-body .chat-processing-title { display: flex; align-items: center; gap: 8px; color: var(--v2-ink); }
.user-body .chat-processing-title strong { color: inherit; font-size: 13px; }
.user-body .chat-processing-spinner { width: 14px; height: 14px; flex: 0 0 14px; border: 2px solid color-mix(in srgb, var(--v2-primary) 24%, transparent); border-top-color: var(--v2-primary); border-radius: 50%; animation: chat-processing-spin .85s linear infinite; }
.user-body .chat-processing.is-failed .chat-processing-spinner { border-color: var(--v2-danger); animation: none; }
.user-body .chat-processing-steps { display: flex; align-items: center; flex-wrap: wrap; gap: 7px 12px; margin-top: 11px; }
.user-body .chat-processing-steps span { display: inline-flex; align-items: center; gap: 5px; color: var(--v2-muted); font-size: 10px; }
.user-body .chat-processing-steps span > i { width: 7px; height: 7px; border: 1px solid var(--v2-line-strong); border-radius: 50%; background: var(--v2-surface); }
.user-body .chat-processing-steps span.done { color: var(--v2-primary); }
.user-body .chat-processing-steps span.done > i { border-color: var(--v2-primary); background: var(--v2-primary); }
.user-body .chat-processing-steps span.active { color: var(--v2-ink); }
.user-body .chat-processing-steps span.active > i { border-color: var(--v2-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--v2-primary) 14%, transparent); }
.user-body .chat-processing-steps span.failed { color: var(--v2-danger); }
.user-body .chat-processing-steps span.failed > i { border-color: var(--v2-danger); background: var(--v2-danger); }
.user-body .composer.chat-mode .chat-processing p { margin: 10px 0 0; color: var(--v2-muted); font-size: 11px; line-height: 1.6; }
@keyframes chat-processing-spin { to { transform: rotate(360deg); } }
@keyframes chat-avatar-pulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--v2-primary) 0%, transparent); } 50% { box-shadow: 0 0 18px 3px color-mix(in srgb, var(--v2-primary) 32%, transparent); } }
@keyframes chat-avatar-ring { 0% { opacity: .7; transform: scale(.84); } 70%, 100% { opacity: 0; transform: scale(1.25); } }
@keyframes chat-avatar-think { 0%, 100% { transform: translateY(0) rotate(0); } 35% { transform: translateY(-2px) rotate(-4deg); } 70% { transform: translateY(1px) rotate(3deg); } }

/* Keep assistant responses readable when the upstream returns Markdown. */
.user-body .composer.chat-mode .chat-markdown { min-width: 0; color: var(--v2-ink); }
.user-body .composer.chat-mode .chat-markdown p { margin: 0 0 10px; }
.user-body .composer.chat-mode .chat-markdown p:last-child { margin-bottom: 0; }
.user-body .composer.chat-mode .chat-markdown h1,
.user-body .composer.chat-mode .chat-markdown h2,
.user-body .composer.chat-mode .chat-markdown h3 { margin: 16px 0 8px; color: var(--v2-ink); line-height: 1.4; }
.user-body .composer.chat-mode .chat-markdown h1 { font-size: 17px; }
.user-body .composer.chat-mode .chat-markdown h2 { font-size: 14px; }
.user-body .composer.chat-mode .chat-markdown h3 { font-size: 12px; }
.user-body .composer.chat-mode .chat-markdown ul,
.user-body .composer.chat-mode .chat-markdown ol { margin: 7px 0 12px; padding-left: 22px; }
.user-body .composer.chat-mode .chat-markdown li { margin: 4px 0; }
.user-body .composer.chat-mode .chat-markdown blockquote { margin: 10px 0; padding: 8px 12px; border-left: 3px solid var(--v2-primary); color: var(--v2-muted); background: var(--v2-primary-soft); }
.user-body .composer.chat-mode .chat-markdown hr { margin: 14px 0; border: 0; border-top: 1px solid var(--v2-line); }
.user-body .composer.chat-mode .chat-markdown code { padding: 2px 4px; border-radius: 4px; background: var(--v2-surface-muted); font-size: .92em; }
.user-body .composer.chat-mode .chat-markdown pre { margin: 10px 0; padding: 10px 12px; max-width:100%; white-space:pre-wrap; overflow-wrap:anywhere; word-break:normal; tab-size:4; overflow-x:auto; border-radius: 6px 0 6px 0; color: #e9f3ef; background: #15211c; }
.user-body .composer.chat-mode .chat-markdown pre code { padding: 0; white-space:inherit; overflow-wrap:inherit; color: inherit; background: transparent; }
.user-body .composer.chat-mode .chat-markdown a { color: var(--v2-primary); }
.user-body .context-asset-thumb { position: relative; overflow: hidden; padding: 0; }
.user-body .context-asset-thumb img { width: 100%; height: 100%; display: block; object-fit: cover; }
.user-body .context-asset-thumb img:not([hidden]) + svg { display: none; }

/* Chat attachments stay visible in the compact composer while the full asset
   workspace remains hidden in chat mode. */
.user-body .composer.chat-mode .chat-attachment-bar { position: relative; min-width: 0; min-height: 36px; display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 16px; padding: 0 9px 6px; }
.user-body .prompt-box { position: relative; }
.user-body .prompt-box { overflow: visible; }
.user-body .asset-mention-trigger { display: inline-flex; align-items: center; gap: 4px; min-height: 25px; padding: 0 7px; border: 1px solid var(--v2-line); border-radius: 5px; color: var(--v2-muted); background: transparent; font-size: 9px; }
.user-body .asset-mention-trigger:hover { border-color: var(--v2-primary); color: var(--v2-primary); }
.user-body .asset-mention-trigger b { color: var(--v2-primary); font-size: 13px; }
.user-body .composer.chat-mode .prompt-box { overflow: visible; z-index: 3; }
.user-body .composer.chat-mode .chat-attachment-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.user-body .composer.chat-mode .chat-attachment-action { box-sizing: border-box; height: 28px; min-height: 28px; max-height: 28px; margin: 0; display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 0 8px; border: 1px solid var(--v2-line); border-radius: 5px; color: var(--v2-muted); background: var(--v2-surface-soft); font-size: 9px; line-height: 1; white-space: nowrap; cursor: pointer; }
.user-body .composer.chat-mode .chat-attachment-action:hover { border-color: var(--v2-primary); color: var(--v2-primary); }
.user-body .composer.chat-mode .chat-attachment-status { min-width: 0; flex: 1 1 100%; color: var(--v2-muted); font-size: 11px; line-height: 1.35; overflow-wrap: anywhere; }
.user-body .composer.chat-mode .chat-attachment-status.is-busy::before { content: ""; width: 10px; height: 10px; display: inline-block; margin-right: 6px; border: 2px solid var(--v2-line-strong); border-top-color: var(--v2-primary); border-radius: 50%; vertical-align: -2px; animation: chat-attachment-spin .7s linear infinite; }
.user-body .composer.chat-mode .chat-attachment-status.is-error { color: var(--v2-danger, #b42318); }
@keyframes chat-attachment-spin { to { transform: rotate(360deg); } }
.user-body .asset-item.picker-item.is-disabled { opacity: .55; cursor: not-allowed; }
.user-body .picker-unsupported-note { display: block; color: var(--v2-muted); font-size: 10px; }
.user-body .generated-history-item.is-disabled { opacity: .55; cursor: not-allowed; }
.user-body .generated-history-dialog { width: min(680px, calc(100% - 32px)); max-height: min(720px, calc(100vh - 40px)); }
.user-body .generated-history-list { display: grid; gap: 8px; max-height: 520px; padding: 14px 20px; overflow: auto; }
.user-body .generated-history-item { min-width: 0; display: grid; grid-template-columns: 18px 34px minmax(0, 1fr); align-items: center; gap: 10px; padding: 9px 10px; border: 1px solid var(--v2-line); border-radius: 7px; color: var(--v2-ink); background: var(--v2-surface); cursor: pointer; }
.user-body .generated-history-item:hover, .user-body .generated-history-item:has(input:checked) { border-color: var(--v2-primary); background: var(--v2-primary-soft); }
.user-body .generated-history-item input { margin: 0; accent-color: var(--v2-primary); }
.user-body .generated-history-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 6px 0 6px 0; color: var(--v2-primary); background: var(--v2-primary-soft); }
.user-body .generated-history-copy { min-width: 0; }
.user-body .generated-history-copy strong, .user-body .generated-history-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-body .generated-history-copy strong { font-size: 12px; }
.user-body .generated-history-copy small { margin-top: 4px; color: var(--v2-muted); font-size: 10px; }
.user-body .composer:not(.chat-mode) .composer-assets {
  box-sizing: border-box;
  min-width: 0;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
  margin: 8px 9px 0;
  padding: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid var(--v2-line-strong);
  border-radius: 6px 0 6px 0;
  background: var(--v2-surface-soft);
}
.user-body .composer:not(.chat-mode) .composer-assets > .section-kicker { display: none; }
.user-body .composer:not(.chat-mode) .composer-asset-actions { flex: 0 1 auto; }
.user-body .composer:not(.chat-mode) .composer-asset-button {
  box-sizing: border-box;
  min-width: 0;
  width: auto;
  height: 28px;
  min-height: 28px;
  max-height: 28px;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 8px;
  border: 1px solid var(--v2-line);
  border-radius: 5px;
  color: var(--v2-muted);
  background: var(--v2-surface-soft);
  font-size: 9px;
  line-height: 1;
  white-space: nowrap;
}
.user-body .composer:not(.chat-mode) .composer-asset-button:hover {
  border-color: var(--v2-primary);
  color: var(--v2-primary);
}
.user-body .composer:not(.chat-mode) .composer-asset-button svg {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
}
.user-body .composer:not(.chat-mode) .selected-asset-strip {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 0 1 auto;
  margin: 0;
  padding: 0;
  overflow: visible;
}
.user-body .composer:not(.chat-mode) .selected-asset-strip:empty { display: none; }
.user-body .composer:not(.chat-mode) .selected-asset-strip .selected-asset {
  flex: 0 0 54px;
  gap: 2px;
}
.user-body .composer:not(.chat-mode) .selected-asset-strip .selected-asset-name,
.user-body .composer.chat-mode .chat-selected-assets .selected-asset-name { font-size: 9px; }
.user-body .composer:not(.chat-mode) .selected-asset-strip .selected-asset-preview {
  width: 54px;
  height: 45px;
  border-radius: 5px;
}
.user-body .composer:not(.chat-mode) .selected-asset-strip .selected-asset small { font-size: 8px; }
.user-body .composer:not(.chat-mode) .selected-asset-strip .selected-asset-remove {
  width: 16px;
  height: 16px;
  top: -4px;
  right: -4px;
  font-size: 10px;
}
.user-body .composer.chat-mode .chat-attachment-action svg { width: 14px; height: 14px; flex: 0 0 14px; }
.user-body .composer.chat-mode .chat-selected-assets { min-width: 0; display: flex; gap: 7px; padding: 0; overflow-x: auto; align-items: center; }
.user-body .composer.chat-mode .chat-selected-assets:empty { display: none; }
.user-body .composer.chat-mode .chat-selected-assets .selected-asset { flex-basis: 54px; gap: 2px; }
.user-body .composer.chat-mode .chat-selected-assets .selected-asset-preview { width: 54px; height: 45px; border-radius: 5px; }
.user-body .composer.chat-mode .chat-selected-assets .selected-asset small { font-size: 8px; }
.user-body .composer.chat-mode .chat-selected-assets .selected-asset-remove { width: 16px; height: 16px; top: -4px; right: -4px; font-size: 10px; }
.user-body .composer.chat-mode .asset-mention-trigger { display: inline-flex; align-items: center; gap: 4px; min-height: 25px; padding: 0 7px; border: 1px solid var(--v2-line); border-radius: 5px; color: var(--v2-muted); background: transparent; font-size: 9px; }
.user-body .composer.chat-mode .asset-mention-trigger:hover { border-color: var(--v2-primary); color: var(--v2-primary); }
.user-body .composer.chat-mode .asset-mention-trigger b { color: var(--v2-primary); font-size: 13px; }
.user-body .asset-mention-menu { position: absolute; z-index: 12; left: 9px; right: 9px; bottom: 42px; max-height: 238px; display: grid; gap: 3px; padding: 7px; overflow-y: auto; border: 1px solid var(--v2-line-strong); border-radius: 7px; background: var(--v2-surface); box-shadow: 0 10px 28px rgba(20, 35, 28, .16); }
.user-body .asset-mention-menu[hidden] { display: none; }
.user-body .asset-mention-option { min-width: 0; display: flex; align-items: center; gap: 8px; padding: 6px; border: 1px solid transparent; border-radius: 5px; color: var(--v2-ink); background: transparent; text-align: left; }
.user-body .asset-mention-option:hover, .user-body .asset-mention-option.is-highlighted { border-color: var(--v2-primary); background: var(--v2-primary-soft); }
.user-body .asset-mention-thumb { width: 34px; height: 30px; display: grid; place-items: center; flex: 0 0 34px; overflow: hidden; border-radius: 4px; color: var(--v2-primary); background: var(--v2-surface-muted); }
.user-body .asset-mention-thumb img { width: 100%; height: 100%; object-fit: cover; }
.user-body .asset-mention-thumb img:not([hidden]) + svg { display: none; }
.user-body .asset-mention-copy { min-width: 0; display: grid; gap: 2px; }
.user-body .asset-mention-copy strong, .user-body .asset-mention-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-body .asset-mention-copy strong { color: var(--v2-primary); font-size: 10px; }
.user-body .asset-mention-copy small { color: var(--v2-muted); font-size: 8px; }
.user-body .asset-mention-empty { padding: 12px 8px; color: var(--v2-muted); font-size: 9px; }
.user-body .asset-picker-media-modes { display: flex; gap: 7px; padding: 10px 20px 0; overflow-x: auto; }
.user-body .asset-picker-media-modes button { min-height: 31px; display: inline-flex; align-items: center; gap: 5px; padding: 0 10px; border: 1px solid var(--v2-line); border-radius: 6px 0 6px 0; color: var(--v2-muted); background: var(--v2-surface); font-size: 10px; white-space: nowrap; }
.user-body .asset-picker-media-modes button:hover, .user-body .asset-picker-media-modes button.active { border-color: var(--v2-primary); color: var(--v2-primary); background: var(--v2-primary-soft); }
.user-body .asset-picker-media-modes button small { font-size: 9px; opacity: .8; }

.user-body .assets-toolbar { align-items: center; }
.user-body .category-tabs { min-width: 0; max-width: 100%; overflow-x: auto; }
.user-body .assets-toolbar { flex-wrap: wrap; }
.user-body .assets-toolbar .category-tabs { flex: 1 0 100%; }
.user-body .assets-toolbar .category-filter-field { flex: 1 0 100%; width: auto; margin-left: 0; box-sizing: border-box; }
.user-body .assets-toolbar .category-filter-field select { flex: 1; min-width: 0; width: 1px; }
.user-body .assets-toolbar .category-filter-field #createAssetCategory { height: 30px; min-height: 30px; margin-left: 8px; padding: 0 12px; font-size: 13px; font-weight: 650; }
.user-body .category-field, .user-body .category-filter-field { height: 38px; display: flex; align-items: center; gap: 7px; margin-left: auto; padding: 0 9px; border: 1px solid var(--v2-line); border-radius: 7px; background: var(--v2-surface); color: var(--v2-muted); font-size: 10px; white-space: nowrap; }
.user-body .category-filter-field { margin-left: 0; }
.user-body .category-field input { width: 100px; border: 0; outline: 0; color: var(--v2-ink); background: transparent; font-size: 10px; }
.user-body .category-filter-field select { border: 0; outline: 0; color: var(--v2-ink); background: transparent; font-size: 10px; }
.user-body .asset-gallery { display: grid; grid-template-columns: repeat(5, minmax(150px, 1fr)); gap: 12px; }
.user-body .asset-card { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; overflow: hidden; padding: 0; border-radius: 7px; }
.user-body .asset-card .asset-image { grid-column: 1 / -1; aspect-ratio: 4 / 3; border-radius: 0; }
.user-body .asset-card .asset-copy { min-width: 0; overflow: hidden; padding: 10px 8px 10px 11px; }
.user-body .asset-card .asset-copy strong, .user-body .asset-card .asset-copy small { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-body .asset-card .asset-menu { position: relative; z-index: 1; align-self: center; display: flex; align-items: center; gap: 2px; padding-right: 8px; }
.user-body .asset-card .asset-menu .icon-button { width: 29px; height: 29px; border: 0; background: transparent; }
.user-body .asset-card .asset-menu .icon-button:last-child:hover { color: var(--v2-danger); background: color-mix(in srgb, var(--v2-danger) 9%, transparent); }
.user-body .assets-toolbar .secondary { min-height: 38px; display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; white-space: nowrap; }
.user-body .asset-bulk-bar { min-height: 46px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 12px; padding: 8px 10px; border: 1px solid var(--v2-line); border-radius: 7px; background: var(--v2-surface); }
.user-body .asset-bulk-bar[hidden] { display: none; }
.user-body .asset-bulk-bar span { margin-right: auto; color: var(--v2-ink); font-size: 12px; font-weight: 700; }
.user-body .asset-bulk-bar .secondary, .user-body .asset-bulk-bar .danger-text { min-height: 32px; display: inline-flex; align-items: center; gap: 5px; padding: 0 10px; font-size: 11px; }
.user-body .asset-card.is-selectable { cursor: pointer; }
.user-body .asset-card.is-selected { border-color: var(--v2-primary); background: var(--v2-primary-soft); box-shadow: inset 0 0 0 1px var(--v2-primary); }
.user-body .asset-card .library-check { position: absolute; top: 10px; right: 10px; z-index: 3; width: 20px; height: 20px; margin: 0; accent-color: var(--v2-primary); }
.user-body .asset-gallery.selecting .asset-card { position: relative; }
.user-body .asset-gallery.selecting .asset-menu { display: none; }
.user-body .category-dialog { width: min(460px, calc(100% - 32px)); }
.user-body .category-dialog-body { display: grid; gap: 14px; padding: 16px 20px 8px; }
.user-body .category-choice-list { display: flex; flex-wrap: wrap; gap: 7px; }
.user-body .category-choice-list button { min-height: 34px; padding: 0 12px; border: 1px solid var(--v2-line); border-radius: 6px 0 6px 0; color: var(--v2-muted); background: var(--v2-surface); }
.user-body .category-choice-list button.active { border-color: var(--v2-primary); color: var(--v2-primary); background: var(--v2-primary-soft); }
.user-body .category-new-field { display: grid; gap: 6px; color: var(--v2-muted); font-size: 11px; }
.user-body .category-new-field input { height: 38px; padding: 0 11px; border: 1px solid var(--v2-line); border-radius: 7px; color: var(--v2-ink); background: var(--v2-surface-soft); }

@media (max-width: 1180px) {
  .user-body .asset-gallery { grid-template-columns: repeat(4, minmax(140px, 1fr)); }
  .user-body .composer.chat-mode { grid-template-columns: 190px minmax(400px, 1fr); }
  .user-body .composer.chat-mode > .composer-panel { display: none; }
}
@media (max-width: 800px) {
  .user-body .workspace > header { padding: 0 14px; gap: 9px; }
  .user-body .page-title p { display: none; }
  .user-body .top-actions { gap: 5px; }
  .user-body .top-actions .theme-toggle { width: 48px; }
  .user-body .top-actions .theme-toggle-track { transform: scale(.82); }
  .user-body .credit-button { min-height: 36px; }
  .user-body .account-button { min-height: 36px; padding-right: 5px; }
  .user-body .account-button > svg { display: none; }
  .user-body .account-menu { top: 58px; right: 14px; }
  .user-body .credits-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 20px; }
  .user-body .credit-stat, .user-body .credit-recharge-card { min-height: 108px; padding: 15px; }
  .user-body .credit-stat strong { font-size: 24px; }
  .user-body .credit-recharge-card { grid-column: 1 / -1; min-height: 76px; }
  .user-body .credits-heading { align-items: flex-end; }
  .user-body .ledger-account { max-width: 42%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; }
  .user-body .ledger-row { grid-template-columns: 36px minmax(0, 1fr) auto; gap: 9px; padding: 10px; }
  .user-body .ledger-icon { width: 32px; height: 32px; }
  .user-body .ledger-copy small { font-size: 9px; }
  .user-body .ledger-balance strong { font-size: 11px; }
  .user-body .ledger-balance small { font-size: 9px; }
  .user-body .composer.chat-mode { height: calc(100vh - 132px); min-height: 560px; grid-template-columns: 1fr; }
  .user-body .composer.chat-mode > .conversation-rail { display: none; }
  .user-body .composer.chat-mode > .conversation-rail.mobile-open { position: fixed; z-index: 42; top: 0; bottom: 0; left: 0; width: min(86vw, 340px); height: 100dvh; display: block; padding: 0 11px 18px; border-right: 1px solid var(--v2-line-strong); box-shadow: 18px 0 44px rgba(0, 0, 0, .28); }
  .user-body .conversation-rail-mobile-head { position: sticky; z-index: 3; top: 0; min-height: 64px; display: flex; align-items: center; justify-content: space-between; margin: 0 -11px 12px; padding: 0 14px; border-bottom: 1px solid var(--v2-line); background: var(--v2-surface-muted); }
  .user-body .conversation-rail-mobile-head strong { font-size: 16px; }
  .user-body .conversation-rail-mobile-head button { width: 36px; height: 36px; display: grid; place-items: center; padding: 0; border: 1px solid var(--v2-line); border-radius: 6px 0 6px 0; color: var(--v2-ink); background: var(--v2-surface); }
  .user-body .conversation-rail-backdrop:not([hidden]) { position: fixed; z-index: 41; inset: 0; display: block; border: 0; border-radius: 0; background: rgba(0, 0, 0, .45); }
  .user-body .mobile-conversation-switcher { display: inline-flex !important; }
  .user-body .composer.chat-mode .chat-head { min-width: 0; gap: 8px; padding: 10px 12px; }
  .user-body .composer.chat-mode .chat-head > div:first-child { flex: 1 1 auto; overflow: hidden; }
  .user-body .composer.chat-mode .chat-head > div:first-child strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .user-body .chat-head-actions { flex: 0 0 auto; gap: 5px; }
  .user-body .chat-head-actions button { min-width: 36px; height: 36px; justify-content: center; padding: 0 8px; }
  .user-body .chat-head-actions button span, .user-body .chat-head-actions button em { display: none; }
  .user-body .composer:not(.chat-mode) .composer-assets { width: calc(100% - 18px); max-width: calc(100% - 18px); min-width: 0; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; }
  .user-body .composer:not(.chat-mode) .selected-asset-strip { width: max-content; min-width: max-content; flex: 0 0 auto; flex-wrap: nowrap; }
  .user-body .composer:not(.chat-mode) .selected-asset-strip .selected-asset { flex: 0 0 64px; width: 64px; }
  .user-body .composer:not(.chat-mode) .selected-asset-strip .selected-asset-preview { width: 64px; height: 54px; }
  .user-body .composer.chat-mode > .composer-panel { display: none; }
  .user-body .history-table-head { display: none; }
  .user-body .history-row { grid-template-columns: minmax(0, 1fr) auto; min-height: 94px; padding: 10px 12px 32px 94px; }
  .user-body .history-work { display: block; }
  .user-body .history-work > .task-thumbnail, .user-body .history-work > .task-kind { position: absolute; left: 10px; top: 10px; width: 76px; height: 72px; }
  .user-body .history-spec { grid-column: 1; margin-top: 5px; }
  .user-body .history-row > .status-pill { position: absolute; right: 12px; top: 12px; }
  .user-body .history-time { display: block; grid-column: 1 / -1; margin: 8px 110px 0 0; }
  .user-body .history-time-details { justify-content: flex-start; }
  .user-body .history-time-details > span { overflow: visible; }
  .user-body .row-actions { position: absolute; right: 8px; bottom: 5px; }
  .user-body .history-error { left: 94px; bottom: 5px; right: 110px; }
  .user-body .assets-toolbar { flex-wrap: wrap; }
  .user-body .category-tabs { width: 100%; order: 1; }
  .user-body .category-field { margin-left: 0; order: 2; flex: 1; }
  .user-body .category-filter-field { order: 3; }
  .user-body .assets-toolbar .secondary { order: 4; }
  .user-body .assets-toolbar .upload-button { order: 5; margin-left: auto; }
  .user-body .asset-bulk-bar { order: 6; width: 100%; }
  .user-body .asset-gallery { grid-template-columns: repeat(3, minmax(120px, 1fr)); }
}
@media (max-width: 520px) {
  .user-body .top-actions .credit-button { padding-inline: 7px; }
  .user-body .credits-overview { grid-template-columns: 1fr 1fr; }
  .user-body .credit-stat { padding: 13px; }
  .user-body .credit-stat span { font-size: 10px; }
  .user-body .credit-stat small { font-size: 9px; }
  .user-body .ledger-row { grid-template-columns: 32px minmax(0, 1fr); }
  .user-body .ledger-balance { grid-column: 2; text-align: left; }
  .user-body .ledger-balance small { display: inline-block; margin-left: 6px; }
  .user-body .history-toolbar { align-items: stretch; flex-direction: column; }
  .user-body .history-toolbar .filter-tabs { width: 100%; min-width: 0; flex-wrap: wrap; }
  .user-body .history-toolbar .filter-tabs button { flex: 1; justify-content: center; padding-inline: 5px; }
  .user-body .history-row { grid-template-columns: minmax(0, 1fr); }
  .user-body .history-spec { grid-column: 1; }
  .user-body .asset-gallery { grid-template-columns: repeat(2, minmax(130px, 1fr)); }
  .user-body .category-field { min-width: 0; }
  .user-body .category-field input { width: 76px; }
}

/* User-facing text hierarchy refinement. Keep metadata compact without
   reducing important labels to caption-sized text. */
:root {
  --v2-soft: #71807a;
}

html.theme-dark {
  --v2-soft: #899892;
}

.user-body {
  font-size: 14px;
  line-height: 1.5;
}

.user-body button,
.user-body input,
.user-body textarea,
.user-body select {
  line-height: 1.35;
}

.user-body .nav-label {
  color: #8d9994;
  font-size: 12px;
  font-weight: 650;
}

.user-body .nav-item {
  font-size: 13px;
}

.user-body .help-row {
  font-size: 12px;
}

.user-body .user-card small {
  color: #9aa7a1;
  font-size: 11px;
}

.user-body .page-title h1 {
  font-size: 20px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.user-body .page-title p {
  color: var(--v2-muted);
  font-size: 13px;
  line-height: 1.45;
}

.user-body .credit-button,
.user-body .account-button {
  font-size: 12px;
}

.user-body .credit-button strong {
  font-size: 14px;
}

.user-body .mode-tabs button {
  font-size: 13px;
}

.user-body .section-kicker h2,
.user-body .panel-title h2 {
  font-size: 16px;
  line-height: 1.4;
}

.user-body .section-kicker p {
  color: var(--v2-muted);
  font-size: 13px;
  line-height: 1.6;
}

.user-body .field-label,
.user-body .generation-field legend,
.user-body .reasoning-control {
  color: var(--v2-muted);
  font-size: 12px;
}

.user-body .model-button > span {
  font-size: 11px;
}

.user-body .model-button > strong {
  font-size: 13px;
  line-height: 1.35;
}

.user-body .model-button > small {
  font-size: 11px;
}

.user-body .generation-option-buttons button,
.user-body .composer-asset-button,
.user-body .composer:not(.chat-mode) .composer-asset-button,
.user-body .composer.chat-mode .chat-attachment-action {
  font-size: 11px;
}

.user-body .selected-asset small,
.user-body .composer:not(.chat-mode) .selected-asset-strip .selected-asset small,
.user-body .composer.chat-mode .chat-selected-assets .selected-asset small {
  color: var(--v2-muted);
  font-size: 10px;
  line-height: 1.25;
}

.user-body .prompt-box textarea {
  font-size: 14px;
  line-height: 1.75;
}

.user-body .prompt-footer,
.user-body .prompt-footer > span {
  font-size: 12px;
}

.user-body .prompt-footer small {
  color: var(--v2-muted);
  font-size: 11px;
}

.user-body .secondary,
.user-body .result-button,
.user-body .cancel-button,
.user-body .primary,
.user-body .upload-button {
  font-size: 13px;
  line-height: 1.35;
}

.user-body .submit-note {
  color: var(--v2-muted);
  font-size: 11px;
  line-height: 1.45;
}

.user-body .task-message {
  font-size: 12px;
  line-height: 1.45;
}

.user-body .chat-tools > span {
  font-size: 11px;
}

.user-body .composer.chat-mode .chat-head strong {
  font-size: 17px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.user-body .composer.chat-mode .chat-head small {
  font-size: 12px;
}

.user-body .composer.chat-mode .chat-markdown {
  font-size: 14px;
  line-height: 1.8;
}

.user-body .composer.chat-mode .chat-message p {
  line-height: 1.8;
}

.user-body .composer.chat-mode .chat-message-asset {
  font-size: 12px;
}

.user-body .composer.chat-mode .chat-asset-copy strong {
  font-size: 11px;
}

.user-body .composer.chat-mode .chat-asset-copy small {
  font-size: 10px;
}

.user-body .composer.chat-mode .chat-processing-title strong {
  font-size: 14px;
}

.user-body .chat-processing-steps span {
  font-size: 11px;
}

.user-body .composer.chat-mode .chat-processing p {
  font-size: 12px;
}

.user-body .section-heading h2 {
  font-size: 18px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.user-body .section-heading p {
  color: var(--v2-muted);
  font-size: 12px;
  line-height: 1.55;
}

.user-body .text-button {
  font-size: 12px;
  line-height: 1.35;
  white-space: nowrap;
}

.user-body .empty-state {
  font-size: 13px;
  line-height: 1.5;
}

.user-body .empty-state strong {
  font-size: 14px;
}

.user-body .recent-task-copy strong {
  font-size: 13px;
  line-height: 1.4;
}

.user-body .recent-task-copy p {
  font-size: 12px;
  line-height: 1.45;
}

.user-body .recent-task-copy em {
  font-size: 11px;
}

.user-body .task-row p {
  font-size: 12px;
  line-height: 1.45;
}

.user-body .task-row small {
  font-size: 11px;
}

.user-body .status,
.user-body .status-pill {
  font-size: 11px;
  line-height: 1.25;
}

.user-body .history-table-head {
  font-size: 11px;
}

.user-body .history-name strong,
.user-body .history-spec strong,
.user-body .history-time strong {
  font-size: 12px;
  line-height: 1.4;
}

.user-body .history-name small,
.user-body .history-spec small,
.user-body .history-time small {
  color: var(--v2-muted);
  font-size: 11px;
  line-height: 1.35;
}

.user-body .history-error {
  font-size: 11px;
}

.user-body .credit-stat span {
  font-size: 12px;
}

.user-body .credit-stat small {
  font-size: 11px;
  line-height: 1.45;
}

.user-body .credit-recharge-card > span {
  font-size: 11px;
}

.user-body .credit-recharge-card > strong {
  font-size: 17px;
}

.user-body .ledger-account {
  font-size: 11px;
}

.user-body .filter-tabs button {
  font-size: 12px;
}

.user-body .filter-tabs button span {
  font-size: 10px;
}

.user-body .ledger-copy strong,
.user-body .ledger-balance strong {
  font-size: 13px;
  line-height: 1.4;
}

.user-body .ledger-copy small,
.user-body .ledger-balance small {
  color: var(--v2-muted);
  font-size: 11px;
  line-height: 1.35;
}

.user-body .balance-band span,
.user-body .balance-band small,
.user-body .recharge-intro span,
.user-body .recharge-intro small {
  font-size: 12px;
  line-height: 1.45;
}

.user-body .asset-toolbar label {
  font-size: 12px;
}

.user-body .asset-toolbar input,
.user-body .asset-toolbar select {
  font-size: 13px;
}

.user-body .category-field,
.user-body .category-filter-field,
.user-body .category-field input,
.user-body .category-filter-field select {
  font-size: 11px;
}

.user-body .asset-item strong {
  font-size: 13px;
  line-height: 1.4;
}

.user-body .asset-item small {
  color: var(--v2-muted);
  font-size: 11px;
  line-height: 1.35;
}

.user-body .asset-actions button {
  font-size: 12px;
}

.user-body .recharge-intro strong {
  font-size: 30px;
}

.user-body .plan-item b {
  font-size: 23px;
}

.user-body .plan-item span {
  font-size: 12px;
}

.user-body .recharge-plan { min-width: 0; gap: 16px; padding: 20px; transition: border-color .15s ease, background-color .15s ease; }
.user-body .recharge-plan.has-bonus { border-color: color-mix(in srgb, var(--v2-primary) 55%, var(--v2-line)); }
.user-body .recharge-plan-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; min-height: 28px; }
.user-body .recharge-plan-heading > span { color: var(--v2-muted); }
.user-body .recharge-plan-heading .recharge-bonus-badge { padding: 5px 8px; border-radius: 5px; background: var(--v2-primary-soft); color: var(--v2-primary); font-weight: 600; }
.user-body .recharge-pay-amount { font-size: 28px; line-height: 1.2; overflow-wrap: anywhere; }
.user-body .recharge-breakdown { margin: 0; padding-top: 12px; border-top: 1px solid var(--v2-line); display: grid; gap: 10px; }
.user-body .recharge-breakdown > div { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.user-body .recharge-breakdown dt { color: var(--v2-muted); font-size: 12px; }
.user-body .recharge-breakdown dd { margin: 0; font-size: 14px; font-weight: 600; overflow-wrap: anywhere; text-align: right; }
.user-body .has-bonus .recharge-breakdown dd { color: var(--v2-primary); }
.user-body .recharge-plan > button { margin-top: 2px; min-height: 42px; }
@media (max-width: 600px) { .user-body #rechargePlans { grid-template-columns: minmax(0, 1fr); } }

.user-body .payment-status-note {
  font-size: 13px;
  line-height: 1.5;
}

.user-body .dialog-heading h2 {
  font-size: 18px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.user-body .dialog-heading p {
  font-size: 12px;
  line-height: 1.5;
}

.user-body .model-dialog-toolbar input {
  font-size: 13px;
}

.user-body .model-dialog-toolbar > div span,
.user-body .model-dialog-toolbar > div small {
  font-size: 11px;
}

.user-body .model-option > strong:first-child {
  font-size: 14px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.user-body .model-option span {
  font-size: 12px;
  line-height: 1.35;
}

.user-body .model-option strong:last-child {
  font-size: 12px;
}

/* Name, kind and price have explicit tracks; no space is reserved for removed actions. */
.user-body .model-option {
  grid-template-columns: minmax(0, 1fr) fit-content(260px);
  column-gap: 12px;
  padding-right: 16px;
  align-items: center;
  min-width: 0;
}
.user-body .model-option > .model-option-name { grid-column: 1; grid-row: 1; min-width: 0; }
.user-body .model-option > .model-option-kind { grid-column: 1; grid-row: 2; min-width: 0; }
.user-body .model-option > strong.model-option-price {
  grid-column: 2;
  grid-row: 1 / 3;
  padding-right: 0;
  text-align: right;
  min-width: 0;
  max-width: 100%;
  font-size: 12px;
  color: var(--v2-coral);
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.4;
}
.user-body .model-option > .model-default-button {
  position: static;
  transform: none;
  grid-column: 3;
  grid-row: 1 / 3;
  width: 32px;
  height: 32px;
  padding: 0;
  display: grid;
  place-items: center;
  color: var(--v2-muted);
}
.user-body .model-option > .model-default-button:hover,
.user-body .model-option > .model-default-button.active { color: #e0a52b; }
.user-body .model-option.active::after { display: none; }
@media (max-width: 600px) {
  .user-body .model-option { grid-template-columns: minmax(0, 1fr); }
  .user-body .model-option > strong.model-option-price {
    grid-column: 1;
    grid-row: 3;
    text-align: left;
    max-width: 100%;
  }
}
.user-body #modelDialog[open] { display: flex; flex-direction: column; max-height: min(720px, calc(100dvh - 24px)); }
.user-body .model-option.model-option-compact { min-height: 0; grid-template-columns: minmax(0, 1fr) fit-content(260px); padding-top: 11px; padding-bottom: 11px; gap: 0 12px; }
.user-body .model-option-compact > .model-option-name { grid-column: 1; grid-row: 1; align-self: center; }
.user-body .model-option-compact > strong.model-option-price { grid-column: 2; grid-row: 1; align-self: center; text-align: right; }
.user-body #modelDialog > .dialog-heading, .user-body #modelDialog > .model-dialog-toolbar { flex: 0 0 auto; }
.user-body #modelDialogBody { flex: 1 1 auto; min-height: 0; overflow: hidden; }
.user-body #modelList { min-width: 0; min-height: 0; grid-auto-rows: max-content; align-content: start; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; }

.user-body .dialog-footer button {
  font-size: 13px;
}

.user-body .asset-picker-category-label {
  font-size: 12px;
}

.user-body .asset-picker-categories button,
.user-body .asset-picker-media-modes button {
  font-size: 11px;
}

.user-body .asset-picker-media-modes button small {
  font-size: 10px;
}

.user-body .asset-mention-trigger,
.user-body .composer.chat-mode .asset-mention-trigger {
  font-size: 11px;
}

.user-body .asset-mention-copy strong {
  font-size: 11px;
}

.user-body .asset-mention-copy small {
  color: var(--v2-muted);
  font-size: 10px;
}

.user-body .asset-mention-empty {
  font-size: 11px;
}

.user-body .chat-context-content .context-heading strong {
  font-size: 14px;
}

.user-body .chat-context-content dl div {
  font-size: 11px;
  line-height: 1.4;
}

.user-body .context-assets strong {
  font-size: 11px;
}

.user-body .context-assets small {
  font-size: 10px;
}

.user-body .context-price span {
  font-size: 10px;
}

.user-body .context-price strong {
  font-size: 13px;
}

.user-body .context-price small {
  font-size: 10px;
  line-height: 1.45;
}

.user-body .new-chat,
.user-body .import-chat {
  font-size: 13px;
}

.user-body .conversation-rail > p {
  font-size: 13px;
}

.user-body .conversation-item strong {
  font-size: 14px;
  line-height: 1.4;
}

.user-body .conversation-item small {
  font-size: 11px;
}

.user-body .conversation-action-menu button {
  font-size: 13px;
}

html.theme-dark .status-pill.progress {
  color: #f0cb73;
  background: #3a321f;
}

html.theme-dark .status-pill.danger {
  color: #ff9c9c;
  background: #452727;
}

@media (max-width: 800px) {
  .user-body .page-title h1 {
    font-size: 18px;
  }

  .user-body .page-title p {
    display: none;
  }

  .user-body .mode-tabs button {
    font-size: 12px;
  }

  .user-body .section-heading h2 {
    font-size: 17px;
  }

  .user-body .section-heading p {
    font-size: 11px;
  }

  .user-body .history-name strong,
  .user-body .history-spec strong {
    font-size: 12px;
  }

  .user-body .ledger-copy strong,
  .user-body .ledger-balance strong {
    font-size: 12px;
  }
}

@media (max-width: 520px) {
  .user-body .composer-workspace,
  .user-body .composer-panel {
    padding: 15px;
  }

  .user-body .section-kicker h2,
  .user-body .panel-title h2 {
    font-size: 15px;
  }

  .user-body .section-kicker p {
    font-size: 12px;
  }

  .user-body .prompt-box textarea {
    font-size: 14px;
  }

  .user-body .dialog-heading h2 {
    font-size: 17px;
  }

  .user-body .dialog-heading p {
    font-size: 11px;
  }

  .user-body .conversation-item strong {
    font-size: 13px;
  }
}

/* Final readability pass for authentication and compact metadata. */
.user-body .brand-copy > span {
  font-size: 13px;
}

.user-body .brand-foot {
  color: #7f8d87;
  font-size: 11px;
}

.user-body .auth-box .subtle {
  font-size: 13px;
  line-height: 1.5;
}

.user-body .auth-box label {
  font-size: 13px;
}

.user-body .auth-legal {
  color: var(--v2-muted);
  font-size: 11px;
  line-height: 1.5;
}

.user-body .account-menu > small {
  font-size: 11px;
  line-height: 1.4;
}

.user-body .account-menu > button {
  font-size: 12px;
}

.user-body .media-thumbnail.video > span {
  font-size: 10px;
}

.user-body .composer.chat-mode .process-line {
  font-size: 11px;
  line-height: 1.4;
}

/* Highlight referenced assets without changing the textarea value, caret, or
   one-key mention deletion behavior. */
.user-body .prompt-editor {
  position: relative;
  width: 100%;
}

.user-body .prompt-highlight {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 1;
  overflow: hidden;
  padding: 15px;
  color: var(--v2-ink);
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.75;
  letter-spacing: 0;
  text-align: left;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  pointer-events: none;
}

.user-body .prompt-highlight .prompt-mention {
  color: var(--v2-primary);
  background: color-mix(in srgb, var(--v2-primary) 12%, transparent);
  border-radius: 3px;
}

.user-body .prompt-editor > textarea {
  position: relative;
  z-index: 2;
  margin: 0;
  color: transparent;
  -webkit-text-fill-color: transparent;
  caret-color: var(--v2-ink);
  background: transparent;
}

.user-body .prompt-editor > textarea::placeholder {
  color: var(--v2-soft);
  -webkit-text-fill-color: var(--v2-soft);
  opacity: 1;
}

.user-body .prompt-editor > textarea::selection {
  color: transparent;
  -webkit-text-fill-color: transparent;
  background-color: rgba(19, 123, 96, 0.28);
}

.user-body .prompt-highlight {
  -webkit-user-select: none;
  user-select: none;
}

.user-body .chat-avatar,
.user-body .chat-message-label,
.user-body .chat-message-assets,
.user-body .chat-tool-card,
.user-body .process-line {
  -webkit-user-select: none;
  user-select: none;
}

.user-body .chat-markdown,
.user-body .chat-markdown * {
  -webkit-user-select: text;
  user-select: text;
}

.user-body .chat-message,
.user-body .chat-message .chat-message-body,
.user-body .chat-message .chat-markdown {
  -webkit-user-select: text;
  user-select: text;
} 

.user-body .chat-avatar *,
.user-body .chat-message-label *,
.user-body .chat-message-assets *,
.user-body .chat-tool-card *,
.user-body .process-line *,
.user-body .chat-processing-title,
.user-body .chat-processing-title *,
.user-body .chat-processing-steps,
.user-body .chat-processing-steps * {
  -webkit-user-select: none;
  user-select: none;
}

.user-body .composer.chat-mode .chat-message-body > :not(.chat-markdown),
.user-body .composer.chat-mode .chat-message-body > :not(.chat-markdown) * {
  -webkit-user-select: none;
  user-select: none;
}

.user-body .chat-markdown {
  -webkit-user-select: text;
  user-select: text;
}

.user-body .chat-markdown * {
  -webkit-user-select: text;
  user-select: text;
}

.user-body .chat-markdown::selection,
.user-body .chat-markdown ::selection {
  color: #10241c;
  background-color: #8fd4be;
}

.user-body .chat-markdown::-moz-selection,
.user-body .chat-markdown ::-moz-selection {
  color: #10241c;
  background-color: #8fd4be;
}

/* Keep selected chat text visibly highlighted in every message element. */
.user-body .chat-message::selection,
.user-body .chat-message *::selection {
  color: #10241c;
  background-color: #8fd4be;
}

.user-body .chat-message::-moz-selection,
.user-body .chat-message *::-moz-selection {
  color: #10241c;
  background-color: #8fd4be;
}

html.theme-dark .user-body .prompt-editor > textarea::selection {
  background-color: rgba(182, 255, 230, 0.55);
}

html.theme-dark .user-body .chat-markdown::selection,
html.theme-dark .user-body .chat-markdown ::selection {
  color: #062018;
  background-color: #b6ffe6;
}

html.theme-dark .user-body .chat-markdown::-moz-selection,
html.theme-dark .user-body .chat-markdown ::-moz-selection {
  color: #062018;
  background-color: #b6ffe6;
}

html.theme-dark .user-body .chat-message::selection,
html.theme-dark .user-body .chat-message *::selection {
  color: #062018;
  background-color: #b6ffe6;
}

html.theme-dark .user-body .chat-message::-moz-selection,
html.theme-dark .user-body .chat-message *::-moz-selection {
  color: #062018;
  background-color: #b6ffe6;
}

.user-body .inline-asset-mention {
  padding: 1px 3px;
  border-radius: 4px;
  color: var(--v2-primary);
  background: var(--v2-primary-soft);
  font-weight: 700;
  white-space: nowrap;
}

.user-body .selected-asset small,
.user-body .composer:not(.chat-mode) .selected-asset-strip .selected-asset small,
.user-body .composer.chat-mode .chat-selected-assets .selected-asset small {
  color: var(--v2-primary);
  font-weight: 700;
}

/* Account settings: avatar, nickname and password management. */
.user-body .account-settings-dialog {
  width: min(560px, calc(100% - 32px));
}

.user-body .account-settings-body {
  display: grid;
  gap: 4px;
  padding: 6px 20px 18px;
}

.user-body .account-settings-section {
  display: grid;
  gap: 10px;
  padding: 16px 0;
  border-bottom: 1px solid var(--v2-line);
}

.user-body .account-settings-section:last-of-type {
  border-bottom: 0;
}

.user-body .account-settings-section h3 {
  margin: 0;
  color: var(--v2-ink);
  font-size: 13px;
  font-weight: 700;
}

.user-body .account-settings-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.user-body .account-settings-inline input {
  flex: 1 1 180px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--v2-line);
  border-radius: 7px;
  color: var(--v2-ink);
  background: var(--v2-surface);
  font-size: 13px;
}

.user-body .account-settings-inline button {
  min-height: 38px;
  padding: 0 16px;
  border-radius: 7px;
  font-size: 13px;
  white-space: nowrap;
}

.user-body .account-avatar-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.user-body .account-avatar-preview {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  color: #16352b;
  background: #68c9a7;
  font-size: 22px;
  font-weight: 800;
}

.user-body .account-avatar-preview img,
.user-body .account-button > span img,
.user-body .user-card > span img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.user-body .account-avatar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.user-body .account-avatar-actions button {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  border-radius: 7px;
  font-size: 13px;
}

.user-body .account-settings-hint {
  color: var(--v2-muted);
  font-size: 12px;
}

.user-body .account-settings-message {
  margin: 4px 0 0;
  padding: 10px 12px;
  border-radius: 7px;
  color: var(--v2-primary);
  background: var(--v2-primary-soft);
  font-size: 12px;
}

.user-body .account-settings-message.is-error {
  color: var(--v2-danger);
  background: rgba(214, 96, 96, 0.12);
}

.user-body .user-card > span {
  overflow: hidden;
}

/* Crystal light theme: approved visual scheme 5. */
:root {
  --v2-bg: #edf6f7;
  --v2-surface: #fcffff;
  --v2-surface-soft: #f2f9f9;
  --v2-surface-muted: #e2eff0;
  --v2-ink: #102b31;
  --v2-muted: #59747a;
  --v2-soft: #81979c;
  --v2-line: #cfe0e3;
  --v2-line-strong: #b3ced3;
  --v2-primary: #067d89;
  --v2-primary-dark: #075f69;
  --v2-primary-soft: #daf2f3;
  --v2-coral: #e06452;
  --v2-danger: #c53d48;
  --v2-sidebar: #092127;
  --v2-sidebar-soft: #153b42;
  --v2-shadow: 0 26px 74px rgba(7, 69, 78, .17);
}

html.theme-dark {
  --v2-bg: #0c1d22;
  --v2-surface: #14292f;
  --v2-surface-soft: #193138;
  --v2-surface-muted: #213b42;
  --v2-ink: #effbfc;
  --v2-muted: #98b3b8;
  --v2-soft: #708d93;
  --v2-line: #2d4c53;
  --v2-line-strong: #40636b;
  --v2-primary: #59d5dc;
  --v2-primary-dark: #3db8c0;
  --v2-primary-soft: #123f45;
  --v2-coral: #ff8d78;
  --v2-danger: #f07d86;
  --v2-sidebar: #06171b;
  --v2-sidebar-soft: #12333a;
  --v2-shadow: 0 30px 78px rgba(0, 0, 0, .4);
}

body.user-body {
  background-color: var(--v2-bg);
  background-image: linear-gradient(color-mix(in srgb, var(--v2-primary) 6%, transparent) 1px, transparent 1px), linear-gradient(90deg, color-mix(in srgb, var(--v2-primary) 6%, transparent) 1px, transparent 1px);
  background-size: 24px 24px;
  animation: crystal-grid-drift 20s linear infinite;
}

.user-body .auth-shell,
.user-body .app-shell {
  position: relative;
  isolation: isolate;
  animation: crystal-materialize .65s cubic-bezier(.16, .8, .25, 1) both;
}

.user-body .auth-shell::before,
.user-body .app-shell::before {
  content: "";
  position: fixed;
  z-index: 60;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  pointer-events: none;
  background: var(--v2-primary);
  box-shadow: 0 0 18px var(--v2-primary);
  opacity: .22;
  animation: none;
}

.user-body .brand-panel {
  background-color: #082228;
  background-image: repeating-linear-gradient(0deg, transparent 0, transparent 5px, rgba(106, 223, 229, .025) 6px);
}

.user-body .brand-panel::before {
  content: "";
  position: absolute;
  z-index: 0;
  left: 0;
  right: 0;
  top: -20%;
  height: 22%;
  pointer-events: none;
  background: linear-gradient(transparent, rgba(82, 211, 220, .14), transparent);
  animation: crystal-panel-scan 8s linear infinite;
}

.user-body .brand-panel::after {
  content: "01  /  CREATIVE SYSTEM   02  /  VISUAL INTELLIGENCE   03  /  SYNC";
  position: absolute;
  right: 25px;
  bottom: 18px;
  display: block;
  color: rgba(115, 222, 227, .23);
  font: 600 9px/1 monospace;
  writing-mode: vertical-rl;
  letter-spacing: 0;
}

.user-body .brand-copy > span { color: #65dce2; font-weight: 750; }
.user-body .brand-copy h1 { font-weight: 780; text-shadow: 0 0 34px rgba(83, 211, 220, .16); }
.user-body .brand-copy p { color: #abc3c7; }
.user-body .auth-mosaic img { filter: saturate(.92) contrast(1.04); transition: transform .5s cubic-bezier(.17, .84, .3, 1), filter .4s ease, box-shadow .4s ease; }
.user-body .auth-mosaic img:hover { transform: translateY(-6px) scale(1.018); filter: saturate(1.15); box-shadow: 0 0 0 1px rgba(89, 213, 220, .5), 0 18px 40px rgba(0, 0, 0, .32); }
.user-body .auth-box { animation: crystal-content-in .65s .12s ease both; }

.user-body .login-options {
  min-height: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: -4px 0 14px;
}
.user-body .login-options > label { display: inline-flex; align-items: center; gap: 7px; margin: 0; color: var(--v2-muted); font-size: 12px; font-weight: 500; cursor: pointer; }
.user-body .login-options input { width: 16px; height: 16px; margin: 0; padding: 0; accent-color: var(--v2-primary); }
.user-body .login-options .auth-text-button { margin: 0; }

.user-body button,
.user-body input,
.user-body textarea,
.user-body select,
.user-body article {
  transition: color .2s ease, background-color .2s ease, border-color .2s ease, box-shadow .3s ease, transform .3s cubic-bezier(.17, .84, .3, 1);
}

.user-body .auth-box input:focus,
.user-body .prompt-box:focus-within {
  border-color: var(--v2-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--v2-primary) 13%, transparent), 0 0 28px color-mix(in srgb, var(--v2-primary) 15%, transparent);
}

.user-body .primary { position: relative; overflow: hidden; box-shadow: 0 10px 28px color-mix(in srgb, var(--v2-primary) 28%, transparent); }
.user-body .primary::before { content: ""; position: absolute; left: -35%; top: 0; width: 25%; height: 100%; pointer-events: none; background: rgba(255, 255, 255, .28); transform: skewX(-20deg); filter: blur(4px); animation: crystal-button-sweep 3.8s ease-in-out infinite; }
.user-body .primary:hover { transform: translateY(-2px) scale(1.006); box-shadow: 0 16px 38px color-mix(in srgb, var(--v2-primary) 34%, transparent); }

.user-body .auth-announcement,
.user-body .announcement-banner { position: relative; overflow: hidden; }
.user-body .auth-announcement::before,
.user-body .announcement-banner::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--v2-primary); box-shadow: 0 0 13px var(--v2-primary); animation: crystal-signal 2.2s ease-in-out infinite; }

.user-body .sidebar { box-shadow: 10px 0 34px rgba(3, 24, 29, .1); }
.user-body .nav-item:hover,
.user-body .help-row:hover { transform: translateX(4px); }
.user-body .nav-item.active { background: linear-gradient(90deg, color-mix(in srgb, var(--v2-primary) 18%, var(--v2-sidebar-soft)), var(--v2-sidebar-soft)); box-shadow: inset 3px 0 var(--v2-primary), 0 0 24px color-mix(in srgb, var(--v2-primary) 10%, transparent); }
.user-body .user-card > span,
.user-body .account-button > span { box-shadow: 0 0 0 3px color-mix(in srgb, var(--v2-primary) 12%, transparent), 0 0 22px color-mix(in srgb, var(--v2-primary) 28%, transparent); animation: crystal-avatar 3s ease-in-out infinite; }

.user-body .workspace > header { border-bottom-color: color-mix(in srgb, var(--v2-primary) 18%, var(--v2-line)); backdrop-filter: blur(16px) saturate(1.12); }
.user-body .mode-tabs button.active { box-shadow: 0 4px 14px color-mix(in srgb, var(--v2-primary) 13%, transparent); }
.user-body .composer-workspace,
.user-body .composer-panel,
.user-body .credit-stat,
.user-body .task-card,
.user-body .asset-card,
.user-body .recent-card { position: relative; overflow: hidden; border-color: color-mix(in srgb, var(--v2-primary) 18%, var(--v2-line)); }
.user-body .composer-workspace::before,
.user-body .composer-panel::before { content: ""; position: absolute; top: 0; left: 16px; width: 44px; height: 2px; pointer-events: none; background: var(--v2-primary); box-shadow: 0 0 14px var(--v2-primary); animation: none; }
.user-body .composer.has-active-tasks .composer-workspace::before,
.user-body .composer.has-active-tasks .composer-panel::before { animation: crystal-card-trace 2.8s ease-in-out infinite; }
.user-body .model-button:hover { transform: translateY(-2px); border-color: var(--v2-primary); box-shadow: 0 10px 28px color-mix(in srgb, var(--v2-primary) 14%, transparent); }
.user-body .generation-option-buttons button.active { animation: crystal-selected 2.4s ease-in-out infinite; }
.user-body .recent-grid article:hover,
.user-body .asset-gallery .asset-card:hover { transform: translateY(-6px); border-color: var(--v2-primary); box-shadow: 0 18px 38px color-mix(in srgb, var(--v2-primary) 17%, transparent); }
.user-body .recent-grid article img,
.user-body .asset-gallery .asset-card img { transition: transform .55s cubic-bezier(.17, .84, .3, 1), filter .4s ease; }
.user-body .recent-grid article:hover img,
.user-body .asset-gallery .asset-card:hover img { transform: scale(1.045); filter: saturate(1.12); }

@keyframes crystal-grid-drift { to { background-position: 24px 24px; } }
@keyframes crystal-page-scan { 0%, 100% { transform: translateY(0); opacity: 0; } 12% { opacity: .32; } 82% { opacity: .18; } 90% { transform: translateY(calc(100vh - 2px)); opacity: 0; } }
@keyframes crystal-materialize { from { opacity: 0; transform: scale(.992); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes crystal-panel-scan { from { transform: translateY(-100%); } to { transform: translateY(600%); } }
@keyframes crystal-content-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes crystal-button-sweep { 0%, 48% { left: -35%; } 78%, 100% { left: 125%; } }
@keyframes crystal-signal { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
@keyframes crystal-avatar { 0%, 100% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--v2-primary) 12%, transparent), 0 0 10px transparent; } 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--v2-primary) 7%, transparent), 0 0 24px color-mix(in srgb, var(--v2-primary) 34%, transparent); } }
@keyframes crystal-card-trace { 0%, 100% { left: 16px; width: 44px; } 50% { left: calc(100% - 90px); width: 74px; } }
@keyframes crystal-selected { 0%, 100% { box-shadow: inset 0 0 0 1px var(--v2-primary), 0 0 0 transparent; } 50% { box-shadow: inset 0 0 0 1px var(--v2-primary), 0 0 18px color-mix(in srgb, var(--v2-primary) 28%, transparent); } }

@media (max-width: 800px) {
  .user-body .auth-shell::before,
  .user-body .app-shell::before,
  .user-body .brand-panel::before { display: none; }
  .user-body .login-options { margin-bottom: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .user-body,
  .user-body *,
  .user-body *::before,
  .user-body *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
.model-default-button { display: none !important; }
.user-body .video-library-picker { width: min(680px, calc(100vw - 28px)); }
.user-body .video-library-picker-body { display: grid; gap: 12px; padding: 16px 20px; }
.user-body .video-library-picker-body label { display: grid; gap: 6px; color: var(--v2-muted); font-size: 12px; font-weight: 650; }
.user-body .video-library-picker-body select, .user-body .video-library-picker-body input { width: 100%; min-height: 38px; padding: 0 10px; border: 1px solid var(--v2-line); border-radius: 7px; color: var(--v2-ink); background: var(--v2-surface); font: inherit; font-size: 13px; }
.user-body .video-library-picker-body select:disabled { color: var(--v2-muted); }
.user-body .video-library-picker-name { margin-bottom: 2px; }
.user-body .video-library-picker-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
@media (max-width: 640px) { .user-body .video-library-picker-grid { grid-template-columns: 1fr; } }
.user-body #video-libraryView > .section-heading { display: none; }
.user-body .video-library-toolbar { margin: 0 0 12px; }
.user-body .video-library-heading { min-height: 38px; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.user-body .video-library-heading > div:first-child { min-width: 0; display: flex; align-items: baseline; gap: 8px; }
.user-body .video-library-heading h3 { margin: 0; overflow: hidden; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
.user-body .video-library-heading span { flex: 0 0 auto; color: var(--v2-muted); font-size: 12px; }
.user-body .video-library-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.user-body .video-library-card { position: relative; display: grid; gap: 8px; padding: 8px; }
.user-body .video-library-select { position: absolute; z-index: 3; top: 8px; right: 8px; left: auto; display: inline-flex; align-items: center; gap: 4px; top: 6px; right: 6px; min-height: 18px; padding: 0 4px; border: 1px solid rgba(255,255,255,.22); border-radius: 4px; color: #fff; background: rgba(15, 25, 20, .5); font-size: 10px; backdrop-filter: blur(8px); }
.user-body .video-library-select:has(input:checked) { border-color: var(--v2-primary); background: color-mix(in srgb, var(--v2-primary) 78%, #102018); }
.user-body .video-library-select input { width: 11px; height: 11px; margin: 0; }
.user-body .video-library-meta { min-width: 0; display: grid; gap: 3px; }
.user-body .video-library-card .row-actions { justify-content: flex-end; margin-top: 0; }
.user-body .video-library-tree { padding: 10px; }
.user-body .video-library-series-tabs,
.user-body .video-library-episode-tabs { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 0; overflow: visible; }
.user-body .video-library-episode-tabs { margin-top: 6px; padding-top: 8px; }
.user-body .video-library-tab-list { min-width: 0; display: flex; align-items: center; gap: 6px; overflow-x: auto; }
.user-body .video-library-series-tab,
.user-body .video-library-episode { width: auto; min-width: max-content; min-height: 34px; flex: 0 0 auto; padding: 0 12px; border: 1px solid var(--v2-line); border-radius: 7px; background: var(--v2-surface-soft); font-size: 13px; font-weight: 700; }
.user-body .video-library-series-tab.active,
.user-body .video-library-episode.active { border-color: var(--v2-primary); background: var(--v2-primary-soft); color: var(--v2-primary); }
.user-body .video-library-tab-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; }
.user-body .video-library-text-action { min-height: 30px; padding: 0 12px; border: 1px solid var(--v2-line-strong); border-radius: 999px; color: var(--v2-ink); background: var(--v2-surface); font-size: 12px; font-weight: 650; white-space: nowrap; cursor: pointer; }
.user-body .video-library-text-action:hover { border-color: var(--v2-primary); color: var(--v2-primary); }
.user-body .video-library-text-action.danger { color: var(--v2-danger); }
.user-body .video-library-text-action.danger:hover { border-color: var(--v2-danger); background: color-mix(in srgb, var(--v2-danger) 8%, var(--v2-surface)); }
.user-body .video-library-episode small { margin-left: 4px; color: var(--v2-muted); font-size: 11px; font-weight: 600; }
.user-body .video-library-new-episode { width: auto; min-width: max-content; min-height: 34px; display: inline-flex; align-items: center; gap: 4px; padding: 0 10px; border: 1px dashed var(--v2-line-strong); border-radius: 7px; color: var(--v2-muted); background: transparent; }
.user-body .video-library-new-episode:hover { color: var(--v2-primary); border-color: var(--v2-primary); background: var(--v2-primary-soft); }
.user-body .history-row .row-actions { display: grid; grid-template-columns: repeat(3, 31px); justify-content: end; align-content: center; }
.user-body .history-row [data-add-video-library] { width: 31px; min-width: 31px; height: 31px; padding: 0; }
.user-body .history-row [data-add-video-library] svg { width: 16px; height: 16px; }
.user-body .video-library-history-dialog { width: min(720px, calc(100vw - 28px)); }
.user-body .video-library-history-list { max-height: min(62vh, 560px); display: grid; gap: 8px; overflow: auto; padding: 14px 18px; }
.user-body .video-library-history-item { display: grid; grid-template-columns: 92px minmax(0, 1fr) 28px; gap: 10px; align-items: center; min-height: 74px; padding: 8px 10px; border: 1px solid var(--v2-line); border-radius: 7px; background: var(--v2-surface-soft); }
.user-body .video-library-history-thumb { position: relative; width: 92px; height: 58px; overflow: hidden; padding: 0; border: 0; border-radius: 6px; background: var(--v2-surface-muted); cursor: pointer; }
.user-body .video-library-history-thumb img { width: 100%; height: 100%; object-fit: cover; }
.user-body .video-library-history-thumb svg { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; padding: 4px; transform: translate(-50%, -50%); border-radius: 50%; color: #fff; background: rgba(15, 25, 20, .72); pointer-events: none; }
.user-body .video-library-history-list strong, .user-body .video-library-history-list small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-body .video-library-history-list small { margin-top: 3px; color: var(--v2-muted); }
.user-body .video-library-history-check { display: grid; place-items: center; }
.user-body .video-library-history-check input { width: 16px; height: 16px; margin: 0; cursor: pointer; }
.user-body #assetsView > .section-heading { display: none; }
.user-body .assets-toolbar .category-tabs button { min-height: 34px; padding: 0 12px; color: var(--v2-ink); font-size: 13px; font-weight: 650; }
.user-body .assets-toolbar .upload-button { color: var(--v2-ink); background: var(--v2-surface); border-color: var(--v2-line-strong); font-weight: 650; }
.user-body .assets-toolbar .upload-button:hover { color: var(--v2-ink); background: var(--v2-surface-soft); border-color: var(--v2-line-strong); }
.user-body .video-library-toolbar .primary { min-height: 38px; display: inline-flex; align-items: center; gap: 6px; padding: 0 14px; color: var(--v2-ink); background: var(--v2-surface); border-color: var(--v2-line-strong); box-shadow: none; font-weight: 650; }
.user-body .video-library-toolbar .primary::before { content: none; }
.user-body .video-library-toolbar .primary:hover { transform: none; color: var(--v2-ink); background: var(--v2-surface-soft); border-color: var(--v2-line-strong); box-shadow: none; }
html.theme-dark .user-body select { color-scheme: dark; }
html.theme-dark .user-body select option { background-color: #193138 !important; color: #effbfc !important; }
html.theme-dark .user-body select option:checked { background-color: #123f45 !important; color: #effbfc !important; }
.user-body .chat-composer-fold { display: none; }
.user-body .chat-composer-fold[hidden] { display: none !important; }
.user-body .composer.chat-mode .chat-composer-fold { position: absolute; right: 8px; bottom: 46px; z-index: 5; width: 28px; height: 28px; display: grid; place-items: center; padding: 0; border: 1px solid var(--v2-line); border-radius: 6px 0 6px 0; color: var(--v2-muted); background: var(--v2-surface); }
.user-body .composer.chat-mode .chat-composer-fold:hover { border-color: var(--v2-primary); color: var(--v2-primary); background: var(--v2-primary-soft); }
.user-body .composer.chat-mode.chat-history-browsing .prompt-box, .user-body .composer.chat-mode.chat-history-browsing #chatComposerFooter { display: none; }
.user-body .composer.chat-mode.chat-history-browsing #chatComposerRestore { display: flex; }
.user-body .composer.chat-mode #chatComposerRestore { cursor: pointer; }
.user-body .composer.chat-mode .prompt-box { position: relative; }
.user-body .recent-task-card .recent-thumbnail .recent-model-badge { top: 0; left: 0; right: auto; bottom: auto; max-width: 100%; padding: 4px 8px; border-radius: 0 0 5px 0; color: #fff; background: rgba(10, 20, 30, .78); font-size: 12px; }
.user-body .recent-task-card .recent-video-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 0; grid-column: 1 / -1; width: 100%; }
.user-body .recent-task-card .recent-video-actions .recent-edit-button { position: static; min-width: 0; max-width: 100%; height: 30px; padding: 0 8px; border-radius: 6px 0 0 0; box-shadow: none; }
.user-body .recent-task-card .recent-video-actions [data-edit-task] { border-radius: 0 0 6px 0; }
@media (max-width: 560px) { .user-body .recent-task-card .recent-video-actions .recent-edit-button { flex: 1 1 0; padding: 0 4px; gap: 2px; font-size: 11px; } }
.user-body .recent-task-card .recent-asset-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 0; grid-column: 1 / -1; width: 100%; }
.user-body .recent-task-card .recent-asset-actions .recent-edit-button { position: static; min-width: 0; max-width: 100%; height: 30px; padding: 0 8px; border-radius: 6px 0 0 0; box-shadow: none; }
.user-body .recent-task-card .recent-asset-actions [data-edit-task] { border-radius: 0 0 6px 0; }
@media (max-width: 560px) { .user-body .recent-task-card .recent-asset-actions .recent-edit-button { flex: 1 1 0; padding: 0 4px; gap: 2px; font-size: 11px; } }

/* Keep status and creation actions aligned in one footer row. */
.user-body .recent-task-card .recent-task-footer { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-width: 0; grid-column: 1 / -1; }
.user-body .recent-task-footer > em { flex: 0 0 auto; margin-left: 9px; color: var(--v2-primary); font-size: 11px; font-style: normal; white-space: nowrap; }
.user-body .recent-task-footer .recent-video-actions, .user-body .recent-task-footer .recent-asset-actions { flex: 0 0 auto; width: auto; flex-wrap: nowrap; margin-left: auto; }
.user-body .recent-task-card .recent-task-footer .recent-edit-button { position: static; flex: 0 0 auto; min-width: 0; height: 30px; padding: 0 6px; gap: 3px; border-radius: 5px 0 0 0; box-shadow: none; }
.user-body .recent-task-card .recent-task-footer [data-edit-task] { border-radius: 0 0 6px 0; }
.user-body .recent-media-tasks { grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }

/* Chat controls stay usable while responses stream and text is selected. */
.user-body .composer.chat-mode .chat-tool-card .chat-tool-copy > p,
.user-body .composer.chat-mode .chat-tool-card .chat-tool-copy > small,
.user-body .composer.chat-mode .chat-tool-card .chat-tool-copy > span,
.user-body .composer.chat-mode .chat-tool-card .chat-tool-summary small {
  -webkit-user-select: text;
  user-select: text;
  overflow-wrap: anywhere;
}
.user-body .chat-message-time { display: block; margin: 0 0 5px; color: var(--v2-text-muted, #7d8583); font-size: 11px; font-weight: 400; }
.user-body .chat-result-warning { display: flex; align-items: flex-start; gap: 6px; margin-top: 8px; color: var(--v2-danger, #c43b46); font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.user-body .chat-result-warning > svg { flex: 0 0 16px; width: 16px; height: 16px; margin-top: 2px; }
.user-body #chatStopInline { background: #b83a41; color: #fff; }
.user-body #chatStopInline:disabled { opacity: .55; cursor: wait; }
.user-body .chat-head-actions { flex-wrap: wrap; }
@media (max-width: 560px) {
  .user-body #chatClearHistoryButton span { display: none; }
  .user-body .chat-message-time { font-size: 10px; margin-left: 7px; }
}
.user-body .chat-message-actions { display: flex; align-items: center; margin-top: 8px; }
.user-body .chat-copy-message { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 6px; border: 1px solid transparent; border-radius: 4px; color: var(--v2-muted); background: transparent; cursor: pointer; }
.user-body .chat-copy-message:hover, .user-body .chat-copy-message:focus-visible { color: var(--v2-primary); border-color: var(--v2-line); background: var(--v2-primary-soft); }
.user-body .chat-copy-message svg { width: 17px; height: 17px; }
