/* ═══════════════════════════════════════════════════════════════════════════
   THE LIVING KNOWLEDGE PLATFORM — WAYFINDER PASSPORT
   File: LKP/css/profile.css

   Includes:
   - full passport/profile layout
   - dark/light mode
   - time-of-day visual system
   - interactive Three.js Knowledge Galaxy container
   - galaxy tooltip, realm preview, reset chips
   - mobile responsive layout
═══════════════════════════════════════════════════════════════════════════ */

:root {
  --profile-bg: #01030a;
  --profile-deep: #030814;
  --profile-card: rgba(5, 12, 32, 0.84);
  --profile-card-strong: rgba(8, 18, 45, 0.92);
  --profile-glass: rgba(4, 10, 26, 0.76);

  --profile-border: rgba(255, 255, 255, 0.085);
  --profile-border-soft: rgba(255, 255, 255, 0.06);
  --profile-border-gold: rgba(240, 201, 106, 0.25);
  --profile-border-cyan: rgba(84, 198, 238, 0.24);

  --profile-text: rgba(235, 245, 255, 0.96);
  --profile-muted: rgba(171, 194, 226, 0.72);
  --profile-faint: rgba(155, 178, 212, 0.44);

  --profile-gold: #f0c96a;
  --profile-gold-soft: #f4df9e;
  --profile-cyan: #54c6ee;
  --profile-emerald: #3cb371;
  --profile-violet: #8fa0ff;
  --profile-rust: #d98545;
  --profile-red: #ff7676;

  --profile-scrollbar-track: rgba(255, 255, 255, 0.045);
  --profile-scrollbar-thumb: rgba(240, 201, 106, 0.36);
  --profile-scrollbar-thumb-hover: rgba(84, 198, 238, 0.54);
  --profile-scrollbar-corner: rgba(1, 3, 10, 0.82);

  --profile-radius-lg: 30px;
  --profile-radius-md: 22px;
  --profile-radius-sm: 16px;

  --profile-shadow: 0 22px 70px rgba(0, 0, 0, 0.34);
  --profile-shadow-soft: 0 16px 44px rgba(0, 0, 0, 0.25);

  --profile-font-title: var(--lkp-font-display, "Pirata One", "Cormorant Garamond", Georgia, serif);
  --profile-font-serif: var(--lkp-font-elegant, "Cormorant Garamond", Georgia, serif);
  --profile-font-body: var(--lkp-font-ui, "DM Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);

  --safe-bottom: max(14px, env(safe-area-inset-bottom));
  --safe-top: max(0px, env(safe-area-inset-top));

  --profile-page-backdrop:
    radial-gradient(circle at 18% 0%, rgba(84, 198, 238, 0.15), transparent 34%),
    radial-gradient(circle at 86% 12%, rgba(240, 201, 106, 0.13), transparent 36%),
    radial-gradient(circle at 50% 105%, rgba(143, 160, 255, 0.10), transparent 36%),
    linear-gradient(180deg, #01030a 0%, #020711 52%, #01030a 100%);

  --profile-sky-gradient: var(--profile-page-backdrop);

  --profile-sky-image:
    radial-gradient(circle at 24% 28%, rgba(84, 198, 238, 0.12), transparent 24%),
    radial-gradient(circle at 78% 32%, rgba(143, 160, 255, 0.10), transparent 24%),
    radial-gradient(circle at 50% 112%, rgba(88, 118, 228, 0.10), transparent 28%);

  --profile-star-field:
    radial-gradient(circle at 15% 18%, rgba(255,255,255,0.92) 0 1px, transparent 1.7px),
    radial-gradient(circle at 32% 44%, rgba(255,255,255,0.78) 0 1px, transparent 1.7px),
    radial-gradient(circle at 74% 24%, rgba(255,255,255,0.72) 0 1.1px, transparent 1.8px),
    radial-gradient(circle at 58% 60%, rgba(255,255,255,0.44) 0 1px, transparent 1.8px),
    radial-gradient(circle at 80% 74%, rgba(255,255,255,0.34) 0 1px, transparent 1.7px);

  --profile-nebula-one: rgba(84, 198, 238, 0.30);
  --profile-nebula-two: rgba(240, 201, 106, 0.20);
  --profile-nebula-three: rgba(143, 160, 255, 0.14);

  --profile-user-font-scale: 1;
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESET / BASE
═══════════════════════════════════════════════════════════════════════════ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
  background: var(--profile-bg);
  scrollbar-color: var(--profile-scrollbar-thumb) var(--profile-scrollbar-track);
  scrollbar-width: thin;
}

body {
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  color: var(--profile-text);
  font-family: var(--profile-font-body);
  font-size: calc(16px * var(--profile-user-font-scale));
  background: var(--profile-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

body.profile-page {
  min-height: 100vh;
  background: var(--profile-page-backdrop);
  transition:
    background 0.8s ease,
    color 0.3s ease;
}

body.profile-theme-dark {
  color-scheme: dark;
}

body.profile-theme-light {
  color-scheme: light;

  --profile-bg: #e7edf6;
  --profile-deep: #f4f8fc;
  --profile-card: rgba(255, 255, 255, 0.82);
  --profile-card-strong: rgba(255, 255, 255, 0.92);
  --profile-glass: rgba(255, 255, 255, 0.72);

  --profile-border: rgba(25, 52, 88, 0.10);
  --profile-border-soft: rgba(25, 52, 88, 0.06);
  --profile-border-gold: rgba(181, 132, 19, 0.18);
  --profile-border-cyan: rgba(47, 144, 183, 0.18);

  --profile-text: rgba(24, 40, 64, 0.95);
  --profile-muted: rgba(67, 92, 121, 0.82);
  --profile-faint: rgba(94, 112, 139, 0.56);

  --profile-shadow: 0 22px 70px rgba(25, 43, 74, 0.14);
  --profile-shadow-soft: 0 16px 44px rgba(25, 43, 74, 0.10);
}

body.profile-theme-light.profile-page {
  background:
    radial-gradient(circle at 14% 0%, rgba(84, 198, 238, 0.18), transparent 34%),
    radial-gradient(circle at 86% 10%, rgba(240, 201, 106, 0.16), transparent 34%),
    radial-gradient(circle at 50% 100%, rgba(143, 160, 255, 0.12), transparent 36%),
    linear-gradient(180deg, #edf3fa 0%, #dce5f0 50%, #e8eef6 100%);
}

body.profile-reduced-motion *,
body.profile-reduced-motion *::before,
body.profile-reduced-motion *::after {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  scroll-behavior: auto !important;
  transition-duration: 0.001ms !important;
}

body.profile-high-contrast {
  --profile-border: rgba(240, 201, 106, 0.42);
  --profile-border-soft: rgba(84, 198, 238, 0.25);
  --profile-text: rgba(255, 252, 235, 1);
  --profile-muted: rgba(222, 237, 255, 0.92);
  --profile-card: rgba(1, 5, 16, 0.94);
  --profile-card-strong: rgba(1, 5, 16, 0.98);
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

strong {
  color: rgba(255, 239, 198, 0.96);
}

img {
  max-width: 100%;
  display: block;
}

.is-hidden {
  display: none !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   BACKGROUND SYSTEM
═══════════════════════════════════════════════════════════════════════════ */

.profile-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.profile-bg__sky,
.profile-bg__image,
.profile-bg__stars {
  position: absolute;
  inset: 0;
  transition:
    opacity 0.8s ease,
    background 0.8s ease,
    filter 0.8s ease;
}

.profile-bg__sky {
  background: var(--profile-sky-gradient);
}

.profile-bg__image {
  background: var(--profile-sky-image);
  opacity: 0.9;
  filter: saturate(1.06);
  mix-blend-mode: screen;
}

.profile-bg__stars {
  background-image: var(--profile-star-field);
  background-size: 320px 320px, 360px 360px, 420px 420px, 460px 460px, 520px 520px;
  background-repeat: repeat;
  opacity: 0.78;
}

.profile-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(1, 3, 10, 0.16), rgba(1, 3, 10, 0.72)),
    radial-gradient(circle at center, transparent 0%, rgba(1, 3, 10, 0.36) 72%, rgba(1, 3, 10, 0.86) 100%);
}

.profile-bg__nebula {
  position: absolute;
  border-radius: 999px;
  filter: blur(50px);
  opacity: 0.22;
  animation: profile-nebula-float 18s ease-in-out infinite alternate;
}

.profile-bg__nebula--one {
  width: 48vw;
  height: 48vw;
  left: -18vw;
  top: 10vh;
  background: var(--profile-nebula-one);
}

.profile-bg__nebula--two {
  width: 58vw;
  height: 58vw;
  right: -24vw;
  bottom: -6vh;
  background: var(--profile-nebula-two);
  animation-delay: -7s;
}

.profile-bg__nebula--three {
  width: 44vw;
  height: 44vw;
  left: 22vw;
  top: 42vh;
  background: var(--profile-nebula-three);
  animation-delay: -11s;
}

.profile-bg__grid {
  position: absolute;
  inset: 0;
  opacity: 0.12;
  background-image:
    linear-gradient(rgba(255,255,255,0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.07) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(circle at center, black, transparent 72%);
}

body.profile-theme-light .profile-bg__image {
  opacity: 0.72;
}

body.profile-theme-light .profile-bg__stars {
  opacity: 0.34;
}

body.profile-theme-light .profile-bg::after {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.10), rgba(233,240,248,0.48)),
    radial-gradient(circle at center, transparent 0%, rgba(220,230,241,0.24) 70%, rgba(208,220,235,0.56) 100%);
}

body.profile-theme-light .profile-bg__grid {
  opacity: 0.08;
  background-image:
    linear-gradient(rgba(44, 82, 122, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(44, 82, 122, 0.06) 1px, transparent 1px);
}

/* ═══════════════════════════════════════════════════════════════════════════
   TOAST
═══════════════════════════════════════════════════════════════════════════ */

.profile-toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 90;
  max-width: min(420px, calc(100vw - 36px));
  padding: 12px 15px;
  border-radius: 17px;
  border: 1px solid rgba(240, 201, 106, 0.28);
  background: rgba(2, 6, 16, 0.94);
  color: var(--profile-text);
  box-shadow: 0 18px 50px rgba(0,0,0,0.40);
  transform: translateY(16px);
  opacity: 0;
  pointer-events: none;
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
}

.profile-toast.is-visible {
  transform: translateY(0);
  opacity: 1;
}

body.profile-theme-light .profile-toast {
  background: rgba(255,255,255,0.92);
  color: var(--profile-text);
  border-color: rgba(181, 132, 19, 0.18);
}

/* ═══════════════════════════════════════════════════════════════════════════
   TOPBAR
═══════════════════════════════════════════════════════════════════════════ */

.profile-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: calc(12px + var(--safe-top)) clamp(14px, 3vw, 30px) 12px;
  border-bottom: 1px solid rgba(255,255,255,0.075);
  background: rgba(1, 3, 10, 0.86);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.profile-brand {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.profile-brand__logo-frame,
.profile-brand__sigil {
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  border: 1px solid rgba(240, 201, 106, 0.22);
  background: rgba(1, 3, 10, 0.42);
  box-shadow:
    0 0 10px rgba(240, 201, 106, 0.26),
    0 0 18px rgba(84, 198, 238, 0.12),
    inset 0 0 18px rgba(255,255,255,0.04);
}

.profile-brand__logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.profile-brand__sigil {
  color: var(--profile-gold);
}

.profile-brand__text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.profile-brand__text strong {
  max-width: min(420px, 42vw);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--profile-gold);
  font-family: var(--profile-font-title);
  font-size: clamp(1.42rem, 2.6vw, 2.12rem);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: 0.035em;
  text-shadow: 0 0 16px rgba(240, 201, 106, 0.18);
}

.profile-brand__text small {
  color: var(--profile-muted);
  font-family: var(--profile-font-serif);
  font-size: 0.92rem;
  letter-spacing: 0.06em;
}

.profile-topbar__links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  min-width: 0;
}

.profile-topbar__links a,
.profile-topbar__button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  color: rgba(230, 242, 255, 0.86);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease,
    color 0.18s ease;
}

.profile-topbar__links a:hover,
.profile-topbar__button:hover {
  transform: translateY(-1px);
  border-color: rgba(240, 201, 106, 0.26);
  background: rgba(240, 201, 106, 0.075);
  color: var(--profile-gold);
}

.profile-theme-toggle {
  min-width: 120px;
}

body.profile-theme-light .profile-topbar {
  background: rgba(232, 242, 255, 0.82);
  border-bottom-color: rgba(20, 48, 78, 0.10);
}

body.profile-theme-light .profile-brand__logo-frame,
body.profile-theme-light .profile-brand__sigil {
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(181, 132, 19, 0.18);
}

body.profile-theme-light .profile-brand__text strong {
  color: #8a6410;
  text-shadow: none;
}

body.profile-theme-light .profile-brand__text small {
  color: var(--profile-muted);
}

body.profile-theme-light .profile-topbar__links a,
body.profile-theme-light .profile-topbar__button {
  background: rgba(255,255,255,0.88);
  color: #2f4f78;
  border-color: rgba(45, 76, 112, 0.12);
}

body.profile-theme-light .profile-topbar__links a:hover,
body.profile-theme-light .profile-topbar__button:hover {
  border-color: rgba(181, 132, 19, 0.20);
  color: #8a6410;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SHELL / HERO
═══════════════════════════════════════════════════════════════════════════ */

/* Settings drawer */

.profile-settings-backdrop {
  position: fixed;
  inset: 0;
  z-index: 78;
  background:
    radial-gradient(circle at 82% 18%, rgba(84, 198, 238, 0.12), transparent 34%),
    rgba(1, 3, 10, 0.58);
  opacity: 0;
  pointer-events: none;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  transition: opacity 0.2s ease;
}

.profile-settings-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.profile-settings-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 80;
  width: min(440px, calc(100vw - 18px));
  height: 100dvh;
  display: flex;
  flex-direction: column;
  border-left: 1px solid rgba(240, 201, 106, 0.24);
  background:
    radial-gradient(circle at 18% 0%, rgba(240, 201, 106, 0.13), transparent 30%),
    radial-gradient(circle at 88% 18%, rgba(84, 198, 238, 0.12), transparent 28%),
    rgba(4, 10, 26, 0.94);
  box-shadow: -24px 0 80px rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  transform: translateX(104%);
  transition: transform 0.28s ease;
}

.profile-settings-drawer.is-open {
  transform: translateX(0);
}

.profile-settings-drawer__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: calc(24px + var(--safe-top)) 22px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.profile-settings-eyebrow {
  display: block;
  margin-bottom: 4px;
  color: var(--profile-cyan);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.profile-settings-drawer h2 {
  margin: 0;
  color: var(--profile-gold);
  font-family: var(--profile-font-title);
  font-size: clamp(2rem, 8vw, 3rem);
  font-weight: 400;
  line-height: 0.9;
}

.profile-settings-close {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.05);
  color: var(--profile-text);
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    background 0.18s ease;
}

.profile-settings-close:hover {
  transform: rotate(90deg);
  border-color: rgba(240, 201, 106, 0.28);
  background: rgba(240, 201, 106, 0.08);
  color: var(--profile-gold);
}

.profile-settings-drawer__body {
  min-height: 0;
  overflow-y: auto;
  padding: 18px 18px calc(26px + var(--safe-bottom));
  scrollbar-color: var(--profile-scrollbar-thumb) transparent;
  scrollbar-width: thin;
}

.profile-settings-section {
  margin-bottom: 14px;
  padding: 16px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 22px;
  background: rgba(255,255,255,0.045);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.profile-settings-section h3 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 8px;
  color: var(--profile-gold-soft);
  font-size: 0.95rem;
}

.profile-settings-section h3 i {
  color: var(--profile-cyan);
}

.profile-settings-section p {
  margin: 0 0 13px;
  color: var(--profile-muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.profile-settings-action-grid,
.cursor-theme-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.profile-settings-action-grid button,
.cursor-theme-card,
.profile-settings-list button,
.profile-settings-list a {
  min-width: 0;
  border: 1px solid rgba(255,255,255,0.09);
  background: rgba(1, 3, 10, 0.35);
  color: var(--profile-text);
  border-radius: 16px;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
}

.profile-settings-action-grid button:hover,
.cursor-theme-card:hover,
.profile-settings-list button:hover,
.profile-settings-list a:hover {
  transform: translateY(-2px);
  border-color: rgba(240, 201, 106, 0.26);
  background: rgba(240, 201, 106, 0.07);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.25);
}

.profile-settings-action-grid button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 10px;
  font-weight: 900;
}

.cursor-theme-card {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 12px 8px;
  text-align: center;
}

.cursor-theme-card.is-active {
  border-color: rgba(84, 198, 238, 0.42);
  background:
    radial-gradient(circle at 50% 10%, rgba(84, 198, 238, 0.13), transparent 40%),
    rgba(84, 198, 238, 0.06);
  box-shadow:
    0 0 0 1px rgba(84, 198, 238, 0.10),
    0 16px 40px rgba(84, 198, 238, 0.10);
}

.cursor-theme-card strong {
  color: var(--profile-text);
  font-size: 0.82rem;
}

.cursor-theme-card small {
  color: var(--profile-muted);
  font-size: 0.72rem;
}

.cursor-theme-card__preview {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
  box-shadow: 0 0 20px rgba(240, 201, 106, 0.10);
}

.cursor-theme-card__preview::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--profile-cyan);
  box-shadow: 0 0 12px var(--profile-cyan);
}

