@import url("https://fonts.googleapis.com/css2?family=Oxanium:wght@300;400;600;700&family=Space+Grotesk:wght@400;600&display=swap");

:root {
  color-scheme: dark;
  /* Subtle gold warmth without overwhelming the UI. */
  --bg: #0c0a07;
  --panel: #15120c;
  --panel-light: #1c1912;
  --accent: #f5c542;
  --accent-warm: #ffb347;
  --text: #f4f7fb;
  --muted: #b7aa90;
  --glow: 0 0 24px rgba(245, 197, 66, 0.5);
  --gold-soft: rgba(245, 197, 66, 0.08);
  --gold-border: rgba(245, 197, 66, 0.22);
  --silver-soft: rgba(196, 206, 218, 0.12);
  --silver-border: rgba(196, 206, 218, 0.3);
  --silver-glow: 0 0 20px rgba(196, 206, 218, 0.45);
  --page-bottom-gap: 84px;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f2ea;
  --panel: #ffffff;
  --panel-light: #f7f4ee;
  --accent: #d59b22;
  --accent-warm: #cc6a38;
  --text: #1a1a1a;
  --muted: #6b6457;
  --glow: 0 0 18px rgba(213, 155, 34, 0.25);
  --gold-soft: rgba(213, 155, 34, 0.16);
  --gold-border: rgba(213, 155, 34, 0.32);
  --silver-soft: rgba(120, 130, 145, 0.12);
  --silver-border: rgba(120, 130, 145, 0.28);
  --silver-glow: 0 0 16px rgba(120, 130, 145, 0.35);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  height: 100%;
}

html {
  background: radial-gradient(circle at top, #2b2316 0%, #0c0a07 62%);
  background-attachment: fixed;
}

:root[data-theme="light"] html {
  background: radial-gradient(circle at top, #fefaf2 0%, #f1ece2 70%);
}

body {
  margin: 0;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  background: transparent;
  color: var(--text);
  min-height: 100vh;
  overflow-y: auto;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at top, #2b2316 0%, #0c0a07 62%);
  z-index: -1;
}

:root[data-theme="light"] body::before {
  background: radial-gradient(circle at top, #fefaf2 0%, #f1ece2 70%);
}

:root {
  --fade-duration: 0.5s;
}

.page-fade {
  position: fixed;
  inset: 0;
  background: #000;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--fade-duration) ease;
  z-index: 50;
}

.page-fade.active {
  opacity: 1;
  pointer-events: auto;
}

.app {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  min-height: 100vh;
  height: auto;
  overflow: visible;
  align-content: start;
}


.rail {
  background: linear-gradient(180deg, #17130d 0%, #0c0a07 100%);
  padding: 28px 22px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

:root[data-theme="light"] .rail {
  background: linear-gradient(180deg, #f4efe6 0%, #ede6d9 100%);
  border-right: 1px solid rgba(0, 0, 0, 0.08);
}

.brand {
  display: flex;
  gap: 14px;
  align-items: center;
}

.credits-panel {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(245, 197, 66, 0.12);
  border: 1px solid rgba(245, 197, 66, 0.22);
  font-family: "Oxanium", "Space Grotesk", sans-serif;
  letter-spacing: 0.04em;
}

:root[data-theme="light"] .credits-panel {
  background: var(--gold-soft);
  border-color: var(--gold-border);
}

:root[data-theme="light"] .credits-panel.silver {
  background: var(--silver-soft);
  border-color: var(--silver-border);
}

.credits-panel.silver {
  background: var(--silver-soft);
  border-color: var(--silver-border);
}

.credits-panel.silver .credits-icon {
  filter: drop-shadow(0 0 6px rgba(196, 206, 218, 0.45));
}

.credits-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.7rem;
  color: var(--muted);
  text-transform: uppercase;
}

.credits-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
  filter: drop-shadow(0 0 6px rgba(245, 197, 66, 0.35));
}

.credits-value {
  font-size: 1.1rem;
  margin-top: 4px;
}

.info-tip {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.info-icon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.4);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}

.info-pop {
  position: absolute;
  left: 50%;
  top: 24px;
  transform: translateX(-50%);
  min-width: 200px;
  max-width: 240px;
  background: #111009;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--muted);
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 0.7rem;
  text-transform: none;
  letter-spacing: 0.02em;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 10;
}

.info-tip:hover .info-pop,
.info-tip:focus-within .info-pop {
  opacity: 1;
  transform: translateX(-50%) translateY(2px);
}

.rail-boosters {
  width: 100%;
  text-align: left;
}

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  object-fit: cover;
  display: block;
  box-shadow: var(--glow);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.brand-text span {
  color: var(--muted);
  font-size: 0.85rem;
}

.nav {
  display: grid;
  gap: 10px;
}

.nav::-webkit-scrollbar {
  height: 0;
}

.nav {
  scrollbar-width: none;
}

.nav-item {
  background: transparent;
  color: var(--text);
  border: 1px solid transparent;
  padding: 12px 16px;
  border-radius: 14px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.95rem;
}

.nav-item:hover,
.nav-item.active {
  background: var(--gold-soft);
  border-color: rgba(245, 197, 66, 0.4);
  box-shadow: inset 0 0 18px rgba(245, 197, 66, 0.18);
}


.main {
  padding: 30px 40px var(--page-bottom-gap);
  display: flex;
  flex-direction: column;
  gap: 28px;
  overflow: visible;
  min-height: 0;
}

.main::after {
  content: "";
  display: block;
  height: 0;
  flex: 0 0 auto;
  pointer-events: none;
}

.section[data-section="profile"]::after,
.section[data-section="settings"]::after {
  content: "";
  display: block;
  height: var(--page-bottom-gap);
}

.section {
  display: none;
  flex-direction: column;
  gap: 24px;
  animation: rise 0.35s ease;
}

.section.active {
  display: flex;
}

.section-header h2 {
  margin: 0 0 8px;
  font-family: "Oxanium", "Space Grotesk", sans-serif;
}

.section-header p {
  margin: 0;
  color: var(--muted);
}

.store-detail-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}

.search input {
  width: 360px;
  max-width: 100%;
  padding: 12px 16px;
  border-radius: 16px;
  border: 1px solid rgba(245, 197, 66, 0.18);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-size: 0.95rem;
}

.search {
  position: relative;
}

.search-results {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  background: var(--panel);
  border: 1px solid rgba(245, 197, 66, 0.2);
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  padding: 8px;
  display: grid;
  gap: 8px;
  max-height: 360px;
  overflow-y: auto;
  z-index: 20;
}

.search-group-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  padding: 6px 10px 0;
}

.search-result-item {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
}

.search-result-item:hover,
.search-result-item:focus {
  border-color: rgba(245, 197, 66, 0.4);
  background: rgba(255, 255, 255, 0.03);
}

.search-result-meta {
  color: var(--muted);
  font-size: 0.8rem;
}

.search-result-pills {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.search-result-pill {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(245, 197, 66, 0.12);
  color: var(--muted);
  font-size: 0.7rem;
  white-space: nowrap;
}

.search-result-pill.friend {
  background: rgba(110, 196, 255, 0.16);
  color: #cfeaff;
}

.search-highlight {
  outline: 2px solid rgba(245, 197, 66, 0.8);
  box-shadow: 0 0 0 6px rgba(245, 197, 66, 0.12);
  border-radius: 16px;
}

.profile-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: rgba(245, 197, 66, 0.18);
  border-radius: 999px;
  border: 1px solid rgba(245, 197, 66, 0.45);
  font-family: "Oxanium", sans-serif;
  letter-spacing: 0.02em;
  color: var(--text);
  cursor: pointer;
}

.avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 30px;
  align-items: center;
}

