/* Profile cosmetics v2: nameplates, name styles, profile cards, avatar decorations. */

/* Name style fonts (OFL licences next to each file in assets/fonts). */
@font-face { font-family: "cz-vazirmatn"; src: url("../assets/fonts/Vazirmatn-Variable.ttf") format("truetype"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "cz-lalezar"; src: url("../assets/fonts/Lalezar-Regular.ttf") format("truetype"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "cz-reem-kufi"; src: url("../assets/fonts/ReemKufi-Variable.ttf") format("truetype"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "cz-changa"; src: url("../assets/fonts/Changa-Variable.ttf") format("truetype"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "cz-lemonada"; src: url("../assets/fonts/Lemonada-Variable.ttf") format("truetype"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "cz-rakkas"; src: url("../assets/fonts/Rakkas-Regular.ttf") format("truetype"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "cz-aref-ruqaa"; src: url("../assets/fonts/ArefRuqaa-Regular.ttf") format("truetype"); font-weight: 100 550; font-display: swap; }
@font-face { font-family: "cz-aref-ruqaa"; src: url("../assets/fonts/ArefRuqaa-Bold.ttf") format("truetype"); font-weight: 551 900; font-display: swap; }
@font-face { font-family: "cz-jomhuria"; src: url("../assets/fonts/Jomhuria-Regular.ttf") format("truetype"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "cz-katibeh"; src: url("../assets/fonts/Katibeh-Regular.ttf") format("truetype"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "cz-mirza"; src: url("../assets/fonts/Mirza-Regular.ttf") format("truetype"); font-weight: 100 550; font-display: swap; }
@font-face { font-family: "cz-mirza"; src: url("../assets/fonts/Mirza-Bold.ttf") format("truetype"); font-weight: 551 900; font-display: swap; }
@font-face { font-family: "cz-nastaliq"; src: url("../assets/fonts/NotoNastaliqUrdu-Variable.ttf") format("truetype"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "cz-pixel"; src: url("../assets/fonts/Silkscreen-Regular.ttf") format("truetype"); font-weight: 100 600; font-display: swap; }
@font-face { font-family: "cz-pixel"; src: url("../assets/fonts/Silkscreen-Bold.ttf") format("truetype"); font-weight: 700 900; font-display: swap; }
@font-face { font-family: "cz-tech"; src: url("../assets/fonts/Orbitron-Variable.ttf") format("truetype"); font-weight: 400 900; font-display: swap; }
@font-face { font-family: "cz-script"; src: url("../assets/fonts/DancingScript-Variable.ttf") format("truetype"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "cz-blackletter"; src: url("../assets/fonts/UnifrakturMaguntia-Book.ttf") format("truetype"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "cz-bungee"; src: url("../assets/fonts/Bungee-Regular.ttf") format("truetype"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "cz-monoton"; src: url("../assets/fonts/Monoton-Regular.ttf") format("truetype"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "cz-press-start"; src: url("../assets/fonts/PressStart2P-Regular.ttf") format("truetype"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "cz-audiowide"; src: url("../assets/fonts/Audiowide-Regular.ttf") format("truetype"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "cz-pacifico"; src: url("../assets/fonts/Pacifico-Regular.ttf") format("truetype"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "cz-righteous"; src: url("../assets/fonts/Righteous-Regular.ttf") format("truetype"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "cz-russo-one"; src: url("../assets/fonts/RussoOne-Regular.ttf") format("truetype"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "cz-cinzel"; src: url("../assets/fonts/Cinzel-Variable.ttf") format("truetype"); font-weight: 400 900; font-display: swap; }
@font-face { font-family: "cz-creepster"; src: url("../assets/fonts/Creepster-Regular.ttf") format("truetype"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "cz-bangers"; src: url("../assets/fonts/Bangers-Regular.ttf") format("truetype"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "cz-major-mono"; src: url("../assets/fonts/MajorMonoDisplay-Regular.ttf") format("truetype"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "cz-rubik-glitch"; src: url("../assets/fonts/RubikGlitch-Regular.ttf") format("truetype"); font-weight: 100 900; font-display: swap; }
/* Persian runs of a Latin-only style fall back to these (Arabic script only). */
@font-face { font-family: "cz-fa-vazirmatn"; src: url("../assets/fonts/Vazirmatn-Variable.ttf") format("truetype"); font-weight: 100 900; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+200C-200F, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "cz-fa-lalezar"; src: url("../assets/fonts/Lalezar-Regular.ttf") format("truetype"); font-weight: 100 900; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+200C-200F, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "cz-fa-reem-kufi"; src: url("../assets/fonts/ReemKufi-Variable.ttf") format("truetype"); font-weight: 400 700; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+200C-200F, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "cz-fa-changa"; src: url("../assets/fonts/Changa-Variable.ttf") format("truetype"); font-weight: 200 800; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+200C-200F, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "cz-fa-lemonada"; src: url("../assets/fonts/Lemonada-Variable.ttf") format("truetype"); font-weight: 300 700; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+200C-200F, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "cz-fa-rakkas"; src: url("../assets/fonts/Rakkas-Regular.ttf") format("truetype"); font-weight: 100 900; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+200C-200F, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "cz-fa-aref-ruqaa"; src: url("../assets/fonts/ArefRuqaa-Regular.ttf") format("truetype"); font-weight: 100 550; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+200C-200F, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "cz-fa-aref-ruqaa"; src: url("../assets/fonts/ArefRuqaa-Bold.ttf") format("truetype"); font-weight: 551 900; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+200C-200F, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "cz-fa-jomhuria"; src: url("../assets/fonts/Jomhuria-Regular.ttf") format("truetype"); font-weight: 100 900; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+200C-200F, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "cz-fa-katibeh"; src: url("../assets/fonts/Katibeh-Regular.ttf") format("truetype"); font-weight: 100 900; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+200C-200F, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "cz-fa-mirza"; src: url("../assets/fonts/Mirza-Regular.ttf") format("truetype"); font-weight: 100 550; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+200C-200F, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "cz-fa-mirza"; src: url("../assets/fonts/Mirza-Bold.ttf") format("truetype"); font-weight: 551 900; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+200C-200F, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "cz-fa-nastaliq"; src: url("../assets/fonts/NotoNastaliqUrdu-Variable.ttf") format("truetype"); font-weight: 400 700; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+200C-200F, U+FB50-FDFF, U+FE70-FEFF; }

@property --cz-ang { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

/* avatar decoration: 140% of the avatar, above the picture, under the presence dot */
.av.cz-deco-av { overflow: visible; }
.av.cz-deco-av > img:not(.cz-deco) { border-radius: inherit; }
.av > .cz-deco {
  position: absolute; left: 50%; top: 50%; z-index: 1; width: 140%; height: 140%; max-width: none;
  transform: translate(-50%, -50%); border-radius: 0; pointer-events: none; container-type: size;
}
.av-wrap > .cz-deco-av + .pres { z-index: 2; }

/* nameplate (member rows only) */
.cz-plate { position: absolute; inset: 0; z-index: 0; overflow: hidden; border-radius: inherit; pointer-events: none; }
.cz-plate--fade {
  -webkit-mask-image: linear-gradient(90deg, rgba(0, 0, 0, .18) 0, rgba(0, 0, 0, .45) 28%, #000 72%);
  mask-image: linear-gradient(90deg, rgba(0, 0, 0, .18) 0, rgba(0, 0, 0, .45) 28%, #000 72%);
}
.mem.cz-np { position: relative; isolation: isolate; }
.mem.cz-np > :not(.cz-plate) { position: relative; z-index: 1; }

/* name styles: the name text sits in one .cz-ns span inside the place's own element */
.cz-ns {
  display: inline-block; box-sizing: border-box; max-width: calc(100% + .2em); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom;
  padding: .12em .1em; margin: -.12em -.1em; line-height: 1.2; font-style: normal;
  background-image: var(--cz-fill); background-size: var(--cz-bgs, 100% 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: var(--cz-flt); -webkit-text-stroke: var(--cz-sw, 0px) var(--cz-sc, transparent);
}
.cz-ns .cz-far { letter-spacing: 0; }
.cz-ns.cz-moving, .cz-ns.fx-flow, .cz-ns.fx-rainbow, .cz-ns.fx-holo { --cz-bgs: 300% 100%; }
.cz-ns.fx-fire { --cz-bgs: 100% 300%; }
.cz-ns.fx-shimmer, .cz-ns.fx-chrome {
  background-image: linear-gradient(100deg, transparent 35%, rgba(255, 255, 255, calc(.425 * var(--cz-int))) 50%, transparent 65%), var(--cz-fill);
  background-size: 250% 100%, var(--cz-bgs, 100% 100%); background-position: 150% 0, 0 0; background-repeat: no-repeat;
}
.cz-ns.fx-sparkle { position: relative; overflow: visible; }
.cz-ns.fx-sparkle::after {
  content: ""; position: absolute; inset: -4px -2px; pointer-events: none; -webkit-text-fill-color: initial;
  background:
    radial-gradient(circle, #fff 0 1px, transparent 1.6px) 10% 20% / 9px 9px no-repeat,
    radial-gradient(circle, #fff 0 1.2px, transparent 1.8px) 60% 80% / 9px 9px no-repeat,
    radial-gradient(circle, #fff 0 1px, transparent 1.6px) 85% 15% / 9px 9px no-repeat,
    radial-gradient(circle, #fff 0 .8px, transparent 1.4px) 35% 70% / 9px 9px no-repeat;
  -webkit-background-clip: border-box; background-clip: border-box; opacity: calc(var(--cz-int) * .45);
}
.cz-ns.fx-wave { overflow: visible; text-overflow: clip; }
.cz-ns.fx-wave > i {
  font-style: normal; display: inline-block; unicode-bidi: isolate;
  background-image: inherit; background-size: inherit; -webkit-background-clip: text; background-clip: text;
}
/* playing: cards always, member rows while hovered (or always with an always-on plate) */
.cz-ns.cz-play, .cz-host:hover .cz-ns.cz-hov, .cz-host:focus-visible .cz-ns.cz-hov,
.mem:hover .cz-ns.cz-hov, .mem:focus-visible .cz-ns.cz-hov { animation: var(--cz-anim, none); }
.cz-ns.cz-play > i, .cz-host:hover .cz-ns.cz-hov > i, .cz-host:focus-visible .cz-ns.cz-hov > i,
.mem:hover .cz-ns.cz-hov > i, .mem:focus-visible .cz-ns.cz-hov > i { animation: var(--cz-ianim, none); animation-delay: calc(var(--i, 0) * -.09s); }
.cz-ns.cz-play::after, .cz-host:hover .cz-ns.cz-hov::after, .cz-host:focus-visible .cz-ns.cz-hov::after,
.mem:hover .cz-ns.cz-hov::after, .mem:focus-visible .cz-ns.cz-hov::after { animation: var(--cz-aanim, none); }
@keyframes cz-shim { from { background-position: 150% 0, 0 0; } to { background-position: -100% 0, 0 0; } }
@keyframes cz-flow-l { from { background-position: 0 0; } to { background-position: 100% 0; } }
@keyframes cz-flow-r { from { background-position: 100% 0; } to { background-position: 0 0; } }
@keyframes cz-fire-up { from { background-position: 0 100%; } to { background-position: 0 0; } }
@keyframes cz-hue { to { filter: var(--cz-flt) hue-rotate(360deg); } }
@keyframes cz-flickr { 0%, 18%, 22%, 25%, 53%, 57%, 100% { opacity: 1; } 20%, 24%, 55% { opacity: calc(1 - .3 * var(--cz-int)); } }
@keyframes cz-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(calc(1 + .03 * var(--cz-int))); } }
@keyframes cz-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(calc(-1.5px * var(--cz-int))); } }
@keyframes cz-twinkle { 0%, 100% { opacity: 0; transform: scale(.6); } 50% { opacity: calc(var(--cz-int) * .45); transform: scale(1); } }
@keyframes cz-type { 0% { clip-path: inset(0 100% 0 0); } 70%, 100% { clip-path: inset(0 0 0 0); } }
@keyframes cz-type-r { 0% { clip-path: inset(0 0 0 100%); } 70%, 100% { clip-path: inset(0 0 0 0); } }
@keyframes cz-glitch {
  0%, 84%, 100% { filter: var(--cz-flt); transform: none; }
  86% { filter: var(--cz-flt) drop-shadow(calc(1px * var(--cz-int)) 0 #ff00d4) drop-shadow(calc(-1px * var(--cz-int)) 0 #00e5ff); transform: translateX(1px); }
  90% { filter: var(--cz-flt) drop-shadow(calc(-1.5px * var(--cz-int)) 0 #ff00d4) drop-shadow(calc(1.5px * var(--cz-int)) 0 #00e5ff); transform: translateX(-1px) skewX(-8deg); }
  94% { filter: var(--cz-flt) drop-shadow(calc(.5px * var(--cz-int)) 0 #ff00d4) drop-shadow(calc(-.5px * var(--cz-int)) 0 #00e5ff); }
}

/* profile card theme */
.cz-card { --cz-base: var(--bg-2); --cz-tint: color-mix(in srgb, var(--cz-c1) var(--cz-tint-mix, 0%), var(--cz-base)); background: var(--cz-tint) !important; }
.sheet.cz-card { --cz-base: var(--panel); }
.pop.cz-card { box-shadow: var(--shadow), var(--cz-card-glow, 0 0 0 transparent); }
.cz-card .pc__av .av { box-shadow: 0 0 0 6px var(--cz-tint); }
.cz-card .pc__av .av-wrap { --ring: var(--cz-tint); }
.cz-card .pc__status, .cz-card .pc__rolechip { background: rgba(0, 0, 0, .28); }

/* card edge and dividers; the edge drop shadow follows the viewer's theme */
.cz-card, .fp-scrim[data-scheme] { --cz-drop: 0 18px 50px -12px rgba(0, 0, 0, .65); }
:root[data-theme="light"] :is(.cz-card, .fp-scrim[data-scheme]) { --cz-drop: 0 18px 50px -14px rgba(30, 40, 80, .35); }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) :is(.cz-card, .fp-scrim[data-scheme]) { --cz-drop: 0 18px 50px -14px rgba(30, 40, 80, .35); } }

/* fixed scheme: the card's own colours replace the page theme inside the card (and, untinted, on
   the full profile's close button and offline pill) */
.fp-scrim[data-scheme] { --cz-tint: var(--cz-base); }
.cz-card[data-scheme], .fp-scrim[data-scheme] :is(.fp__x, .fp__pill) {
  --bg: var(--cz-tint); --bg-2: var(--cz-tint);
  --panel: var(--cz-panel); --panel-2: var(--cz-panel); --panel-3: color-mix(in srgb, var(--cz-panel) 86%, var(--cz-text));
  --line: var(--cz-line); --line-2: var(--cz-line); --line-3: color-mix(in srgb, var(--cz-line) 75%, var(--cz-text));
  --ink: var(--cz-text); --ink-2: color-mix(in srgb, var(--cz-text) 86%, var(--cz-muted)); --ink-3: var(--cz-muted); --ink-4: var(--cz-muted);
  --ink-5: color-mix(in srgb, var(--cz-muted) 70%, var(--cz-base));
  --accent: var(--cz-accent); --accent-hover: color-mix(in srgb, var(--cz-accent) 86%, #fff);
  --accent-soft: color-mix(in srgb, var(--cz-accent) 16%, transparent); --glow: color-mix(in srgb, var(--cz-accent) 28%, transparent);
  --shadow: var(--cz-drop), 0 0 0 1px var(--cz-line);
  color: var(--ink);
}
.cz-card[data-scheme="dark"] { color-scheme: dark; }
.cz-card[data-scheme="light"] { color-scheme: light; }
.cz-card[data-scheme] :is(.pc__status, .pc__rolechip) { background: var(--cz-panel); }
.cz-card[data-scheme] .pc__sec { background: var(--cz-panel); }
.cz-card[data-scheme] .pf-sk { background: var(--panel-3); }
.cz-card[data-outline="none"] { --shadow: var(--cz-drop); }
.cz-card[data-dividers="off"] :is(.fp__info, .fp__cw) { border-color: transparent; }
.cz-card[data-dividers="off"] :is(.ga-arow + .ga-arow, .ga-aline + .ga-aline) { border-top-color: transparent; }

/* card layers: "inside" lives in the card under its content; "behind" and "front" sit beside the
   open card (the menu layer, or the full profile's scrim), synced to its rect, so they may reach
   past its edges */
.cz-has-in > :not(.cz-lays) { position: relative; z-index: 1; }
.cz-lays { pointer-events: none; box-sizing: border-box; }
.cz-lays--in { position: absolute; left: 0; top: 0; width: 100%; z-index: 0; overflow: hidden; }
.cz-lays--behind, .cz-lays--front, .cz-ring { position: fixed; }
.cz-wait { visibility: hidden !important; }
.cz-lays--behind { z-index: 70; }
.cz-lays--front, .cz-ring { z-index: 72; }
.cz-space { position: absolute; left: 0; top: 0; transform-origin: 0 0; }

/* studio layers (all kinds): one node per layer, posed every frame by js/studio-paint.js */
.cz-sl { position: absolute; pointer-events: none; }
.cz-sb { position: absolute; inset: 0; box-sizing: border-box; background-position: center; background-repeat: no-repeat; background-size: 100% 100%; }
.cz-sb--nine { border-style: solid; border-color: transparent; }
.cz-sc { position: absolute; }
.cz-sp { position: absolute; left: 0; top: 0; display: block; width: 100%; height: 100%; max-width: none; }
/* animated pictures of plates and decorations hold a still frame until they play (hover or always) and the live one has loaded */
.cz-st-hover:not(.cz-st-play) .cz-sp--live, .cz-st-play .cz-sp--live:not(.cz-sp--wait) + .cz-sp--still { display: none; }
.cz-sb--still > .cz-pt { animation-play-state: paused; }
.cz-pt { position: absolute; background-size: contain; background-repeat: no-repeat; animation-iteration-count: infinite; animation-timing-function: linear; }
.cz-pm-twinkle { animation-name: cz-ptw; }
.cz-pm-fall { animation-name: cz-pfall; }
.cz-pm-rise { animation-name: cz-prise; }
.cz-pm-drift { animation-name: cz-pdrift; }
@keyframes cz-ptw { 0%, 100% { opacity: 0; transform: scale(.4); } 50% { opacity: 1; transform: scale(1); } }
@keyframes cz-pfall { 0% { opacity: 0; transform: translateY(-40px); } 15%, 85% { opacity: 1; } 100% { opacity: 0; transform: translateY(60px); } }
@keyframes cz-prise { 0% { opacity: 0; transform: translateY(40px); } 15%, 85% { opacity: 1; } 100% { opacity: 0; transform: translateY(-60px) translateX(8px); } }
@keyframes cz-pdrift { 0%, 100% { transform: translate(0, 0); opacity: .3; } 50% { transform: translate(14px, -8px); opacity: 1; } }

/* palette ring over the open card */
.cz-ring {
  box-sizing: border-box; pointer-events: none;
  background: conic-gradient(from var(--cz-ang), var(--cz-c1), var(--cz-c2), var(--cz-c3), var(--cz-c1));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.cz-ring--spin { animation: cz-spin var(--cz-spin, 6s) linear infinite; }
@keyframes cz-spin { to { --cz-ang: 360deg; } }

/* hidden window: stop everything */
.cz-off .cz-ns, .cz-off .cz-ns > i, .cz-off .cz-ns::after, .cz-off .cz-sl *, .cz-off .cz-ring { animation-play-state: paused !important; }

/* a closing full profile keeps its card layers drawn while they play their exits (the rest fades) */
.fp-scrim.cz-exits.is-closing { animation: cz-scrim-out .17s ease-in both; }
.fp-scrim.cz-exits.is-closing > :is(.fp, .fp__x, .fp__pill) { animation: pc-fade-out .17s ease-in both; }
@keyframes cz-scrim-out { to { background-color: transparent; } }

@media (prefers-reduced-motion: reduce) {
  .cz-st-hover .cz-sp--live { display: none !important; }
  .cz-st-hover .cz-sp--still { display: block !important; }
  .cz-ns, .cz-ns > i, .cz-ns::after, .cz-sl *, .cz-ring, .cz-lays--behind, .cz-lays--front { animation: none !important; }
  .cz-pt { opacity: .7; }
}