.cursor-theme-card__preview--default::before {
  width: 0;
  height: 0;
  border-radius: 0;
  border-left: 8px solid var(--profile-text);
  border-top: 12px solid transparent;
  background: transparent;
  box-shadow: none;
}

.cursor-theme-card__preview--wayfinder {
  border-color: rgba(240, 201, 106, 0.76);
}

.cursor-theme-card__preview--star::before {
  background: #ffe27a;
  box-shadow: 0 0 14px #ffe27a;
}

.cursor-theme-card__preview--ocean {
  border-color: rgba(84, 198, 238, 0.76);
}

.cursor-theme-card__preview--ocean::before {
  background: #9bf2ff;
}

.cursor-theme-card__preview--ember {
  border-color: rgba(255, 162, 72, 0.80);
}

.cursor-theme-card__preview--ember::before {
  background: #ffcf6f;
  box-shadow: 0 0 14px #ff9f43;
}

.cursor-theme-card__preview--leaf {
  border-color: rgba(82, 213, 151, 0.80);
}

.cursor-theme-card__preview--leaf::before {
  background: #c9ffd9;
  box-shadow: 0 0 14px #52d597;
}

.profile-settings-list {
  display: grid;
  gap: 9px;
}

.profile-settings-list--split {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.profile-settings-list button,
.profile-settings-list a {
  display: grid;
  gap: 3px;
  padding: 12px 13px;
  text-align: left;
}

.profile-settings-list a {
  text-decoration: none;
}

.profile-settings-list span {
  color: var(--profile-text);
  font-weight: 900;
}

.profile-settings-list small {
  color: var(--profile-muted);
  line-height: 1.35;
}

.profile-settings-list button.is-active {
  border-color: rgba(84, 198, 238, 0.42);
  background:
    radial-gradient(circle at 0 0, rgba(84, 198, 238, 0.14), transparent 42%),
    rgba(84, 198, 238, 0.08);
  box-shadow: 0 0 0 1px rgba(84, 198, 238, 0.10);
}

.profile-settings-inline-btn {
  width: 100%;
  margin-top: 10px;
  min-height: 38px;
  border: 1px dashed rgba(240, 201, 106, 0.26);
  border-radius: 14px;
  background: rgba(240, 201, 106, 0.055);
  color: var(--profile-gold-soft);
  font-weight: 900;
}

.profile-settings-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.profile-settings-pill-row span {
  padding: 6px 9px;
  border: 1px solid rgba(84, 198, 238, 0.16);
  border-radius: 999px;
  background: rgba(84, 198, 238, 0.055);
  color: var(--profile-muted);
  font-size: 0.76rem;
  font-weight: 900;
}

.profile-settings-admin-section {
  border-color: rgba(240, 201, 106, 0.20);
  background:
    radial-gradient(circle at 0 0, rgba(240, 201, 106, 0.11), transparent 44%),
    rgba(255,255,255,0.05);
}

.profile-settings-admin-pills {
  margin-top: 12px;
}

body.profile-theme-light .profile-settings-backdrop {
  background: rgba(24, 40, 64, 0.22);
}

body.profile-theme-light .profile-settings-drawer {
  background:
    radial-gradient(circle at 18% 0%, rgba(181, 132, 19, 0.11), transparent 30%),
    radial-gradient(circle at 88% 18%, rgba(47, 144, 183, 0.10), transparent 28%),
    rgba(246, 250, 255, 0.94);
  border-left-color: rgba(181, 132, 19, 0.18);
}

body.profile-theme-light .profile-settings-section,
body.profile-theme-light .profile-settings-action-grid button,
body.profile-theme-light .cursor-theme-card,
body.profile-theme-light .profile-settings-list button,
body.profile-theme-light .profile-settings-list a {
  background: rgba(255,255,255,0.72);
  border-color: rgba(45, 76, 112, 0.11);
}

.profile-mobile-dock {
  display: none;
}

.profile-shell {
  position: relative;
  z-index: 2;
  width: min(1480px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 96px;
}

.profile-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  margin-bottom: 22px;
  padding: clamp(22px, 4vw, 40px);
  border: 1px solid rgba(240, 201, 106, 0.16);
  border-radius: 34px;
  background:
    radial-gradient(circle at 0 0, rgba(240, 201, 106, 0.12), transparent 42%),
    radial-gradient(circle at 100% 42%, rgba(84, 198, 238, 0.11), transparent 40%),
    rgba(4, 10, 26, 0.68);
  box-shadow: var(--profile-shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.profile-eyebrow {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  margin: 0 0 12px;
  padding: 6px 11px;
  border: 1px solid rgba(240, 201, 106, 0.24);
  border-radius: 999px;
  background: rgba(240, 201, 106, 0.07);
  color: var(--profile-gold);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.profile-hero h1 {
  margin: 0;
  color: var(--profile-gold);
  font-family: var(--profile-font-title);
  font-size: clamp(3.35rem, 7vw, 6.8rem);
  font-weight: 400;
  letter-spacing: 0.03em;
  line-height: 0.84;
  text-shadow:
    0 0 22px rgba(240, 201, 106, 0.20),
    0 0 52px rgba(84, 198, 238, 0.08);
}

.profile-hero p {
  max-width: 820px;
  margin: 18px 0 0;
  color: var(--profile-muted);
  font-family: var(--profile-font-serif);
  font-size: clamp(1.05rem, 1.8vw, 1.28rem);
  line-height: 1.62;
}

.profile-hero__mark {
  width: 116px;
  height: 116px;
  flex: 0 0 116px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  border: 1px solid rgba(240, 201, 106, 0.24);
  background:
    radial-gradient(circle, rgba(240, 201, 106, 0.16), transparent 66%),
    rgba(1, 3, 10, 0.52);
  box-shadow:
    0 0 30px rgba(240, 201, 106, 0.15),
    inset 0 0 24px rgba(255,255,255,0.04);
}

.profile-hero__mark img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

body.profile-theme-light .profile-hero {
  background:
    radial-gradient(circle at 0 0, rgba(240, 201, 106, 0.08), transparent 38%),
    radial-gradient(circle at 100% 100%, rgba(84, 198, 238, 0.08), transparent 42%),
    rgba(255, 255, 255, 0.76);
  border-color: rgba(45, 76, 112, 0.10);
  box-shadow: 0 14px 34px rgba(45, 76, 112, 0.08);
}

body.profile-theme-light .profile-hero h1,
body.profile-theme-light .profile-card-head h2,
body.profile-theme-light .profile-passport-copy h2 {
  color: #8a6410;
  text-shadow: none;
}

body.profile-theme-light .profile-hero p,
body.profile-theme-light .profile-card-head p,
body.profile-theme-light .profile-note,
body.profile-theme-light .lesson-row small,
body.profile-theme-light .profile-passport-copy p {
  color: var(--profile-muted);
}

body.profile-theme-light .profile-eyebrow,
body.profile-theme-light .profile-role-chip {
  background: rgba(240, 201, 106, 0.10);
  color: #8a6410;
  border-color: rgba(181, 132, 19, 0.18);
}

/* ═══════════════════════════════════════════════════════════════════════════
   SESSION STATE
═══════════════════════════════════════════════════════════════════════════ */

.profile-session-state {
  position: relative;
  z-index: 2;
  margin-bottom: 18px;
  padding: 12px 15px;
  border-radius: 18px;
  border: 1px solid rgba(84, 198, 238, 0.20);
  background: rgba(84, 198, 238, 0.06);
  color: var(--profile-cyan);
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 10px 30px rgba(0,0,0,0.18);
}

.profile-session-state.is-good {
  border-color: rgba(60,179,113,0.24);
  background: rgba(60,179,113,0.08);
  color: #8fffc7;
}

.profile-session-state.is-warning {
  border-color: rgba(240,201,106,0.24);
  background: rgba(240,201,106,0.08);
  color: var(--profile-gold);
}

.profile-session-state.is-bad {
  border-color: rgba(255,118,118,0.26);
  background: rgba(255,118,118,0.08);
  color: var(--profile-red);
}

body.profile-theme-light .profile-session-state {
  background: rgba(255, 255, 255, 0.76);
  border-color: rgba(45, 76, 112, 0.10);
  box-shadow: 0 14px 34px rgba(45, 76, 112, 0.08);
}

body.profile-theme-light .profile-session-state.is-good {
  color: #137247;
  background: rgba(60,179,113,0.12);
}

body.profile-theme-light .profile-session-state.is-warning {
  color: #8a6410;
  background: rgba(240,201,106,0.14);
}

body.profile-theme-light .profile-session-state.is-bad {
  color: #9e3434;
  background: rgba(255,118,118,0.12);
}

/* ═══════════════════════════════════════════════════════════════════════════
   LAYOUT
═══════════════════════════════════════════════════════════════════════════ */

.profile-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(300px, 0.42fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  transition: opacity 0.28s ease;
}

body.profile-loading .profile-layout {
  opacity: 0;
  pointer-events: none;
}

body.profile-is-signed-in .profile-auth-card {
  display: none !important;
}

body.profile-is-signed-in .profile-layout {
  grid-template-columns: 1fr;
}

body.profile-is-guest .profile-continuation-grid,
body.profile-is-guest #rewards,
body.profile-is-guest #reflections,
body.profile-is-guest #ecosystem,
body.profile-is-guest #access {
  display: none !important;
}

body.profile-is-guest .profile-mobile-dock a[href="#continuePath"],
body.profile-is-guest .profile-mobile-dock a[href="#rewards"] {
  display: none;
}

body.profile-is-signed-in .profile-mobile-dock a[href="#authPanel"] {
  display: none;
}

.profile-content {
  min-width: 0;
  display: grid;
  gap: 18px;
}

body.profile-is-signed-in .profile-content {
  grid-template-columns: minmax(380px, 520px) minmax(0, 1fr);
  align-items: start;
}

.profile-stage {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(380px, 520px) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

body.profile-is-signed-in .profile-stage {
  grid-column: 1 / -1;
}

.profile-col {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

body.profile-is-signed-in #path {
  grid-column: 1 / -1;
}

.profile-continuation-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(300px, 0.9fr) minmax(320px, 1.1fr);
  gap: 18px;
  align-items: stretch;
}

/* ═══════════════════════════════════════════════════════════════════════════
   CARDS
═══════════════════════════════════════════════════════════════════════════ */

.profile-card,
.profile-auth-card {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 16px;
  padding: clamp(16px, 2vw, 22px);
  border-radius: var(--profile-radius-lg);
  border: 1px solid var(--profile-border);
  background:
    radial-gradient(circle at 20% 0%, rgba(240, 201, 106, 0.08), transparent 44%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0)),
    var(--profile-card);
  box-shadow: var(--profile-shadow-soft), inset 0 0 26px rgba(255, 255, 255, 0.025);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.profile-card::before,
.profile-auth-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.36;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.08), transparent 34%),
    radial-gradient(circle at 100% 0%, rgba(84,198,238,0.08), transparent 32%);
}