.hero-copy h1 {
  font-family: "Oxanium", "Space Grotesk", sans-serif;
  font-size: 2.6rem;
  margin: 0 0 12px;
}

.hero-copy p {
  color: var(--muted);
  max-width: 460px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 18px;
}

.primary,
.ghost {
  padding: 12px 20px;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-family: "Space Grotesk", sans-serif;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.primary {
  background: linear-gradient(135deg, #f5c542, #ff9f1c);
  color: #06121a;
  box-shadow: var(--glow);
}

.primary:hover,
.ghost:hover {
  transform: translateY(-1px);
}

.ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text);
}

.ghost.small {
  padding: 8px 14px;
}

.primary.small {
  padding: 8px 14px;
}

.ghost.full,
.primary.full {
  width: 100%;
}

.hero-card {
  position: relative;
  background: var(--panel);
  padding: 26px;
  border-radius: 22px;
  border: 1px solid var(--gold-border);
  overflow: hidden;
}

.hero-image {
  width: 100%;
  height: 320px;
  object-fit: cover;
  border-radius: 18px;
  display: block;
}

.hero-caption {
  position: absolute;
  left: 22px;
  bottom: 22px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(12, 16, 22, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-family: "Oxanium", "Space Grotesk", sans-serif;
  letter-spacing: 0.08em;
}

.pulse-ring {
  position: absolute;
  inset: -40px;
  border-radius: 50%;
  border: 1px solid rgba(245, 197, 66, 0.35);
  animation: pulse 3.6s ease-in-out infinite;
}

.hero-stats {
  display: grid;
  gap: 18px;
  position: relative;
}

.stat-label {
  color: var(--muted);
  font-size: 0.82rem;
  display: block;
  margin-bottom: 4px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.social-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 18px;
}

.social-stack {
  display: grid;
  gap: 18px;
}

.stack-form {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.stack-form.inline {
  grid-template-columns: 1fr auto;
  align-items: center;
  margin-top: 0;
}

.stack-form input {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(245, 197, 66, 0.16);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}

.stack-form input:disabled,
.stack-form button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

button.loading {
  position: relative;
  padding-right: 40px;
  min-width: 120px;
}

button.loading::after {
  content: "";
  position: absolute;
  right: 10px;
  top: 50%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-top-color: transparent;
  transform: translateY(-50%);
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to {
    transform: translateY(-50%) rotate(360deg);
  }
}

.library-loading {
  display: flex;
  gap: 16px;
  align-items: center;
}

.loading-spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: #f5c542;
  animation: spin 0.9s linear infinite;
  flex: 0 0 auto;
}

.list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

#view-all-teams-btn {
  margin-top: 8px;
  width: 100%;
}

