/* Mahua mobile visual system v2
   Visual-only overrides: no geometry, spacing, positioning, or layout changes. */

:root {
  --mahua-v2-navy: #0a0c16;
  --mahua-v2-deep-1: #201a46;
  --mahua-v2-deep-2: #140f34;
  --mahua-v2-deep-3: #0a0c16;
  --mahua-v2-bg: #f4f4f9;
  --mahua-v2-card: #ffffff;
  --mahua-v2-line: #ececf3;
  --mahua-v2-indigo-1: #4b41e0;
  --mahua-v2-indigo-2: #7a70f5;
  --mahua-v2-indigo-soft: #edebfc;
  --mahua-v2-indigo-text: #5044e3;
  --mahua-v2-gold: #c7a05b;
  --mahua-v2-gold-soft: #f4e9d2;
  --mahua-v2-ink: #12131f;
  --mahua-v2-ink-2: #55576e;
  --mahua-v2-ink-3: #9799ae;
  --bg: var(--mahua-v2-bg);
  --screen: var(--mahua-v2-bg);
  --surface: var(--mahua-v2-card);
  --surface-soft: #f8f7fc;
  --line: var(--mahua-v2-line);
  --text: var(--mahua-v2-ink);
  --muted: var(--mahua-v2-ink-3);
  --brand: var(--mahua-v2-indigo-1);
  --brand-dark: var(--mahua-v2-indigo-text);
  --shadow: 0 20px 50px rgba(20, 18, 50, 0.10);
  --card-shadow: 0 1px 2px rgba(20, 20, 50, 0.035);
}

html,
body,
.phone-app,
#appPanel,
#appPanel .screen-body,
#worksView,
#studioView,
#accountView {
  background-color: var(--mahua-v2-bg) !important;
  color: var(--mahua-v2-ink) !important;
}

.phone-app {
  box-shadow: 0 0 0 1px rgba(18, 19, 31, 0.06), 0 24px 56px rgba(20, 18, 50, 0.12) !important;
}

.app-header {
  background: rgba(10, 12, 22, 0.96) !important;
  border-bottom-color: rgba(199, 160, 91, 0.18) !important;
  color: #ffffff !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset !important;
}

.app-header small {
  color: var(--mahua-v2-gold) !important;
}

#viewTitle,
.app-header h1 {
  color: #ffffff !important;
}

#refreshBtn,
.icon-button {
  background: rgba(255, 255, 255, 0.07) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: rgba(255, 255, 255, 0.88) !important;
  box-shadow: none !important;
}

.primary,
.primary-gradient,
.main-create-button,
.sticky-submit,
.auth-card .primary,
.account-core-card .primary,
.account-settings-card .primary,
.account-feature-card .primary {
  background: linear-gradient(135deg, var(--mahua-v2-indigo-1), var(--mahua-v2-indigo-2)) !important;
  border-color: transparent !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  box-shadow: 0 14px 26px -12px rgba(75, 65, 224, 0.62), 0 1px 0 rgba(255, 255, 255, 0.24) inset !important;
}

.secondary,
button.secondary,
.seg,
.icon-button:not(#refreshBtn) {
  background-color: var(--mahua-v2-card) !important;
  border-color: var(--mahua-v2-line) !important;
  color: var(--mahua-v2-ink-2) !important;
  box-shadow: 0 1px 2px rgba(20, 20, 50, 0.03) !important;
}

.seg.active,
.seg[aria-selected="true"],
button.secondary.active {
  background: var(--mahua-v2-indigo-soft) !important;
  border-color: rgba(80, 68, 227, 0.18) !important;
  color: var(--mahua-v2-indigo-text) !important;
}

input,
textarea,
select,
.manual-prompt-editor,
.manual-prompt-editor textarea {
  background-color: var(--mahua-v2-card) !important;
  border-color: var(--mahua-v2-line) !important;
  color: var(--mahua-v2-ink) !important;
  box-shadow: 0 1px 2px rgba(20, 20, 50, 0.025) !important;
}

input::placeholder,
textarea::placeholder {
  color: #aeb0c4 !important;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(80, 68, 227, 0.48) !important;
  outline-color: rgba(80, 68, 227, 0.18) !important;
  box-shadow: 0 0 0 3px rgba(80, 68, 227, 0.09) !important;
}

a,
.auth-footer a,
.link-button {
  color: var(--mahua-v2-indigo-text) !important;
}

.auth-screen {
  background:
    radial-gradient(circle at 88% 4%, rgba(122, 112, 245, 0.12), transparent 32%),
    radial-gradient(circle at 8% 92%, rgba(199, 160, 91, 0.08), transparent 30%),
    var(--mahua-v2-bg) !important;
}

.auth-card {
  background: rgba(255, 255, 255, 0.96) !important;
  border-color: var(--mahua-v2-line) !important;
  color: var(--mahua-v2-ink) !important;
  box-shadow: 0 22px 44px -24px rgba(20, 18, 50, 0.28), 0 1px 0 rgba(255, 255, 255, 0.9) inset !important;
}

.auth-brand,
.auth-brand h1,
.auth-card h2,
.auth-card h3 {
  color: var(--mahua-v2-ink) !important;
}

.auth-brand small,
.auth-card small,
.auth-consent,
.auth-consent-hint {
  color: var(--mahua-v2-ink-3) !important;
}

.auth-card .auth-tabs,
.auth-card .segmented {
  background: #f0eff7 !important;
  border-color: var(--mahua-v2-line) !important;
}

.auth-card .seg.active,
.auth-card .seg[aria-selected="true"] {
  background: var(--mahua-v2-card) !important;
  color: var(--mahua-v2-indigo-text) !important;
  box-shadow: 0 4px 12px rgba(20, 18, 50, 0.08) !important;
}

body.studio-manual-mode #appPanel #studioView,
body.studio-agent-mode #appPanel #studioView {
  background: var(--mahua-v2-bg) !important;
}

body.studio-manual-mode #appPanel #studioView .studio-mode-switch,
body.studio-agent-mode #appPanel #studioView .studio-mode-switch,
#studioView .ai-generation-disclosure,
#studioView .auto-agent-head,
#studioView .studio-agent-hero {
  background:
    radial-gradient(120% 90% at 88% -10%, rgba(199, 160, 91, 0.16), transparent 55%),
    radial-gradient(140% 120% at 8% 0%, var(--mahua-v2-deep-1) 0%, var(--mahua-v2-deep-2) 45%, var(--mahua-v2-deep-3) 100%) !important;
  border-color: rgba(255, 255, 255, 0.07) !important;
  color: #ffffff !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08) inset, 0 22px 36px -18px rgba(15, 10, 45, 0.50) !important;
}