.profile-card > *,
.profile-auth-card > * {
  position: relative;
  z-index: 1;
}

.profile-card-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 13px;
  align-items: center;
}

.profile-card-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(240, 201, 106, 0.24);
  background:
    radial-gradient(circle, rgba(240, 201, 106, 0.16), transparent 62%),
    rgba(255, 255, 255, 0.035);
  color: var(--profile-gold);
  font-size: 24px;
}

.profile-card-head h2,
.profile-card h2,
.profile-auth-card h2 {
  margin: 0;
  color: rgba(255, 239, 198, 0.98);
  font-family: var(--profile-font-title);
  font-size: clamp(1.8rem, 3vw, 2.55rem);
  font-weight: 400;
  letter-spacing: 0.035em;
  line-height: 0.95;
}

.profile-card-head p,
.profile-card p,
.profile-auth-card p {
  margin: 4px 0 0;
  color: var(--profile-muted);
  font-size: 13px;
  line-height: 1.52;
}

body.profile-theme-light .profile-card,
body.profile-theme-light .profile-auth-card {
  background:
    radial-gradient(circle at 0 0, rgba(240, 201, 106, 0.08), transparent 38%),
    radial-gradient(circle at 100% 100%, rgba(84, 198, 238, 0.08), transparent 42%),
    rgba(255, 255, 255, 0.76);
  color: var(--profile-text);
  border-color: rgba(45, 76, 112, 0.10);
  box-shadow: 0 14px 34px rgba(45, 76, 112, 0.08);
}