.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(245, 197, 66, 0.12);
  cursor: pointer;
}

.list-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 2px 4px;
  cursor: default;
}

.list-item.active {
  border-color: rgba(245, 197, 66, 0.5);
  box-shadow: inset 0 0 12px rgba(245, 197, 66, 0.18);
}

.list-item .meta {
  color: var(--muted);
  font-size: 0.8rem;
}

.invite-actions {
  display: flex;
  gap: 8px;
}

.inline-actions {
  display: flex;
  gap: 8px;
}

.bot-offers {
  display: grid;
  gap: 10px;
}

.bot-offer {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(245, 197, 66, 0.12);
  background: rgba(255, 255, 255, 0.03);
}

.bot-offer img {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.bot-buy {
  margin-top: 10px;
  width: 100%;
}

.bot-thumb {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.bot-line {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chip {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(245, 197, 66, 0.12);
  color: var(--muted);
  font-size: 0.75rem;
}

.chat-panel {
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  gap: 12px;
}

.public-chat {
  max-width: 680px;
}

.chat-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.chat-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.ghost.danger {
  border-color: rgba(255, 122, 80, 0.6);
  color: #ffb29c;
}

.chat-header h3 {
  margin: 0 0 4px;
}

.chat-header span {
  color: var(--muted);
  font-size: 0.85rem;
}

.chat-messages {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
  overflow-y: auto;
  overflow-x: hidden;
  max-height: 320px;
}

.chat-message {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(245, 197, 66, 0.12);
  max-width: 100%;
  min-width: 0;
}

.chat-message span {
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  min-width: 0;
}

.chat-message .chat-author + .meta + span {
  max-width: 100%;
  display: block;
}

.input-with-counter input,
.input-with-counter textarea {
  max-width: 100%;
  overflow-x: hidden;
  text-overflow: ellipsis;
}

:root[data-theme="light"] .chat-message {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.08);
}

.chat-message .meta {
  color: var(--muted);
  font-size: 0.75rem;
}

.chat-ai-tag,
.chat-ai-note {
  color: rgba(245, 197, 66, 0.55);
  font-size: 0.7rem;
}

.chat-ai-tag {
  margin-top: -2px;
}

.chat-ai-note {
  margin-top: 2px;
  font-style: italic;
}

.chat-rooms-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.community-switch {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.community-view.hidden {
  display: none;
}

.community-levels {
  display: grid;
  gap: 14px;
}

.community-levels-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.community-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.community-levels-meta {
  color: var(--muted);
  font-size: 0.85rem;
  min-height: 18px;
}

.community-levels-list {
  display: grid;
  gap: 12px;
}

.community-favorites {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 14px;
  border: 1px dashed rgba(245, 197, 66, 0.35);
  background: rgba(255, 255, 255, 0.02);
}

.community-favorites.hidden {
  display: none;
}

.community-favorites h4 {
  margin: 0;
  font-family: "Oxanium", "Space Grotesk", sans-serif;
}

.community-level-card {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(245, 197, 66, 0.16);
  background: rgba(255, 255, 255, 0.03);
}

.community-level-thumb {
  width: 140px;
  height: 78px;
  border-radius: 10px;
  border: 1px solid rgba(245, 197, 66, 0.2);
  background: rgba(10, 8, 5, 0.6);
  object-fit: cover;
}

.community-level-meta {
  display: grid;
  gap: 6px;
}

.profile-levels-list {
  display: grid;
  gap: 12px;
}

.community-level-author {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  cursor: pointer;
  text-align: left;
}

.community-level-author .chat-avatar {
  width: 24px;
  height: 24px;
}

.community-level-meta p {
  margin: 0;
  color: var(--muted);
}

.level-comments {
  margin-top: 8px;
}

.private-chat-panel {
  display: grid;
  gap: 12px;
}

.private-chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.private-chat-layout {
  display: grid;
  gap: 12px;
  grid-auto-flow: column;
  grid-auto-columns: minmax(220px, 1fr);
  overflow-x: auto;
  padding-bottom: 6px;
}

.private-chat-friends {
  max-height: 420px;
  overflow-y: auto;
  display: grid;
  gap: 8px;
  min-width: 220px;
}

.private-chat-friends .list-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
}

.private-chat-friends input[type="checkbox"] {
  width: 16px;
  height: 16px;
}

.chat-panel.compact .chat-messages {
  max-height: 320px;
}

.chat-panel.compact {
  min-width: 320px;
}

.chat-author {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--muted);
}

.chat-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(245, 197, 66, 0.3);
  background: rgba(245, 197, 66, 0.15);
  display: grid;
  place-items: center;
  color: var(--text);
  font-size: 0.7rem;
}