body.studio-manual-mode #appPanel #studioView .studio-mode-switch :is(#switchAgentCreateBtn, #switchManualCreateBtn),
body.studio-agent-mode #appPanel #studioView .studio-mode-switch :is(#switchAgentCreateBtn, #switchManualCreateBtn) {
  background: rgba(255, 255, 255, 0.055) !important;
  border-color: rgba(255, 255, 255, 0.07) !important;
  color: rgba(255, 255, 255, 0.56) !important;
  -webkit-text-fill-color: currentColor !important;
  box-shadow: none !important;
}

body.studio-manual-mode #appPanel #studioView .studio-mode-switch :is(#switchAgentCreateBtn, #switchManualCreateBtn).active,
body.studio-agent-mode #appPanel #studioView .studio-mode-switch :is(#switchAgentCreateBtn, #switchManualCreateBtn).active {
  background: linear-gradient(135deg, var(--mahua-v2-indigo-1), var(--mahua-v2-indigo-2)) !important;
  border-color: transparent !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  box-shadow: 0 8px 18px -6px rgba(75, 65, 224, 0.70), 0 1px 0 rgba(255, 255, 255, 0.25) inset !important;
}

#studioView .ai-generation-disclosure,
#studioView .ai-generation-disclosure span,
#studioView .auto-agent-head :is(strong, small, span) {
  color: rgba(255, 255, 255, 0.70) !important;
  -webkit-text-fill-color: currentColor !important;
}

#studioView .manual-create-panel .prompt-block,
#studioView .auto-agent-panel,
#studioView .manual-tool-card,
#studioView .studio-asset-card,
#studioView .video-template-card,
#studioView .prompt-library-card {
  background-color: var(--mahua-v2-card) !important;
  border-color: var(--mahua-v2-line) !important;
  color: var(--mahua-v2-ink) !important;
  box-shadow: 0 1px 2px rgba(20, 20, 50, 0.035) !important;
}

#studioView .manual-create-panel .prompt-block > .section-title,
#studioView .studio-section-title,
#studioView .prompt-library-head {
  background: linear-gradient(135deg, var(--mahua-v2-indigo-1), var(--mahua-v2-indigo-2)) !important;
  border-color: transparent !important;
  color: #ffffff !important;
  box-shadow: 0 10px 20px -12px rgba(75, 65, 224, 0.58) !important;
}

#studioView .manual-tool-icon,
#studioView .studio-asset-icon,
#studioView .video-template-icon {
  background-color: var(--mahua-v2-indigo-soft) !important;
  color: var(--mahua-v2-indigo-text) !important;
  border-color: rgba(80, 68, 227, 0.12) !important;
  box-shadow: none !important;
}

#worksView,
#worksView .works-section,
#worksView .works-list {
  background-color: var(--mahua-v2-bg) !important;
}

#worksView .works-browse-tabs,
#worksView .works-switch,
#worksView .works-topbar {
  background: rgba(255, 255, 255, 0.92) !important;
  border-color: var(--mahua-v2-line) !important;
  box-shadow: 0 8px 22px rgba(20, 18, 50, 0.045) !important;
}

#worksView .works-browse-tabs button,
#worksView .works-switch button {
  background: transparent !important;
  border-color: transparent !important;
  color: var(--mahua-v2-ink-3) !important;
  box-shadow: none !important;
}

#worksView .works-browse-tabs button.active,
#worksView .works-switch button.active {
  background: var(--mahua-v2-indigo-soft) !important;
  border-color: rgba(80, 68, 227, 0.14) !important;
  color: var(--mahua-v2-indigo-text) !important;
  box-shadow: none !important;
}

#worksView .work-card,
.works-category-card,
.theater-card {
  background-color: var(--mahua-v2-card) !important;
  border-color: var(--mahua-v2-line) !important;
  color: var(--mahua-v2-ink) !important;
  box-shadow: 0 1px 2px rgba(20, 20, 50, 0.035) !important;
}

#worksView .work-title,
#worksView .work-title strong,
.works-category-head h2 {
  color: var(--mahua-v2-ink) !important;
}

#worksView .work-meta,
#worksView .work-side-meta,
#worksView .work-status,
.works-category-note {
  color: var(--mahua-v2-ink-3) !important;
}

#worksView .work-status.ready,
#worksView .status-success {
  background-color: var(--mahua-v2-indigo-soft) !important;
  border-color: rgba(80, 68, 227, 0.14) !important;
  color: var(--mahua-v2-indigo-text) !important;
}

#appPanel #accountView {
  background: var(--mahua-v2-bg) !important;
}

#appPanel #accountView .account-card {
  background:
    radial-gradient(120% 90% at 88% -10%, rgba(199, 160, 91, 0.16), transparent 55%),
    radial-gradient(140% 120% at 8% 0%, var(--mahua-v2-deep-1) 0%, var(--mahua-v2-deep-2) 45%, var(--mahua-v2-deep-3) 100%) !important;
  border-color: rgba(255, 255, 255, 0.07) !important;
  color: #ffffff !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08) inset, 0 22px 36px -16px rgba(15, 10, 45, 0.55) !important;
}

#appPanel #accountView .account-card-bg {
  background: radial-gradient(circle at 18% 12%, rgba(122, 112, 245, 0.17), transparent 48%) !important;
}

#appPanel #accountView .account-card :is(h2, strong),
#appPanel #accountView .account-name-row h2,
#appPanel #accountView .account-invite-code > strong {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

#appPanel #accountView #accountPhone,
#appPanel #accountView .account-level-summary > span,
#appPanel #accountView .account-invite-code > span,
#appPanel #accountView .account-top-balance span,
#appPanel #accountView .account-top-balance em {
  color: rgba(255, 255, 255, 0.54) !important;
  -webkit-text-fill-color: currentColor !important;
}