body.profile-theme-light .profile-card-head h2,
body.profile-theme-light .profile-card h2,
body.profile-theme-light .profile-auth-card h2 {
  color: #8a6410;
}

body.profile-theme-light strong {
  color: #7f5d10;
}

/* ═══════════════════════════════════════════════════════════════════════════
   FORMS / BUTTONS
═══════════════════════════════════════════════════════════════════════════ */

.profile-auth-form,
.profile-edit-form {
  display: grid;
  gap: 12px;
}

.profile-edit-form--settings {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.profile-auth-form label,
.profile-edit-form label {
  display: grid;
  gap: 7px;
  color: rgba(230, 242, 255, 0.88);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.profile-auth-form input,
.profile-edit-form input,
.profile-edit-form textarea,
.profile-edit-form select,
.profile-filter-row input,
.profile-filter-row select {
  width: 100%;
  min-height: 44px;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.09);
  outline: none;
  background: rgba(1, 3, 10, 0.56);
  color: var(--profile-text);
  box-shadow: inset 0 0 16px rgba(0,0,0,0.18);
}

.profile-password-field {
  position: relative;
  display: grid;
}

.profile-password-field input {
  padding-right: 48px;
}

.profile-password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  transform: translateY(-50%);
  border: 1px solid rgba(84, 198, 238, 0.18);
  border-radius: 50%;
  background: rgba(84, 198, 238, 0.08);
  color: var(--profile-cyan);
  cursor: pointer;
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
}

.profile-password-toggle:hover {
  transform: translateY(-50%) scale(1.04);
  border-color: rgba(240, 201, 106, 0.34);
  background: rgba(240, 201, 106, 0.12);
  color: var(--profile-gold);
}

.profile-edit-form textarea {
  min-height: 112px;
  resize: vertical;
}

.profile-main-btn {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 11px 17px;
  border: 1px solid rgba(240, 201, 106, 0.34);
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 0%, rgba(240, 201, 106, 0.24), transparent 60%),
    rgba(240, 201, 106, 0.11);
  color: rgba(255, 239, 198, 0.98);
  font-weight: 900;
  box-shadow: 0 0 24px rgba(240, 201, 106, 0.12);
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}

.profile-main-btn:hover {
  transform: translateY(-1px);
}

.profile-main-btn--ghost {
  border-color: rgba(84, 198, 238, 0.28);
  background: rgba(84, 198, 238, 0.08);
  color: var(--profile-cyan);
}

.profile-main-btn.is-disabled,
.profile-main-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.profile-note {
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.035);
  color: var(--profile-muted);
  font-size: 12px;
  line-height: 1.52;
}

body.profile-theme-light .profile-auth-form label,
body.profile-theme-light .profile-edit-form label {
  color: rgba(24, 43, 70, 0.90);
}

body.profile-theme-light input,
body.profile-theme-light select,
body.profile-theme-light textarea,
body.profile-theme-light .profile-auth-form input,
body.profile-theme-light .profile-edit-form input,
body.profile-theme-light .profile-edit-form textarea,
body.profile-theme-light .profile-edit-form select,
body.profile-theme-light .profile-filter-row input,
body.profile-theme-light .profile-filter-row select {
  background: rgba(255, 255, 255, 0.88) !important;
  color: rgba(24, 40, 64, 0.95) !important;
  border: 1px solid rgba(45, 76, 112, 0.12) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.55),
    0 8px 18px rgba(35, 64, 99, 0.05);
}

body.profile-theme-light input::placeholder,
body.profile-theme-light textarea::placeholder {
  color: rgba(92, 110, 138, 0.78);
}

body.profile-theme-light .profile-password-toggle {
  background: rgba(255,255,255,0.76);
  border-color: rgba(45, 76, 112, 0.14);
  color: #2f4f78;
}

body.profile-theme-light .profile-password-toggle:hover {
  border-color: rgba(181, 132, 19, 0.20);
  color: #8a6410;
}

body.profile-theme-light .profile-main-btn,
body.profile-theme-light .lesson-row__complete,
body.profile-theme-light .lesson-row__status,
body.profile-theme-light .lesson-row__open,
body.profile-theme-light .profile-realm-wheel button {
  background: rgba(255,255,255,0.88) !important;
  color: #2f4f78 !important;
  border-color: rgba(45, 76, 112, 0.12) !important;
}