.chat-avatar.fallback {
  font-family: "Oxanium", "Space Grotesk", sans-serif;
  text-transform: uppercase;
}

.chat-input {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.chat-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ai-assist-toggle {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 10px;
  font-size: 1.1rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ai-assist-panel {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}

.ai-assist-owner {
  font-size: 0.85rem;
  color: var(--muted);
}

.ai-assist-btn:disabled,
.ai-assist-toggle:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ai-assist-panel.hidden {
  display: none;
}

.ai-assist-status {
  font-size: 0.85rem;
  color: var(--muted);
}

.input-with-counter {
  position: relative;
}

.input-with-counter input,
.input-with-counter textarea {
  width: 100%;
}

.char-counter {
  position: absolute;
  bottom: 6px;
  left: 12px;
  font-size: 0.7rem;
  color: var(--muted);
  pointer-events: none;
}

.chat-input input,
.chat-input textarea {
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(245, 197, 66, 0.18);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
}

:root[data-theme="light"] .chat-input input,
:root[data-theme="light"] .chat-input textarea {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.12);
  color: #1a1a1a;
}

.chat-input .input-with-counter input,
.chat-input .input-with-counter textarea {
  padding-bottom: 26px;
}

.chat-input textarea {
  resize: none;
  min-height: 54px;
  line-height: 1.3;
}

.chat-meta {
  min-height: 18px;
  color: var(--accent-warm);
  font-size: 0.85rem;
}

.tile {
  background: var(--panel-light);
  padding: 20px;
  border-radius: 18px;
  border: 1px solid rgba(245, 197, 66, 0.14);
}


:root[data-theme=\"light\"] .tile {
  border-color: rgba(0, 0, 0, 0.08);
}
.tile p {
  color: var(--muted);
}

.panel-muted {
  color: var(--muted);
  font-size: 0.85rem;
}

.store-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.store-tab {
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(245, 197, 66, 0.2);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  cursor: pointer;
}

.store-tab.active {
  border-color: rgba(245, 197, 66, 0.5);
  box-shadow: inset 0 0 12px rgba(245, 197, 66, 0.2);
}

.store-panel {
  display: none;
}

.store-panel.active {
  display: block;
}

.store-meta {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.85rem;
}

.store-actions {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.store-message {
  min-height: 18px;
  margin-bottom: 10px;
  color: var(--accent-warm);
  font-size: 0.85rem;
}

.store-card {
  position: relative;
  display: grid;
  gap: 10px;
}

.store-tag {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(245, 197, 66, 0.18);
  border: 1px solid rgba(245, 197, 66, 0.4);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.store-thumb {
  width: 100%;
  height: 140px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(245, 197, 66, 0.2);
  background: rgba(10, 8, 5, 0.6);
  display: grid;
  place-items: center;
}

.store-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.store-detail {
  margin-top: 18px;
  padding: 20px;
  border-radius: 18px;
  border: 1px solid rgba(245, 197, 66, 0.2);
  background: var(--panel);
  display: grid;
  gap: 16px;
}

.store-detail.hidden {
  display: none;
}

.store-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.store-detail-header h3 {
  margin: 0 0 6px;
  font-family: "Oxanium", "Space Grotesk", sans-serif;
}

.store-detail-body {
  display: grid;
  gap: 18px;
}

.store-detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 280px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.store-detail-thumb {
  width: 100%;
  height: 200px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(245, 197, 66, 0.2);
  background: rgba(10, 8, 5, 0.6);
  display: grid;
  place-items: center;
}

.store-detail-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.store-detail-meta {
  display: grid;
  gap: 12px;
}

.store-detail-price {
  font-family: "Oxanium", "Space Grotesk", sans-serif;
  font-size: 1.05rem;
  color: var(--text);
}

.store-detail-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.store-detail-friends {
  display: grid;
  gap: 8px;
}

.store-detail-label {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.store-friends-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.store-friend-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(245, 197, 66, 0.3);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 0.85rem;
}

.store-detail-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.store-detail-info h4 {
  margin: 0 0 8px;
  font-family: "Oxanium", "Space Grotesk", sans-serif;
}

.store-detail-features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 6px;
  color: var(--muted);
}

.store-detail-features li::before {
  content: "•";
  margin-right: 8px;
  color: var(--accent);
}

.library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.library-card {
  display: grid;
  gap: 12px;
}

.library-thumb {
  width: 100%;
  height: 140px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(245, 197, 66, 0.2);
  background: rgba(10, 8, 5, 0.6);
  display: grid;
  place-items: center;
}

.library-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.library-card .library-meta {
  color: var(--muted);
  font-size: 0.85rem;
}

.auth-panel {
  padding: 30px 26px;
  background: linear-gradient(180deg, #14110c 0%, #17130d 100%);
  border-left: 1px solid rgba(245, 197, 66, 0.12);
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow: visible;
}

.auth-panel.in-section {
  border-left: none;
  border: 1px solid rgba(245, 197, 66, 0.12);
  border-radius: 18px;
  max-width: 520px;
  width: min(520px, 92vw);
  margin: 0 auto;
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.25);
}


:root[data-theme=\"light\"] .auth-panel {
  background: linear-gradient(180deg, #f7f3eb 0%, #ffffff 100%);
  border-left: 1px solid rgba(0, 0, 0, 0.08);
}

:root[data-theme=\"light\"] .auth-panel.in-section {
  border-left: none;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.12);
}
.auth-header h2 {
  margin: 0 0 8px;
  font-family: "Oxanium", sans-serif;
}

.auth-header p {
  margin: 0;
  color: var(--muted);
}

.tabs {
  display: flex;
  gap: 8px;
}

.tab {
  flex: 1;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
  color: var(--text);
  border-radius: 12px;
  cursor: pointer;
}

.tab.active {
  border-color: rgba(245, 197, 66, 0.5);
  box-shadow: inset 0 0 12px rgba(245, 197, 66, 0.2);
}

.auth-form {
  display: grid;
  gap: 12px;
}

.auth-form label {
  display: grid;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--muted);
}

.auth-form input {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(245, 197, 66, 0.16);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}

.auth-message {
  min-height: 22px;
  color: var(--accent-warm);
  font-size: 0.9rem;
}

.hidden {
  display: none !important;
}

.profile-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: start;
}