#appPanel #accountView .account-user .avatar-upload {
  background-color: rgba(255, 255, 255, 0.08) !important;
  border-color: var(--mahua-v2-navy) !important;
  box-shadow: 0 0 0 2px var(--mahua-v2-gold), 0 10px 24px rgba(0, 0, 0, 0.20) !important;
}

#appPanel #accountView .account-level-summary > strong {
  background: linear-gradient(135deg, #debb7b, var(--mahua-v2-gold)) !important;
  border-color: transparent !important;
  color: #241c10 !important;
  -webkit-text-fill-color: #241c10 !important;
  box-shadow: none !important;
}

#appPanel #accountView .profile-edit-button,
#appPanel #accountView .account-invite-code,
#appPanel #accountView .account-invite-code > button,
#appPanel #accountView .account-settings-button {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.10) !important;
  color: rgba(255, 255, 255, 0.86) !important;
  box-shadow: none !important;
}

#accountView .account-hub-title,
#accountView .account-hub-title strong,
#accountView .account-feature-head strong,
#accountView .account-core-head strong,
#accountView .account-settings-head strong {
  color: var(--mahua-v2-ink) !important;
}

#accountView .account-hub-title::before,
#accountView .account-section-title::before {
  background: linear-gradient(180deg, var(--mahua-v2-indigo-1), var(--mahua-v2-gold)) !important;
}

#accountView .account-hub-card,
#accountView .account-hub-secondary button,
#accountView .account-core-card,
#accountView .account-feature-card,
#accountView .account-settings-card,
#accountView .account-settings-group,
#accountView .task-checkin-card,
#accountView .reward-wallet-card,
#accountView .membership-plan,
#accountView .account-earnings-ledger,
#accountView .invite-quick-card {
  background-color: var(--mahua-v2-card) !important;
  background-image: none !important;
  border-color: var(--mahua-v2-line) !important;
  color: var(--mahua-v2-ink) !important;
  box-shadow: 0 1px 2px rgba(20, 20, 50, 0.035) !important;
}

#accountView .account-hub-icon,
#accountView .account-settings-intro-icon,
#accountView .task-checkin-icon,
#accountView .reward-module-icon {
  background: var(--mahua-v2-indigo-soft) !important;
  border-color: rgba(80, 68, 227, 0.12) !important;
  color: var(--mahua-v2-indigo-text) !important;
  box-shadow: none !important;
}

#accountView .account-hub-icon svg,
#accountView .account-settings-intro-icon svg,
#accountView .task-checkin-icon svg,
#accountView .reward-module-icon svg {
  fill: none !important;
  stroke: currentColor !important;
}

#accountView .account-hub-card :is(strong, span),
#accountView .account-hub-secondary button strong,
#accountView .account-settings-group-title span,
#accountView .task-checkin-card strong {
  color: var(--mahua-v2-ink) !important;
  -webkit-text-fill-color: currentColor !important;
}

#accountView .account-hub-card :is(small, em),
#accountView .account-settings-group-title small,
#accountView .task-checkin-card small,
#accountView .account-core-head small {
  color: var(--mahua-v2-ink-3) !important;
  -webkit-text-fill-color: currentColor !important;
}

#accountView .membership-entry,
#accountView .task-center-entry,
#accountView .earnings-entry,
#accountView .recharge-center-entry {
  background-color: var(--mahua-v2-card) !important;
  background-image: none !important;
  border-color: var(--mahua-v2-line) !important;
  color: var(--mahua-v2-ink) !important;
}

.account-core-head,
.account-feature-head,
.account-settings-head,
.works-category-head,
.prompt-library-head {
  background: rgba(255, 255, 255, 0.96) !important;
  border-color: var(--mahua-v2-line) !important;
  box-shadow: 0 8px 22px rgba(20, 18, 50, 0.045) !important;
}

.account-core-head button,
.account-feature-head button,
.account-settings-head button,
.works-category-head button,
.prompt-library-head button {
  background-color: var(--mahua-v2-indigo-soft) !important;
  border-color: rgba(80, 68, 227, 0.12) !important;
  color: var(--mahua-v2-indigo-text) !important;
  box-shadow: none !important;
}

.tabbar,
html.theme-dark .phone-app.phone-app.phone-app nav.tabbar {
  background: rgba(255, 255, 255, 0.94) !important;
  background-image: none !important;
  border-top-color: var(--mahua-v2-line) !important;
  color: var(--mahua-v2-ink-3) !important;
  box-shadow: 0 -10px 28px rgba(20, 18, 50, 0.055) !important;
}

.tabbar .tab-item,
html.theme-dark .phone-app.phone-app.phone-app .tabbar .tab-item {
  background: transparent !important;
  background-image: none !important;
  border-color: transparent !important;
  color: #a6a8bc !important;
  -webkit-text-fill-color: currentColor !important;
  box-shadow: none !important;
}

.tabbar .tab-item.active,
html.theme-dark .phone-app.phone-app.phone-app .tabbar button.tab-item.active {
  background: transparent !important;
  background-image: none !important;
  border-color: transparent !important;
  color: var(--mahua-v2-indigo-text) !important;
  -webkit-text-fill-color: currentColor !important;
  box-shadow: none !important;
}

.tabbar .tab-item.active .tab-icon,
html.theme-dark .phone-app.phone-app.phone-app .tabbar button.tab-item.active .tab-icon {
  background: var(--mahua-v2-indigo-soft) !important;
  background-image: none !important;
  border-color: transparent !important;
  color: var(--mahua-v2-indigo-text) !important;
  box-shadow: none !important;
}

.tabbar .tab-graphic-icon,
.tabbar .tab-graphic-icon::before,
.tabbar .tab-graphic-icon::after {
  border-color: currentColor !important;
  color: currentColor !important;
}

.tabbar .tab-graphic-icon::after {
  background-color: currentColor !important;
}

.pull-refresh-indicator,
.toast,
.status-pill,
.badge {
  background-color: rgba(255, 255, 255, 0.96) !important;
  border-color: var(--mahua-v2-line) !important;
  color: var(--mahua-v2-ink-2) !important;
  box-shadow: 0 10px 26px rgba(20, 18, 50, 0.12) !important;
}

.pull-refresh-indicator::before {
  border-color: rgba(80, 68, 227, 0.22) !important;
  border-top-color: var(--mahua-v2-indigo-text) !important;
}

