:root {
  --bg: #140b14;
  --surface: rgba(41, 18, 30, 0.62);
  --surface-strong: rgba(61, 28, 45, 0.88);
  --line: rgba(255, 214, 228, 0.18);
  --line-strong: rgba(255, 255, 255, 0.12);
  --text: #fff8fb;
  --muted: #f0c7d5;
  --primary: #ff9eb9;
  --primary-2: #ffd9e6;
  --accent: #ffe7f1;
  --success: #b7f2d0;
  --danger: #ff7d98;
  --radius: 24px;
  --shadow: 0 22px 56px rgba(30, 8, 20, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.04);
  --tabbar-height: 84px;
  --sidebar-width: 102px;
  --font: "Trebuchet MS", "Avenir Next Condensed", "Noto Sans JP", "Arial Narrow", sans-serif;
  --font-display: "Arial Black", "Avenir Next", "Trebuchet MS", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

html {
  background: var(--bg);
}

body {
  position: relative;
  overflow-x: hidden;
  padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
  color: var(--text);
  font-family: var(--font);
  background:
    radial-gradient(circle at 14% 12%, rgba(255, 174, 202, 0.24), transparent 24%),
    radial-gradient(circle at 88% 10%, rgba(255, 225, 235, 0.16), transparent 20%),
    radial-gradient(circle at 50% 120%, rgba(255, 205, 220, 0.18), transparent 26%),
    linear-gradient(140deg, #140b14 0%, #26101e 42%, #381527 100%);
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

body::before {
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.035) 0, rgba(255, 255, 255, 0) 24%),
    repeating-linear-gradient(
      -28deg,
      rgba(255, 255, 255, 0.025) 0,
      rgba(255, 255, 255, 0.025) 2px,
      transparent 2px,
      transparent 24px
    );
  opacity: 0.4;
}

body::after {
  inset: auto auto -140px -120px;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 174, 202, 0.3) 0, rgba(255, 174, 202, 0) 70%);
  filter: blur(12px);
  animation: driftGlow 11s ease-in-out infinite alternate;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.app-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  isolation: isolate;
}

.app-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.app-shell.has-sidebar .app-main {
  margin-right: calc(var(--sidebar-width) + 26px);
}

.app-shell.is-guest .screen {
  display: flex;
  align-items: center;
  min-height: calc(100vh - 180px);
  padding-bottom: 30px;
}

.app-shell::before,
.app-shell::after {
  content: "";
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(16px);
  opacity: 0.62;
  z-index: -1;
}

.app-shell::before {
  top: 12%;
  right: -90px;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(125, 231, 255, 0.2) 0, rgba(125, 231, 255, 0) 72%);
  animation: driftGlow 13s ease-in-out infinite alternate-reverse;
}

.app-shell::after {
  bottom: 18%;
  left: -70px;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(255, 211, 110, 0.18) 0, rgba(255, 211, 110, 0) 68%);
  animation: driftGlow 15s ease-in-out infinite alternate;
}

.app-shell[data-theme="neon-dark-alt"] {
  --surface: rgba(39, 25, 43, 0.84);
  --surface-strong: rgba(57, 35, 61, 0.95);
  --line: rgba(255, 224, 164, 0.2);
  --text: #fff6ee;
  --muted: #edd3c7;
  --primary: #ff8b63;
  --primary-2: #81efd8;
  --accent: #ffe37f;
  --success: #aaf2bc;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 22px 18px 16px;
  backdrop-filter: blur(26px);
  background: linear-gradient(180deg, rgba(38, 16, 30, 0.62), rgba(38, 16, 30, 0.2));
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  position: relative;
  flex-shrink: 0;
}

.brand img {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.34), 0 0 0 4px rgba(255, 255, 255, 0.02);
}

.brand-spark {
  position: absolute;
  right: -8px;
  bottom: -6px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #170d19;
  box-shadow: 0 8px 18px rgba(255, 93, 143, 0.28);
}