body.profile-theme-light .profile-main-btn:hover,
body.profile-theme-light .lesson-row__complete:hover,
body.profile-theme-light .lesson-row__open:hover,
body.profile-theme-light .profile-realm-wheel button:hover {
  border-color: rgba(181, 132, 19, 0.20) !important;
  color: #8a6410 !important;
}

body.profile-theme-light .profile-note {
  background: rgba(255,255,255,0.72);
  border-color: rgba(45, 76, 112, 0.10);
}

/* ═══════════════════════════════════════════════════════════════════════════
   PASSPORT CARD
═══════════════════════════════════════════════════════════════════════════ */

.profile-passport-card {
  gap: 0;
  padding: 0;
  border-color: rgba(240, 201, 106, 0.18);
  background:
    radial-gradient(circle at 50% 0%, rgba(240, 201, 106, 0.12), transparent 46%),
    radial-gradient(circle at 100% 70%, rgba(84, 198, 238, 0.08), transparent 38%),
    rgba(5, 12, 32, 0.80);
}

.profile-passport-card__banner {
  position: relative;
  min-height: 86px;
  border-bottom: 1px solid rgba(255,255,255,0.075);
  background:
    radial-gradient(circle at 20% 0%, rgba(84, 198, 238, 0.25), transparent 34%),
    radial-gradient(circle at 78% 42%, rgba(240, 201, 106, 0.18), transparent 42%),
    linear-gradient(135deg, rgba(84,198,238,0.13), rgba(143,160,255,0.10));
}

.profile-passport-card__glow {
  position: absolute;
  inset: auto 10% -42px;
  height: 90px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(240, 201, 106, 0.20), transparent 70%);
  filter: blur(18px);
}

.profile-passport-card__main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: clamp(16px, 2vw, 22px);
}

.profile-avatar {
  width: 98px;
  height: 98px;
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  border-radius: 36% 64% 55% 45% / 46% 36% 64% 54%;
  border: 1px solid rgba(240, 201, 106, 0.34);
  background:
    radial-gradient(circle at 40% 30%, rgba(255, 255, 255, 0.18), transparent 28%),
    radial-gradient(circle at 50% 50%, rgba(240, 201, 106, 0.22), transparent 64%),
    rgba(1, 3, 10, 0.72);
  box-shadow:
    0 0 28px rgba(240, 201, 106, 0.20),
    inset 0 0 26px rgba(84, 198, 238, 0.08);
  animation: passport-morph 9s ease-in-out infinite alternate;
}

.profile-avatar::before {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: inherit;
  border: 1px dashed rgba(255, 220, 140, 0.30);
  animation: passport-spin 34s linear infinite;
}

.profile-avatar span {
  position: relative;
  z-index: 2;
  color: var(--profile-gold);
  font-family: var(--profile-font-title);
  font-size: 32px;
  font-weight: 900;
  letter-spacing: 0.03em;
}

.profile-passport-copy {
  min-width: 0;
}

.profile-passport-topline {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.profile-passport-topline .profile-eyebrow {
  margin: 0;
}

.profile-role-chip {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid rgba(240, 201, 106, 0.26);
  background: rgba(240, 201, 106, 0.08);
  color: var(--profile-gold);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.profile-passport-copy h2 {
  margin: 12px 0 4px;
  color: rgba(255, 239, 198, 0.98);
  font-family: var(--profile-font-title);
  font-size: clamp(2rem, 4vw, 3.35rem);
  font-weight: 400;
  letter-spacing: 0.03em;
  line-height: 0.96;
}

.profile-passport-copy p {
  margin: 4px 0;
  color: var(--profile-muted);
  font-size: 13px;
}

.profile-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.profile-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(240, 201, 106, 0.22);
  background: rgba(240, 201, 106, 0.07);
  color: rgba(255, 239, 198, 0.92);
  font-size: 12px;
  font-weight: 800;
}

.profile-ring-wrap {
  position: relative;
  width: 118px;
  height: 118px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.profile-ring {
  position: absolute;
  inset: 0;
  width: 118px;
  height: 118px;
  transform: rotate(-90deg);
}

.profile-ring__track {
  fill: none;
  stroke: rgba(255,255,255,0.08);
  stroke-width: 10;
}

.profile-ring__progress {
  fill: none;
  stroke: var(--profile-gold);
  stroke-width: 10;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.35s ease;
}

#statProgress {
  position: relative;
  z-index: 2;
  color: var(--profile-gold);
  font-size: 22px;
  font-weight: 900;
}

.profile-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid rgba(255,255,255,0.075);
}

.profile-stat-grid div {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 15px 10px;
  border-right: 1px solid rgba(255,255,255,0.055);
  text-align: center;
}

.profile-stat-grid div:last-child {
  border-right: 0;
}

.profile-stat-grid strong {
  color: var(--profile-cyan);
  font-size: clamp(1.45rem, 3vw, 1.8rem);
  line-height: 1;
}

.profile-stat-grid span {
  color: var(--profile-muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

body.profile-theme-light .profile-passport-card {
  background:
    radial-gradient(circle at 0 0, rgba(240, 201, 106, 0.08), transparent 38%),
    radial-gradient(circle at 100% 100%, rgba(84, 198, 238, 0.08), transparent 42%),
    rgba(255, 255, 255, 0.76);
}

body.profile-theme-light .profile-passport-card__banner {
  background:
    radial-gradient(circle at 20% 0%, rgba(84, 198, 238, 0.12), transparent 34%),
    radial-gradient(circle at 78% 42%, rgba(240, 201, 106, 0.12), transparent 42%),
    linear-gradient(135deg, rgba(255,255,255,0.70), rgba(235,243,252,0.72));
}

body.profile-theme-light .profile-badge {
  color: #8a6410;
  background: rgba(240, 201, 106, 0.10);
  border-color: rgba(181, 132, 19, 0.18);
}

/* ═══════════════════════════════════════════════════════════════════════════
   KNOWLEDGE GALAXY
═══════════════════════════════════════════════════════════════════════════ */

.profile-galaxy-panel {
  min-height: 540px;
  padding: 0;
  overflow: hidden;
  border-color: rgba(84, 198, 238, 0.16);
}

body.profile-theme-light .profile-galaxy-panel {
  background:
    radial-gradient(circle at 20% 0%, rgba(84, 198, 238, 0.08), transparent 44%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0)),
    rgba(2, 7, 20, 0.92);
  border-color: rgba(84, 198, 238, 0.18);
  box-shadow: var(--profile-shadow-soft), inset 0 0 26px rgba(255, 255, 255, 0.025);
}

.profile-galaxy-panel__inner {
  position: relative;
  width: 100%;
  min-height: 540px;
  height: 100%;
  overflow: hidden;
  isolation: isolate;
  border-radius: var(--profile-radius-lg);
  background:
    radial-gradient(circle at 18% 18%, rgba(84, 198, 238, 0.12), transparent 32%),
    radial-gradient(circle at 80% 18%, rgba(240, 201, 106, 0.10), transparent 36%),
    radial-gradient(circle at 50% 100%, rgba(143, 160, 255, 0.10), transparent 42%),
    rgba(2, 7, 20, 0.84);
}

.profile-galaxy-panel__inner::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(circle at 30% 20%, rgba(84, 198, 238, 0.12), transparent 24%),
    radial-gradient(circle at 70% 26%, rgba(240, 201, 106, 0.12), transparent 26%),
    radial-gradient(circle at 50% 75%, rgba(143, 160, 255, 0.12), transparent 26%);
  pointer-events: none;
}

.profile-galaxy-panel__overlay {
  position: absolute;
  left: 20px;
  right: 20px;
  top: 18px;
  z-index: 4;
  pointer-events: none;
}

.profile-galaxy-panel__overlay .profile-eyebrow {
  margin-bottom: 8px;
}

.profile-galaxy-panel__overlay h2 {
  margin: 0;
  color: var(--profile-gold);
  font-family: var(--profile-font-title);
  font-size: clamp(2rem, 3vw, 3rem);
  font-weight: 400;
  line-height: 0.95;
}

.profile-galaxy-panel__overlay p {
  max-width: 620px;
  margin: 10px 0 0;
  color: var(--profile-muted);
  font-family: var(--profile-font-serif);
  font-size: 1rem;
  line-height: 1.45;
}

.profile-galaxy-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0.96;
  pointer-events: auto;
  touch-action: none;
  cursor: grab;
}

.profile-galaxy-canvas:active {
  cursor: grabbing;
}

.profile-galaxy-chipbar {
  position: absolute;
  right: 14px;
  top: 14px;
  z-index: 6;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  max-width: min(520px, calc(100% - 28px));
}