html.theme-dark body,
html.theme-dark .phone-app,
html.theme-dark #appPanel,
html.theme-dark #appPanel .screen-body,
html.theme-dark #worksView,
html.theme-dark #studioView,
html.theme-dark #accountView {
  background-color: var(--mahua-v2-bg) !important;
  color: var(--mahua-v2-ink) !important;
}

/* Creation page correction v3: override the older bright purple manual theme. */
body.studio-manual-mode #appPanel #studioView {
  --create-ref-bg: var(--mahua-v2-bg);
  --create-ref-card: var(--mahua-v2-card);
  --create-ref-surface: var(--mahua-v2-card);
  --create-ref-line: var(--mahua-v2-line);
  --create-ref-text: var(--mahua-v2-ink);
  --create-ref-dim: var(--mahua-v2-ink-2);
  --create-ref-purple: var(--mahua-v2-indigo-text);
  --create-ref-purple-soft: var(--mahua-v2-indigo-soft);
  background: var(--mahua-v2-bg) !important;
}

body.studio-manual-mode #appPanel #studioView .studio-mode-switch,
body.studio-manual-mode #appPanel #studioView .ai-generation-disclosure,
body.studio-manual-mode #appPanel #studioView .manual-create-panel .prompt-block > .section-title {
  background:
    radial-gradient(120% 90% at 88% -10%, rgba(199, 160, 91, 0.16), transparent 55%),
    radial-gradient(140% 120% at 8% 0%, var(--mahua-v2-deep-1) 0%, var(--mahua-v2-deep-2) 45%, var(--mahua-v2-deep-3) 100%) !important;
  border-color: rgba(255, 255, 255, 0.07) !important;
  box-shadow: none !important;
}

body.studio-manual-mode #appPanel #studioView .studio-mode-switch::before {
  background: rgba(255, 255, 255, 0.055) !important;
}

body.studio-manual-mode #appPanel #studioView .studio-mode-switch :is(#switchAgentCreateBtn, #switchManualCreateBtn) {
  background: rgba(255, 255, 255, 0.055) !important;
  border-color: rgba(255, 255, 255, 0.07) !important;
  color: rgba(255, 255, 255, 0.56) !important;
  -webkit-text-fill-color: currentColor !important;
  box-shadow: none !important;
}

body.studio-manual-mode #appPanel #studioView .studio-mode-switch :is(#switchAgentCreateBtn, #switchManualCreateBtn).active {
  background: linear-gradient(135deg, var(--mahua-v2-indigo-1), var(--mahua-v2-indigo-2)) !important;
  border-color: transparent !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  box-shadow: 0 8px 18px -6px rgba(75, 65, 224, 0.70), 0 1px 0 rgba(255, 255, 255, 0.25) inset !important;
}

body.studio-manual-mode #appPanel #studioView .ai-generation-disclosure-dot {
  background: var(--mahua-v2-gold) !important;
}

body.studio-manual-mode #appPanel #studioView .ai-generation-disclosure span {
  color: rgba(255, 255, 255, 0.62) !important;
  -webkit-text-fill-color: currentColor !important;
}

body.studio-manual-mode #appPanel #studioView .manual-create-panel .prompt-block > .section-title h3 {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

body.studio-manual-mode #appPanel #studioView .prompt-title-actions .studio-model-trigger {
  background: rgba(255, 255, 255, 0.055) !important;
  border-color: rgba(199, 160, 91, 0.42) !important;
  color: var(--mahua-v2-gold) !important;
  box-shadow: none !important;
}

body.studio-manual-mode #appPanel #studioView .prompt-title-actions .studio-model-trigger :is(.studio-model-name, .duration-badge),
body.studio-manual-mode #appPanel #studioView .prompt-title-actions .studio-model-trigger span,
body.studio-manual-mode #appPanel #studioView .prompt-title-actions .studio-model-trigger strong {
  color: var(--mahua-v2-gold) !important;
  -webkit-text-fill-color: currentColor !important;
}

body.studio-manual-mode #appPanel #studioView .prompt-title-actions .studio-model-icon {
  color: var(--mahua-v2-gold) !important;
  stroke: currentColor !important;
}

body.studio-manual-mode #appPanel #studioView .prompt-library-entry > button,
body.studio-manual-mode #appPanel #studioView .prompt-library-entry > button.secondary,
body.studio-manual-mode #appPanel #studioView .manual-prompt-editor,
body.studio-manual-mode #appPanel #studioView .manual-create-panel .creator-panel,
body.studio-manual-mode #appPanel #studioView .creator-pick {
  background: var(--mahua-v2-card) !important;
  border-color: var(--mahua-v2-line) !important;
  color: var(--mahua-v2-ink-2) !important;
  box-shadow: 0 1px 2px rgba(20, 20, 50, 0.035) !important;
}

body.studio-manual-mode #appPanel #studioView .manual-prompt-editor textarea {
  background: var(--mahua-v2-card) !important;
  color: var(--mahua-v2-ink) !important;
}

body.studio-manual-mode #appPanel #studioView .manual-prompt-editor #aiPromptBtn.ai-prompt-button,
body.studio-manual-mode #appPanel #studioView .manual-prompt-editor button#aiPromptBtn.secondary,
body.studio-manual-mode #appPanel #studioView .main-create-button {
  background: linear-gradient(135deg, var(--mahua-v2-indigo-1), var(--mahua-v2-indigo-2)) !important;
  border-color: transparent !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  box-shadow: 0 14px 26px -12px rgba(75, 65, 224, 0.62), 0 1px 0 rgba(255, 255, 255, 0.24) inset !important;
}

body.studio-manual-mode #appPanel #studioView .manual-prompt-actions :is(#toggleAssetLibraryBtn, #uploadWorkBtn, #studioTopMyWorksBtn) {
  color: var(--mahua-v2-ink-2) !important;
  -webkit-text-fill-color: currentColor !important;
}

body.studio-manual-mode #appPanel #studioView .manual-prompt-actions #toggleAssetLibraryBtn::before {
  border-right-color: var(--mahua-v2-indigo-text) !important;
  border-bottom-color: var(--mahua-v2-indigo-text) !important;
}

body.studio-manual-mode #appPanel #studioView .manual-prompt-actions #studioTopMyWorksBtn svg,
body.studio-manual-mode #appPanel #studioView #uploadWorkBtn.studio-upload-work svg {
  color: var(--mahua-v2-indigo-text) !important;
  stroke: currentColor !important;
}