.brand-copy {
  display: grid;
  gap: 3px;
}

.kicker {
  color: var(--accent);
  font-size: 0.62rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.brand-copy h1,
.brand-copy p {
  margin: 0;
}

.brand-copy h1 {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 3.8vw, 1.72rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow: 0 0 18px rgba(255, 93, 143, 0.18);
}

.brand-copy p {
  max-width: 34rem;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.maintenance-banner {
  margin: 14px 18px 0;
  border-color: rgba(255, 211, 110, 0.32);
  background:
    radial-gradient(circle at top right, rgba(255, 215, 120, 0.18), transparent 30%),
    rgba(31, 20, 14, 0.82);
}

.screen {
  flex: 1;
  width: 100%;
  padding: 20px 18px calc(var(--tabbar-height) + 30px);
}

.app-shell.has-sidebar .screen {
  padding-bottom: 30px;
}

.stack {
  display: grid;
  gap: 16px;
}

.card,
.panel,
.composer,
.story-card,
.chat-card,
.profile-hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015)),
    var(--surface);
  box-shadow: var(--shadow);
  animation: riseIn 0.45s ease both;
}

.card::before,
.panel::before,
.composer::before,
.story-card::before,
.chat-card::before,
.profile-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent 36%);
  opacity: 0.55;
  pointer-events: none;
}

.card::after,
.panel::after,
.composer::after,
.story-card::after,
.chat-card::after,
.profile-hero::after {
  content: "";
  position: absolute;
  left: -18%;
  top: 0;
  width: 42%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), var(--primary-2), transparent);
  box-shadow: 0 0 18px rgba(255, 93, 143, 0.26);
  pointer-events: none;
}

.card,
.panel,
.composer,
.story-card,
.chat-card {
  padding: 16px;
}

.chat-card {
  width: 100%;
  text-align: left;
}

.profile-hero {
  padding: 0;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.section-title h2,
.section-title h3,
.section-title p,
.panel h3 {
  margin: 0;
}

.section-title h2,
.section-title h3,
.panel h3 {
  font-family: var(--font-display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.muted {
  color: var(--muted);
}

.pill-row,
.tabs,
.stats-row,
.action-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.compact-actions {
  gap: 8px;
}

.pill,
.tag,
.badge,
.tab-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--muted);
  backdrop-filter: blur(12px);
}

.badge.verified {
  color: #fffdf8;
  background: linear-gradient(135deg, rgba(255, 93, 143, 0.28), rgba(125, 231, 255, 0.18));
  box-shadow: 0 0 22px rgba(255, 93, 143, 0.18);
}

.tag {
  color: var(--accent);
}

.mini-action,
.profile-link-btn {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border-radius: 999px;
  min-height: 36px;
  padding: 8px 12px;
  transition: transform 0.18s ease, background 0.18s ease;
}

.mini-action:hover,
.profile-link-btn:hover,
.mini-action:focus-visible,
.profile-link-btn:focus-visible {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.1);
}

.post-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.post-comments {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.post-comments.collapsed {
  display: none;
}

.comment-item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  padding: 10px 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.comment-avatar,
.friend-avatar {
  width: 36px;
  height: 36px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(255, 218, 229, 0.9), rgba(255, 158, 185, 0.85));
  color: #2d1422;
  font-family: var(--font-display);
}

.comment-avatar-btn {
  padding: 0;
  border: 0;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.comment-avatar-btn:hover,
.comment-avatar-btn:focus-visible {
  transform: translateY(-1px) scale(1.03);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.08), 0 0 18px rgba(255, 93, 143, 0.22);
}

.comment-avatar img,
.friend-avatar.has-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.comment-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.comment-identity {
  min-width: 0;
}

.comment-name-btn {
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 0;
}

.comment-name-btn:hover,
.comment-name-btn:focus-visible {
  transform: none;
  background: transparent;
  color: var(--accent);
}

.comment-meta {
  margin-top: 2px;
}