.profile-viewer.profile-background {
  position: relative;
  overflow: hidden;
}

.profile-viewer.profile-background::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(12, 10, 7, 0.5), rgba(12, 10, 7, 0.7));
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 0;
  pointer-events: none;
}

.profile-viewer.profile-background::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
}

.profile-viewer.profile-background.profile-clouds::after {
  opacity: 0.4;
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='260' height='140' viewBox='0 0 260 140'><defs><filter id='b' x='-20%25' y='-20%25' width='140%25' height='140%25'><feGaussianBlur stdDeviation='7'/></filter></defs><g filter='url(%23b)' fill='white' fill-opacity='0.6'><ellipse cx='85' cy='78' rx='60' ry='24'/><ellipse cx='140' cy='64' rx='50' ry='22'/><ellipse cx='190' cy='82' rx='70' ry='28'/></g></svg>"),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='320' height='160' viewBox='0 0 320 160'><defs><filter id='b' x='-20%25' y='-20%25' width='140%25' height='140%25'><feGaussianBlur stdDeviation='8'/></filter></defs><g filter='url(%23b)' fill='white' fill-opacity='0.55'><ellipse cx='115' cy='96' rx='78' ry='30'/><ellipse cx='185' cy='80' rx='66' ry='26'/><ellipse cx='245' cy='102' rx='88' ry='34'/></g></svg>"),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='300' height='150' viewBox='0 0 300 150'><defs><filter id='b' x='-20%25' y='-20%25' width='140%25' height='140%25'><feGaussianBlur stdDeviation='7'/></filter></defs><g filter='url(%23b)' fill='white' fill-opacity='0.5'><ellipse cx='110' cy='86' rx='70' ry='26'/><ellipse cx='170' cy='72' rx='58' ry='24'/><ellipse cx='230' cy='90' rx='78' ry='30'/></g></svg>");
  background-size: 260px 140px, 320px 160px, 300px 150px;
  background-position: 12% 22%, 58% 48%, 85% 30%;
  animation: profileCloudsDrift 40s linear infinite;
}

.profile-viewer.profile-background.profile-galaxy::after {
  opacity: 0.5;
  background-image:
    radial-gradient(closest-side, rgba(180, 140, 255, 0.7), rgba(120, 90, 200, 0.28), rgba(30, 20, 60, 0));
  background-size: 560px 340px;
  background-position: 70% 32%;
  animation: profileGalaxyDrift 60s ease-in-out infinite;
}

.profile-viewer.profile-background > * {
  position: relative;
  z-index: 1;
}

:root[data-theme="light"] .profile-viewer.profile-background::before {
  background: linear-gradient(180deg, rgba(246, 242, 234, 0.45), rgba(246, 242, 234, 0.7));
}

.profile-viewer.profile-background.profile-bg-image::before {
  background-image: var(--profile-bg-image);
}