/* Design-spec micro details v4: title signature and exact creation mode pills. */
body.studio-manual-mode #appPanel #studioView::after,
body.studio-agent-mode #appPanel #studioView::after {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, #c7a05b, transparent);
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 4;
}

body.studio-manual-mode #appPanel #studioView .studio-mode-switch,
body.studio-agent-mode #appPanel #studioView .studio-mode-switch {
  gap: 6px !important;
}

body.studio-manual-mode #appPanel #studioView .studio-mode-switch :is(#switchAgentCreateBtn, #switchManualCreateBtn),
body.studio-agent-mode #appPanel #studioView .studio-mode-switch :is(#switchAgentCreateBtn, #switchManualCreateBtn) {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  color: rgba(255, 255, 255, 0.50) !important;
  -webkit-text-fill-color: rgba(255, 255, 255, 0.50) !important;
  font-weight: 600 !important;
  box-shadow: none !important;
}

body.studio-manual-mode #appPanel #studioView .studio-mode-switch :is(#switchAgentCreateBtn, #switchManualCreateBtn).active,
body.studio-agent-mode #appPanel #studioView .studio-mode-switch :is(#switchAgentCreateBtn, #switchManualCreateBtn).active {
  background: linear-gradient(135deg, #4b41e0, #7a70f5) !important;
  border-color: transparent !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  font-weight: 600 !important;
  box-shadow: 0 8px 18px -6px rgba(75, 65, 224, 0.70), 0 1px 0 rgba(255, 255, 255, 0.25) inset !important;
}

/* Exact design-state correction v5.
   Keep these full selectors last: legacy segmented/Android 9 rules otherwise
   paint both choices purple or replace the selected state with neon yellow. */
html body.studio-manual-mode #appPanel section#studioView nav.studio-mode-switch #switchAgentCreateBtn:not(.active),
html body.studio-manual-mode #appPanel section#studioView nav.studio-mode-switch #switchManualCreateBtn:not(.active),
html body.studio-agent-mode #appPanel section#studioView nav.studio-mode-switch #switchAgentCreateBtn:not(.active),
html body.studio-agent-mode #appPanel section#studioView nav.studio-mode-switch #switchManualCreateBtn:not(.active) {
  background: rgba(255, 255, 255, 0.05) !important;
  background-image: none !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  border-radius: 999px !important;
  color: rgba(255, 255, 255, 0.50) !important;
  -webkit-text-fill-color: rgba(255, 255, 255, 0.50) !important;
  font-weight: 600 !important;
  box-shadow: none !important;
}

html body.studio-manual-mode #appPanel section#studioView nav.studio-mode-switch #switchAgentCreateBtn.active,
html body.studio-manual-mode #appPanel section#studioView nav.studio-mode-switch #switchManualCreateBtn.active,
html body.studio-agent-mode #appPanel section#studioView nav.studio-mode-switch #switchAgentCreateBtn.active,
html body.studio-agent-mode #appPanel section#studioView nav.studio-mode-switch #switchManualCreateBtn.active {
  background: linear-gradient(135deg, #4b41e0 0%, #7a70f5 100%) !important;
  border: 1px solid transparent !important;
  border-radius: 999px !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  font-weight: 600 !important;
  box-shadow: 0 8px 18px -6px rgba(75, 65, 224, 0.70), 0 1px 0 rgba(255, 255, 255, 0.25) inset !important;
}

html body.studio-manual-mode #appPanel section#studioView nav.studio-mode-switch #switchAgentCreateBtn.active *,
html body.studio-manual-mode #appPanel section#studioView nav.studio-mode-switch #switchManualCreateBtn.active *,
html body.studio-agent-mode #appPanel section#studioView nav.studio-mode-switch #switchAgentCreateBtn.active *,
html body.studio-agent-mode #appPanel section#studioView nav.studio-mode-switch #switchManualCreateBtn.active * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* Global title signature + design-spec tab states v7. */
body.studio-manual-mode #appPanel #studioView::after,
body.studio-agent-mode #appPanel #studioView::after {
  content: none !important;
  display: none !important;
}

#appPanel::before {
  content: "";
  position: absolute;
  top: 12px;
  left: 50%;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, #c7a05b, transparent);
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 90;
}

html body .phone-app.phone-app.phone-app nav.tabbar button.tab-item {
  gap: 5px !important;
  background: transparent !important;
  background-image: none !important;
  border-color: transparent !important;
  box-shadow: none !important;
  filter: none !important;
}

html body .phone-app.phone-app.phone-app nav.tabbar button.tab-item.active {
  background: transparent !important;
  background-image: none !important;
  border-color: transparent !important;
  color: #5044e3 !important;
  -webkit-text-fill-color: #5044e3 !important;
  box-shadow: none !important;
  filter: none !important;
}

html body .phone-app.phone-app.phone-app nav.tabbar button.tab-item .tab-icon,
html body .phone-app.phone-app.phone-app nav.tabbar button.tab-item.active .tab-icon,
html body .phone-app.phone-app.phone-app nav.tabbar button.tab-item:active .tab-icon {
  width: 38px !important;
  min-width: 38px !important;
  height: 24px !important;
  min-height: 24px !important;
  margin: 0 0 -3px !important;
  border-radius: 999px !important;
  transform: none !important;
  box-shadow: none !important;
  filter: none !important;
}

html body .phone-app.phone-app.phone-app nav.tabbar button.tab-item .tab-icon {
  background: transparent !important;
}

html body .phone-app.phone-app.phone-app nav.tabbar button.tab-item.active .tab-icon {
  background: #edebfc !important;
  background-image: none !important;
  color: #5044e3 !important;
  overflow: hidden !important;
}

html body .phone-app.phone-app.phone-app nav.tabbar button.tab-item .tab-logo-icon img {
  width: 32px !important;
  height: 32px !important;
  display: block !important;
  flex: 0 0 auto !important;
  object-fit: contain !important;
  filter: none !important;
}

html body .phone-app.phone-app.phone-app nav.tabbar button.tab-item .tab-logo-icon,
html body .phone-app.phone-app.phone-app nav.tabbar button.tab-item.active .tab-logo-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: visible !important;
  line-height: 0 !important;
}