.profile-galaxy-chipbar button {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid rgba(84, 198, 238, 0.24);
  background: rgba(2, 8, 22, 0.72);
  color: var(--profile-cyan);
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(0,0,0,0.22);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.profile-galaxy-chipbar button:hover {
  transform: translateY(-1px);
  border-color: rgba(240, 201, 106, 0.28);
  color: var(--profile-gold);
}

.profile-galaxy-tooltip {
  position: absolute;
  z-index: 7;
  min-width: 140px;
  max-width: 230px;
  padding: 9px 12px;
  border-radius: 14px;
  border: 1px solid rgba(240, 201, 106, 0.20);
  background: rgba(2, 6, 16, 0.92);
  color: rgba(238, 248, 255, 0.96);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  transform: translate(-50%, -118%);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.14s ease,
    transform 0.14s ease;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.profile-galaxy-tooltip.is-visible {
  opacity: 1;
  transform: translate(-50%, -132%);
}

* {
  scrollbar-color: var(--profile-scrollbar-thumb) var(--profile-scrollbar-track);
  scrollbar-width: thin;
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.055), rgba(255,255,255,0.02));
}

*::-webkit-scrollbar-thumb {
  min-height: 44px;
  border: 2px solid rgba(1,3,10,0.72);
  border-radius: 999px;
  background:
    linear-gradient(180deg, var(--profile-scrollbar-thumb), rgba(84,198,238,0.26));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
}

*::-webkit-scrollbar-thumb:hover {
  background:
    linear-gradient(180deg, var(--profile-scrollbar-thumb-hover), rgba(240,201,106,0.48));
}

*::-webkit-scrollbar-corner {
  background: var(--profile-scrollbar-corner);
}

.profile-galaxy-tooltip small {
  display: block;
  margin-top: 5px;
  color: var(--profile-gold);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.profile-galaxy-selection {
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 8;
  width: min(360px, calc(100% - 32px));
  padding: 16px;
  border-radius: 22px;
  border: 1px solid rgba(240, 201, 106, 0.22);
  background:
    radial-gradient(circle at 0 0, rgba(240, 201, 106, 0.08), transparent 42%),
    radial-gradient(circle at 100% 100%, rgba(84, 198, 238, 0.08), transparent 44%),
    rgba(2, 6, 16, 0.82);
  box-shadow: 0 22px 58px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition:
    opacity 0.16s ease,
    transform 0.16s ease,
    border-color 0.16s ease;
}

.profile-galaxy-selection.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.profile-galaxy-selection__eyebrow {
  color: var(--profile-gold);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.profile-galaxy-selection h3 {
  margin: 8px 32px 6px 0;
  color: var(--profile-gold);
  font-family: var(--profile-font-title);
  font-size: 2rem;
  line-height: 0.95;
  font-weight: 400;
}

.profile-galaxy-selection p {
  margin: 0 0 12px;
  color: var(--profile-muted);
  line-height: 1.45;
  font-size: 13px;
}

.profile-galaxy-selection__meta {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 15px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  color: var(--profile-muted);
  font-size: 12px;
  line-height: 1.45;
}

.profile-galaxy-selection__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.profile-galaxy-selection__actions button,
.profile-galaxy-selection__actions a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(84, 198, 238, 0.24);
  background: rgba(84, 198, 238, 0.08);
  color: var(--profile-cyan);
  font-size: 12px;
  font-weight: 900;
}

.profile-galaxy-selection__actions a {
  border-color: rgba(240, 201, 106, 0.24);
  background: rgba(240, 201, 106, 0.08);
  color: var(--profile-gold);
}

.profile-galaxy-selection__actions a:hover,
.profile-galaxy-selection__actions button:hover {
  transform: translateY(-1px);
}

.profile-galaxy-selection__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
  color: var(--profile-text);
  font-size: 20px;
  line-height: 1;
}

.profile-galaxy-selection__close:hover {
  color: var(--profile-gold);
  border-color: rgba(240, 201, 106, 0.22);
}

body.profile-theme-light .profile-galaxy-panel__inner {
  background:
    radial-gradient(circle at 18% 18%, rgba(84, 198, 238, 0.12), transparent 32%),
    radial-gradient(circle at 80% 18%, rgba(240, 201, 106, 0.10), transparent 36%),
    radial-gradient(circle at 50% 100%, rgba(143, 160, 255, 0.10), transparent 42%),
    rgba(2, 7, 20, 0.84);
  border-color: rgba(84, 198, 238, 0.16);
}

body.profile-theme-light .profile-galaxy-panel__overlay h2 {
  color: var(--profile-gold);
  text-shadow: 0 0 28px rgba(240, 201, 106, 0.16);
}

body.profile-theme-light .profile-galaxy-panel__overlay p {
  color: rgba(171, 194, 226, 0.78);
}

body.profile-theme-light .profile-galaxy-panel__overlay .profile-eyebrow {
  background: rgba(84, 198, 238, 0.10);
  color: var(--profile-cyan);
  border-color: rgba(84, 198, 238, 0.22);
}

body.profile-theme-light .profile-galaxy-chipbar button {
  background: rgba(2, 8, 22, 0.72);
  color: var(--profile-cyan);
  border-color: rgba(84, 198, 238, 0.24);
}

body.profile-theme-light .profile-galaxy-tooltip,
body.profile-theme-light .profile-galaxy-selection {
  background:
    radial-gradient(circle at 0 0, rgba(240, 201, 106, 0.08), transparent 42%),
    radial-gradient(circle at 100% 100%, rgba(84, 198, 238, 0.08), transparent 44%),
    rgba(2, 6, 16, 0.86);
  color: rgba(238, 248, 255, 0.96);
  border-color: rgba(240, 201, 106, 0.22);
}

body.profile-theme-light .profile-galaxy-selection h3 {
  color: var(--profile-gold);
}

body.profile-theme-light .profile-galaxy-selection p,
body.profile-theme-light .profile-galaxy-tooltip,
body.profile-theme-light .profile-galaxy-selection__meta {
  color: rgba(171, 194, 226, 0.86);
}

body.profile-theme-light .profile-galaxy-selection__meta {
  background: rgba(255,255,255,0.045);
  border-color: rgba(255,255,255,0.08);
}

/* ═══════════════════════════════════════════════════════════════════════════
   REWARDS
═══════════════════════════════════════════════════════════════════════════ */

/* User profile learning cards */

.profile-continue-card {
  border-color: rgba(240, 201, 106, 0.22);
  background:
    radial-gradient(circle at 0 0, rgba(240, 201, 106, 0.14), transparent 44%),
    radial-gradient(circle at 92% 72%, rgba(84, 198, 238, 0.08), transparent 38%),
    var(--profile-card);
}

.profile-continue-card__body {
  display: grid;
  gap: 9px;
  padding: 14px;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,0.075);
  background: rgba(255,255,255,0.035);
}

.profile-continue-card__body strong {
  color: rgba(255, 239, 198, 0.98);
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  line-height: 1.1;
}

.profile-continue-card__body span {
  color: var(--profile-muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.profile-continue-card__body small {
  color: var(--profile-faint);
  font-weight: 800;
  letter-spacing: 0.03em;
  line-height: 1.45;
}

.profile-continue-progress {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,0.075);
}

.profile-continue-progress span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--profile-cyan), var(--profile-gold));
  transition: width 0.35s ease;
}

.profile-evolution-card {
  border-color: rgba(84, 198, 238, 0.18);
}

.profile-evolution-log,
.profile-reflection-list {
  display: grid;
  gap: 10px;
}

.profile-evolution-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  padding: 12px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.075);
  background:
    radial-gradient(circle at 0 0, color-mix(in srgb, var(--culture-color, var(--profile-cyan)) 18%, transparent), transparent 58%),
    rgba(255,255,255,0.035);
  box-shadow: inset 3px 0 0 color-mix(in srgb, var(--culture-color, var(--profile-cyan)) 82%, var(--profile-gold));
}

.profile-evolution-item__orb {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--culture-color, var(--profile-cyan)) 48%, transparent);
  background:
    radial-gradient(circle at 34% 28%, rgba(255,255,255,0.20), transparent 28%),
    color-mix(in srgb, var(--culture-color, var(--profile-cyan)) 22%, rgba(1,3,10,0.72));
  box-shadow: 0 0 18px color-mix(in srgb, var(--culture-color, var(--profile-cyan)) 22%, transparent);
}

.profile-evolution-item strong,
.profile-reflection-item strong {
  display: block;
  color: rgba(255, 239, 198, 0.96);
  font-size: 0.98rem;
  line-height: 1.2;
}