.comment-quick-action {
  min-height: 30px;
  padding: 6px 10px;
  white-space: nowrap;
}

.comment-body p {
  margin: 4px 0 0;
}

.comment-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.comment-form input {
  min-width: 0;
}

.comment-empty,
.friend-empty {
  padding: 14px;
  border-radius: 18px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
  border: 1px dashed rgba(255, 255, 255, 0.12);
}

.tab-chip.active {
  background: linear-gradient(135deg, rgba(255, 93, 143, 0.24), rgba(125, 231, 255, 0.18));
  color: var(--text);
}

.grid-two {
  display: grid;
  gap: 12px;
}

.field {
  display: grid;
  gap: 8px;
}

.field label {
  color: var(--accent);
  font-size: 0.74rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 14px 16px;
  color: var(--text);
  background: rgba(6, 10, 20, 0.72);
  border: 1px solid rgba(125, 231, 255, 0.16);
  border-radius: 18px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.field input::placeholder,
.field textarea::placeholder {
  color: rgba(186, 199, 230, 0.62);
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: rgba(255, 211, 110, 0.8);
  box-shadow: 0 0 0 3px rgba(255, 211, 110, 0.08), 0 16px 32px rgba(0, 0, 0, 0.22);
  transform: translateY(-1px);
}

.field textarea {
  min-height: 116px;
  resize: vertical;
}

.auth-oauth-block {
  margin-bottom: 16px;
}

.auth-divider {
  position: relative;
  margin: 4px 0 18px;
  text-align: center;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.auth-divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.14), transparent);
}

.auth-divider span {
  position: relative;
  padding: 0 12px;
  background: var(--surface);
}

.auth-oauth-note {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.6;
}

.oauth-google-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.oauth-google-mark {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffffff, rgba(255, 255, 255, 0.78));
  color: #1f315b;
  font-family: var(--font-display);
  font-size: 1rem;
  box-shadow: inset 0 0 0 1px rgba(31, 49, 91, 0.08);
}

.btn {
  position: relative;
  overflow: hidden;
  min-height: 48px;
  padding: 12px 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #1a0f1d;
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  box-shadow: 0 14px 28px rgba(255, 93, 143, 0.24);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0, rgba(255, 255, 255, 0.45) 45%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.45s ease;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 20px 34px rgba(255, 93, 143, 0.28);
}

.btn:hover::after,
.btn:focus-visible::after {
  transform: translateX(120%);
}

.btn.secondary {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), var(--surface-strong));
  color: var(--text);
  border: 1px solid var(--line);
  box-shadow: none;
}

.btn.ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  box-shadow: none;
}

.post-card-header,
.story-row,
.profile-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar,
.avatar-lg {
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  font-family: var(--font-display);
  background: linear-gradient(135deg, rgba(125, 231, 255, 0.5), rgba(255, 93, 143, 0.86));
  border: 2px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
}

.avatar {
  width: 46px;
  height: 46px;
}

.avatar-image {
  display: block;
  object-fit: cover;
}

.avatar-lg {
  width: 78px;
  height: 78px;
}

.cover {
  height: 168px;
  border-radius: 28px 28px 34px 34px;
  background:
    radial-gradient(circle at 22% 18%, rgba(255, 255, 255, 0.2), transparent 18%),
    linear-gradient(135deg, rgba(255, 93, 143, 0.36), transparent 30%),
    linear-gradient(180deg, rgba(125, 231, 255, 0.18), transparent 50%),
    linear-gradient(135deg, #2e1635 0%, #1d2748 55%, #0d1225 100%);
}

.profile-page {
  gap: 18px;
}

.profile-grid {
  display: grid;
  gap: 18px;
}

.profile-card-ds {
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--radius) + 4px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at top right, rgba(125, 231, 255, 0.14), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01)),
    rgba(17, 21, 34, 0.94);
  box-shadow: 0 36px 70px rgba(5, 8, 18, 0.5);
}