.profile-viewer.profile-background.profile-sky-0::before {
  background-image: linear-gradient(180deg, #bfe9ff 0%, #6bc6ff 100%);
}

.profile-viewer.profile-background.profile-sky-1::before {
  background-image: linear-gradient(180deg, #5aa7ff 0%, #1d4f99 100%);
}

.profile-viewer.profile-background.profile-sky-2::before {
  background-image: linear-gradient(180deg, #ff9a3c 0%, #ff5c1a 100%);
}

.profile-viewer.profile-background.profile-sky-3::before {
  background-image: linear-gradient(180deg, #1a2c6a 0%, #0c1230 100%);
}

.profile-viewer.profile-background.profile-sky-4::before {
  background-image: linear-gradient(180deg, #080b20 0%, #020511 100%);
}

.profile-viewer.profile-background.profile-sky-5::before {
  background-image: linear-gradient(180deg, #140a2a 0%, #02010a 100%);
}

@keyframes profileCloudsDrift {
  0% {
    background-position: -12% 22%, 40% 48%, 95% 30%;
  }
  50% {
    background-position: 30% 24%, 70% 52%, 130% 32%;
  }
  100% {
    background-position: 110% 22%, 140% 48%, 170% 30%;
  }
}

@keyframes profileGalaxyDrift {
  0% {
    background-position: 65% 28%, 25% 62%;
  }
  50% {
    background-position: 72% 34%, 32% 58%;
  }
  100% {
    background-position: 65% 28%, 25% 62%;
  }
}

.profile-viewer {
  display: grid;
  gap: 18px;
  background: var(--panel);
  border-radius: 18px;
  padding: 22px;
  border: 1px solid rgba(245, 197, 66, 0.14);
  position: relative;
  overflow: hidden;
}

.profile-viewer.has-background {
  border-color: rgba(245, 197, 66, 0.28);
}

.profile-viewer.panel-translucent {
  background: rgba(15, 13, 9, 0.88);
}

.profile-viewer.panel-opaque {
  background: var(--panel);
}

:root[data-theme="light"] .profile-viewer.panel-translucent {
  background: rgba(255, 255, 255, 0.9);
}

:root[data-theme="light"] .profile-viewer.panel-opaque {
  background: var(--panel);
}

.profile-viewer-card,
.profile-inbox,
.profile-actions,
.profile-comments {
  position: relative;
  z-index: 1;
}

.profile-viewer.panel-opaque .profile-viewer-card,
.profile-viewer.panel-opaque .profile-inbox,
.profile-viewer.panel-opaque .profile-comments,
.profile-viewer.panel-opaque .profile-actions,
.profile-viewer.panel-opaque .profile-form {
  background: rgba(12, 14, 18, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 16px;
}

:root[data-theme="light"] .profile-viewer.panel-opaque .profile-viewer-card,
:root[data-theme="light"] .profile-viewer.panel-opaque .profile-inbox,
:root[data-theme="light"] .profile-viewer.panel-opaque .profile-comments,
:root[data-theme="light"] .profile-viewer.panel-opaque .profile-actions,
:root[data-theme="light"] .profile-viewer.panel-opaque .profile-form {
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(0, 0, 0, 0.12);
}

.profile-viewer.panel-opaque .list li,
.profile-viewer.panel-opaque .comment-form textarea,
.profile-viewer.panel-opaque .comment-form input,
.profile-viewer.panel-opaque .comment-form .input-with-counter,
.profile-viewer.panel-opaque .level-card,
.profile-viewer.panel-opaque .profile-form textarea,
.profile-viewer.panel-opaque .profile-form input,
.profile-viewer.panel-opaque .profile-form select,
.profile-viewer.panel-opaque .profile-customize-panel {
  background: rgba(17, 19, 24, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

:root[data-theme="light"] .profile-viewer.panel-opaque .list li,
:root[data-theme="light"] .profile-viewer.panel-opaque .comment-form textarea,
:root[data-theme="light"] .profile-viewer.panel-opaque .comment-form input,
:root[data-theme="light"] .profile-viewer.panel-opaque .comment-form .input-with-counter,
:root[data-theme="light"] .profile-viewer.panel-opaque .level-card,
:root[data-theme="light"] .profile-viewer.panel-opaque .profile-form textarea,
:root[data-theme="light"] .profile-viewer.panel-opaque .profile-form input,
:root[data-theme="light"] .profile-viewer.panel-opaque .profile-form select,
:root[data-theme="light"] .profile-viewer.panel-opaque .profile-customize-panel {
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(0, 0, 0, 0.12);
}

.profile-level {
  font-family: "Oxanium", "Space Grotesk", sans-serif;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}

.profile-customize {
  display: grid;
  gap: 12px;
}

.profile-customize-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

:root[data-theme="light"] .profile-customize-panel {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.12);
}

.profile-backgrounds {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.profile-background-item {
  display: grid;
  grid-template-columns: 70px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(11, 15, 20, 0.6);
}

:root[data-theme="light"] .profile-background-item {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.12);
}

.profile-background-thumb {
  width: 70px;
  height: 44px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

:root[data-theme="light"] .profile-background-thumb {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.12);
}

.profile-background-item.locked {
  opacity: 0.55;
}

.profile-background-item .panel-muted {
  font-size: 0.85rem;
}

.profile-viewer-card {
  display: grid;
  gap: 12px;
}

.profile-viewer-avatar {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  font-family: "Oxanium", "Space Grotesk", sans-serif;
  background: rgba(245, 197, 66, 0.2);
  color: var(--text);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background-size: cover;
  background-position: center;
}

.gift-form {
  display: grid;
  gap: 10px;
  max-width: 320px;
}

.gift-form input {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(245, 197, 66, 0.16);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}

.mailbox {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(245, 197, 66, 0.14);
  background: rgba(255, 255, 255, 0.02);
}

.mailbox-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mailbox-header h3 {
  margin: 0;
}

.mailbox-count {
  font-size: 0.85rem;
  color: var(--muted);
}

.mailbox-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.mailbox-item {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(245, 197, 66, 0.16);
  background: rgba(255, 255, 255, 0.03);
}

.mailbox-meta {
  color: var(--muted);
  font-size: 0.85rem;
}

.mailbox-actions {
  display: flex;
  gap: 8px;
}

.recovery-code {
  margin-top: 12px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(245, 197, 66, 0.08);
  border: 1px dashed rgba(245, 197, 66, 0.3);
  font-family: "Oxanium", "Space Grotesk", sans-serif;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  word-break: break-all;
}

.profile-link {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  color: inherit;
  padding: 0;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.list-item .profile-link {
  width: 100%;
}

.profile-card {
  background: var(--panel-light);
  border-radius: 18px;
  padding: 24px;
  display: grid;
  gap: 16px;
  border: 1px solid rgba(245, 197, 66, 0.14);
}

.profile-avatar {
  width: 84px;
  height: 84px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  font-family: "Oxanium", sans-serif;
  background: rgba(245, 197, 66, 0.22);
  background-size: cover;
  background-position: center;
  color: #e8fbff;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.profile-name {
  font-size: 1.2rem;
}

.profile-email {
  color: var(--muted);
  font-size: 0.9rem;
}

.profile-credits {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.profile-description {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

.level-card {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.level-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--muted);
}

.level-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.level-row strong {
  color: var(--text);
  font-size: 0.95rem;
}

.level-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  margin: 8px 0 6px;
  overflow: hidden;
}

.level-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #7fd6ff 0%, #b8ffef 100%);
  box-shadow: 0 0 12px rgba(127, 214, 255, 0.4);
  transition: width 0.2s ease;
}

.level-meta {
  font-size: 0.75rem;
  color: var(--muted);
}

.profile-stats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.profile-presence {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.profile-presence.online {
  color: #4edb8c;
}

.profile-presence.offline {
  color: #ff6b5a;
}

.profile-stat {
  display: grid;
  gap: 2px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(245, 197, 66, 0.16);
  background: rgba(255, 255, 255, 0.03);
  min-width: 120px;
}

.profile-stat-value {
  font-family: "Oxanium", "Space Grotesk", sans-serif;
  font-size: 1.05rem;
}

.profile-stat-label {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.profile-form {
  display: grid;
  gap: 12px;
  background: rgba(255, 255, 255, 0.02);
  padding: 18px;
  border-radius: 16px;
  border: 1px solid rgba(245, 197, 66, 0.14);
}

.profile-form textarea {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(245, 197, 66, 0.16);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  resize: vertical;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
}

.profile-form .input-with-counter textarea {
  padding-bottom: 26px;
}

.profile-form select {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(245, 197, 66, 0.16);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
}

.profile-message {
  min-height: 20px;
  color: var(--accent-warm);
  font-size: 0.9rem;
}

.settings-form {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.settings-field {
  display: grid;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--muted);
}

.settings-field select,
.settings-field input {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(245, 197, 66, 0.16);
  background: #ffffff;
  color: #111111;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
}

.settings-field select option {
  color: #111111;
  background: #ffffff;
}

.settings-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text);
}

.settings-toggle input {
  width: 18px;
  height: 18px;
}

.profile-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile-level-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.level-info-icon {
  position: absolute;
  bottom: 2px;
  right: 40px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(15, 15, 15, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #ffffff;
  font-size: 10px;
  line-height: 16px;
  text-align: center;
  font-weight: 700;
  cursor: help;
}

:root[data-theme="light"] .level-info-icon {
  background: rgba(255, 255, 255, 0.8);
  color: #1f1a12;
  border-color: rgba(0, 0, 0, 0.2);
}

.profile-comments {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(245, 197, 66, 0.14);
  background: rgba(255, 255, 255, 0.02);
}

#comment-list {
  max-height: 320px;
  overflow-y: auto;
}

.profile-inbox {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(245, 197, 66, 0.14);
  background: rgba(255, 255, 255, 0.02);
}

.profile-comments-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.comment-form {
  display: grid;
  gap: 10px;
}

.comment-form textarea {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(245, 197, 66, 0.16);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  resize: vertical;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
}

.comment-form .input-with-counter textarea {
  padding-bottom: 26px;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(0.92);
    opacity: 0.4;
  }
  50% {
    transform: scale(1);
    opacity: 0.9;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .app {
    grid-template-columns: 80px 1fr;
  }

  .rail {
    padding: 20px 12px;
  }

  .brand-text,
  .nav-item {
    display: none;
  }

  .rail-boosters {
    display: none;
  }

  .main {
    padding: 24px 24px var(--page-bottom-gap);
  }

  .auth-panel {
    grid-column: 1 / -1;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .profile-grid {
    grid-template-columns: 1fr;
  }

  .profile-viewer {
    margin-top: 18px;
  }

  .social-grid {
    grid-template-columns: 1fr;
  }

  .chat-panel {
    min-height: 320px;
  }

  .community-level-card {
    grid-template-columns: 1fr;
  }

  .community-level-thumb {
    width: 100%;
    height: 140px;
  }

  .public-chat {
    max-width: 100%;
  }

  .chat-rooms-grid {
    grid-template-columns: 1fr;
  }

  .private-chat-layout {
    grid-auto-flow: column;
    grid-auto-columns: minmax(220px, 1fr);
  }

  .store-detail-hero {
    grid-template-columns: 1fr;
  }

  .store-detail-header-row {
    align-items: flex-start;
  }
}

@media (max-width: 720px) {
  .app {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto;
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .rail {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 18px 16px;
    gap: 16px;
  }

  .brand {
    justify-content: space-between;
  }

  .brand-text {
    display: block;
  }

  .credits-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .rail-boosters {
    display: inline-flex;
    width: auto;
  }

  .nav {
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    overflow-x: auto;
    gap: 8px;
    padding-bottom: 6px;
  }

  .nav-item {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    padding: 10px 14px;
  }

  .main {
    padding: 18px 16px var(--page-bottom-gap);
  }

  .profile-viewer.profile-background::after {
    background-size: 180px 100px, 220px 110px, 200px 100px, 260px 130px;
  }

  .topbar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .search,
  .search input {
    width: 100%;
  }

  .profile-pill {
    justify-content: center;
  }

  .hero {
    gap: 18px;
  }

  .hero-copy h1 {
    font-size: 2rem;
  }

  .hero-card {
    padding: 18px;
  }

  .hero-image {
    height: 220px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .grid,
  .library-grid {
    grid-template-columns: 1fr;
  }

  .store-tabs {
    flex-wrap: wrap;
    gap: 10px;
  }

  .store-tab {
    flex: 1 1 120px;
  }

  .bot-offer {
    flex-direction: column;
    align-items: flex-start;
  }

  .invite-actions,
  .inline-actions,
  .profile-actions,
  .mailbox-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .chat-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .chat-actions {
    width: 100%;
  }

  .chat-messages,
  #comment-list {
    max-height: 45vh;
  }

  .profile-comments-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .auth-panel {
    border-left: none;
    border-top: 1px solid rgba(245, 197, 66, 0.12);
    padding: 22px 16px 26px;
  }
}

@media (orientation: portrait) {
  .app {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto;
    height: auto;
    min-height: 100vh;
  }

  .rail {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 18px 16px;
    gap: 16px;
  }

  .brand {
    justify-content: space-between;
  }

  .brand-text {
    display: block;
  }

  .credits-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .rail-boosters {
    display: inline-flex;
    width: auto;
  }

  .nav {
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    overflow-x: auto;
    gap: 8px;
    padding-bottom: 6px;
  }

  .nav::-webkit-scrollbar {
    height: 0;
  }

  .nav {
    scrollbar-width: none;
  }

  .nav-item {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    padding: 10px 14px;
  }

  .main {
    padding: 18px 16px var(--page-bottom-gap);
  }
}

:root[data-layout="compact"] .app {
  grid-template-columns: 1fr;
  grid-template-rows: auto 1fr auto;
  height: auto;
  min-height: 100vh;
}

:root[data-layout="compact"] .rail {
  border-right: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 18px 16px;
  gap: 16px;
}

:root[data-layout="compact"] .brand {
  justify-content: space-between;
}

:root[data-layout="compact"] .brand-text {
  display: block;
}

:root[data-layout="compact"] .credits-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

:root[data-layout="compact"] .rail-boosters {
  display: inline-flex;
  width: auto;
}

:root[data-layout="compact"] .nav {
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  overflow-x: auto;
  gap: 8px;
  padding-bottom: 6px;
}

:root[data-layout="compact"] .nav-item {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  padding: 10px 14px;
}

:root[data-layout="compact"] .main {
  padding: 18px 16px var(--page-bottom-gap);
}

@media (max-height: 720px) {
  .rail {
    padding: 18px 16px;
    gap: 16px;
  }

  .main {
    padding: 18px 20px var(--page-bottom-gap);
    gap: 20px;
  }

  .topbar {
    gap: 12px;
    flex-wrap: wrap;
  }
}
