:root {
  --bg-void: #050a18;
  --bg-deep: #0b1636;
  --bg-panel: rgba(10, 22, 56, 0.88);
  --royal-blue: #1a4fd6;
  --gold-bright: #ffd644;
  --gold-mid: #e69a12;
  --ivory: #fff8e7;
  --muted: #9eb9e8;
  --font-pixel: "Courier New", "Lucida Console", ui-monospace, monospace;
  --font-hindi: "Kohinoor Devanagari", "Noto Sans Devanagari", "Devanagari Sangam MN", "Mangal", system-ui, -apple-system, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg-void);
  color: var(--ivory);
  font-family: var(--font-pixel);
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
}

body {
  background:
    radial-gradient(ellipse 80% 55% at 50% 18%, rgba(28, 76, 198, 0.38) 0%, rgba(11, 22, 54, 0.25) 48%, rgba(5, 10, 24, 0.96) 100%),
    linear-gradient(180deg, #07112b 0%, #050a18 100%);
  min-height: 100dvh;
  overflow-x: hidden;
}

/* Subtle retro CRT scanline ambience */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.14) 0 1px, transparent 1px 4px);
  opacity: 0.35;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.hub-shell {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: max(0.7rem, env(safe-area-inset-top, 0px))
    max(0.85rem, env(safe-area-inset-right, 0px))
    max(0.75rem, env(safe-area-inset-bottom, 0px))
    max(0.85rem, env(safe-area-inset-left, 0px));
  max-width: 1120px;
  margin: 0 auto;
}

/* Top Console Bar */
.hub-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.2rem 0 0.55rem;
}

.brand-lockup {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand-kicker {
  color: var(--gold-bright);
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.22em;
}

.brand-title {
  margin: 0.08rem 0 0;
  font-size: clamp(1.3rem, 1rem + 1.4vw, 1.95rem);
  font-weight: 900;
  letter-spacing: 0.14em;
  color: #ffffff;
  text-shadow: 2px 2px 0 #10328c, 0 0 18px rgba(255, 214, 68, 0.28);
}

.account-area {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.account-loading {
  font-size: 0.68rem;
  color: var(--gold-bright);
  letter-spacing: 0.06em;
}

.samrat-pill {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.34rem 0.55rem;
  background: var(--bg-panel);
  border: 1.5px solid rgba(255, 214, 68, 0.58);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.42);
}

.samrat-pill[hidden],
.profile-trigger[hidden],
.wallet-strip[hidden],
.account-loading[hidden],
.retro-btn[hidden],
.dialog-form[hidden],
.dialog-context[hidden],
.dialog-message[hidden],
.profile-panel[hidden],
.prof-inline-form[hidden],
.prof-subbox[hidden] {
  display: none;
}

/* Sigma STM-inspired Compact Samrat Profile Trigger */
.profile-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.28rem 0.55rem 0.28rem 0.34rem;
  background: var(--bg-panel);
  border: 1.5px solid rgba(255, 214, 68, 0.72);
  border-radius: 999px;
  color: var(--ivory);
  font-family: var(--font-pixel);
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.48), 0 0 14px rgba(255, 214, 68, 0.14);
  transition: transform 110ms ease, border-color 120ms ease, background-color 120ms ease;
}

.profile-trigger:hover {
  border-color: var(--gold-bright);
  background: rgba(18, 38, 92, 0.94);
  transform: translateY(-1px);
}

.profile-trigger:focus-visible {
  outline: 3px solid var(--gold-bright);
  outline-offset: 2px;
}

.profile-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 50%;
  background: linear-gradient(135deg, #275de8 0%, #102a73 100%);
  border: 2px solid var(--gold-bright);
  color: var(--gold-bright);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.03em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.profile-avatar-lg {
  width: 46px;
  height: 46px;
  font-size: 1.05rem;
}

.profile-trigger-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.18;
}

.samrat-id-line {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  font-size: 0.6rem;
}

.samrat-coin-dot {
  color: rgba(158, 185, 232, 0.55);
}

.samrat-coin-chip {
  color: var(--gold-bright);
  font-weight: 800;
}

.profile-caret {
  font-size: 0.68rem;
  color: var(--gold-bright);
  padding-left: 0.1rem;
}

.wallet-strip {
  cursor: pointer;
}

.samrat-id-group {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.2;
}