.sakura-banner {
  position: relative;
}

.sakura-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 12% 26%, rgba(255, 241, 245, 0.35) 0, transparent 10%),
    radial-gradient(circle at 26% 18%, rgba(255, 199, 220, 0.32) 0, transparent 9%),
    radial-gradient(circle at 74% 32%, rgba(255, 225, 235, 0.28) 0, transparent 11%);
  pointer-events: none;
}

.profile-card-banner {
  height: 182px;
  background:
    radial-gradient(circle at 22% 18%, rgba(255, 255, 255, 0.18), transparent 18%),
    linear-gradient(135deg, rgba(255, 93, 143, 0.34), transparent 30%),
    linear-gradient(180deg, rgba(125, 231, 255, 0.16), transparent 50%),
    linear-gradient(135deg, #2e1635 0%, #1d2748 55%, #0d1225 100%);
  background-size: cover;
  background-position: center;
}

.profile-card-body {
  position: relative;
  display: grid;
  gap: 18px;
  padding: 0 18px 22px;
  margin-top: -38px;
}

.profile-card-head {
  display: flex;
  align-items: flex-end;
  gap: 14px;
}

.profile-card-heading {
  display: grid;
  gap: 6px;
}

.profile-card-heading h2 {
  margin: 0;
  font-family: var(--font-display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.profile-card-kicker,
.profile-section-label {
  color: var(--accent);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.profile-avatar-xl {
  position: relative;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 108px;
  height: 108px;
  border-radius: 34px;
  color: white;
  font-family: var(--font-display);
  font-size: 2rem;
  background: linear-gradient(145deg, rgba(125, 231, 255, 0.82), rgba(255, 93, 143, 0.92));
  border: 6px solid rgba(17, 21, 34, 0.95);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.3);
}

.profile-avatar-xl.has-image {
  overflow: hidden;
  background: rgba(12, 16, 28, 0.9);
}

.profile-avatar-xl img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-presence-dot {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--success);
  border: 3px solid rgba(17, 21, 34, 0.95);
  box-shadow: 0 0 18px rgba(158, 242, 200, 0.52);
}

.profile-info-block {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 20px;
  background: rgba(8, 11, 20, 0.54);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.profile-mini-grid,
.profile-stat-grid {
  display: grid;
  gap: 12px;
}

.profile-mini-card,
.profile-stat-card {
  display: grid;
  gap: 6px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.profile-mini-card span,
.profile-stat-card span {
  color: var(--muted);
  font-size: 0.8rem;
}

.profile-mini-card strong,
.profile-stat-card strong {
  font-size: 1rem;
}

.profile-permission-list,
.profile-pulse-list {
  display: grid;
  gap: 10px;
}

.profile-permission-item,
.profile-pulse-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.profile-permission-item {
  justify-content: space-between;
}

.profile-permission-item span {
  color: var(--muted);
}

.profile-pulse-item p {
  margin: 4px 0 0;
  color: var(--muted);
}

.profile-side-stack {
  display: grid;
  gap: 18px;
}

.profile-pulse-panel {
  align-self: start;
}

.profile-post-grid {
  display: grid;
  gap: 14px;
}

.profile-post-card {
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01)),
    rgba(14, 18, 32, 0.82);
}

.profile-post-thumb {
  width: 100%;
  height: 170px;
  object-fit: cover;
  display: block;
}

.profile-post-thumb-fallback {
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.8);
  background:
    radial-gradient(circle at top left, rgba(125, 231, 255, 0.18), transparent 24%),
    linear-gradient(135deg, rgba(255, 93, 143, 0.28), rgba(125, 231, 255, 0.12)),
    rgba(21, 26, 46, 0.9);
}

.profile-post-body {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.profile-post-body p {
  margin: 0;
}

.profile-empty-state {
  padding: 18px;
  border-radius: 22px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.12);
}

.profile-editor {
  gap: 14px;
}

.profile-social-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.profile-social-link {
  text-decoration: none;
}

.admin-role-pill {
  color: #261400;
  background: linear-gradient(135deg, rgba(255, 225, 122, 0.98), rgba(255, 188, 64, 0.92));
  border-color: rgba(255, 215, 122, 0.58);
  box-shadow: 0 0 24px rgba(255, 211, 110, 0.24);
}

.art-price-pill {
  color: #2f1700;
  background: linear-gradient(135deg, rgba(255, 224, 122, 0.95), rgba(255, 160, 112, 0.86));
  border-color: rgba(255, 224, 122, 0.4);
}

.friends-page,
.other-profile-page {
  gap: 18px;
}

.friends-hero {
  background:
    radial-gradient(circle at top left, rgba(255, 220, 232, 0.22), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015)),
    var(--surface);
}