html body .phone-app.phone-app.phone-app nav.tabbar button.tab-item > span:not(.tab-icon) {
  position: relative;
  z-index: 2;
  color: #a6a8bc !important;
  -webkit-text-fill-color: #a6a8bc !important;
  font-size: 10.5px !important;
  line-height: 1.2 !important;
}

html body .phone-app.phone-app.phone-app nav.tabbar button.tab-item.active > span:not(.tab-icon) {
  color: #5044e3 !important;
  -webkit-text-fill-color: #5044e3 !important;
}

html body .phone-app.phone-app.phone-app nav.tabbar .tab-work-icon::after {
  left: 19px !important;
  top: 8px !important;
}

html body .phone-app.phone-app.phone-app nav.tabbar .tab-account-icon::before {
  top: 2.5px !important;
  width: 6.5px !important;
  height: 6.5px !important;
  border-width: 1.5px !important;
}

html body .phone-app.phone-app.phone-app nav.tabbar .tab-account-icon::after {
  bottom: 2.5px !important;
  width: 17px !important;
  height: 7.5px !important;
  border-width: 1.5px !important;
}

/* Mini-program native-title continuation v8.
   The native WeChat title bar sits outside the web-view, so continue its navy
   surface through the existing 12px web safe area and keep the signature there. */
html.mahua-mini-program-review #appPanel::after,
body.mahua-mini-program-review #appPanel::after,
body.mini-program-review #appPanel::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 12px;
  background: #0a0c16;
  pointer-events: none;
  z-index: 89;
}

html.mahua-mini-program-review #appPanel::before,
body.mahua-mini-program-review #appPanel::before,
body.mini-program-review #appPanel::before {
  top: 4px;
}

/* Fullscreen transport controls v9.
   Shared by Mini/H5, the standard APK and the Android 9 APK. */
.video-fullscreen-overlay .fullscreen-close {
  left: 14px !important;
  right: auto !important;
  z-index: 12 !important;
  display: grid !important;
  place-items: center !important;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.video-fullscreen-overlay .fullscreen-close > span {
  display: block;
  transform: translateX(-1px);
  font-size: 32px;
  line-height: 1;
}

.video-fullscreen-overlay .fullscreen-play {
  z-index: 12 !important;
  display: grid;
  place-items: center;
  width: 68px;
  min-width: 68px;
  height: 68px;
  min-height: 68px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(5, 7, 13, 0.62);
  color: #fff;
  font-size: 28px;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.26);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

.video-fullscreen-overlay .fullscreen-play.hidden {
  display: none !important;
}

.video-fullscreen-overlay .fullscreen-play > span {
  display: block;
  transform: translateX(2px);
  line-height: 1;
}

.video-fullscreen-overlay .fullscreen-controls {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 8px);
  z-index: 12;
  display: grid;
  grid-template-columns: 34px 43px minmax(0, 1fr) 49px;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 6px 9px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 14px;
  background: rgba(5, 7, 13, 0.76);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  touch-action: pan-x;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.video-fullscreen-overlay.controls-visible .fullscreen-controls,
.video-fullscreen-overlay.fullscreen-paused .fullscreen-controls {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.video-fullscreen-overlay.controls-visible .fullscreen-close,
.video-fullscreen-overlay.fullscreen-paused .fullscreen-close {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.video-fullscreen-overlay .fullscreen-toggle {
  display: grid;
  place-items: center;
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #fff;
  font-size: 18px;
  line-height: 1;
  touch-action: manipulation;
}

.video-fullscreen-overlay .fullscreen-landscape {
  display: none;
  place-items: center;
  width: 42px;
  min-width: 42px;
  height: 28px;
  min-height: 28px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.92);
  font-size: 10px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.2px;
  line-height: 1;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.video-fullscreen-overlay.fullscreen-current-landscape .fullscreen-controls {
  grid-template-columns: 34px 43px minmax(0, 1fr) 49px 42px;
}

.video-fullscreen-overlay.fullscreen-current-landscape .fullscreen-landscape {
  display: grid;
}

.video-fullscreen-overlay .fullscreen-landscape.active {
  border-color: rgba(212, 167, 76, 0.92);
  background: linear-gradient(135deg, rgba(212, 167, 76, 0.28), rgba(137, 100, 38, 0.24));
  color: #f7d98e;
  box-shadow: inset 0 0 0 1px rgba(247, 217, 142, 0.12);
}

.video-fullscreen-overlay .fullscreen-toggle:active,
.video-fullscreen-overlay .fullscreen-landscape:active,
.video-fullscreen-overlay .fullscreen-close:active {
  transform: scale(0.94);
}

.video-fullscreen-overlay .fullscreen-play:active {
  transform: translate(-50%, -50%) scale(0.94);
}

.video-fullscreen-overlay .fullscreen-time {
  min-width: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.video-fullscreen-overlay .fullscreen-seek {
  --fullscreen-progress: 0%;
  width: 100%;
  min-width: 0;
  height: 28px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  touch-action: pan-x;
}

/* Range inputs inherit the app-wide 48px text-field treatment. Reset every
   field metric so older Android WebViews cannot paint a white input pill. */
html body .video-fullscreen-overlay input.fullscreen-seek {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  height: 14px !important;
  min-height: 14px !important;
  max-height: 14px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  outline: none !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}

.video-fullscreen-overlay .fullscreen-seek::-webkit-slider-runnable-track {
  width: 100%;
  height: 2px !important;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(to right, rgba(255, 255, 255, 0.76) 0, rgba(255, 255, 255, 0.76) var(--fullscreen-progress), rgba(255, 255, 255, 0.2) var(--fullscreen-progress), rgba(255, 255, 255, 0.2) 100%) !important;
}

.video-fullscreen-overlay .fullscreen-seek::-webkit-slider-thumb {
  width: 10px !important;
  height: 10px !important;
  margin-top: -4px !important;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92) !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.38) !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}

.video-fullscreen-overlay .fullscreen-seek::-moz-range-track {
  height: 2px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
}

.video-fullscreen-overlay .fullscreen-seek::-moz-range-progress {
  height: 2px;
  border: 0;
  border-radius: 999px;
  background: #fff;
}

.video-fullscreen-overlay .fullscreen-seek::-moz-range-thumb {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.45);
}

.video-fullscreen-overlay .fullscreen-seek:disabled {
  opacity: 0.42;
}

.video-fullscreen-overlay .fullscreen-seek:focus-visible,
.video-fullscreen-overlay .fullscreen-toggle:focus-visible,
.video-fullscreen-overlay .fullscreen-landscape:focus-visible,
.video-fullscreen-overlay .fullscreen-close:focus-visible,
.video-fullscreen-overlay .fullscreen-play:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.94);
  outline-offset: 2px;
}

