/* Community artwork and account standing use the workspace's existing surfaces and spacing. */
.community-theme-frame { display: block; border: 0; pointer-events: none; width: 100%; height: 100%; }
#community-theme-background { position: fixed; inset: 0; z-index: 0; }
#community-theme-wallpaper { position: fixed; inset: 0; z-index: 0; pointer-events: none; background-size: cover; background-position: center; }
:root.community-theme .app { position: relative; z-index: 1; background: transparent !important; }
:root.community-theme .main,:root.community-theme .sidebar { background: var(--glass-1) !important; backdrop-filter: blur(6px); }
:root.community-theme :is(.chat,.page,.members,.topbar) { background: transparent !important; }
.featured-community { margin-top: 38px; padding-top: 24px; border-top: 1px solid var(--line); }
.featured-community .shop-section-head { align-items: center; gap: 16px; }
.featured-community h2 { margin: 0; }
.featured-community p { color: var(--text-2); font-size: 13px; line-height: 1.6; }
.featured-community-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.featured-community-card { display: flex; flex-direction: column; text-align: left; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--bg-2); }
.featured-community-card > img { width: 100%; height: 138px; object-fit: contain; background: var(--bg-3); }
.featured-community-card > span { display: grid; gap: 5px; padding: 13px; }
.featured-community-card b { font-size: 14px; }
.featured-community-card small { font-size: 11px; color: var(--text-2); }
.featured-community-card em { font-size: 12px; color: var(--gold); font-style: normal; }
.featured-community-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 16px; font-size: 12px; }
.featured-community-empty { grid-column: 1 / -1; padding: 22px; border: 1px solid var(--line); border-radius: 8px; }
.community-theme-preview { position: relative; isolation: isolate; width: 100%; max-width: 100%; min-width: 0; min-height: 280px; aspect-ratio: 8 / 5; overflow: hidden; border-radius: 8px; background: var(--bg); border: 1px solid var(--line); color: var(--text); }
.community-theme-preview > iframe { position: absolute; inset: 0; z-index: 0; }
.theme-preview-chat { display: grid; grid-template-columns: minmax(0,30%) minmax(0,1fr); width: 100%; min-width: 0; position: relative; z-index: 1; height: 100%; min-height: inherit; font-size: 12px; }
.theme-preview-chat aside { display: flex; flex-direction: column; gap: 18px; padding: 20px 14px; background: color-mix(in srgb,var(--bg-2) 85%,transparent); border-right: 1px solid var(--line); }
.theme-preview-chat section { display: flex; flex-direction: column; padding: 20px 16px; background: color-mix(in srgb,var(--bg-1) 75%,transparent); min-width: 0; }
.theme-preview-chat article { display: flex; gap: 10px; margin-top: 26px; }
.theme-preview-chat article > div { min-width: 0; overflow-wrap: anywhere; }
.theme-preview-chat article i { flex: none; width: 26px; height: 26px; border-radius: 8px; background: var(--blue); }
.theme-preview-chat article:nth-child(3) i { background: var(--green); }
.theme-preview-chat p { color: var(--text-2); font-size: 11px; line-height: 1.6; margin: 5px 0; white-space: normal; overflow-wrap: anywhere; }
.theme-preview-chat footer { margin-top: auto; padding: 10px; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; background: var(--bg-3); }
.theme-editor-tools { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0; }
.theme-editor { display: grid; grid-template-columns: minmax(0,1.15fr) minmax(0,1fr); gap: 24px; }
.theme-editor > section,.theme-editor > aside { min-width: 0; }
.theme-editor label { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; font-size: 12px; font-weight: 600; }
.theme-editor .creative-free { flex-direction: row; }
.theme-editor textarea { font: 12px/1.6 var(--font-mono,monospace); tab-size: 2; }
.theme-editor > aside { align-self: start; position: sticky; top: 0; }
.theme-preview-empty { padding: 55px 20px; text-align: center; border: 1px dashed var(--line); border-radius: 8px; color: var(--text-2); font-size: 13px; }
.theme-editor-modal { height: min(850px,calc(100dvh - 24px)); }
@media(max-width:760px) { .featured-community-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }.featured-community .shop-section-head { flex-wrap: wrap; }.theme-editor { grid-template-columns: 1fr; }.theme-editor aside { position: static; }.community-theme-preview { min-height: 240px; }.theme-preview-chat aside { padding: 14px 8px; font-size: 10px; } }
.profile-banner-controls { display: flex; flex-direction: column; gap: 10px; margin: 16px 0 24px; max-width: 600px; }
.profile-banner-controls > label { font-size: 13px; font-weight: 600; }
.profile-banner-controls > div:not(.form-error) { display: flex; flex-wrap: wrap; gap: 8px; }
.profile-banner-controls small { font-size: 12px; color: var(--text-2); line-height: 1.6; }
.profile-banner-controls [hidden] { display: none !important; }
.profile-banner-image { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; pointer-events: none; }
.profile-preview:has(.pp-banner) { max-width: 600px; }
.profile-preview .pp-banner:has(.profile-banner-image) { height: auto; aspect-ratio: 3 / 1; }
.profile-preview .pp-body { position: relative; }
.profile-card:not(.mini) .pc-hero > .profile-banner-image { position: absolute; top: 0; left: 0; right: 0; height: 112px; z-index: 0; border-radius: 8px 8px 0 0; }
.full-profile .fp-banner > .profile-banner-image { position: absolute; inset: 0; }
.full-profile .fp-banner .x { z-index: 2; }
/* Nameplates stay inside their row. Avatar overlays and menus remain above the artwork. */
.nameplate-art { position: absolute; inset: 0; overflow: hidden; border-radius: inherit; pointer-events: none; z-index: 0; background: #30333b; }
.nameplate-art > :is(img,svg) { display: block; width: 100%; height: 100%; object-fit: cover; object-position: right center; }
.nameplate-art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg,rgba(22,24,30,.95),rgba(22,24,30,.8) 36%,rgba(22,24,30,.24) 78%); }
:is(.member,.dm-item,.me-chip,.pcard):has(> .nameplate-art),.creative-nameplate-preview { position: relative; isolation: isolate; }
:is(.member,.dm-item,.me-chip,.pcard):has(> .nameplate-art) > :not(.nameplate-art),.creative-nameplate-preview > :not(.nameplate-art) { position: relative; z-index: 1; }
:is(.member,.dm-item,.me-chip,.pcard):has(> .nameplate-art) :is(.mn,.dname,.who,.pc-who) { color: #f3f4f7; }
.nameplate_meadow { background: linear-gradient(110deg,#30333b 30%,#514b32 75%,#b18b42); }
.nameplate_meadow svg { stroke: #e7bb65; stroke-width: 1.3; fill: none; transform-origin: bottom right; animation: nameplate-sway 6s ease-in-out infinite; }
.nameplate_orbit { background: linear-gradient(110deg,#30333b 30%,#25304a 75%,#526485); }
.nameplate_orbit svg { animation: nameplate-starlight 5s ease-in-out infinite; }
.nameplate_ink { background: linear-gradient(110deg,#30333b 30%,#32324b 70%,#535171); }
.creative-nameplate-preview { display: flex; align-items: center; gap: 10px; width: 100%; min-width: 0; min-height: 56px; padding: 8px 10px; border-radius: 8px; color: #f3f4f7; text-align: left; }
.creative-nameplate-preview > div { min-width: 0; }
.creative-nameplate-preview b { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.creative-nameplate-preview small { display: block; color: #c5c8d1; font-size: 11px; margin-top: 2px; }
.creative-selected > .creative-nameplate-preview { margin: 28px 0; }
.ip-nameplate { padding: 12px; }
@keyframes nameplate-sway { 50% { transform: skewX(-3deg); } }
@keyframes nameplate-starlight { 50% { opacity: .65; transform: translateY(-1px); } }

/* A portrait profile: artwork across the whole card, with a distinct banner and identity. */
.profile-card:not(.mini),.full-profile { position: relative; isolation: isolate; border-radius: 12px; }
.profile-card:not(.mini) { width: 340px; }
.profile-card:not(.mini) .pc-hero { display: block; padding: 78px 18px 4px; background: transparent; }
.profile-card:not(.mini) .pc-hero::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 112px; background: var(--pc-bg); border-radius: 11px 11px 0 0; }
.profile-card:not(.mini) .pc-hero::after { display: none; }
.profile-card:not(.mini) .pc-av { width: fit-content; }
.profile-card:not(.mini) .pc-av .av.lg { width: 80px; height: 80px; }
.profile-card:not(.mini) .pc-hero .pc-av .av-img { border: 5px solid var(--bg-1); }
.profile-card:not(.mini) .pc-names { margin-top: 12px; }
.profile-card:not(.mini) .pc-names h3 { font-size: 21px; line-height: 1.3; font-weight: 650; text-shadow: none; white-space: normal; overflow-wrap: anywhere; }
.profile-card:not(.mini) .pc-names .uname { font-size: 12px; margin-top: 3px; color: var(--text-2) !important; overflow-wrap: anywhere; }
.profile-card:not(.mini) .pc-names .badge-row { margin: 10px 0 4px; background: var(--bg-3); border-radius: 6px; }
.profile-card:not(.mini) .pc-body { padding: 8px 18px 18px; }
:is(.profile-card,.full-profile) .pc-sec { border: 0; border-radius: 8px; padding: 12px; font-size: 13px; line-height: 1.55; }
:is(.profile-card,.full-profile) .pc-sec h5 { font-size: 11px; font-weight: 650; color: var(--text-2); margin-bottom: 7px; }
.profile-backdrop { position: absolute; inset: 0; overflow: hidden; border-radius: inherit; pointer-events: none; z-index: 0; background: #171a24; }
.profile-backdrop > img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.profile-backdrop::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg,rgba(14,16,23,.05),rgba(14,16,23,.25) 24%,rgba(14,16,23,.8) 47%,rgba(14,16,23,.92)); }
.has-profile-backdrop > :not(.profile-backdrop):not(.profile-open-effect) { position: relative; z-index: 1; }
.has-profile-backdrop { color: #f3f4f7; --text: #f3f4f7; --text-2: #c5c8d1; --muted: #a7adbc; --bg-2: rgba(18,20,29,.64); --bg-3: rgba(18,20,29,.78); }
.profile-card.has-profile-backdrop .pc-hero::before,.full-profile.has-profile-backdrop .fp-banner { background: transparent; }
.has-profile-backdrop :is(.pc-sec,.pc-facts > div,.pc-status,.private-friend-controls) { background: rgba(18,20,29,.7); }
.fp-modal { width: 480px; max-width: min(480px,calc(100vw - 24px)) !important; border-radius: 12px; }
.full-profile .fp-banner { height: 144px; }
.full-profile .fp-top { align-items: flex-start; padding: 0 22px; gap: 12px; }
.full-profile .fp-names { flex-basis: calc(100% - 116px); padding-top: 50px; }
.full-profile .fp-names h2 { font-size: 23px; line-height: 1.25; overflow-wrap: anywhere; }
.full-profile .fp-names > span { font-size: 12px; }
.full-profile .fp-actions { flex-basis: 100%; margin: 4px 0 8px; }
.full-profile .fp-actions .btn { flex: 1; justify-content: center; }
.full-profile .fp-tabs { margin-top: 10px; overflow-x: auto; }
.full-profile .fp-tabs button { white-space: nowrap; }
.creative-profile-preview { width: 100% !important; margin-bottom: 18px; border: 1px solid var(--line); min-height: 380px; text-align: left; }
.creative-profile-preview .pc-hero { flex: none; }
.creative-profile-preview .pc-body { overflow: visible; }
.creative-profile-preview .pc-actions .btn { font-size: 12px; justify-content: center; }
.creative-upload-canvas.is-nameplate { min-height: 56px; height: 56px; margin-top: 24px; }
.creative-upload-canvas.is-nameplate > [data-art-preview] { width: 100%; height: 100%; object-fit: cover; object-position: right center; z-index: 0; }
.creative-upload-canvas.is-nameplate .creative-nameplate-preview { background: linear-gradient(90deg,rgba(22,24,30,.94),rgba(22,24,30,.8) 36%,transparent); z-index: 1; }
.creative-upload-canvas.is-profile-effect { display: block; min-height: 380px; background: var(--bg-1); }
.creative-upload-canvas.is-profile-effect .creative-profile-preview { border: 0; margin: 0; pointer-events: none; }
.creative-upload-canvas.is-profile-effect > [data-art-preview] { inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; pointer-events: none; z-index: 4; }
.creative-upload-canvas[data-type=pbg] > [data-art-preview] { z-index: 0; }
.creative-upload-canvas[data-type=pbg] .creative-profile-preview { z-index: 1; background: linear-gradient(180deg,transparent,rgba(14,16,23,.84) 48%,rgba(14,16,23,.94)); }
.creative-upload-canvas[data-type=pbg] .pc-hero::before { background: transparent; }
.profile-card .profile-open-effect > img,.full-profile .profile-open-effect > img { object-fit: cover; object-position: center top; }
.profile-open-effect.landscape-effect > img { object-fit: contain; object-position: center; }
.profile-open-effect.effect_starlight { background: radial-gradient(ellipse at 85% 10%,rgba(181,180,247,.32),transparent 48%); }
.profile-open-effect.effect_starlight i { background: #e7e8ff; filter: drop-shadow(0 0 5px #adadf4); }
@media(max-width:760px) {
  .fp-modal { width: calc(100vw - 16px); max-width: calc(100vw - 16px) !important; }
  .full-profile .fp-names { min-width: 0; flex-basis: calc(100% - 90px); padding-top: 36px; }
  .creative-selected > .creative-profile-preview { width: min(300px,100%) !important; margin: 0 auto 18px; }
  .creative-upload-canvas.is-profile-effect { width: min(300px,100%); margin: 0 auto; }
}
@media(prefers-reduced-motion:reduce) { .nameplate-art svg { animation: none !important; } }
.reduce-motion .nameplate-art svg { animation: none !important; }
.shop { width: 100%; min-width: 0; }
.shop-navigation { display: flex; align-items: center; gap: 8px; min-width: 0; margin: 16px 0; }
.shop-navigation .shop-tabs { position: relative; flex: 1; min-width: 0; margin: 0; padding: 3px 1px 9px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: var(--muted) transparent; }
.shop-navigation .shop-tabs::-webkit-scrollbar { display: block; height: 5px; }
.shop-navigation .shop-tabs::-webkit-scrollbar-thumb { background: var(--muted); border-radius: 5px; }
.shop-navigation .shop-tab { flex: 0 0 auto; }
.shop-scroll { flex: none; border: 1px solid var(--line); border-radius: 6px; width: 32px; height: 36px; }
.shop-scroll.previous svg { transform: rotate(180deg); }
.shop-scroll:disabled { opacity: .3; cursor: default; }
.creative-modal [hidden], .community-shop [hidden], .creative-upload [hidden] { display: none !important; }
.modal.wide.creative-modal { max-width: 1000px; height: min(760px,calc(100dvh - 32px)); }
.creative-picker { display: grid; grid-template-columns: minmax(0,1fr) 280px; flex: 1; min-height: 0; padding: 12px 22px 22px; gap: 22px; }
.creative-browser { min-width: 0; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 2px; }
.creative-tabs { display: flex; gap: 3px; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: 8px; margin-bottom: 12px; }
.creative-tabs button { border-radius: 5px; font-size: 12px; padding: 7px 10px; color: var(--text-2); }
.creative-tabs button.on { background: var(--bg-active); color: var(--text); }
.creative-filters { display: grid; grid-template-columns: minmax(0,1fr) 130px; gap: 8px; }
.creative-filters .input, .creative-filters .select { min-width: 0; padding: 9px; font-size: 12px; }
.creative-owned { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--text-2); margin: 12px 0; }
.creative-item-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(112px,1fr)); gap: 9px; }
.creative-art-card { min-width: 0; display: flex; flex-direction: column; text-align: left; gap: 4px; padding: 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--bg-3); }
.creative-art-card.selected { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
.creative-art-card b { font-size: 12px; overflow: hidden; text-overflow: ellipsis; max-width: 100%; white-space: nowrap; }
.creative-art-card small, .creative-art-card > span { font-size: 10px; color: var(--muted); }
.creative-art-preview { display: grid; place-items: center; position: relative; width: 100%; height: 96px; overflow: hidden; }
.creative-art-preview > img { width: 100%; height: 100%; object-fit: contain; }
.creative-art-preview > .ip { height: 100%; width: 100%; border: 0; background: transparent; }
.creative-art-preview .av.lg { width: 54px; height: 54px; }
.creative-art-preview .av-deco, .creative-art-preview .av-custom { z-index: 2; }
.creative-selected { position: relative; min-width: 0; border-left: 1px solid var(--line); padding-left: 22px; overflow-y: auto; overflow-wrap: anywhere; }
.creative-avatar-preview { display: flex; min-height: 190px; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 8px; background: var(--bg-3); margin-bottom: 16px; position: relative; }
.creative-avatar-preview .av.lg { width: 96px; height: 96px; }
.creative-mini-profile { border: 1px solid var(--line); padding: 14px; border-radius: 7px; margin-bottom: 18px; font-size: 13px; }
.creative-mini-profile p, .creative-selected > p { color: var(--text-2); font-size: 12px; line-height: 1.65; }
.creative-selected > small { font-size: 10px; color: var(--muted); letter-spacing: .06em; }
.creative-selected h4 { margin: 6px 0; font-size: 15px; }
.creative-make { width: 100%; margin-top: 16px; }
.creative-more { margin-top: 12px; }
.creative-result { color: var(--red); flex: 1; font-size: 12px; align-self: center; }
.creative-setting-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.creative-setting-row b { font-size: 13px; font-weight: 550; }
.creative-setting-row small { display: block; color: var(--muted); font-size: 12px; margin-top: 5px; }
.creative-preview-companion, .creative-preview-message, .creative-preview-effect, .creative-preview-feature { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 12px; position: relative; }
.creative-preview-companion .profile-companion { position: static; width: 68px; height: 68px; }
.creative-preview-message span { padding: 9px 13px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 7px; font-size: 12px; }
.creative-preview-message svg, .creative-preview-effect svg, .creative-preview-feature svg { color: var(--gold); }
.creative-message-sample { margin: 14px 0; padding: 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--bg-2); font-size: 13px; }
.creative-compose-button[aria-pressed="true"] { color: var(--gold); background: var(--gold-soft); }
.creative-preview-effect span, .creative-preview-feature span { font-size: 11px; color: var(--muted); }
.creative-unlock { max-width: 520px; padding: 22px; border: 1px solid var(--line); border-radius: 8px; }
.creative-unlock svg { color: var(--gold); }
.creative-unlock p { color: var(--text-2); line-height: 1.7; font-size: 13px; }
.creative-compose-button { color: var(--muted); }
.creative-upload { display: grid; grid-template-columns: minmax(0,1fr) minmax(200px,300px); gap: 24px; min-height: 0; }
.creative-upload .field small, .creative-upload-preview > small { color: var(--muted); line-height: 1.7; font-size: 11px; }
.creative-upload-fields { min-width: 0; }
.creative-upload-preview { min-width: 0; }
.creative-upload-canvas { min-height: 240px; position: relative; display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--line); background: repeating-conic-gradient(var(--bg-2) 0 25%,var(--bg-3) 0 50%) 50%/20px 20px; overflow: hidden; }
.creative-upload-canvas > [data-art-preview] { position: absolute; width: 144px; height: 144px; object-fit: contain; }
.creative-upload-canvas.is-profile-effect > [data-art-preview] { width: 100%; height: 100%; }
.creative-upload-preview > p { font-size: 12px; color: var(--text-2); line-height: 1.7; }
.creative-template-links { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0; }
.creative-free { display: flex; align-items: center; gap: 8px; margin: 12px 0 18px; font-size: 13px; }
.market-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 18px 0; flex-wrap: wrap; }
.market-toolbar .creative-tabs { margin: 0; padding: 0; border: 0; }
.market-filters { display: grid; grid-template-columns: minmax(0,1fr) 200px 170px; gap: 10px; }
.market-filters > * { min-width: 0; }
.market-help { display: flex; gap: 10px; flex-wrap: wrap; color: var(--muted); font-size: 12px; margin: 14px 0 22px; line-height: 1.6; }
.market-help button { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.market-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(210px,1fr)); gap: 16px; }
.market-card { border: 1px solid var(--line); border-radius: 8px; background: var(--bg-2); min-width: 0; overflow: hidden; }
.market-art { display: grid; place-items: center; width: 100%; height: 180px; padding: 18px; background: var(--bg-3); }
.market-art img { width: 100%; height: 100%; object-fit: contain; }
.market-card-info { padding: 14px; }
.market-card-info > b { display: block; overflow-wrap: anywhere; font-size: 14px; }
.market-card-info > small { display: block; color: var(--muted); font-size: 11px; margin-top: 6px; }
.market-card-info > p { color: var(--text-2); font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.market-card-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.market-card-actions .icon-btn { margin-left: auto; }
.market-more { margin-top: 20px; }
.market-card-info .market-removed { color: var(--red); }

/* Decorations extend beyond the avatar; mobile's responsive image limit must not squeeze them. */
.av-custom { position: absolute; width: 144%; height: 144%; max-width: none; left: -22%; top: -22%; object-fit: contain; pointer-events: none; z-index: 2; }
.av-custom-decoration { z-index: 3; }
.profile-card[data-user], .full-profile[data-user] { position: relative; isolation: isolate; }
.profile-companion { position: absolute; width: 42px; height: 42px; right: 10px; bottom: 7px; z-index: 3; display: block; pointer-events: none; animation: companion-breathe 3s ease-in-out infinite; }
.profile-companion svg { display: block; width: 100%; height: 100%; }
.has-companion.profile-card .pc-hero { padding-right: 58px; }
.has-companion.profile-card .pc-av { flex: none; }
.creative-avatar-preview .profile-companion { right: 18px; bottom: 12px; }
.profile-open-effect { position: absolute; inset: 0; z-index: 4; pointer-events: none; overflow: hidden; border-radius: inherit; opacity: .75; animation: profile-effect-fade 4.5s ease both; }
.profile-open-effect > img { width: 100%; height: 100%; object-fit: contain; }
.profile-open-effect i { position: absolute; left: var(--x); top: -20px; width: 6px; height: 12px; background: var(--gold); animation: profile-confetti 3.8s ease-out calc(var(--i)*.05s) both; }
.profile-open-effect i:nth-child(3n) { background: var(--blue); }
.profile-open-effect i:nth-child(3n + 1) { background: var(--green); }
.effect_starlight i { width: 7px; height: 7px; clip-path: polygon(50% 0,61% 37%,100% 50%,61% 61%,50% 100%,39% 61%,0 50%,39% 37%); }
/* An equipped effect replaces the normal entrance. Animate real content without duplicating text. */
.message-enter[class*="fx-message_"] { animation: none; }
.message-enter[class*="fx-message_"] :is(.m-content,.m-attach,.m-sticker) { position: relative; isolation: isolate; transform-origin: left center; }
.message-enter.fx-message_pop :is(.m-content,.m-attach,.m-sticker) { animation: chat-soft-pop .55s cubic-bezier(.2,.8,.2,1) both; }
.message-enter.fx-message_sparkle :is(.m-content,.m-attach,.m-sticker) { animation: chat-sparkle .9s ease-out both; }
.message-enter.fx-message_wave :is(.m-content,.m-attach,.m-sticker) { animation: chat-wave .8s ease-out both; }
.message-enter.fx-message_shimmer :is(.m-content,.m-attach,.m-sticker) { animation: chat-shimmer .9s ease-out both; }
.message-enter.fx-message_glitch :is(.m-content,.m-attach,.m-sticker) { animation: chat-glitch .65s steps(1,end) both; }
.message-enter:is(.fx-message_sparkle,.fx-message_wave,.fx-message_shimmer) :is(.m-content,.m-attach,.m-sticker)::after { content: ''; position: absolute; inset: -4px -6px; pointer-events: none; border-radius: 6px; opacity: 0; }
.message-enter.fx-message_sparkle :is(.m-content,.m-attach,.m-sticker)::after { background: radial-gradient(circle at 8% 25%,#f5c518 0 2px,transparent 3px),radial-gradient(circle at 35% 75%,#89cfd4 0 2px,transparent 3px),radial-gradient(circle at 62% 12%,#f5c518 0 2px,transparent 3px),radial-gradient(circle at 90% 55%,#c4b5fd 0 2px,transparent 3px); animation: chat-sparks .95s ease-out both; }
.message-enter.fx-message_wave :is(.m-content,.m-attach,.m-sticker)::after { border: 2px solid #60a5fa; animation: chat-ripple .8s ease-out both; }
.message-enter.fx-message_shimmer :is(.m-content,.m-attach,.m-sticker)::after { background: linear-gradient(110deg,transparent 30%,rgba(245,197,24,.32) 48%,transparent 65%); background-size: 260% 100%; animation: chat-gold-sweep .95s ease-out both; }
.message-enter[class*="fx-message_"] :is(.m-content,.m-attach,.m-sticker),.message-enter[class*="fx-message_"] :is(.m-content,.m-attach,.m-sticker)::after { animation-delay: var(--message-enter-delay,0ms); }
@keyframes companion-breathe { 50% { transform: translateY(-3px) rotate(-2deg); } }
@keyframes profile-confetti { 0% { opacity: 0; transform: translateY(0) rotate(0); } 15% { opacity: 1; } 100% { opacity: 0; transform: translateY(420px) rotate(270deg); } }
@keyframes profile-effect-fade { 0%,100% { opacity: 0; } 12%,80% { opacity: .75; } }
@keyframes chat-soft-pop { 0% { opacity: 0; transform: translateY(8px) scale(.84); } 55% { opacity: 1; transform: scale(1.035); } 100% { opacity: 1; transform: none; } }
@keyframes chat-sparkle { 0% { opacity: 0; transform: translateY(4px); } 35% { opacity: 1; filter: drop-shadow(0 0 4px rgba(245,197,24,.5)); } 100% { opacity: 1; transform: none; filter: none; } }
@keyframes chat-wave { 0% { opacity: 0; transform: translateX(-18px) skewX(-3deg); } 65% { opacity: 1; transform: translateX(3px); } 100% { opacity: 1; transform: none; } }
@keyframes chat-shimmer { from { opacity: 0; transform: translateY(4px); } 30%,to { opacity: 1; transform: none; } }
@keyframes chat-sparks { 0% { opacity: 0; transform: scale(.8); } 30% { opacity: .9; } 100% { opacity: 0; transform: scale(1.12); } }
@keyframes chat-ripple { 0% { opacity: .7; transform: scale(.92,.6); } 100% { opacity: 0; transform: scale(1.03,1.25); } }
@keyframes chat-gold-sweep { 0% { opacity: 0; background-position: 100% 0; } 20% { opacity: 1; } 100% { opacity: 0; background-position: 0 0; } }
@keyframes chat-glitch { 0% { opacity: 0; transform: translateX(-10px); clip-path: inset(40% 0 25%); } 14% { opacity: 1; transform: translateX(5px) skewX(3deg); text-shadow: -3px 0 #22d3ee,3px 0 #f472b6; clip-path: inset(5% 0 10%); } 28% { transform: translateX(-3px); clip-path: inset(20% 0 0); } 43% { transform: translateX(2px); clip-path: none; text-shadow: 2px 0 #22d3ee,-2px 0 #f472b6; } 62% { transform: translateX(-1px); text-shadow: -1px 0 #22d3ee,1px 0 #f472b6; } 80%,100% { opacity: 1; transform: none; text-shadow: none; clip-path: none; } }

.standing-card { border: 1px solid var(--line); background: var(--bg-3); border-radius: 8px; padding: 18px; margin: 12px 0 24px; }
.standing-card h4 { margin: 0 0 14px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.standing-summary { display: flex; align-items: center; gap: 12px; }
.standing-summary > svg { color: var(--green); flex: none; }
.level-1 .standing-summary > svg, .level-2 .standing-summary > svg { color: var(--gold); }
.level-3 .standing-summary > svg { color: var(--red); }
.standing-summary b { font-size: 15px; }
.standing-summary p { font-size: 12px; color: var(--text-2); margin: 5px 0 0; line-height: 1.6; }
.standing-track { display: flex; position: relative; justify-content: space-between; margin: 24px 0 18px; gap: 6px; }
.standing-track::before { content: ''; position: absolute; top: 8px; height: 3px; left: 7px; right: 7px; background: var(--bg-active); }
.standing-track > div { z-index: 1; display: flex; flex-direction: column; gap: 8px; color: var(--muted); font-size: 10px; min-width: 0; }
.standing-track > div:last-child { align-items: flex-end; }
.standing-track i { display: block; width: 18px; height: 18px; border-radius: 50%; border: 4px solid var(--bg-active); background: var(--muted); }
.standing-track .reached i { background: var(--green); border-color: color-mix(in srgb,var(--green) 35%,var(--bg-3)); }
.level-3 .standing-track .reached:last-child i { background: var(--red); border-color: color-mix(in srgb,var(--red) 35%,var(--bg-3)); }
.standing-card ul { color: var(--text-2); font-size: 11px; line-height: 1.8; padding-left: 16px; margin-bottom: 0; }
.standing-history article { padding: 16px 0; border-bottom: 1px solid var(--line); }
.standing-history article > div { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.standing-history b { font-size: 13px; }
.standing-history p { color: var(--text-2); font-size: 12px; line-height: 1.65; }
.standing-history small { display: block; font-size: 11px; color: var(--muted); margin: 6px 0; }
.standing-gate { min-height: 100dvh; overflow-y: auto; padding: 36px 20px; background: var(--bg-1); }
.standing-gate > section { width: min(620px,100%); margin: 0 auto; }
.standing-gate h1 { font-size: 24px; line-height: 1.4; }
.standing-gate section > p { color: var(--text-2); line-height: 1.7; font-size: 13px; }
.account-standing-link { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 16px 0; }
.account-standing-link small { color: var(--muted); font-size: 12px; }
@media(max-width:760px) {
  .modal.wide.creative-modal { height: var(--mobile-viewport-height,100dvh); max-height: var(--mobile-viewport-height,100dvh); border-radius: 0; }
  .creative-picker { display: flex; flex-direction: column; overflow-y: auto; padding: 10px 14px 18px; gap: 16px; }
  .creative-browser { overflow: visible; flex: none; }
  .creative-selected { order: -1; overflow: visible; border-left: 0; border-bottom: 1px solid var(--line); padding: 0 0 14px; flex: none; }
  .creative-avatar-preview { float: left; min-height: 0; width: 106px; height: 106px; margin: 0 16px 10px 0; }
  .creative-avatar-preview .av.lg { width: 62px; height: 62px; }
  .creative-mini-profile { display: none; }
  .creative-selected h4 { margin-top: 6px; }
  .creative-selected::after { content: ''; display: block; clear: both; }
  .creative-selected > p { margin: 8px 0; }
  .creative-item-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .creative-art-card { padding: 7px; }
  .creative-art-preview { height: 84px; }
  .creative-upload { display: flex; flex-direction: column-reverse; gap: 18px; }
  .creative-upload-canvas { min-height: 160px; }
  .creative-filters { grid-template-columns: minmax(0,1fr) 110px; }
  .creative-filters .input, .creative-upload .input { font-size: 16px; }
  .creative-upload .creative-template-links .btn { white-space: normal; }
  .creative-compose-button { display: none !important; }
  .market-filters { grid-template-columns: 1fr 1fr; }
  .market-filters > input { grid-column: 1 / -1; font-size: 16px; }
  .market-filters > select { font-size: 12px; }
  .market-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .market-art { height: 140px; padding: 10px; }
  .market-card-info { padding: 10px; }
  .market-card-info > b { font-size: 12px; }
  .market-card-actions .btn { width: 100%; }
  .creative-modal .modal-foot { flex-wrap: wrap; }
  .creative-result { flex-basis: 100%; }
  .profile-companion { width: 34px; height: 34px; }
}
@media(prefers-reduced-motion:reduce) { .profile-companion,.profile-open-effect,.message-enter[class*=fx-] :is(.m-content,.m-attach,.m-sticker),.message-enter[class*=fx-] :is(.m-content,.m-attach,.m-sticker)::after { animation: none !important; } }
.reduce-motion .profile-companion,.reduce-motion .profile-open-effect,.reduce-motion .message-enter[class*=fx-] :is(.m-content,.m-attach,.m-sticker),.reduce-motion .message-enter[class*=fx-] :is(.m-content,.m-attach,.m-sticker)::after { animation: none !important; }