.samrat-name {
  font-family: var(--font-hindi);
  font-size: 0.78rem;
  font-weight: 800;
  color: #ffffff;
  max-width: 10rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.samrat-id {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.05em;
}

.samrat-actions {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* Unified Wallet Strip */
.wallet-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.65rem, 2.4vw, 1.8rem);
  padding: 0.48rem 0.85rem;
  margin: 0 auto 0.6rem;
  width: min(100%, 34rem);
  background: rgba(9, 20, 50, 0.84);
  border: 1.5px solid rgba(114, 158, 255, 0.38);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.wallet-metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  text-align: center;
}

.wallet-label {
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
}

.lock-tag {
  font-style: normal;
  font-size: 0.48rem;
  padding: 1px 4px;
  border: 1px solid rgba(255, 214, 68, 0.55);
  color: var(--gold-bright);
  background: rgba(255, 214, 68, 0.12);
  letter-spacing: 0.06em;
}

.wallet-value {
  font-size: clamp(0.88rem, 0.72rem + 0.6vw, 1.1rem);
  font-weight: 900;
  color: #e6f0ff;
  letter-spacing: 0.04em;
}

.wallet-value.is-gold {
  color: var(--gold-bright);
}

.wallet-value.is-bright {
  color: #ffffff;
  text-shadow: 0 0 10px rgba(255, 214, 68, 0.45);
}

.wallet-divider {
  width: 1px;
  height: 1.75rem;
  background: rgba(158, 185, 232, 0.25);
}

/* Retro Buttons */
.retro-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 36px;
  min-width: 36px;
  padding: 0.42rem 0.85rem;
  border: 2px solid #060c1f;
  background: linear-gradient(180deg, #275de8 0%, #15399c 100%);
  color: #ffffff;
  font-family: var(--font-pixel);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.28),
    inset 0 -3px 0 rgba(6, 12, 31, 0.55),
    0 3px 0 #050a18;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 90ms ease, filter 120ms ease;
}

.retro-btn:hover {
  filter: brightness(1.1);
}

.retro-btn:active {
  transform: translateY(2px);
}

.retro-btn:focus-visible {
  outline: 3px solid var(--gold-bright);
  outline-offset: 2px;
}

.retro-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  filter: saturate(0.4);
}

.retro-btn-gold {
  background: linear-gradient(180deg, #ffe05a 0%, #e59300 100%);
  color: #140e02;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
}

.retro-btn-play {
  background: linear-gradient(180deg, #ffe05a 0%, #e59300 100%);
  color: #140e02;
  min-height: 44px;
  padding: 0.55rem 1.8rem;
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.55),
    inset 0 -3px 0 rgba(120, 62, 0, 0.55),
    0 4px 0 #050a18,
    0 0 22px rgba(255, 214, 68, 0.3);
}

.retro-btn-icon {
  padding: 0.25rem 0.5rem;
  min-height: 30px;
  min-width: 30px;
  font-size: 0.78rem;
}

.retro-btn-danger {
  background: linear-gradient(180deg, #68253a 0%, #411423 100%);
  min-height: 30px;
  padding: 0.25rem 0.58rem;
  font-size: 0.62rem;
}

.retro-btn-full {
  width: 100%;
  min-height: 42px;
}

/* Main Console Library Stage */
.hub-main {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  padding: 0.2rem 0 0.5rem;
}

.carousel {
  position: relative;
  width: 100%;
  max-width: 960px;
}

.carousel-controls {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0.25rem;
  pointer-events: none;
  z-index: 4;
}

.carousel-nav-btn {
  pointer-events: auto;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 2px solid rgba(255, 214, 68, 0.78);
  background: rgba(7, 16, 44, 0.86);
  color: var(--gold-bright);
  font-size: 1.55rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  touch-action: manipulation;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.55);
  transition: transform 120ms ease, background-color 120ms ease, opacity 120ms ease;
}

.carousel-nav-btn:hover {
  background: rgba(24, 58, 152, 0.92);
  transform: scale(1.06);
}

.carousel-nav-btn:focus-visible {
  outline: 3px solid var(--gold-bright);
  outline-offset: 2px;
}

.carousel-nav-btn:disabled {
  opacity: 0.26;
  cursor: default;
  transform: none;
}

.carousel-track {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2rem);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  touch-action: manipulation;
  padding: 0.75rem calc(50% - min(40vw, 150px));
  scrollbar-width: none;
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

@media (prefers-reduced-motion: no-preference) {
  .carousel-track {
    scroll-behavior: smooth;
  }
}

.carousel-track:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 4px;
}

/* Retro Collector CD-Case Slide */
.game-slide {
  flex: 0 0 min(78vw, 300px);
  scroll-snap-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 240ms ease, opacity 240ms ease, filter 240ms ease;
  opacity: 0.62;
  transform: scale(0.91);
}

.game-slide.is-active {
  opacity: 1;
  transform: scale(1);
}