.friends-grid {
  display: grid;
  gap: 18px;
}

.friend-card {
  display: grid;
  gap: 12px;
  padding: 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.friend-card-main {
  display: flex;
  align-items: center;
  gap: 12px;
}

.friend-avatar {
  width: 48px;
  height: 48px;
}

.friend-open-btn {
  width: fit-content;
}

.streams-page {
  gap: 18px;
}

.stream-view-panel {
  background:
    radial-gradient(circle at top left, rgba(255, 224, 235, 0.24), transparent 26%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015)),
    var(--surface);
}

.streams-grid {
  display: grid;
  gap: 18px;
}

.stream-monetization-panel,
.stream-editor-panel {
  align-self: start;
}

.stream-balance-card {
  display: grid;
  gap: 8px;
  padding: 18px;
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(255, 211, 110, 0.18), transparent 28%),
    linear-gradient(140deg, rgba(255, 93, 143, 0.22), rgba(125, 231, 255, 0.08)),
    rgba(14, 18, 32, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.stream-balance-card span {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
}

.stream-balance-card strong {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2.5rem);
}

.stream-settings-form {
  margin-top: 12px;
}

.stream-card-grid,
.stream-tip-list,
.stream-mini-list {
  display: grid;
  gap: 14px;
}

.stream-card {
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)),
    rgba(13, 18, 33, 0.9);
  box-shadow: var(--shadow);
}

.stream-card.is-live {
  box-shadow: var(--shadow), 0 0 0 1px rgba(255, 93, 143, 0.18), 0 0 36px rgba(255, 93, 143, 0.14);
}

.stream-card-cover {
  height: 168px;
  padding: 14px;
  position: relative;
  display: flex;
  align-items: flex-start;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.16), transparent 16%),
    linear-gradient(135deg, rgba(255, 93, 143, 0.34), transparent 35%),
    linear-gradient(180deg, rgba(125, 231, 255, 0.22), transparent 55%),
    linear-gradient(140deg, #24111f 0%, #1a223f 48%, #0b1022 100%);
  background-size: cover;
  background-position: center;
}

.stream-card-cover-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
}