.profile-evolution-item small,
.profile-reflection-item span {
  display: block;
  margin-top: 3px;
  color: var(--profile-cyan);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.profile-evolution-item p,
.profile-reflection-item p {
  margin-top: 5px;
  color: var(--profile-muted);
  font-size: 0.82rem;
  line-height: 1.48;
}

.profile-reflections-card {
  border-color: rgba(240, 201, 106, 0.18);
}

.profile-reflection-item {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.075);
  background:
    radial-gradient(circle at 100% 0, rgba(240, 201, 106, 0.08), transparent 46%),
    rgba(255,255,255,0.035);
}

.profile-reflection-item a {
  justify-self: start;
  margin-top: 3px;
  color: var(--profile-gold);
  font-size: 0.78rem;
  font-weight: 900;
  text-decoration: none;
}

.rewards-next-badge__inner {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 20px;
  border: 1px solid rgba(84, 198, 238, 0.20);
  background:
    radial-gradient(circle at 0 0, rgba(84, 198, 238, 0.10), transparent 50%),
    rgba(84, 198, 238, 0.055);
}

.rewards-next-badge__inner > span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(240, 201, 106, 0.22);
  background: rgba(240, 201, 106, 0.08);
  font-size: 1.2rem;
}

.rewards-next-badge__inner strong {
  display: block;
  color: var(--profile-cyan);
  font-size: 0.95rem;
}

.rewards-next-badge__inner small {
  display: block;
  margin-top: 3px;
  color: var(--profile-muted);
  line-height: 1.4;
}

.rewards-next-badge__inner.is-complete {
  border-color: rgba(60, 179, 113, 0.22);
  background: rgba(60, 179, 113, 0.08);
}

body.profile-theme-light .profile-continue-card__body,
body.profile-theme-light .profile-evolution-item,
body.profile-theme-light .profile-reflection-item,
body.profile-theme-light .rewards-next-badge__inner {
  background: rgba(255,255,255,0.72);
  border-color: rgba(45, 76, 112, 0.10);
}

body.profile-theme-light .profile-continue-card__body strong,
body.profile-theme-light .profile-evolution-item strong,
body.profile-theme-light .profile-reflection-item strong {
  color: #8a6410;
}

body.profile-theme-light .profile-continue-progress,
body.profile-theme-light .rewards-progress-bar {
  background: rgba(45, 76, 112, 0.10);
}

.profile-rewards-card {
  border-color: rgba(240, 201, 106, 0.22);
  background:
    radial-gradient(circle at 50% 0%, rgba(240, 201, 106, 0.13), transparent 44%),
    radial-gradient(circle at 100% 70%, rgba(84, 198, 238, 0.08), transparent 38%),
    rgba(5, 12, 32, 0.82);
}

.rewards-rank-panel {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border-radius: 22px;
  border: 1px solid rgba(240, 201, 106, 0.18);
  background:
    radial-gradient(circle at 0 0, rgba(240, 201, 106, 0.12), transparent 54%),
    rgba(255,255,255,0.035);
}

.rewards-rank-orb {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(240, 201, 106, 0.30);
  background:
    radial-gradient(circle, rgba(240, 201, 106, 0.22), transparent 64%),
    rgba(1, 3, 10, 0.56);
  font-size: 30px;
}

.rewards-rank-copy {
  display: grid;
  gap: 4px;
}

.rewards-rank-copy span,
.rewards-section-title {
  color: var(--profile-gold);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.rewards-rank-copy strong {
  color: rgba(255, 239, 198, 0.98);
  font-size: 24px;
  line-height: 1.1;
}

.rewards-rank-copy p {
  margin: 0;
  color: var(--profile-muted);
  font-size: 12px;
  line-height: 1.45;
}

.rewards-progress-wrap {
  display: grid;
  gap: 7px;
}

.rewards-progress-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--profile-muted);
  font-size: 11px;
  font-weight: 800;
}

.rewards-progress-bar {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,0.075);
}

.rewards-progress-bar span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--profile-cyan), var(--profile-gold));
  transition: width 0.35s ease;
}

.profile-stat-grid--rewards {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  border: 0;
}

.profile-stat-grid--rewards div {
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 18px;
  background: rgba(255,255,255,0.035);
}

.rewards-mini-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.rewards-mini-grid div {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 12px 8px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.07);
  background: rgba(255,255,255,0.035);
  text-align: center;
}

.rewards-mini-grid strong {
  color: var(--profile-cyan);
  font-size: 22px;
  line-height: 1;
}

.rewards-mini-grid span {
  color: var(--profile-muted);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.rewards-badge-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rewards-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(240, 201, 106, 0.22);
  background: rgba(240, 201, 106, 0.07);
  color: rgba(255, 239, 198, 0.94);
  font-size: 12px;
  font-weight: 800;
}

.rewards-certificate-list {
  display: grid;
  gap: 8px;
}

.rewards-certificate {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(84, 198, 238, 0.18);
  background: rgba(84, 198, 238, 0.06);
}

.rewards-certificate strong {
  color: var(--profile-cyan);
  font-size: 13px;
}

.rewards-certificate span {
  color: var(--profile-muted);
  font-size: 11px;
}

body.profile-theme-light .profile-rewards-card,
body.profile-theme-light .rewards-rank-panel,
body.profile-theme-light .profile-stat-grid--rewards div,
body.profile-theme-light .rewards-mini-grid div {
  background:
    radial-gradient(circle at 0 0, rgba(240, 201, 106, 0.08), transparent 38%),
    rgba(255,255,255,0.72);
  border-color: rgba(45, 76, 112, 0.10);
}

body.profile-theme-light .rewards-rank-copy strong {
  color: #8a6410;
}

body.profile-theme-light .rewards-badge {
  color: #8a6410;
  background: rgba(240, 201, 106, 0.10);
  border-color: rgba(181, 132, 19, 0.18);
}

/* ═══════════════════════════════════════════════════════════════════════════
   ACCESS / REALMS / ECOSYSTEM / ADMIN
═══════════════════════════════════════════════════════════════════════════ */

.profile-realm-wheel {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.profile-realm-wheel button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  color: rgba(230, 242, 255, 0.84);
  font-weight: 900;
}

.profile-realm-wheel button:hover,
.profile-realm-wheel button.is-active {
  color: var(--profile-gold);
  border-color: rgba(240, 201, 106, 0.28);
  background: rgba(240, 201, 106, 0.08);
}

.profile-realm-description {
  margin: 0;
  padding: 13px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.035);
  color: var(--profile-muted);
  line-height: 1.65;
}

.profile-ecosystem-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}

.profile-ecosystem-card,
.ecosystem-card {
  min-height: 118px;
  display: grid;
  gap: 7px;
  padding: 14px;
  border-radius: 20px;
  border: 1px solid var(--eco-border, rgba(255,255,255,0.08));
  background:
    radial-gradient(circle at 0 0, var(--eco-bg, rgba(240,201,106,0.08)), transparent 62%),
    rgba(255,255,255,0.035);
}

.profile-ecosystem-card strong,
.ecosystem-card strong {
  color: var(--eco-color, var(--profile-gold));
  font-size: 14px;
}

.profile-ecosystem-card span,
.ecosystem-card span {
  color: var(--profile-muted);
  font-size: 12px;
  line-height: 1.45;
}

.profile-ecosystem-card small,
.ecosystem-card small {
  margin-top: auto;
  color: var(--eco-color, var(--profile-gold));
  font-size: 11px;
  font-weight: 900;
}

.profile-admin-panel {
  border-color: rgba(240, 201, 106, 0.24);
  background:
    radial-gradient(circle at 0 0, rgba(240, 201, 106, 0.13), transparent 42%),
    radial-gradient(circle at 100% 0, rgba(143, 160, 255, 0.09), transparent 42%),
    var(--profile-card-strong);
}

.profile-admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}

.profile-admin-card {
  min-height: 132px;
  display: grid;
  gap: 8px;
  padding: 15px;
  border-radius: 22px;
  border: 1px solid rgba(240, 201, 106, 0.22);
  background:
    radial-gradient(circle at 50% 0%, rgba(240, 201, 106, 0.13), transparent 62%),
    rgba(255,255,255,0.035);
}

.profile-admin-card i {
  color: var(--profile-gold);
  font-size: 21px;
}

.profile-admin-card strong {
  color: var(--profile-gold);
}

.profile-admin-card span {
  color: var(--profile-muted);
  font-size: 12px;
  line-height: 1.45;
}

body.profile-theme-light .profile-realm-description,
body.profile-theme-light .profile-ecosystem-card,
body.profile-theme-light .ecosystem-card,
body.profile-theme-light .profile-admin-card {
  background:
    radial-gradient(circle at 0 0, rgba(240, 201, 106, 0.08), transparent 38%),
    rgba(255,255,255,0.72);
  border-color: rgba(45, 76, 112, 0.10);
}