.cd-case {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  padding: 0;
  border: 2.5px solid rgba(255, 214, 68, 0.78);
  border-radius: 10px;
  overflow: hidden;
  background: #081230;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
  box-shadow:
    inset 12px 0 0 rgba(255, 255, 255, 0.08),
    inset 13px 0 0 rgba(0, 0, 0, 0.52),
    0 18px 42px rgba(0, 0, 0, 0.72),
    0 0 0 2px #050a18;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.game-slide.is-active .cd-case {
  border-color: var(--gold-bright);
  box-shadow:
    inset 12px 0 0 rgba(255, 255, 255, 0.1),
    inset 13px 0 0 rgba(0, 0, 0, 0.52),
    0 22px 52px rgba(0, 0, 0, 0.78),
    0 0 28px rgba(255, 214, 68, 0.24),
    0 0 0 2px #050a18;
}

.cd-case:hover {
  transform: translateY(-4px);
}

.cd-case:focus-visible {
  outline: 3px solid var(--gold-bright);
  outline-offset: 4px;
}

.cd-case.is-locked {
  cursor: default;
  border-color: rgba(158, 185, 232, 0.36);
}

.cd-case.is-locked:hover {
  transform: none;
}

/* Jewel-case diagonal glass sheen */
.cd-case::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(125deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.02) 32%, transparent 55%);
}

.cd-cover-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.cd-top-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0.6rem 0.45rem 1.05rem;
  background: linear-gradient(180deg, rgba(5, 10, 26, 0.9) 0%, rgba(5, 10, 26, 0) 100%);
  z-index: 2;
}

.cd-disc-no {
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: #cfe0ff;
}

.cd-badge {
  font-size: 0.55rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  padding: 0.16rem 0.45rem;
  background: rgba(255, 214, 68, 0.95);
  color: #140e02;
  border-radius: 3px;
}

.cd-case.is-locked .cd-badge {
  background: rgba(17, 34, 78, 0.92);
  color: #9eb9e8;
  border: 1px solid rgba(158, 185, 232, 0.4);
}

.cd-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.65rem 0.7rem 0.65rem 1.05rem;
  background: linear-gradient(0deg, rgba(5, 10, 26, 0.94) 0%, rgba(5, 10, 26, 0.68) 62%, rgba(5, 10, 26, 0) 100%);
  text-align: left;
  z-index: 2;
}

.cd-title {
  margin: 0;
  font-size: clamp(1rem, 0.88rem + 0.65vw, 1.32rem);
  font-weight: 900;
  color: #ffffff;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.85);
}

.cd-title[lang="hi"] {
  font-family: var(--font-hindi);
  letter-spacing: 0.01em;
}

/* Carousel Markers (WCAG >= 24px touch target) */
.carousel-markers {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 0.55rem;
}

.carousel-markers button {
  appearance: none;
  border: 7px solid transparent;
  background-clip: padding-box;
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 999px;
  background-color: rgba(158, 185, 232, 0.42);
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 150ms ease, background-color 150ms ease;
}

.carousel-markers button[aria-current="true"] {
  background-color: var(--gold-bright);
  transform: scale(1.25);
  box-shadow: 0 0 0 2px rgba(255, 214, 68, 0.35);
}

.carousel-markers button:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 2px;
}

/* Active Game Launch Bar */
.active-game-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  text-align: center;
}

.active-game-subtitle {
  margin: 0;
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.hub-footer {
  padding-top: 0.5rem;
  text-align: center;
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  color: rgba(158, 185, 232, 0.62);
}

/* Native Modal Dialog (Modern Web Guidance compliant scroll containment) */
dialog.samrat-dialog {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ivory);
  max-width: min(92vw, 22rem);
  width: 100%;
  overflow: visible;
}

dialog.samrat-dialog:modal {
  overscroll-behavior: contain;
}

dialog.samrat-dialog::backdrop {
  background: rgba(3, 8, 22, 0.78);
  backdrop-filter: blur(4px);
  overflow: hidden;
  overscroll-behavior: contain;
}

.dialog-card {
  background: rgba(10, 22, 56, 0.96);
  border: 2px solid var(--gold-bright);
  box-shadow: 0 0 0 2px #050a18, 0 18px 46px rgba(0, 0, 0, 0.78);
  padding: 0.95rem 1.05rem 1.05rem;
}

.dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.dialog-kicker {
  margin: 0;
  color: var(--gold-bright);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.dialog-title {
  margin: 0.12rem 0 0;
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #ffffff;
}

.dialog-context {
  margin: 0 0 0.6rem;
  font-family: var(--font-hindi);
  font-size: 0.74rem;
  color: #dbe8ff;
}

.dialog-form {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.retro-input {
  width: 100%;
  min-height: 42px;
  padding: 0.42rem 0.65rem;
  border: 2px solid #4c7bf0;
  background: #07112c;
  color: #ffffff;
  font-family: var(--font-pixel);
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.04em;
}

.retro-input::placeholder {
  color: #7d9ed4;
  font-weight: 600;
}

.retro-input:focus {
  outline: 2px solid var(--gold-bright);
  outline-offset: 1px;
  border-color: var(--gold-bright);
}

.retro-input-otp {
  letter-spacing: 0.28em;
}

.dialog-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.68rem;
  color: #6b8ac0;
}

.text-link {
  background: none;
  border: none;
  padding: 0.15rem 0.25rem;
  color: #9ec5ff;
  font-family: var(--font-pixel);
  font-size: 0.68rem;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

.text-link:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  text-decoration: none;
}

.dialog-message {
  margin: 0.55rem 0 0;
  padding: 0.38rem 0.5rem;
  border-left: 2px solid var(--gold-bright);
  background: rgba(255, 214, 68, 0.12);
  color: #fff3b0;
  font-family: var(--font-hindi);
  font-size: 0.7rem;
  line-height: 1.35;
}

.dialog-message.is-error {
  border-left-color: #ff6b6b;
  background: rgba(255, 76, 76, 0.18);
  color: #ffd1d1;
}

/* Mobile Portrait Polish */
@media (max-width: 600px) {
  .carousel-controls {
    display: none;
  }
  .game-slide {
    flex-basis: min(74vw, 272px);
  }
  .carousel-track {
    padding: 0.55rem calc(50% - min(37vw, 136px));
  }
  .wallet-strip {
    padding: 0.42rem 0.55rem;
    gap: 0.55rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .game-slide,
  .cd-case,
  .carousel-nav-btn,
  .retro-btn,
  .profile-trigger {
    transition: none;
  }
}

/* =========================================================================
   MY SAMRAT PROFILE DIALOG (Retro Navy + Collector Gold, Mobile-Friendly)
   ========================================================================= */
dialog.profile-dialog {
  max-width: min(94vw, 31rem);
  width: 100%;
}

.profile-sheet {
  display: flex;
  flex-direction: column;
  max-height: 88dvh;
  background: rgba(9, 20, 52, 0.97);
  border: 2px solid var(--gold-bright);
  box-shadow: 0 0 0 2px #050a18, 0 20px 56px rgba(0, 0, 0, 0.84);
  overflow: hidden;
}

.profile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.8rem 0.9rem 0.65rem;
  background: linear-gradient(180deg, rgba(24, 58, 152, 0.34) 0%, rgba(9, 20, 52, 0) 100%);
  border-bottom: 1px solid rgba(158, 185, 232, 0.22);
}

.profile-hero {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.profile-hero-text {
  min-width: 0;
}

.profile-hero-name {
  margin: 0.08rem 0 0;
  font-family: var(--font-hindi);
  font-size: 1rem;
  font-weight: 900;
  color: #ffffff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-hero-sub {
  margin: 0.14rem 0 0;
  font-size: 0.66rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.profile-head-actions {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex: none;
}

.profile-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: rgba(5, 11, 29, 0.85);
  border-bottom: 1px solid rgba(158, 185, 232, 0.22);
}

.profile-tab {
  appearance: none;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-pixel);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.58rem 0.3rem;
  cursor: pointer;
  touch-action: manipulation;
}

.profile-tab.is-active {
  color: var(--gold-bright);
  border-bottom-color: var(--gold-bright);
  background: rgba(255, 214, 68, 0.08);
}

.profile-tab:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: -2px;
}

.profile-toast {
  margin: 0.5rem 0.85rem 0;
}