.stream-card-overlay {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.stream-card-body {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.stream-card-head {
  display: flex;
  gap: 12px;
  align-items: center;
}

.stream-avatar,
.stream-tip-avatar {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border-radius: 18px;
  font-family: var(--font-display);
  color: #fff;
  background: linear-gradient(145deg, rgba(125, 231, 255, 0.78), rgba(255, 93, 143, 0.88));
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
}

.stream-stat-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.stream-media-frame,
.stream-media-link,
.stream-media-placeholder {
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(4, 7, 16, 0.7);
}

.stream-media-frame iframe {
  display: block;
  width: 100%;
  min-height: 260px;
  border: 0;
}

.stream-media-link,
.stream-media-placeholder {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.stream-tip-item,
.stream-mini-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.stream-tip-item p,
.stream-mini-item p {
  margin: 4px 0 0;
}

.stream-mini-item {
  display: grid;
  gap: 6px;
}

.stream-empty-state {
  padding: 18px;
  border-radius: 24px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.12);
}

.stream-side-stack {
  display: grid;
  gap: 18px;
}

.profile-hero p,
.panel p,
.card p {
  line-height: 1.58;
}

.media-grid {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.media-grid img,
.media-grid video,
.media-grid audio {
  width: 100%;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.28);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.media-grid audio {
  padding: 6px;
}

.tabbar {
  position: fixed;
  top: 110px;
  right: 18px;
  bottom: 18px;
  width: var(--sidebar-width);
  z-index: 30;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 8px;
  padding: 10px;
  border-radius: 28px;
  background: rgba(44, 20, 32, 0.28);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 42px rgba(28, 9, 18, 0.22), 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.tabbar a {
  position: relative;
  display: grid;
  place-items: center;
  gap: 4px;
  min-height: 58px;
  padding: 6px 2px;
  color: var(--muted);
  border-radius: 18px;
  font-size: 0.69rem;
  text-align: center;
  transition: transform 0.18s ease, color 0.18s ease, background 0.18s ease;
}

.tabbar a.active {
  background: linear-gradient(180deg, rgba(255, 93, 143, 0.24), rgba(125, 231, 255, 0.16));
  color: var(--text);
  transform: translateY(-2px);
}

.tabbar a.active::after {
  content: "";
  position: absolute;
  left: 20%;
  right: 20%;
  top: 8px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.tabbar strong {
  font-size: 1rem;
  text-shadow: 0 0 12px rgba(255, 93, 143, 0.28);
}

.list {
  display: grid;
  gap: 14px;
}

.meta {
  font-size: 0.86rem;
  color: var(--muted);
}

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

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 16px rgba(158, 242, 200, 0.78);
}

.toast-stack {
  position: fixed;
  top: 18px;
  right: 16px;
  z-index: 60;
  display: grid;
  gap: 10px;
  width: min(92vw, 360px);
  pointer-events: none;
}

.toast {
  opacity: 0;
  transform: translateY(-10px) scale(0.98);
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(12, 16, 30, 0.92);
  color: var(--text);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.34);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.toast.success {
  border-color: rgba(158, 242, 200, 0.32);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.34), 0 0 20px rgba(158, 242, 200, 0.14);
}

.toast.danger {
  border-color: rgba(255, 125, 152, 0.32);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.34), 0 0 22px rgba(255, 125, 152, 0.14);
}

.hidden {
  display: none;
}

@keyframes driftGlow {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }

  to {
    transform: translate3d(28px, -24px, 0) scale(1.1);
  }
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 720px) {
  .screen {
    max-width: 1040px;
    margin: 0 auto;
  }

  .grid-two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-grid {
    grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.9fr);
    align-items: start;
  }

  .profile-mini-grid,
  .profile-stat-grid,
  .profile-post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .streams-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
    align-items: start;
  }

  .stream-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .friends-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .app-shell.has-sidebar .app-main {
    margin-right: 0;
  }

  .tabbar {
    top: auto;
    left: 14px;
    right: 14px;
    bottom: 14px;
    width: auto;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    align-content: stretch;
  }

  .app-shell.has-sidebar .screen {
    padding-bottom: calc(var(--tabbar-height) + 30px);
  }
}

@media (max-width: 540px) {
  .topbar {
    padding-inline: 16px;
  }

  .screen {
    padding-inline: 14px;
  }

  .tabbar {
    left: 10px;
    right: 10px;
    bottom: 10px;
    padding: 8px;
  }

  .tabbar a {
    min-height: 54px;
    font-size: 0.62rem;
  }

  .brand-copy h1 {
    font-size: 1rem;
  }

  .brand-copy p {
    font-size: 0.78rem;
  }

  .profile-card-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .profile-avatar-xl {
    width: 92px;
    height: 92px;
    font-size: 1.75rem;
  }

  .profile-card-body {
    margin-top: -28px;
  }

  .stream-media-frame iframe {
    min-height: 210px;
  }
}