/* True landscape playback v13. Landscape media first requests native browser
   or APK orientation. Fixed-orientation mini-program/WebView shells rotate the
   complete player canvas, so the user can turn the device and watch it wide. */
@media (orientation: portrait) {
  .video-fullscreen-overlay.fullscreen-css-landscape {
    inset: auto !important;
    top: 50% !important;
    left: 50% !important;
    width: 100vh !important;
    width: 100dvh !important;
    height: 100vw !important;
    max-width: none !important;
    max-height: none !important;
    --fullscreen-viewport-height: 100vw !important;
    transform: translate(-50%, -50%) rotate(90deg) !important;
    transform-origin: center center !important;
  }

  .video-fullscreen-overlay.fullscreen-css-landscape .fullscreen-track {
    width: 100% !important;
    height: 300vw !important;
  }

  .video-fullscreen-overlay.fullscreen-css-landscape .fullscreen-slide,
  .video-fullscreen-overlay.fullscreen-css-landscape .fullscreen-slide video,
  .video-fullscreen-overlay.fullscreen-css-landscape .fullscreen-slide .fullscreen-slide-cover {
    width: 100% !important;
    height: 100vw !important;
    min-height: 100vw !important;
    max-height: 100vw !important;
    object-fit: contain !important;
  }
}

.video-fullscreen-overlay.fullscreen-16x9-mode .fullscreen-info,
.video-fullscreen-overlay.fullscreen-16x9-mode .fullscreen-actions,
.video-fullscreen-overlay.fullscreen-16x9-mode .fullscreen-operation,
.video-fullscreen-overlay.fullscreen-16x9-mode .fullscreen-counter {
  display: none !important;
}

@media (max-width: 359px) {
  .video-fullscreen-overlay .fullscreen-controls {
    left: 8px;
    right: 8px;
    grid-template-columns: 31px 39px minmax(0, 1fr) 45px;
    gap: 5px;
    padding-left: 7px;
    padding-right: 7px;
  }

  .video-fullscreen-overlay.fullscreen-current-landscape .fullscreen-controls {
    grid-template-columns: 31px 39px minmax(0, 1fr) 45px 38px;
  }

  .video-fullscreen-overlay .fullscreen-toggle {
    width: 31px;
    min-width: 31px;
  }

  .video-fullscreen-overlay .fullscreen-landscape {
    width: 38px;
    min-width: 38px;
    font-size: 9px;
  }
}

.video-fullscreen-overlay .fullscreen-info {
  bottom: calc(env(safe-area-inset-bottom, 0px) + 78px) !important;
}

.video-fullscreen-overlay .fullscreen-actions {
  bottom: calc(env(safe-area-inset-bottom, 0px) + 84px) !important;
}

.video-fullscreen-overlay.dragging .fullscreen-controls {
  opacity: 0 !important;
  transform: translateY(8px) !important;
  pointer-events: none !important;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

html.mahua-apk-android9 .video-fullscreen-overlay .fullscreen-controls,
body.mahua-apk-android9 .video-fullscreen-overlay .fullscreen-controls {
  background: rgba(5, 7, 13, 0.88);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

@media (orientation: landscape) and (max-height: 520px) {
  .video-fullscreen-overlay .fullscreen-controls {
    left: 16px;
    right: 16px;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 6px);
  }

  .video-fullscreen-overlay .fullscreen-info {
    bottom: calc(env(safe-area-inset-bottom, 0px) + 68px) !important;
  }

  .video-fullscreen-overlay .fullscreen-actions {
    bottom: calc(env(safe-area-inset-bottom, 0px) + 72px) !important;
  }
}

/* Mini-program fullscreen controls stability v11.
   WKWebView can leave a backdrop-filter layer visible while its children are
   repainted after the three-slide video rail rotates. Use a single solid
   compositor and visibility changes only for the mini-program overlay. */
.video-fullscreen-overlay.mini-program-fullscreen .fullscreen-controls {
  background: rgba(5, 7, 13, 0.84) !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2) !important;
  opacity: 0 !important;
  visibility: hidden !important;
  transform: translateZ(0) !important;
  -webkit-transform: translateZ(0) !important;
  transition: none !important;
}