/* ═══════════════════════════════════════════════════════════════════════════
   LESSON PATH
═══════════════════════════════════════════════════════════════════════════ */

.profile-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.profile-filter-row > * {
  flex: 1 1 180px;
}

.profile-lesson-path {
  display: grid;
  gap: 10px;
  max-height: 620px;
  overflow: auto;
  padding-right: 4px;
  scrollbar-gutter: stable;
}

.profile-lesson-path::-webkit-scrollbar {
  width: 8px;
}

.profile-lesson-path::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.025);
}

.profile-lesson-path::-webkit-scrollbar-thumb {
  border-color: rgba(5, 12, 32, 0.86);
  background: linear-gradient(180deg, rgba(240, 201, 106, 0.38), rgba(84, 198, 238, 0.28));
}

.lesson-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.075);
  background:
    linear-gradient(90deg, rgba(240, 201, 106, 0.06), transparent 48%),
    rgba(255,255,255,0.035);
  box-shadow: inset 3px 0 0 var(--lesson-color, var(--profile-cyan));
}

.lesson-row__num {
  min-width: 66px;
  color: var(--lesson-color, var(--profile-cyan));
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.lesson-row__body {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.lesson-row__body strong,
.lesson-row__body small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lesson-row__body small {
  color: var(--profile-muted);
}

.lesson-row__complete,
.lesson-row__status,
.lesson-row__open {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(84, 198, 238, 0.20);
  background: rgba(84, 198, 238, 0.07);
  color: var(--profile-cyan);
  font-weight: 900;
  white-space: nowrap;
}

.lesson-row__complete.is-done {
  border-color: rgba(60,179,113,0.28);
  background: rgba(60,179,113,0.10);
  color: #8fffc7;
}

.lesson-row__status {
  cursor: default;
  border-color: rgba(240, 201, 106, 0.20);
  background: rgba(240, 201, 106, 0.07);
  color: var(--profile-gold);
}

.lesson-row__status.is-done {
  border-color: rgba(60,179,113,0.28);
  background: rgba(60,179,113,0.10);
  color: #8fffc7;
}

body.profile-theme-light .lesson-row {
  background:
    linear-gradient(90deg, rgba(240, 201, 106, 0.08), transparent 48%),
    rgba(255,255,255,0.76);
  border-color: rgba(45, 76, 112, 0.10);
}

body.profile-theme-light .lesson-row__complete.is-done,
body.profile-theme-light .lesson-row__status.is-done {
  color: #137247 !important;
  border-color: rgba(60,179,113,0.22) !important;
  background: rgba(60,179,113,0.12) !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 1320px) {
  body.profile-is-signed-in .profile-content,
  .profile-stage {
    grid-template-columns: minmax(340px, 480px) minmax(0, 1fr);
  }
}

@media (max-width: 1120px) {
  .profile-layout,
  body.profile-is-signed-in .profile-layout,
  body.profile-is-signed-in .profile-content,
  .profile-stage,
  .profile-continuation-grid {
    grid-template-columns: 1fr;
  }

  .profile-galaxy-panel,
  .profile-galaxy-panel__inner {
    min-height: 420px;
  }
}

@media (max-width: 840px) {
  .profile-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .profile-topbar__links {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .profile-hero {
    grid-template-columns: 1fr;
  }

  .profile-hero__mark {
    display: none;
  }

  .profile-ecosystem-grid,
  .profile-admin-grid {
    grid-template-columns: 1fr;
  }

  .profile-galaxy-chipbar {
    top: auto;
    right: 12px;
    left: 12px;
    bottom: 12px;
    justify-content: center;
  }

  .profile-galaxy-selection {
    bottom: 62px;
  }
}

@media (max-width: 760px) {
  .profile-shell {
    width: min(100% - 18px, 1420px);
    padding-bottom: 110px;
  }

  body.profile-is-guest .profile-content {
    order: 1;
  }

  body.profile-is-guest .profile-auth-card {
    order: 2;
  }

  body.profile-is-guest #path {
    order: 3;
  }

  .profile-stage {
    gap: 14px;
  }

  .profile-brand__logo-frame,
  .profile-brand__sigil {
    width: 42px;
    height: 42px;
  }

  .profile-brand__text strong {
    max-width: calc(100vw - 120px);
    font-size: 1.35rem;
  }

  .profile-brand__text small {
    font-size: 0.8rem;
  }

  .profile-hero {
    padding: 22px;
    border-radius: 26px;
  }

  .profile-hero h1 {
    font-size: clamp(3rem, 15vw, 4.8rem);
  }

  .profile-passport-card__main {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .profile-passport-topline {
    justify-content: center;
  }

  .profile-avatar {
    width: 106px;
    height: 106px;
  }

  .profile-ring-wrap,
  .profile-ring {
    width: 112px;
    height: 112px;
  }

  .profile-stat-grid,
  .profile-stat-grid--rewards,
  .rewards-mini-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-stat-grid div:nth-child(2n),
  .profile-stat-grid--rewards div:nth-child(2n),
  .rewards-mini-grid div:nth-child(2n) {
    border-right: 0;
  }

  .lesson-row {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .lesson-row__num {
    min-width: 0;
  }

  .lesson-row__body strong,
  .lesson-row__body small {
    white-space: normal;
  }

  .lesson-row__complete,
  .lesson-row__status,
  .lesson-row__open {
    width: 100%;
  }

  .profile-galaxy-panel,
  .profile-galaxy-panel__inner {
    min-height: clamp(420px, 72vh, 560px);
  }

  .profile-galaxy-panel__overlay p {
    max-width: 26rem;
    font-size: 0.9rem;
    line-height: 1.35;
  }

  .profile-galaxy-selection {
    left: 10px;
    right: 10px;
    bottom: 64px;
    width: auto;
    padding: 13px;
  }

  .profile-galaxy-selection h3 {
    font-size: 1.74rem;
  }

  .profile-galaxy-tooltip {
    display: none;
  }

  .profile-mobile-dock {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: calc(10px + var(--safe-bottom));
    z-index: 60;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(58px, 1fr));
    gap: 5px;
    padding: 7px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 22px;
    background: rgba(1, 3, 10, 0.88);
    box-shadow: 0 18px 60px rgba(0,0,0,0.42);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
  }

  .profile-mobile-dock a {
    display: grid;
    place-items: center;
    min-height: 36px;
    color: rgba(230, 242, 255, 0.80);
    font-size: 11px;
    font-weight: 900;
  }

  body.profile-theme-light .profile-mobile-dock {
    background: rgba(255,255,255,0.88);
    border-color: rgba(45, 76, 112, 0.10);
  }

  body.profile-theme-light .profile-mobile-dock a {
    color: #2f4f78;
  }
}

@media (max-width: 460px) {
  .profile-card,
  .profile-auth-card {
    padding: 14px;
    border-radius: 22px;
  }

  .profile-passport-card,
  .profile-galaxy-panel {
    padding: 0;
  }

  .profile-passport-card__main {
    padding: 14px;
  }

  .profile-card-head {
    grid-template-columns: 1fr;
  }

  .profile-card-icon {
    width: 46px;
    height: 46px;
    font-size: 20px;
  }

  .profile-theme-toggle {
    min-width: auto;
  }

  .profile-galaxy-chipbar {
    gap: 5px;
  }

  .profile-galaxy-chipbar button {
    min-height: 32px;
    padding: 7px 9px;
    font-size: 10px;
  }

  .profile-galaxy-panel,
  .profile-galaxy-panel__inner {
    min-height: clamp(400px, 68vh, 520px);
  }

  .profile-galaxy-panel__overlay {
    left: 14px;
    right: 14px;
    top: 14px;
  }

  .profile-galaxy-panel__overlay h2 {
    max-width: 14rem;
    font-size: clamp(1.8rem, 12vw, 2.45rem);
  }

  .profile-galaxy-panel__overlay p {
    display: none;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   MOTION
═══════════════════════════════════════════════════════════════════════════ */

@keyframes profile-nebula-float {
  from {
    transform: translate3d(-2%, -1%, 0) scale(0.96);
  }

  to {
    transform: translate3d(3%, 2%, 0) scale(1.06);
  }
}

@keyframes passport-morph {
  0% {
    border-radius: 36% 64% 55% 45% / 46% 36% 64% 54%;
  }

  50% {
    border-radius: 48% 52% 42% 58% / 42% 54% 46% 58%;
  }

  100% {
    border-radius: 58% 42% 54% 46% / 52% 40% 60% 48%;
  }
}

@keyframes passport-spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