.profile-body {
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0.75rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.profile-panel {
  display: flex;
  flex-direction: column;
  gap: 0.58rem;
}

.prof-card {
  padding: 0.62rem 0.72rem;
  background: rgba(6, 14, 38, 0.82);
  border: 1px solid rgba(124, 166, 255, 0.28);
}

.prof-row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.prof-row-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.prof-label {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  color: var(--muted);
}

.prof-val {
  margin-top: 0.15rem;
  font-family: var(--font-hindi);
  font-size: 0.88rem;
  font-weight: 800;
  color: #ffffff;
  word-break: break-word;
}

.prof-val.is-gold {
  color: var(--gold-bright);
  font-family: var(--font-pixel);
}

.prof-note {
  margin: 0.36rem 0 0;
  font-family: var(--font-hindi);
  font-size: 0.68rem;
  line-height: 1.4;
  color: #a8c2ee;
}

.prof-note-top {
  margin-top: 0;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.42rem;
  font-size: 0.54rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  border-radius: 3px;
}

.status-badge.is-ok {
  background: rgba(46, 204, 113, 0.18);
  border: 1px solid rgba(72, 232, 138, 0.55);
  color: #88f7b2;
}

.status-badge.is-muted {
  background: rgba(158, 185, 232, 0.12);
  border: 1px solid rgba(158, 185, 232, 0.32);
  color: var(--muted);
}

.retro-btn-sm {
  min-height: 30px;
  padding: 0.24rem 0.58rem;
  font-size: 0.62rem;
}

.retro-input-sm {
  min-height: 36px;
  font-size: 0.86rem;
  padding: 0.32rem 0.55rem;
}

.prof-inline-form {
  display: flex;
  flex-direction: column;
  gap: 0.42rem;
  margin-top: 0.5rem;
}

.prof-inline-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.prof-subbox {
  margin-top: 0.55rem;
  padding: 0.6rem;
  background: rgba(14, 30, 74, 0.72);
  border: 1px solid rgba(255, 214, 68, 0.45);
}

.prof-stack {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.prof-social-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  padding: 0.55rem 0.68rem;
  background: rgba(6, 14, 38, 0.82);
  border: 1px solid rgba(124, 166, 255, 0.25);
}

.prof-social-info {
  min-width: 0;
}

.prof-social-title {
  font-size: 0.78rem;
  font-weight: 800;
  color: #ffffff;
}

.prof-social-sub {
  margin-top: 0.12rem;
  font-family: var(--font-hindi);
  font-size: 0.64rem;
  color: var(--muted);
  word-break: break-word;
}

.prof-connect-title {
  display: block;
  font-size: 0.78rem;
  color: var(--gold-bright);
  letter-spacing: 0.05em;
}

.prof-code-pill {
  margin: 0.45rem 0;
  padding: 0.45rem 0.65rem;
  background: #050c20;
  border: 1.5px dashed var(--gold-bright);
  color: var(--gold-bright);
  font-size: 1.08rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-align: center;
  user-select: all;
}

.prof-target-links {
  margin-top: 0.45rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.prof-wallet-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.45rem;
}

.prof-kpi {
  padding: 0.52rem 0.4rem;
  background: rgba(6, 14, 38, 0.85);
  border: 1px solid rgba(124, 166, 255, 0.28);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.16rem;
}

.prof-kpi-num {
  font-size: 1.08rem;
  font-weight: 900;
  color: #e6f0ff;
}

.prof-kpi-num.is-gold {
  color: var(--gold-bright);
}

.prof-kpi-num.is-bright {
  color: #ffffff;
  text-shadow: 0 0 10px rgba(255, 214, 68, 0.4);
}

.prof-section-heading {
  margin: 0.25rem 0 0;
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  color: var(--gold-bright);
}

.prof-list {
  display: flex;
  flex-direction: column;
  gap: 0.38rem;
}

.prof-hist-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.48rem 0.62rem;
  background: rgba(6, 14, 38, 0.8);
  border: 1px solid rgba(124, 166, 255, 0.22);
}

.prof-hist-left {
  min-width: 0;
}

.prof-hist-title {
  font-family: var(--font-hindi);
  font-size: 0.74rem;
  font-weight: 800;
  color: #ffffff;
}

.prof-hist-meta {
  margin-top: 0.1rem;
  font-size: 0.6rem;
  color: var(--muted);
}

.prof-hist-val {
  flex: none;
  font-size: 0.76rem;
  font-weight: 900;
}

.prof-hist-val.is-gold {
  color: var(--gold-bright);
}

.prof-hist-val.is-ok {
  color: #88f7b2;
}

.prof-hist-val.is-err {
  color: #ff9c9c;
}

.prof-hist-val.is-muted {
  color: var(--muted);
}

.prof-empty {
  margin: 0;
  padding: 0.7rem;
  text-align: center;
  font-family: var(--font-hindi);
  font-size: 0.72rem;
  color: var(--muted);
  background: rgba(6, 14, 38, 0.55);
  border: 1px dashed rgba(124, 166, 255, 0.25);
}

.profile-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.65rem 0.85rem;
  background: rgba(5, 11, 29, 0.92);
  border-top: 1px solid rgba(158, 185, 232, 0.22);
}

.prof-sync-tag {
  font-size: 0.58rem;
  color: var(--muted);
  letter-spacing: 0.05em;
}