.video-fullscreen-overlay.mini-program-fullscreen.controls-visible .fullscreen-controls,
.video-fullscreen-overlay.mini-program-fullscreen.fullscreen-paused .fullscreen-controls {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

.video-fullscreen-overlay.mini-program-fullscreen .fullscreen-controls > * {
  opacity: 1 !important;
  visibility: visible !important;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

.video-fullscreen-overlay.mini-program-fullscreen.dragging .fullscreen-controls {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Landscape transport auto-hide v22. Paused videos obey the same three-second
   visibility window; a tap restores the controls without changing playback. */
.video-fullscreen-overlay.fullscreen-16x9-mode.fullscreen-paused:not(.controls-visible) .fullscreen-controls,
.video-fullscreen-overlay.mini-program-fullscreen.fullscreen-16x9-mode.fullscreen-paused:not(.controls-visible) .fullscreen-controls {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transform: translateY(8px) !important;
}

/* Public creator profile v15. Shared by Mini/H5 and both APK runtimes. */
body.user-profile-open {
  overflow: hidden !important;
}

[data-user-profile] {
  cursor: pointer;
}

.fullscreen-author {
  border: 0 !important;
  background: transparent !important;
  color: inherit !important;
  font: inherit;
  text-align: left;
  -webkit-appearance: none;
  appearance: none;
}

.video-fullscreen-overlay .fullscreen-author[data-user-profile] {
  position: relative;
  z-index: 1;
  pointer-events: auto !important;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.fullscreen-author:disabled {
  opacity: 1;
  cursor: default;
}

.public-user-profile-overlay {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: #f5f5fa;
  color: #151622;
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
}

.public-user-profile-overlay.hidden {
  display: none !important;
}

.public-user-profile-header {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  min-height: 54px;
  padding: env(safe-area-inset-top, 0px) 10px 0;
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid #ececf3;
}

.public-user-profile-header button,
.public-user-profile-header i {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #171825;
  box-shadow: none;
  -webkit-appearance: none;
  appearance: none;
}

.public-user-profile-header button:active {
  background: #efeff6;
}

.public-user-profile-header button span {
  display: block;
  transform: translateY(-1px);
  font-size: 34px;
  font-weight: 400;
  line-height: 1;
}

.public-user-profile-header > strong {
  overflow: hidden;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.public-user-profile-scroll {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 14px 14px calc(28px + env(safe-area-inset-bottom, 0px));
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

.public-user-profile-hero {
  padding: 22px 20px 18px;
  border: 1px solid rgba(25, 24, 54, 0.055);
  border-radius: 22px;
  background:
    radial-gradient(circle at 91% 8%, rgba(199, 160, 91, 0.18), transparent 29%),
    linear-gradient(145deg, #1f1a43 0%, #131126 58%, #090b14 100%);
  color: #fff;
  box-shadow: 0 18px 34px -24px rgba(17, 14, 46, 0.72);
}

.public-user-profile-identity {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 14px;
}

.public-user-profile-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 74px;
  width: 74px;
  height: 74px;
  overflow: hidden;
  border: 2px solid #c7a05b;
  border-radius: 50%;
  background: #373251;
  color: #fff;
  box-shadow: 0 0 0 3px rgba(199, 160, 91, 0.13);
}

.public-user-profile-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.public-user-profile-avatar span {
  font-size: 27px;
  font-weight: 750;
}

.public-user-profile-name {
  min-width: 0;
}

.public-user-profile-name h2 {
  overflow: hidden;
  color: #fff !important;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.public-user-profile-name p {
  margin-top: 7px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
  letter-spacing: 0.02em;
}

.public-user-profile-bio {
  margin-top: 17px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  line-height: 1.55;
}

.public-user-profile-meta {
  margin-top: 7px;
  color: rgba(255, 255, 255, 0.48);
  font-size: 12px;
}

.public-user-profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.public-user-profile-stats > div {
  display: grid;
  justify-items: center;
  gap: 4px;
  min-width: 0;
}

.public-user-profile-stats > div + div {
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.public-user-profile-stats strong {
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.public-user-profile-stats span {
  color: rgba(255, 255, 255, 0.55);
  font-size: 12px;
}

.public-user-profile-gallery {
  margin-top: 20px;
}

.public-user-profile-gallery > header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 0 2px 11px;
}

.public-user-profile-gallery h3 {
  color: #151622;
  font-size: 19px;
  font-weight: 800;
}

.public-user-profile-gallery header span {
  color: #999aad;
  font-size: 12px;
}

.public-user-profile-works {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 10px;
}

.public-user-profile-work {
  display: grid;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: #fff;
  color: #1b1c29;
  text-align: left;
  box-shadow: 0 1px 2px rgba(20, 20, 50, 0.04);
  -webkit-appearance: none;
  appearance: none;
}

.public-user-profile-work:active {
  transform: scale(0.985);
}

.public-user-profile-cover {
  position: relative;
  display: block;
  width: 100%;
  height: calc((100vw - 38px) * 0.64);
  max-height: 280px;
  overflow: hidden;
  border-radius: 14px 14px 10px 10px;
  background: linear-gradient(145deg, #e9e8f4, #d9d8e7);
}

.public-user-profile-cover img,
.public-user-profile-cover > i {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.public-user-profile-cover em {
  position: absolute;
  right: 8px;
  bottom: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(6, 7, 13, 0.62);
  color: #fff;
  font-size: 11px;
  font-style: normal;
  line-height: 1;
}

.public-user-profile-cover .social-icon {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  fill: none;
}

.public-user-profile-work > strong {
  display: -webkit-box;
  min-height: 39px;
  margin: 10px 10px 11px;
  overflow: hidden;
  color: #20212d;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.public-user-profile-more {
  display: block;
  min-width: 132px;
  height: 40px;
  margin: 20px auto 0;
  padding: 0 22px;
  border: 1px solid #e4e3ee;
  border-radius: 999px;
  background: #fff;
  color: #5b5c70;
  font-size: 13px;
  box-shadow: none;
}

.public-user-profile-empty {
  grid-column: 1 / -1;
  display: grid;
  justify-items: center;
  gap: 7px;
  padding: 54px 20px;
  border-radius: 16px;
  background: #fff;
  color: #9899aa;
  text-align: center;
}

.public-user-profile-empty strong {
  color: #55566a;
  font-size: 15px;
}

.public-user-profile-empty span {
  font-size: 12px;
}

.public-user-profile-work-skeleton {
  display: grid;
  gap: 8px;
  padding-bottom: 8px;
  overflow: hidden;
  border-radius: 14px;
  background: #fff;
}

.public-user-profile-work-skeleton i {
  display: block;
  height: calc((100vw - 38px) * 0.64);
  max-height: 280px;
  background: linear-gradient(100deg, #e9e9f1 25%, #f4f4f8 38%, #e9e9f1 52%);
  background-size: 220% 100%;
  animation: public-profile-shimmer 1.25s linear infinite;
}

.public-user-profile-work-skeleton span {
  display: block;
  width: calc(100% - 20px);
  height: 10px;
  margin: 0 10px;
  border-radius: 999px;
  background: #eeeeF4;
}

.public-user-profile-work-skeleton span:last-child {
  width: 56%;
}

@keyframes public-profile-shimmer {
  to { background-position-x: -220%; }
}

html.mahua-apk-android9 .public-user-profile-overlay,
body.mahua-apk-android9 .public-user-profile-overlay {
  height: 100vh;
}

html.mahua-apk-android9 .public-user-profile-cover,
html.mahua-apk-android9 .public-user-profile-work-skeleton i,
body.mahua-apk-android9 .public-user-profile-cover,
body.mahua-apk-android9 .public-user-profile-work-skeleton i {
  height: calc((100vw - 38px) * 0.64);
}

@media (min-width: 720px) {
  .public-user-profile-scroll {
    width: min(100%, 680px);
    margin: 0 auto;
  }
  .public-user-profile-cover,
  .public-user-profile-work-skeleton i {
    height: 406px;
  }
}
