/*
  Design system and responsive rules.

  Naming rules:
  - Page-level layouts end in -layout, -shell, or -section.
  - Reusable items end in -card, -panel, -row, -grid, or -list.
  - Interactive classes use btn/chip/badge names so they are easy to scan.

  Breakpoints mirror the responsive spec:
  xs: 320-479, sm: 480-639, md: 640-767, lg: 768-1023,
  xl: 1024-1279, 2xl: 1280+.
*/

:root {
  color-scheme: light;
  --bg: #f7f9fc;
  --surface: #ffffff;
  --surface-soft: #eef7f5;
  --text: #172033;
  --muted: #627084;
  --line: #dce5ee;
  --primary: #1d68d8;
  --primary-dark: #144da3;
  --teal: #0f9f8f;
  --green: #18a058;
  --gold: #c58b12;
  --emerald: #087f5b;
  --purple: #7c3aed;
  --danger: #c23131;
  --shadow: 0 18px 45px rgba(35, 48, 76, 0.14);
  --radius: 8px;
  --touch: 44px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0;
}

body::selection {
  background: #bee9df;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

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

.user-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.user-link:hover {
  color: var(--primary-dark);
  border-bottom-color: currentColor;
}

.user-link.inverse:hover {
  color: #ffe066;
}

.user-avatar-link {
  overflow: hidden;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.user-avatar-link.has-photo {
  background: #fff;
  border: 2px solid rgba(255, 255, 255, 0.72);
}

.user-avatar-link img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.user-avatar-link:hover,
.user-avatar-link:focus-visible,
.room-avatar-link:hover,
.room-avatar-link:focus-visible {
  transform: translateY(-1px) scale(1.03);
  filter: saturate(1.1);
}

.user-avatar-link:focus-visible,
.room-avatar-link:focus-visible {
  outline: 3px solid rgba(29, 104, 216, 0.28);
  outline-offset: 3px;
}

[data-profile-target] {
  cursor: pointer;
}

[data-profile-target] button,
[data-profile-target] input,
[data-profile-target] label,
[data-profile-target] select,
[data-profile-target] textarea {
  cursor: auto;
}

img {
  display: block;
  max-width: 100%;
}

main {
  min-height: calc(100vh - 78px);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  min-height: 74px;
  padding: 12px clamp(18px, 4vw, 56px);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.login-location-prompt {
  position: sticky;
  top: 74px;
  z-index: 29;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px clamp(18px, 4vw, 56px);
  color: #12345c;
  background: #eefaf6;
  border-bottom: 1px solid #c7eadf;
  box-shadow: 0 10px 24px rgba(15, 118, 110, 0.08);
}

.login-location-prompt strong,
.login-location-prompt span {
  display: block;
}

.login-location-prompt strong {
  font-size: 14px;
  font-weight: 950;
}

.login-location-prompt span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: var(--touch);
}

.brand-mark,
.avatar-mini,
.avatar-large {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--teal));
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
}

.desktop-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.tablet-menu {
  position: relative;
  display: none;
}

.tablet-menu summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--touch);
  padding: 0 16px;
  color: var(--primary-dark);
  background: #e8f0ff;
  border: 1px solid #cfe0fb;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 900;
  list-style: none;
}

.tablet-menu summary::-webkit-details-marker {
  display: none;
}

.tablet-menu summary::before {
  content: "";
  width: 18px;
  height: 12px;
  margin-right: 8px;
  background:
    linear-gradient(var(--primary-dark), var(--primary-dark)) 0 0 / 18px 2px no-repeat,
    linear-gradient(var(--primary-dark), var(--primary-dark)) 0 5px / 18px 2px no-repeat,
    linear-gradient(var(--primary-dark), var(--primary-dark)) 0 10px / 18px 2px no-repeat;
}

.tablet-menu-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 90;
  display: grid;
  grid-template-columns: repeat(2, minmax(132px, 1fr));
  gap: 8px;
  width: min(420px, calc(100vw - 32px));
  padding: 12px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.tablet-menu-panel a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--touch);
  padding: 0 10px;
  color: var(--muted);
  background: #f6f9fc;
  border-radius: var(--radius);
  font-weight: 900;
  text-align: center;
}

.tablet-menu-panel a.active,
.tablet-menu-panel a:hover {
  color: var(--primary-dark);
  background: #e8f0ff;
}

.desktop-nav a,
.mobile-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--touch);
  padding: 0 12px;
  color: var(--muted);
  border-radius: var(--radius);
  font-weight: 700;
}

.nav-badge {
  display: inline-grid;
  min-width: 20px;
  height: 20px;
  margin-left: 6px;
  place-items: center;
  color: #fff;
  background: #e03131;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.desktop-nav a.active,
.desktop-nav a:hover,
.mobile-nav a.active {
  color: var(--primary-dark);
  background: #e8f0ff;
}

.account-strip {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.plan-status,
.language-switcher {
  display: grid;
  gap: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.language-switcher {
  width: 84px;
}

.plan-status {
  min-width: 112px;
  padding: 7px 10px;
  background: #f6f9fc;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.plan-status strong {
  color: var(--primary-dark);
  font-size: 13px;
}

.language-switcher select,
input,
select,
textarea {
  min-height: var(--touch);
  width: 100%;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
}

textarea {
  min-height: 112px;
  resize: vertical;
}

.primary-btn,
.secondary-btn,
.ghost-btn,
.danger-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--touch);
  border: 0;
  border-radius: var(--radius);
  padding: 0 18px;
  cursor: pointer;
  font-weight: 800;
  line-height: 1.15;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.primary-btn {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--teal));
  box-shadow: 0 12px 28px rgba(29, 104, 216, 0.24);
}

.secondary-btn {
  color: var(--primary-dark);
  background: #e8f0ff;
}

.ghost-btn {
  color: var(--text);
  background: #f0f4f7;
}

.danger-btn {
  color: #fff;
  background: var(--danger);
}

.primary-btn:hover,
.secondary-btn:hover,
.ghost-btn:hover,
.danger-btn:hover {
  transform: translateY(-1px);
}

.small {
  min-height: 38px;
  padding-inline: 12px;
  font-size: 14px;
}

.tiny {
  min-height: 30px;
  padding-inline: 9px;
  font-size: 12px;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled,
.disabled {
  cursor: not-allowed;
  opacity: 0.56;
}

.hero-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.72fr);
  align-items: center;
  gap: clamp(22px, 5vw, 68px);
  min-height: min(680px, 68vh);
  padding: clamp(44px, 8vw, 88px) clamp(20px, 6vw, 72px);
  background:
    linear-gradient(90deg, rgba(247, 249, 252, 0.98) 0%, rgba(247, 249, 252, 0.86) 42%, rgba(247, 249, 252, 0.35) 100%),
    url("/assets/language-rooms-hero.png") center right / cover no-repeat;
}

.hero-copy {
  max-width: 690px;
}

.hero-preview {
  display: grid;
  gap: 16px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(220, 229, 238, 0.86);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.preview-topline,
.preview-actions,
.voice-head,
.voice-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hero-preview h2 {
  font-size: clamp(26px, 3vw, 38px);
}

.voice-wave {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  align-items: end;
  gap: 8px;
  height: 72px;
  padding: 10px;
  background: #eff8f6;
  border-radius: var(--radius);
}

.voice-wave span {
  display: block;
  min-height: 14px;
  border-radius: 99px;
  background: linear-gradient(180deg, var(--teal), var(--primary));
  animation: voice-pulse 1.35s ease-in-out infinite;
}

.voice-wave span:nth-child(1) { height: 34%; animation-delay: 0ms; }
.voice-wave span:nth-child(2) { height: 70%; animation-delay: 80ms; }
.voice-wave span:nth-child(3) { height: 48%; animation-delay: 160ms; }
.voice-wave span:nth-child(4) { height: 86%; animation-delay: 240ms; }
.voice-wave span:nth-child(5) { height: 56%; animation-delay: 320ms; }
.voice-wave span:nth-child(6) { height: 40%; animation-delay: 400ms; }

@keyframes voice-pulse {
  0%, 100% { transform: scaleY(0.72); opacity: 0.72; }
  50% { transform: scaleY(1); opacity: 1; }
}

.preview-speakers,
.home-activity-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  gap: 12px;
}

.speaker-pill,
.activity-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: #f4f8fb;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.speaker-pill.speaking {
  background: #e9f9f5;
  border-color: #bce8de;
}

.activity-card {
  display: grid;
  align-content: start;
  min-height: 142px;
}

.activity-card span {
  color: var(--teal);
  font-size: 13px;
  font-weight: 900;
}

.activity-language-line,
.room-language-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.room-language-line {
  margin: 0;
}

.activity-card p {
  margin: 0;
  color: var(--muted);
}

.kicker {
  margin: 0 0 10px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.12;
}

h1 {
  max-width: 720px;
  font-size: clamp(40px, 7vw, 76px);
}

h2 {
  font-size: clamp(26px, 4vw, 42px);
}

h3 {
  font-size: 20px;
}

.hero-copy p,
.page-heading p,
.section-copy {
  max-width: 680px;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 21px);
}

.hero-actions,
.modal-actions,
.chat-tools,
.social-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.room-feedback-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  background: #fffaf0;
  border: 1px solid #f0d58b;
  border-radius: var(--radius);
}

.room-feedback-form {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) repeat(2, minmax(120px, 0.7fr)) minmax(160px, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.feedback-preview-list,
.recent-feedback-list {
  display: grid;
  gap: 8px;
}

.feedback-preview-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 54px;
  padding: 9px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(240, 213, 139, 0.72);
  border-radius: var(--radius);
}

.recent-feedback-list span {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  color: var(--muted);
  background: #fff;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 800;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.trust-row span,
.language-chip,
.room-mode-chip,
.open-chip,
.lock-chip,
.plan-highlight,
.online-status {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 10px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 800;
}

.trust-row span,
.open-chip {
  color: var(--emerald);
  background: #e7f7ee;
}

.language-chip {
  color: var(--primary-dark);
  background: #e8f0ff;
}

.language-flag-chip {
  gap: 7px;
  white-space: nowrap;
}

.language-flag-chip .flag-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  font-size: 18px;
  line-height: 1;
}

.language-flag-chip span {
  min-width: 0;
}

/*
  Country flag emoji can disappear or render as plain letters on desktop
  Windows. The app uses these small CSS flags for room language labels so the
  visual result stays consistent across phones, laptops, and desktop monitors.
*/
.flag-badge {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 30px;
  height: 21px;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.18);
  border-radius: 5px;
  background: #e8f0ff;
  box-shadow: 0 3px 8px rgba(15, 23, 42, 0.12);
}

.flag-badge span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: transparent;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
}

.flag-world {
  background:
    radial-gradient(circle at 35% 35%, #ffffff 0 13%, transparent 14%),
    linear-gradient(135deg, #2f80ed, #0f9f8f);
}

.flag-world span {
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(15, 23, 42, 0.35);
}

.flag-us {
  background: repeating-linear-gradient(to bottom, #b22234 0 2px, #ffffff 2px 4px);
}

.flag-us::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 45%;
  height: 55%;
  background: #3c3b6e;
}

.flag-kr {
  background: #ffffff;
}

.flag-kr::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(to bottom, #cd2e3a 0 50%, #0047a0 50% 100%);
  transform: translate(-50%, -50%) rotate(25deg);
}

.flag-vn,
.flag-cn {
  background: #da251d;
}

.flag-vn::after,
.flag-cn::after {
  content: "★";
  position: absolute;
  left: 50%;
  top: 50%;
  color: #ffde00;
  font-size: 13px;
  line-height: 1;
  transform: translate(-50%, -50%);
}

.flag-cn::after {
  left: 34%;
  top: 36%;
  font-size: 11px;
}

.flag-es {
  background: linear-gradient(to bottom, #aa151b 0 25%, #f1bf00 25% 75%, #aa151b 75% 100%);
}

.flag-jp {
  background: #ffffff;
}

.flag-jp::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #bc002d;
  transform: translate(-50%, -50%);
}

.flag-fr,
.flag-it {
  background: linear-gradient(to right, #0055a4 0 33%, #ffffff 33% 66%, #ef4135 66% 100%);
}

.flag-it {
  background: linear-gradient(to right, #009246 0 33%, #ffffff 33% 66%, #ce2b37 66% 100%);
}

.flag-de {
  background: linear-gradient(to bottom, #000000 0 33%, #dd0000 33% 66%, #ffce00 66% 100%);
}

.flag-ru {
  background: linear-gradient(to bottom, #ffffff 0 33%, #0039a6 33% 66%, #d52b1e 66% 100%);
}

.flag-ae {
  background:
    linear-gradient(to right, #ce1126 0 25%, transparent 25% 100%),
    linear-gradient(to bottom, #009a44 0 33%, #ffffff 33% 66%, #000000 66% 100%);
}

.flag-in {
  background: linear-gradient(to bottom, #ff9933 0 33%, #ffffff 33% 66%, #138808 66% 100%);
}

.flag-in::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 7px;
  height: 7px;
  border: 1.5px solid #000080;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.flag-th {
  background: linear-gradient(to bottom, #a51931 0 17%, #ffffff 17% 30%, #2d2a4a 30% 70%, #ffffff 70% 83%, #a51931 83% 100%);
}

.flag-br {
  background: #009b3a;
}

.flag-br::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 15px;
  height: 15px;
  background: #ffdf00;
  transform: translate(-50%, -50%) rotate(45deg);
}

.flag-br::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #002776;
  transform: translate(-50%, -50%);
}

.room-mode-chip {
  color: #073b4c;
  background: #dff7fb;
  border: 1px solid #bdeaf0;
}

.room-mode-chip.voice {
  color: #6d3b00;
  background: #fff0d7;
  border-color: #f5c878;
}

.room-mode-chip.chat_voice {
  color: #063f2f;
  background: #def7eb;
  border-color: #a9e3c6;
}

.room-mode-chip.chat_voice_video {
  color: #42258f;
  background: #eee8ff;
  border-color: #d3c5ff;
}

.room-mode-chip.large {
  min-height: 34px;
  font-size: 14px;
}

.lock-chip {
  color: #7a5200;
  background: #fff3cd;
}

.section,
.page-heading,
.chat-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.section {
  padding: 42px 0;
}

.page-heading {
  padding: 48px 0 18px;
}

.page-heading h1 {
  font-size: clamp(36px, 6vw, 62px);
}

.two-column,
.split-form,
.dm-layout,
.public-profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.8fr);
  gap: 28px;
  align-items: start;
}

.feature-grid,
.pricing-grid,
.profile-grid,
.admin-grid,
.room-list,
.announcement-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 16px;
}

.feature-card,
.room-card,
.pricing-card,
.profile-card,
.profile-result-card,
.announcement-card,
.story-card,
.activity-card,
.form-panel,
.side-panel,
.lock-panel,
.auth-panel,
.verified-band,
.profile-summary,
.profile-detail,
.member-panel,
.chat-panel,
.dm-list,
.dm-thread {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 28px rgba(35, 48, 76, 0.07);
}

.feature-card,
.room-card,
.pricing-card,
.profile-card,
.profile-result-card,
.announcement-card,
.story-card,
.activity-card,
.form-panel,
.side-panel,
.lock-panel,
.profile-summary,
.profile-detail,
.dm-list,
.dm-thread {
  padding: 20px;
}

.current-talking-room-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px;
  color: #fff;
  background: linear-gradient(135deg, #102033, #0f766e);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  box-shadow: 0 18px 38px rgba(15, 118, 110, 0.2);
}

.current-talking-room-card h3,
.current-talking-room-card p {
  margin: 0;
}

.current-talking-room-card > div:first-child {
  display: grid;
  gap: 7px;
  min-width: min(100%, 320px);
}

.current-talking-room-card > div:first-child > span {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.current-talking-room-card small {
  color: #d8f7f1;
  font-weight: 800;
}

.current-room-actions {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.current-room-actions strong {
  font-size: 13px;
}

.feature-card p,
.room-card p,
.pricing-card p,
.profile-card p,
.announcement-card p,
.story-card p,
.partner-result-card p,
.side-panel p,
.lock-panel p {
  color: var(--muted);
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.metric {
  min-height: 88px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.metric strong,
.metric span {
  display: block;
}

.metric strong {
  font-size: 22px;
}

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

.announcement-card {
  display: grid;
  gap: 12px;
  align-content: start;
  background: linear-gradient(180deg, #fff, #f7fbff);
}

.announcement-card.hot-event {
  border-color: #f0d58b;
  background: linear-gradient(180deg, #fffaf0, #fff);
}

.announcement-card.security {
  border-color: #ffc9b8;
  background: linear-gradient(180deg, #fff1ec, #fff);
}

.announcement-topline,
.announcement-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.announcement-topline span {
  min-height: 28px;
  padding: 4px 9px;
  color: var(--primary-dark);
  background: #e8f0ff;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 900;
}

.announcement-topline em,
.announcement-footer strong {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.room-list.compact {
  grid-template-columns: 1fr;
}

.room-card {
  display: grid;
  gap: 12px;
}

/*
  Secure2Talk room cards use an original bright "conversation studio" layout:
  a host spotlight, a live-speaker panel, and a small capacity meter.  The
  structure keeps avatars readable on phones while staying visually distinct.
*/
.voice-room-card {
  position: relative;
  isolation: isolate;
  min-height: 332px;
  overflow: hidden;
  align-content: start;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 251, 255, 0.98)),
    linear-gradient(135deg, rgba(29, 104, 216, 0.08), transparent 42%, rgba(15, 159, 143, 0.08));
  border-color: #d5e4f2;
  border-left: 6px solid var(--primary);
  box-shadow: 0 16px 34px rgba(35, 48, 76, 0.1);
}

.voice-room-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(29, 104, 216, 0.07) 0 1px, transparent 1px 100%),
    linear-gradient(180deg, rgba(15, 159, 143, 0.06), transparent 34%);
  background-size: 18px 18px, auto;
  opacity: 0.9;
}

.voice-room-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-color: rgba(255, 255, 255, 0.8);
  border-style: solid;
  border-width: 1px;
  border-radius: inherit;
  pointer-events: none;
}

.voice-room-card.hot {
  border-color: #e8d39a;
  border-left-color: var(--gold);
  box-shadow: 0 18px 38px rgba(197, 139, 18, 0.13), 0 10px 28px rgba(35, 48, 76, 0.08);
}

.voice-room-card.hot::before {
  background:
    linear-gradient(90deg, rgba(197, 139, 18, 0.09) 0 1px, transparent 1px 100%),
    linear-gradient(180deg, rgba(255, 248, 232, 0.9), transparent 42%);
  background-size: 18px 18px, auto;
}

.voice-room-card.private {
  border-left-color: var(--purple);
}

.voice-room-card.full {
  border-left-color: var(--danger);
}

.voice-room-card h3,
.voice-room-card p {
  margin: 0;
}

.voice-room-card h3 {
  color: var(--text);
  font-size: 19px;
}

.voice-room-card p,
.voice-room-card .room-actions span,
.room-host-row > span {
  color: var(--muted);
}

.room-title-pill {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.room-title-pill .language-chip {
  color: var(--primary-dark);
  background: #e8f0ff;
  border-color: #d5e4f8;
}

.room-title-pill > span:not(.language-chip):not(.room-mode-chip) {
  color: var(--muted);
  font-size: 12px;
  font-style: italic;
  font-weight: 800;
}

.room-card-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.room-stage {
  display: grid;
  grid-template-columns: minmax(118px, 0.75fr) minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  min-height: 150px;
  padding: 10px 0 4px;
  justify-items: stretch;
}

.room-host-spotlight {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 8px;
  min-height: 142px;
  padding: 14px 10px;
  background: linear-gradient(180deg, #fff, #eef8ff);
  border: 1px solid #d8e9f8;
  border-radius: var(--radius);
}

.room-host-spotlight > span {
  color: var(--primary-dark);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.room-stage-avatar {
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #1d68d8, #0f9f8f);
  border: 3px solid #fff;
  border-radius: 50%;
  font-weight: 900;
  text-decoration: none;
}

.room-stage-avatar.main-speaker {
  width: 104px;
  height: 104px;
  color: #fff;
  font-size: 30px;
  border: 4px solid #fff;
  box-shadow:
    0 0 0 4px rgba(29, 104, 216, 0.14),
    0 16px 28px rgba(29, 104, 216, 0.2);
}

.voice-room-card.hot .room-stage-avatar.main-speaker {
  box-shadow:
    0 0 0 4px rgba(197, 139, 18, 0.2),
    0 16px 28px rgba(197, 139, 18, 0.18);
}

.room-stage-avatar img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.room-host-row {
  flex-wrap: wrap;
}

.room-host-row .avatar-mini {
  width: 34px;
  height: 34px;
  font-size: 12px;
}

.room-card-meter {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.room-roomcast-panel {
  display: grid;
  align-content: center;
  gap: 12px;
  min-width: 0;
  min-height: 142px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(213, 228, 242, 0.9);
  border-radius: var(--radius);
}

.room-wave-mini {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  align-items: end;
  height: 28px;
  margin-bottom: 2px;
}

.room-wave-mini i {
  display: block;
  height: 12px;
  background: linear-gradient(180deg, var(--teal), var(--primary));
  border-radius: 99px;
}

.room-wave-mini i:nth-child(2) {
  height: 22px;
}

.room-wave-mini i:nth-child(3) {
  height: 16px;
}

.room-wave-mini i:nth-child(4) {
  height: 24px;
}

.room-avatar-rail {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.room-avatar-rail-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.room-avatar-stack {
  display: flex;
  align-items: center;
  min-width: 0;
  overflow-x: auto;
  padding: 2px 0 7px;
  scrollbar-width: none;
}

.room-avatar-stack::-webkit-scrollbar {
  display: none;
}

.room-rail-avatar,
.room-avatar-overflow {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  margin-left: -10px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--teal));
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 8px 18px rgba(35, 48, 76, 0.12);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.room-rail-avatar:first-child,
.room-avatar-overflow:first-child {
  margin-left: 0;
}

.room-rail-avatar img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.room-avatar-overflow {
  color: var(--primary-dark);
  background: #e8f0ff;
  border-color: #fff;
}

.room-speaker-mini {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  min-height: 40px;
  padding: 7px 9px;
  background: #fff;
  border: 1px solid #e0eaf3;
  border-radius: var(--radius);
}

.room-speaker-mini .avatar-mini {
  width: 30px;
  height: 30px;
  font-size: 11px;
}

.room-speaker-mini span {
  min-width: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.room-speaker-mini.waiting {
  grid-template-columns: 1fr;
  background: #f6f9fc;
  border-style: dashed;
}

.room-speaker-mini.waiting span {
  color: var(--muted);
}

.voice-room-card .capacity {
  background: #dfe9f3;
}

.voice-room-card .capacity span {
  background: linear-gradient(90deg, var(--teal), var(--primary));
}

.room-card-meter strong {
  color: var(--primary-dark);
}

.voice-room-card .ghost-btn:disabled {
  color: var(--muted);
  background: #f1f5f9;
  border: 1px dashed #b8c7d6;
}

.private-room-card-entry {
  display: grid;
  grid-template-columns: minmax(96px, 128px) auto;
  gap: 8px;
  align-items: center;
  margin-left: auto;
}

.private-room-card-entry input {
  min-height: 38px;
  width: 100%;
  padding: 0 10px;
  font-weight: 900;
  text-align: center;
  border: 1px solid #c9dcff;
  border-radius: var(--radius);
}

.room-list {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr));
}

.verified-location-chip {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  color: #075985;
  background: #e0f2fe;
  border: 1px solid #bae6fd;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.room-topline,
.room-actions,
.room-exit-bar,
.host-row,
.member-row,
.profile-head,
.profile-editor-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.room-topline,
.room-actions,
.room-exit-bar,
.profile-head {
  justify-content: space-between;
}

.room-topline,
.room-exit-bar {
  flex-wrap: wrap;
}

.member-list {
  display: flex;
  gap: 8px;
  align-items: stretch;
  flex-wrap: wrap;
  max-width: 100%;
  max-height: 320px;
  overflow: auto;
  padding: 4px 2px 10px;
  scrollbar-width: thin;
}

.member-list.video-gallery-active {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 10px;
  max-height: min(38vh, 360px);
  overflow: auto;
  padding-right: 4px;
}

.room-mode-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 10px 0 4px;
}

.room-mode-strip > span:last-child {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.member-row {
  display: grid;
  grid-template-rows: auto minmax(30px, auto) auto;
  justify-items: center;
  align-items: start;
  gap: 6px;
  flex: 0 1 92px;
  min-height: 126px;
  padding: 9px 7px;
  text-align: center;
  background: #f8fbff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.member-row .avatar-mini {
  width: 58px;
  height: 58px;
  font-size: 18px;
  box-shadow: 0 0 0 3px #fff, 0 10px 20px rgba(35, 48, 76, 0.1);
}

.member-avatar-surface {
  display: grid;
  place-items: center;
}

.member-media-select {
  position: relative;
  display: grid;
  width: 100%;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  color: #fff;
  background: #0f172a;
  border: 2px solid #48c6b4;
  border-radius: var(--radius);
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.18);
}

.member-media-select.selected {
  border-color: #ffc857;
  box-shadow: 0 0 0 3px rgba(255, 200, 87, 0.28), 0 16px 32px rgba(15, 23, 42, 0.22);
}

.member-media-slot {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 4 / 3;
  min-height: 64px;
  overflow: hidden;
  background: #060b14;
}

.member-media-slot em {
  padding: 4px 7px;
  color: #dbeafe;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}

.member-media-slot video,
.member-media-focus-slot video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.member-media-slot.screen video,
.member-media-focus-slot.screen video {
  object-fit: contain;
  background: #020617;
}

.member-media-select b {
  position: absolute;
  top: 5px;
  left: 5px;
  padding: 3px 6px;
  color: #fff;
  background: rgba(15, 23, 42, 0.78);
  border-radius: 6px;
  font-size: 10px;
  line-height: 1;
}

.member-row.host {
  flex-basis: 108px;
  background: #fff7ed;
  border-color: #fed7aa;
}

.member-row.host .avatar-mini {
  width: 66px;
  height: 66px;
  box-shadow: 0 0 0 4px #fff, 0 14px 28px rgba(194, 65, 12, 0.15);
}

.member-row.self {
  background: #eef5ff;
  border-color: #c9dcff;
}

.member-row.speaking {
  background: #eefaf6;
  border-color: #9edfcf;
}

.member-row.video,
.member-row.screen {
  flex-basis: 132px;
  background: #f8fbff;
  border-color: #9edfcf;
}

.member-row.host.video,
.member-row.host.screen {
  flex-basis: 144px;
}

.member-list.video-gallery-active .member-row {
  flex: 1 0 148px;
  min-height: 164px;
}

.member-list.video-gallery-active .member-row.video,
.member-list.video-gallery-active .member-row.screen {
  min-height: 190px;
}

.member-list.video-gallery-active .member-media-slot {
  min-height: 96px;
}

.member-list.video-gallery-active .member-row .avatar-mini {
  width: 72px;
  height: 72px;
}

.member-row.recent-join {
  position: relative;
  background: #fffaf0;
  border-color: #ffcf70;
  box-shadow: 0 0 0 2px rgba(255, 183, 77, 0.25), 0 16px 32px rgba(255, 146, 43, 0.15);
  animation: member-join-pop 900ms ease both;
}

.member-row.recent-join .avatar-mini,
.voice-member.recent-join .avatar-mini {
  box-shadow: 0 0 0 4px rgba(255, 183, 77, 0.32), 0 0 26px rgba(255, 146, 43, 0.42);
}

.member-row span,
.member-row small {
  display: block;
  min-width: 0;
}

.member-row-meta {
  width: 100%;
}

.member-row-meta a {
  display: block;
  overflow: hidden;
  font-size: 13px;
  font-weight: 950;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-row small {
  color: var(--muted);
  overflow: hidden;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-voice-meter {
  display: block;
  width: 100%;
  height: 6px;
  margin-top: 6px;
  overflow: hidden;
  background: #dbe5ee;
  border-radius: 99px;
}

.member-voice-meter em {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--teal));
  border-radius: inherit;
  transition: width 120ms ease;
}

.voice-state-pill {
  min-width: 70px;
  padding: 6px 9px;
  color: var(--muted);
  background: #edf1f5;
  border-radius: var(--radius);
  font-size: 11px;
  font-weight: 900;
  text-align: center;
}

.voice-state-pill.speaking {
  color: #066047;
  background: #dff6ec;
}

.voice-state-pill.muted {
  color: #6b7280;
  background: #eef1f5;
}

.voice-state-pill.listener {
  color: #075985;
  background: #e0f2fe;
}

.avatar-mini {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 15px;
}

.avatar-large {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  font-size: 30px;
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.45);
}

.avatar-effect-gold-glow {
  box-shadow: 0 0 0 4px #fff, 0 0 0 8px rgba(197, 139, 18, 0.4), 0 0 34px rgba(197, 139, 18, 0.55);
}

.avatar-effect-study-ring {
  box-shadow: 0 0 0 4px #fff, 0 0 0 9px rgba(15, 159, 143, 0.35);
}

.avatar-effect-host-spark {
  box-shadow: 0 0 0 4px #fff, 0 0 0 8px rgba(124, 58, 237, 0.28), 0 0 28px rgba(29, 104, 216, 0.35);
}

.feedback-badge {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 6px 9px;
  color: #14304f;
  background: #fff8e8;
  border: 1px solid #f0d58b;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 900;
}

.feedback-badge.profile {
  display: flex;
  justify-content: center;
  width: 100%;
}

.feedback-badge.empty {
  background: #f2f6fb;
  border-color: var(--line);
}

.feedback-badge span {
  color: var(--muted);
}

.rating-stars {
  display: inline-flex;
  gap: 1px;
  color: #c6ced8;
  font-size: 14px;
  line-height: 1;
}

.rating-stars .filled {
  color: #f59f00;
  text-shadow: 0 0 10px rgba(245, 159, 0, 0.2);
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 9px;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 900;
}

.badge.free {
  color: var(--muted);
  background: #edf1f5;
}

.badge.go,
.badge.plus,
.badge.pro {
  color: #704900;
  background: #fff0c7;
}

.badge.pro_max {
  color: #46278a;
  background: #efe8ff;
}

.badge.pro_max_plus {
  color: #063f2f;
  background: #dff6ec;
}

.plan-type-highlight {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  min-height: 36px;
  padding: 6px 11px 6px 7px;
  color: #18304d;
  background: linear-gradient(135deg, #ffffff, #eaf3ff);
  border: 1px solid #c7dcf7;
  border-radius: var(--radius);
  box-shadow: 0 10px 22px rgba(29, 104, 216, 0.1);
  font-size: 13px;
  font-weight: 950;
}

.plan-type-icon {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--teal));
  border-radius: 50%;
  font-size: 11px;
  line-height: 1;
}

.plan-type-highlight.free .plan-type-icon {
  background: linear-gradient(135deg, #718096, #394655);
}

.plan-type-highlight.go .plan-type-icon,
.plan-type-highlight.plus .plan-type-icon,
.plan-type-highlight.pro .plan-type-icon {
  background: linear-gradient(135deg, #f59f00, #d96b00);
}

.plan-type-highlight.pro_max .plan-type-icon {
  background: linear-gradient(135deg, #6d4bd6, #14a3a1);
}

.plan-type-highlight.pro_max_plus {
  color: #063f2f;
  background: linear-gradient(135deg, #effff8, #dff6ec);
  border-color: #a6e4cd;
}

.plan-type-highlight.pro_max_plus .plan-type-icon {
  background: linear-gradient(135deg, #087f5b, #1d68d8);
}

.profile-plan-language-stack {
  display: grid;
  gap: 7px;
  margin-top: 6px;
}

.profile-plan-language-stack p {
  margin: 0;
  color: var(--muted);
  font-weight: 850;
}

.capacity {
  height: 8px;
  overflow: hidden;
  background: #e8edf3;
  border-radius: 99px;
}

.capacity span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--primary));
}

.filter-bar,
.usage-band,
.verified-band,
.auth-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
  justify-content: space-between;
}

.filter-bar {
  flex: 1 1 auto;
}

.explore-search-bar {
  align-items: end;
}

.explore-userid-search span {
  display: inline-flex;
  width: fit-content;
  padding: 4px 9px;
  color: var(--primary-dark);
  background: #e8f0ff;
  border: 1px solid #cfe0fb;
  border-radius: var(--radius);
  font-weight: 950;
}

.filter-bar label,
.form-panel label {
  display: grid;
  gap: 6px;
  min-width: 170px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.filter-bar label.wide-filter {
  flex: 1 1 280px;
  min-width: min(100%, 280px);
}

.distance-control {
  display: grid;
  gap: 8px;
  min-width: 210px;
}

.distance-control label {
  min-width: 0;
  width: 100%;
}

.filter-bar input[name="exploreSearch"] {
  min-width: 0;
}

.checkbox-label {
  display: inline-flex !important;
  grid-template-columns: none !important;
  align-items: center;
  min-height: var(--touch);
  gap: 8px;
}

.checkbox-label input {
  width: 18px;
  min-height: 18px;
}

.usage-band {
  padding: 12px 14px;
  background: #eff8f6;
  border: 1px solid #cde8e2;
  border-radius: var(--radius);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.form-panel {
  display: grid;
  gap: 16px;
}

.form-panel.wide {
  width: 100%;
}

.profile-edit-stack {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.profile-result-card {
  display: grid;
  gap: 16px;
  background: linear-gradient(180deg, #fff, #f8fbff);
}

.profile-result-head {
  align-items: flex-start;
}

.profile-result-head > div {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.profile-result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr));
  gap: 10px;
}

.profile-result-grid span {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 12px;
  background: #fff;
  border: 1px solid #dbe9ff;
  border-radius: var(--radius);
}

.profile-result-grid strong {
  overflow-wrap: anywhere;
  color: var(--primary-dark);
  font-size: 13px;
}

.profile-result-grid small {
  color: var(--muted);
  font-weight: 800;
}

.partner-location-panel,
.partner-search-controls,
.partner-results-section {
  display: grid;
  gap: 16px;
}

.partner-location-panel {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  background: linear-gradient(135deg, #ffffff, #eef8f4);
  border: 1px solid #cde8e2;
  border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(15, 118, 110, 0.09);
}

.partner-filter-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 168px), 1fr));
  align-items: end;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.connect-search-controls .partner-filter-bar {
  align-items: end;
}

.connect-search-controls .partner-filter-bar button {
  min-width: 0;
}

.age-range-filter {
  min-width: 0;
}

.age-range-inputs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.age-range-inputs input {
  min-width: 0;
}

.distance-preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.distance-preset {
  width: auto;
  min-height: 30px;
  padding: 6px 9px;
  border: 1px solid #cfe0f3;
  border-radius: 999px;
  background: #f7fbff;
  color: #0f3d68;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.distance-preset.active,
.distance-preset:hover {
  border-color: var(--primary);
  background: #e9f3ff;
  color: var(--primary);
}

.partner-rule-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  color: #24425f;
  background: #edf6ff;
  border: 1px solid #d2e7ff;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 800;
}

.partner-result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 245px), 1fr));
  gap: 16px;
}

.connect-result-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
}

.partner-result-card {
  display: grid;
  align-content: start;
  gap: 14px;
  min-width: 0;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 30px rgba(35, 48, 76, 0.08);
}

.connect-result-card {
  overflow: hidden;
}

.partner-result-card.locked {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(29, 104, 216, 0.08), rgba(15, 159, 143, 0.08)),
    #fff;
}

.partner-result-card.locked::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  backdrop-filter: blur(1.5px);
  opacity: 0.35;
}

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

.partner-avatar {
  width: 76px;
  height: 76px;
  font-size: 24px;
}

.partner-avatar-blur {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, #ffffff 0 16%, transparent 17%),
    linear-gradient(135deg, #1d68d8, #0f9f8f);
  filter: blur(4px) saturate(0.8);
  opacity: 0.75;
}

.partner-card-body {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.partner-card-body h3,
.partner-card-body p {
  margin: 0;
}

.partner-distance {
  display: inline-flex;
  width: fit-content;
  padding: 6px 10px;
  color: #084c42;
  background: #dcf7f1;
  border: 1px solid #b9ece1;
  border-radius: var(--radius);
  font-size: 13px;
}

.partner-hidden-lines {
  display: grid;
  gap: 7px;
}

.partner-hidden-lines span {
  display: block;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, #d8e5ef, #edf3f8);
}

.connect-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  width: fit-content;
  padding: 6px;
  background: #eef4fb;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.section.connect-tabs {
  padding: 6px;
}

.connect-tabs button {
  min-height: 40px;
  padding: 9px 14px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: calc(var(--radius) - 2px);
  font-weight: 950;
}

.connect-tabs button.active {
  color: var(--primary-dark);
  background: #fff;
  box-shadow: 0 8px 18px rgba(35, 48, 76, 0.08);
}

.connect-page-stack,
.connect-search-summary-grid,
.connect-profile-section,
.connect-guideline-panel,
.connect-usage-panel,
.connect-orders-panel {
  display: grid;
  gap: 16px;
}

.connect-search-summary-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.connect-profile-section {
  grid-template-columns: minmax(300px, 0.78fr) minmax(0, 1.42fr);
  align-items: start;
}

.connect-profile-preview,
.connect-guideline-panel,
.connect-usage-panel {
  padding: 18px;
  background: linear-gradient(135deg, #ffffff, #f3fbf8);
  border: 1px solid #cde8e2;
  border-radius: var(--radius);
  box-shadow: 0 12px 30px rgba(15, 118, 110, 0.08);
}

.connect-profile-preview {
  position: sticky;
  top: 94px;
}

.connect-photo-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.connect-photo-strip img,
.connect-photo-strip span {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius);
}

.connect-photo-strip img {
  object-fit: cover;
  background: #edf3f8;
}

.connect-photo-strip span {
  display: grid;
  place-items: center;
  color: var(--muted);
  background: #f4f7fa;
  border: 1px dashed #b9c5d4;
  font-size: 12px;
  font-weight: 900;
}

.connect-photo-strip.compact {
  gap: 6px;
}

.connect-profile-form {
  min-width: 0;
}

.connect-profile-form fieldset {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.connect-profile-form textarea,
.connect-profile-form input,
.connect-profile-form select {
  min-width: 0;
}

.connect-location-readonly input[readonly] {
  background: #f7fbff;
  border-style: dashed;
  cursor: default;
}

.connect-location-verify-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  padding: 14px 16px;
  background: linear-gradient(135deg, #f8fcff, #eefaf6);
  border: 1px solid #cfe4db;
  border-radius: var(--radius);
}

.connect-location-verify-copy,
.connect-location-verify-actions {
  display: grid;
  gap: 10px;
}

.connect-location-verify-actions {
  align-content: start;
}

.connect-location-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.connect-photo-upload-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
  gap: 12px;
}

.connect-photo-uploader {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 10px;
  background: #f7fbff;
  border: 1px solid #d5e6f8;
  border-radius: var(--radius);
}

.connect-photo-upload-preview {
  display: grid;
  place-items: center;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 1;
  color: var(--muted);
  background: linear-gradient(135deg, #eef6ff, #f7fbff);
  border: 1px dashed #aebdd0;
  border-radius: var(--radius);
  text-align: center;
}

.connect-photo-upload-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.connect-photo-upload-preview span {
  color: var(--primary-dark);
  font-size: 14px;
  font-weight: 950;
}

.connect-photo-upload-preview small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.connect-photo-upload-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.connect-photo-upload-action {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.connect-photo-upload-action input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.connect-offer-preview,
.connect-flow-grid,
.connect-order-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  gap: 10px;
}

.connect-offer-preview span,
.connect-flow-grid span,
.connect-order-card {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 12px;
  background: #fff;
  border: 1px solid #d8efe7;
  border-radius: var(--radius);
}

.connect-offer-preview strong,
.connect-flow-grid strong,
.connect-order-card strong {
  color: var(--primary-dark);
}

.connect-offer-preview small,
.connect-flow-grid small,
.connect-order-card span,
.connect-order-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.connect-offer-editor {
  display: grid;
  gap: 12px;
}

.connect-offer-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1.15fr) minmax(92px, 0.45fr) minmax(100px, 0.55fr);
  gap: 10px;
  align-items: end;
  padding: 12px;
  background: #f7fbff;
  border: 1px solid #d7e7f8;
  border-radius: var(--radius);
}

.connect-offer-row label {
  min-width: 0;
}

.connect-offer-row .full-span {
  grid-column: 1 / -1;
}

.connect-usage-panel {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.connect-token-box {
  display: grid;
  gap: 8px;
  justify-items: end;
}

.connect-token-box .primary-btn,
.connect-token-box .secondary-btn {
  width: 100%;
}

.connect-token-box span {
  display: grid;
  justify-items: end;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.connect-token-box strong {
  color: var(--primary-dark);
  font-size: 26px;
}

.connect-offer-list {
  display: grid;
  gap: 8px;
}

.connect-offer-button {
  display: grid;
  gap: 3px;
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  color: var(--primary-dark);
  background: #f4fbff;
  border: 1px solid #cfe3fb;
  border-radius: var(--radius);
  text-align: left;
  cursor: pointer;
}

.connect-offer-button:hover {
  background: #e9f6ff;
  border-color: #95c7f5;
}

.connect-offer-button span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.partner-hidden-lines span:nth-child(2) {
  width: 74%;
}

.partner-hidden-lines span:nth-child(3) {
  width: 48%;
}

.config-disclosure {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.config-disclosure summary {
  display: grid;
  gap: 2px;
  min-height: var(--touch);
  padding: 11px 13px;
  color: var(--primary-dark);
  background: #eef5ff;
  border: 1px solid #c9dcff;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 900;
  list-style: none;
}

.config-disclosure summary::-webkit-details-marker {
  display: none;
}

.config-disclosure summary span::after {
  content: " +";
}

.config-disclosure[open] summary span::after {
  content: " -";
}

.config-disclosure summary small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.config-disclosure:not([open]) > :not(summary) {
  display: none !important;
}

.config-disclosure > .form-panel,
.config-disclosure > .language-verification-panel {
  margin-top: 4px;
}

.best-friends-config .best-friend-grid {
  margin-top: 4px;
}

.full-span {
  grid-column: 1 / -1;
}

fieldset {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.learning-language-editor,
.language-verification-form {
  display: grid;
  gap: 12px;
}

.learning-language-editor-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 12px;
}

.language-profile-block {
  display: grid;
  gap: 10px;
  width: 100%;
  padding: 12px;
  background: #f7fbff;
  border: 1px solid #d7e7f8;
  border-radius: var(--radius);
}

.language-profile-block.compact {
  padding: 10px;
}

.language-profile-row,
.language-learning-list {
  display: grid;
  gap: 7px;
}

.language-profile-row > span,
.language-learning-list > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.learning-language-pill,
.verified-language-badge {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 36px;
  padding: 8px 10px;
  color: #12345c;
  background: #fff;
  border: 1px solid #dbe7f2;
  border-radius: var(--radius);
  font-size: 13px;
}

.learning-language-pill em {
  color: var(--teal-dark);
  font-style: normal;
  font-weight: 900;
}

.verified-language-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.verified-language-badge {
  border-color: #bfe7dc;
  background: #effaf6;
}

.verified-language-badge b {
  color: var(--teal-dark);
}

.language-verification-panel,
.language-review-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.language-verification-history,
.language-review-list {
  display: grid;
  gap: 10px;
}

.verification-history-row,
.language-review-row {
  display: grid;
  gap: 8px;
  padding: 12px;
  background: #f7f9fc;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.language-review-row {
  grid-template-columns: minmax(220px, 1.4fr) auto minmax(160px, 1fr) auto auto;
  align-items: center;
}

.language-review-row > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.language-review-row small,
.verification-history-row span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

legend {
  padding: 0 6px;
  font-weight: 900;
}

.inline-lock,
.locked-copy,
.chat-warning {
  padding: 12px 14px;
  color: #744d00;
  background: #fff6d9;
  border: 1px solid #f0d58b;
  border-radius: var(--radius);
}

.current-room-user-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  background: linear-gradient(180deg, #f7fbff, #eef7ff);
  border: 1px solid #cfe2f4;
  border-radius: var(--radius);
}

.current-room-user-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.current-room-user-head h3,
.current-room-user-head p {
  margin: 0;
}

.current-room-user-head > span {
  min-height: 28px;
  padding: 5px 10px;
  color: #066047;
  background: #dff6ec;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 900;
}

.current-room-user-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: stretch;
}

.current-room-user-avatar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  flex: 1 1 176px;
  max-width: 250px;
  min-height: 76px;
  padding: 10px;
  background: #fff;
  border: 1px solid #dbe7f3;
  border-radius: var(--radius);
  box-shadow: 0 10px 22px rgba(35, 48, 76, 0.06);
}

.current-room-user-avatar.host {
  border-color: #b9d2ff;
  background: #f0f6ff;
}

.current-room-user-avatar.speaking {
  border-color: #9edfcf;
  background: #eefaf6;
  box-shadow: 0 0 0 2px rgba(20, 184, 166, 0.12), 0 14px 28px rgba(20, 184, 166, 0.12);
}

.current-room-user-avatar.listener,
.current-room-user-avatar.muted {
  background: #f8fbff;
}

.current-room-user-avatar.recent-join {
  border-color: #ffc857;
  background: #fff8e7;
  animation: member-join-pop 900ms ease both;
}

.current-room-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  border-radius: 50%;
  font-size: 17px;
}

.current-room-user-avatar.speaking .current-room-avatar {
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.2), 0 0 22px rgba(20, 184, 166, 0.28);
}

.current-room-user-avatar strong,
.current-room-user-avatar span {
  display: block;
  min-width: 0;
}

.current-room-user-avatar strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.current-room-user-avatar span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.current-room-user-meter {
  display: block;
  height: 6px;
  margin-top: 7px;
  overflow: hidden;
  background: #dbe5ee;
  border-radius: 99px;
}

.current-room-user-meter em {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--teal));
  border-radius: inherit;
  transition: width 120ms ease;
}

.current-room-user-avatar.listener .current-room-user-meter em,
.current-room-user-avatar.muted .current-room-user-meter em {
  background: #ccd6e1;
}

.permission-list,
.step-list,
.privacy-toggles {
  display: grid;
  gap: 10px;
}

.permission-list span,
.step-list span {
  padding: 10px 12px;
  background: #f2f6fb;
  border-radius: var(--radius);
  color: var(--muted);
}

.pricing-grid {
  align-items: stretch;
}

.pricing-card {
  position: relative;
  display: grid;
  gap: 14px;
}

.pricing-card.active {
  border-color: var(--teal);
  box-shadow: 0 18px 38px rgba(15, 159, 143, 0.18);
}

.plan-highlight {
  position: absolute;
  top: 12px;
  right: 12px;
  color: #063f2f;
  background: #dff6ec;
}

.plan-head {
  display: grid;
  gap: 8px;
  padding-top: 10px;
}

.price strong {
  font-size: 36px;
}

.price span,
.vnd-price {
  color: var(--muted);
}

.vnd-price {
  font-size: 13px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.pricing-card ul,
.safety-list {
  display: grid;
  gap: 9px;
  margin: 0;
  padding-left: 20px;
}

.form-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.section-intro-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.6fr);
  gap: 18px;
  align-items: end;
  margin-bottom: 18px;
}

.section-intro-row p:last-child {
  margin: 0;
  color: var(--muted);
}

.dashboard-grid,
.safety-chart-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.75fr);
  gap: 16px;
  align-items: stretch;
  min-width: 0;
}

.ranking-grid,
.safety-case-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 16px;
  margin-top: 16px;
}

.ranking-card,
.chart-card,
.location-card,
.safety-chart-card,
.safety-case-card,
.safety-alert-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 28px rgba(35, 48, 76, 0.07);
}

.ranking-card,
.chart-card,
.location-card,
.safety-chart-card,
.safety-case-card {
  min-width: 0;
  padding: 18px;
}

.ranking-card h3,
.chart-card h3,
.safety-chart-card h3,
.safety-case-card h3 {
  font-size: 20px;
}

.ranking-list,
.world-list,
.pie-legend,
.safety-bar-list,
.location-status {
  display: grid;
  gap: 10px;
}

.nearby-support-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  gap: 10px;
}

.nearby-support-grid div {
  display: grid;
  gap: 4px;
  min-height: 86px;
  padding: 12px;
  background: #fff8e8;
  border: 1px solid #f0d58b;
  border-radius: var(--radius);
}

.nearby-support-grid div.ready {
  background: #eefbf7;
  border-color: #bce8de;
}

.nearby-support-grid strong,
.nearby-support-grid span {
  display: block;
}

.nearby-support-grid span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.cup-ranking-board,
.online-mode-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 28px rgba(35, 48, 76, 0.07);
}

.cup-ranking-board {
  position: relative;
  overflow: hidden;
  margin-bottom: 16px;
  padding: 20px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(8, 21, 44, 0.94), rgba(23, 70, 96, 0.9)),
    radial-gradient(circle at 20% 0%, rgba(255, 194, 87, 0.28), transparent 36%),
    radial-gradient(circle at 80% 10%, rgba(29, 104, 216, 0.28), transparent 34%);
  border-color: rgba(255, 255, 255, 0.12);
}

.cup-ranking-board::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, #000, transparent 78%);
}

.cup-board-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.ranking-tabs {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 18px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
}

.ranking-tab {
  min-height: 42px;
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 900;
}

.ranking-tab.active {
  color: #071528;
  background: linear-gradient(135deg, #ffe066, #ff922b);
  box-shadow: 0 10px 24px rgba(240, 140, 0, 0.22);
}

.cup-board-head h3 {
  font-size: clamp(24px, 4vw, 38px);
}

.live-flame-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  padding: 5px 14px;
  color: #fff7d6;
  background: linear-gradient(135deg, #e03131, #ff922b 48%, #ffe066);
  border-radius: var(--radius);
  box-shadow: 0 0 0 1px rgba(255, 224, 102, 0.28), 0 12px 28px rgba(224, 49, 49, 0.28);
  font-weight: 900;
  text-shadow: 0 1px 8px rgba(94, 29, 0, 0.48);
}

.live-flame-chip i,
.flame-crown {
  display: inline-block;
  width: 28px;
  height: 36px;
  background:
    radial-gradient(circle at 52% 78%, #fffce0 0 14%, transparent 15%),
    radial-gradient(circle at 49% 68%, #fff33b 0 28%, transparent 29%),
    radial-gradient(circle at 46% 66%, #ff922b 0 48%, transparent 49%),
    radial-gradient(circle at 52% 57%, #f71919 0 72%, transparent 73%);
  border-radius: 62% 38% 54% 46% / 82% 48% 52% 18%;
  filter: drop-shadow(0 0 14px rgba(255, 146, 43, 0.78));
  animation: flame-flicker 560ms ease-in-out infinite alternate;
}

@keyframes flame-flicker {
  from { transform: translateY(2px) scale(0.94) rotate(-4deg); filter: drop-shadow(0 0 12px rgba(255, 146, 43, 0.68)); }
  to { transform: translateY(-4px) scale(1.1) rotate(5deg); filter: drop-shadow(0 0 24px rgba(247, 25, 25, 0.88)); }
}

.cup-podium {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
}

.podium-player {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 8px;
  min-height: 286px;
  padding: 18px 14px 14px;
  text-align: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  backdrop-filter: blur(10px);
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.podium-player:hover {
  border-color: rgba(255, 224, 102, 0.56);
  box-shadow: 0 18px 38px rgba(8, 21, 44, 0.24);
}

.podium-player.first {
  grid-column: 2;
  grid-row: 1;
  min-height: 326px;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 224, 102, 0.28), transparent 32%),
    linear-gradient(180deg, rgba(255, 146, 43, 0.32), rgba(255, 255, 255, 0.1));
  border-color: rgba(255, 224, 102, 0.46);
  box-shadow: 0 0 0 1px rgba(255, 224, 102, 0.2), 0 22px 44px rgba(224, 49, 49, 0.22), inset 0 0 36px rgba(255, 146, 43, 0.16);
  transform: translateY(-8px);
}

.podium-player.first::before,
.podium-player.first::after {
  position: absolute;
  inset: 10px;
  pointer-events: none;
  content: "";
  border-radius: var(--radius);
}

.podium-player.first::before {
  background:
    radial-gradient(circle at 18% 28%, rgba(255, 224, 102, 0.24), transparent 14%),
    radial-gradient(circle at 78% 20%, rgba(224, 49, 49, 0.24), transparent 16%),
    radial-gradient(circle at 48% 82%, rgba(255, 146, 43, 0.22), transparent 22%);
  animation: heat-aura 1.45s ease-in-out infinite alternate;
}

.podium-player.first::after {
  inset: auto 18px 12px;
  height: 58px;
  background: linear-gradient(180deg, transparent, rgba(255, 146, 43, 0.2));
  filter: blur(10px);
  animation: heat-rise 1.2s ease-in-out infinite alternate;
}

@keyframes heat-aura {
  from { opacity: 0.58; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1.02); }
}

@keyframes heat-rise {
  from { opacity: 0.36; transform: translateY(8px); }
  to { opacity: 0.78; transform: translateY(-2px); }
}

.podium-player.second {
  grid-column: 1;
  grid-row: 1;
  min-height: 292px;
}

.podium-player.third {
  grid-column: 3;
  grid-row: 1;
  min-height: 266px;
}

.podium-player .avatar-large {
  width: 74px;
  height: 74px;
  font-size: 26px;
  box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.22), 0 16px 32px rgba(0, 0, 0, 0.28);
}

.podium-player.first .avatar-large {
  width: 108px;
  height: 108px;
  font-size: 34px;
  box-shadow: 0 0 0 6px rgba(255, 224, 102, 0.42), 0 0 42px rgba(255, 224, 102, 0.34), 0 20px 42px rgba(0, 0, 0, 0.32);
}

.podium-player.first strong {
  font-size: 22px;
}

.podium-player strong,
.podium-player span {
  position: relative;
  z-index: 1;
}

.podium-player > span:not(.avatar-large):not(.flame-crown) {
  color: #dbeafe;
  font-size: 13px;
  font-weight: 800;
}

.podium-player em {
  position: relative;
  z-index: 1;
  min-height: 30px;
  color: #ffe8a3;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.flame-crown {
  position: absolute;
  top: 8px;
  right: 18px;
}

.podium-player.first .flame-crown {
  top: -8px;
  right: 18px;
  width: 70px;
  height: 88px;
  z-index: 3;
}

.podium-player.first .flame-crown::before,
.podium-player.first .flame-crown::after {
  position: absolute;
  content: "";
  background:
    radial-gradient(circle at 52% 78%, #fffce0 0 14%, transparent 15%),
    radial-gradient(circle at 49% 68%, #fff33b 0 28%, transparent 29%),
    radial-gradient(circle at 46% 66%, #ff922b 0 48%, transparent 49%),
    radial-gradient(circle at 52% 57%, #f71919 0 72%, transparent 73%);
  border-radius: 68% 32% 60% 40% / 74% 42% 58% 26%;
}

.podium-player.first .flame-crown::before {
  right: 42px;
  bottom: 8px;
  width: 30px;
  height: 42px;
  opacity: 0.9;
  animation: flame-flicker 720ms ease-in-out infinite alternate-reverse;
}

.podium-player.first .flame-crown::after {
  left: 42px;
  bottom: 5px;
  width: 24px;
  height: 36px;
  opacity: 0.82;
  animation: flame-flicker 680ms ease-in-out infinite alternate;
}

.top-fire-label {
  position: relative;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  margin-top: 28px;
  padding: 4px 12px;
  color: #fff8d6;
  background: linear-gradient(135deg, #c92a2a, #f08c00);
  border: 1px solid rgba(255, 224, 102, 0.48);
  border-radius: 999px;
  box-shadow: 0 8px 22px rgba(224, 49, 49, 0.28);
  font-size: 12px;
  font-weight: 1000;
  letter-spacing: 0;
  text-shadow: 0 1px 8px rgba(94, 29, 0, 0.42);
}

.podium-score {
  position: relative;
  display: grid;
  align-items: end;
  justify-items: center;
  width: 100%;
  height: 92px;
  margin-top: auto;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
}

.podium-score i {
  display: block;
  width: 100%;
  min-height: 34%;
  background: linear-gradient(180deg, #ffe066, #f08c00, #c92a2a);
  border-radius: var(--radius) var(--radius) 0 0;
  animation: score-rise 1.8s ease-out both;
}

.podium-score b {
  position: absolute;
  bottom: 10px;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.38);
}

.ranking-panel-meta {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.ranking-panel-meta span {
  min-width: 0;
  padding: 10px;
  overflow: hidden;
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-panel-meta b {
  color: #ffe066;
}

.daily-task-board {
  display: grid;
  gap: 14px;
  margin-top: 16px;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 14px 34px rgba(35, 48, 76, 0.08);
}

.daily-task-list {
  display: grid;
  gap: 10px;
}

.daily-task-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 68px;
  padding: 10px;
  background: #f6f9fc;
  border: 1px solid #e5edf5;
  border-radius: var(--radius);
}

.daily-task-row.valid {
  background: #f0fbf6;
  border-color: #bce8de;
}

.daily-task-row small,
.daily-task-row span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.daily-task-progress {
  display: block;
  width: min(260px, 100%);
  height: 8px;
  margin-top: 8px;
  overflow: hidden;
  background: #dbe7f3;
  border-radius: 999px;
}

.daily-task-progress em {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #1d68d8, #0f9f8f);
  border-radius: inherit;
}

.bulk-benefit-form {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.bulk-benefit-form strong,
.bulk-benefit-form .form-note {
  grid-column: 1 / -1;
}

@keyframes score-rise {
  from { transform: translateY(90%); opacity: 0.42; }
  to { transform: translateY(0); opacity: 1; }
}

.room-race-chart {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.room-race-row {
  display: grid;
  grid-template-columns: 28px minmax(130px, 0.8fr) minmax(0, 1fr) 42px;
  gap: 10px;
  align-items: center;
  min-height: 44px;
}

.room-race-row > span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: #071528;
  background: #ffe066;
  border-radius: 50%;
  font-weight: 900;
}

.room-race-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.room-race-row div {
  height: 14px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 99px;
}

.room-race-row i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #ff922b, #ffe066, #4dabf7);
  border-radius: 99px;
  animation: room-bar-glow 1.5s ease-out both;
}

@keyframes room-bar-glow {
  from { width: 0; filter: brightness(1); }
  to { filter: brightness(1.18); }
}

.online-mode-card {
  display: grid;
  gap: 5px;
  padding: 12px 14px;
}

.online-mode-card strong,
.online-mode-card span {
  display: block;
}

.online-mode-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.online-mode-card.real {
  background: #e9f9f5;
  border-color: #bce8de;
}

.online-mode-card.setup {
  background: #eef5ff;
  border-color: #c9dcff;
}

.online-mode-card.preview {
  background: #fff8e8;
  border-color: #f0d58b;
}

.ranking-row {
  display: grid;
  grid-template-columns: 28px auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 58px;
  padding: 10px;
  background: #f5f8fb;
  border: 1px solid #e5edf5;
  border-radius: var(--radius);
}

.ranking-row div,
.ranking-row span {
  min-width: 0;
}

.ranking-row div span,
.world-list span,
.location-status span,
.table-subtext {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.rank-number {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: #fff;
  background: #2e3a59;
  border-radius: 50%;
  font-weight: 900;
}

.chart-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.chart-head > span,
.chart-head > strong {
  color: var(--muted);
  font-size: 13px;
}

.column-chart {
  display: grid;
  grid-template-columns: repeat(6, minmax(56px, 1fr));
  gap: 12px;
  align-items: end;
  min-height: 260px;
  padding-top: 18px;
}

.chart-column {
  display: grid;
  grid-template-rows: minmax(140px, 1fr) auto auto;
  gap: 8px;
  align-items: end;
  min-width: 0;
  text-align: center;
}

.chart-column > span {
  display: block;
  width: 100%;
  min-height: 18px;
  border-radius: var(--radius) var(--radius) 3px 3px;
  box-shadow: inset 0 -10px 18px rgba(0, 0, 0, 0.12);
}

.chart-column strong,
.chart-column small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chart-column small {
  color: var(--muted);
  font-weight: 800;
}

.pie-layout {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  margin-top: 14px;
}

.pie-chart {
  position: relative;
  display: grid;
  place-items: center;
  width: 152px;
  aspect-ratio: 1;
  border-radius: 50%;
}

.pie-chart::after {
  position: absolute;
  inset: 32px;
  content: "";
  background: #fff;
  border-radius: 50%;
}

.pie-chart span {
  position: relative;
  z-index: 1;
  font-weight: 900;
}

.pie-legend span {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.pie-legend i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.world-card {
  grid-column: 1 / -1;
}

.earth-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.earth-actions select {
  min-width: min(260px, 100%);
  min-height: 40px;
  padding: 0 10px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-weight: 800;
}

.continent-jump-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.continent-chip {
  min-height: 34px;
  padding: 0 11px;
  color: #15335f;
  background: #eef6ff;
  border: 1px solid #d3e7ff;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
}

.continent-chip.active {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--teal));
  border-color: transparent;
}

.earth-explorer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 16px;
  align-items: stretch;
}

.world-explorer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.7fr);
  gap: 16px;
  align-items: stretch;
}

.world-activity-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  background: #f8fbff;
  border: 1px solid #d7e7f8;
  border-radius: var(--radius);
}

.world-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.continent-activity-chart,
.country-activity-grid {
  display: grid;
  gap: 10px;
}

.continent-activity-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) 78px 82px;
  gap: 10px;
  align-items: center;
  min-height: 46px;
  padding: 10px;
  color: #15335f;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 900;
  text-align: left;
}

.continent-activity-row.active {
  background: #eef7f5;
  border-color: #bce8de;
}

.continent-activity-row div {
  height: 12px;
  overflow: hidden;
  background: #e7edf4;
  border-radius: 99px;
}

.continent-activity-row i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--teal));
  border-radius: 99px;
}

.continent-activity-row small {
  color: var(--muted);
  font-size: 12px;
}

.country-activity-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
}

.country-activity-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 84px;
  padding: 12px;
  color: #15335f;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  text-align: left;
}

.country-activity-card.active {
  background: #fff8e8;
  border-color: #f0d58b;
  box-shadow: 0 10px 24px rgba(197, 139, 18, 0.14);
}

.country-activity-card b {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  background: #f5f8fb;
  border-radius: 50%;
  font-size: 24px;
}

.country-activity-card span,
.country-activity-card small,
.country-activity-card em {
  display: block;
}

.country-activity-card small,
.country-activity-card em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.earth-country-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
  color: #14304f;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(240, 248, 255, 0.96)),
    radial-gradient(circle at 100% 0, rgba(29, 104, 216, 0.16), transparent 42%);
  border: 1px solid #d7e7f8;
  border-radius: var(--radius);
  box-shadow: 0 16px 36px rgba(35, 48, 76, 0.1);
}

.country-panel-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 13px;
  align-items: center;
}

.country-panel-head h3 {
  margin: 0;
  font-size: 28px;
}

.country-panel-head span {
  color: var(--muted);
  font-weight: 800;
}

.country-flag {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 50%;
  box-shadow: 0 10px 24px rgba(35, 48, 76, 0.1);
  font-size: 38px;
}

.country-metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.mini-metric {
  min-height: 78px;
  padding: 12px;
}

.mini-metric strong {
  font-size: 20px;
}

.country-info-list,
.country-story-block {
  display: grid;
  gap: 8px;
}

.country-info-list span {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  background: #f5f9fd;
  border: 1px solid #e2ecf6;
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.country-info-list strong,
.country-story-block strong {
  color: var(--primary-dark);
  font-size: 12px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.country-live-city-list {
  display: grid;
  gap: 8px;
}

.country-live-city {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  min-height: 44px;
  padding: 9px 10px;
  color: #15335f;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  text-align: left;
}

.country-live-city.active {
  background: #fff8e8;
  border-color: #f0d58b;
  box-shadow: 0 10px 24px rgba(197, 139, 18, 0.12);
}

.country-live-city span,
.country-live-city em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.country-story-block {
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.country-story-block p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.history-block {
  background: #fffaf0;
  border-color: #f0d58b;
}

.world-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 9px;
  margin-top: 12px;
}

.world-city-chip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  min-height: 42px;
  padding: 8px 10px;
  color: #15335f;
  background: #eef6ff;
  border: 1px solid #d3e7ff;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 800;
  text-align: left;
}

.world-city-chip.active {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--teal));
  border-color: transparent;
  box-shadow: 0 12px 24px rgba(29, 104, 216, 0.18);
}

.world-city-chip b {
  font-size: 20px;
}

.world-city-chip span,
.world-city-chip small {
  display: block;
}

.world-city-chip small {
  color: inherit;
  opacity: 0.72;
  font-size: 11px;
}

.world-city-chip strong {
  color: var(--primary-dark);
}

.world-city-chip.active strong {
  color: #fff;
}

.mini-capacity {
  width: 74px;
  height: 8px;
  overflow: hidden;
  background: #dfe7ef;
  border-radius: 99px;
}

.mini-capacity span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--danger));
}

.room-ranking-row {
  grid-template-columns: 28px minmax(0, 1fr) auto;
}

.token-grid,
.admin-control-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 16px;
}

.token-wallet-card,
.admin-control-card {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 28px rgba(35, 48, 76, 0.07);
}

.admin-control-card.wide-card {
  grid-column: 1 / -1;
}

.admin-control-card.danger-admin-card {
  border-color: #ffd5d5;
  background: linear-gradient(180deg, #fff, #fff7f7);
}

.admin-danger-action {
  display: grid;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid #ffd5d5;
}

.plan-pricing-admin-card {
  align-content: start;
}

.partner-admin-card {
  align-content: start;
}

.partner-admin-rule-grid {
  display: grid;
  gap: 12px;
}

.partner-admin-rule-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(140px, 0.7fr) minmax(130px, 0.55fr) repeat(8, minmax(88px, auto)) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  background: #f8fbff;
  border: 1px solid #d8e7f6;
  border-radius: var(--radius);
}

.partner-admin-rule-row label {
  min-width: 0;
}

.plan-pricing-admin-grid {
  display: grid;
  gap: 10px;
}

.admin-money-type-box {
  display: grid;
  grid-template-columns: minmax(160px, 220px) 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: #f2fbf8;
  border: 1px solid #cdeee3;
  border-radius: var(--radius);
}

.admin-money-type-box label {
  display: grid;
  gap: 6px;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 900;
}

.admin-money-type-box span {
  color: #4f647a;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.plan-pricing-row {
  display: grid;
  grid-template-columns: minmax(130px, 0.8fr) minmax(140px, 0.8fr) minmax(130px, 0.65fr) minmax(220px, 1.2fr) auto;
  gap: 10px;
  align-items: end;
  min-width: 0;
  padding: 12px;
  background: #f7fbff;
  border: 1px solid #dce9f7;
  border-radius: var(--radius);
}

.plan-pricing-row label,
.plan-pricing-name {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.plan-pricing-name strong {
  color: var(--primary-dark);
  font-size: 15px;
}

.plan-pricing-name span {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.admin-price-preview {
  align-self: stretch;
  display: grid;
  align-items: center;
  min-width: 0;
  padding: 10px 12px;
  color: #37536f;
  background: #eef7ff;
  border: 1px solid #d1e9ff;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.token-package-grid,
.gift-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr));
  gap: 10px;
}

.token-package,
.gift-card-btn {
  display: grid;
  gap: 4px;
  min-height: 112px;
  padding: 13px;
  color: var(--ink);
  background: #f5f9ff;
  border: 1px solid #dbe9ff;
  border-radius: var(--radius);
  cursor: pointer;
  text-align: left;
}

.token-package.featured {
  background: #fff8e8;
  border-color: #f0d58b;
  box-shadow: 0 10px 24px rgba(197, 139, 18, 0.16);
}

.withdraw-rule-card {
  display: grid;
  gap: 6px;
  padding: 12px;
  color: var(--ink);
  background: #f0fbf7;
  border: 1px solid #bce8de;
  border-radius: var(--radius);
}

.withdraw-rule-card strong {
  color: var(--primary-dark);
  font-size: 14px;
}

.withdraw-rule-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.shop-hero,
.shop-grid,
.admin-analytics-grid,
.admin-analytics-chart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 16px;
}

.shop-item-card,
.admin-analytics-card,
.admin-metric-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 28px rgba(35, 48, 76, 0.07);
}

.shop-item-card {
  align-content: start;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
}

.shop-visual {
  display: grid;
  place-items: center;
  min-height: 128px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--teal));
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22), 0 18px 36px rgba(35, 48, 76, 0.12);
}

.shop-visual span {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  background: rgba(255, 255, 255, 0.16);
  border: 2px solid rgba(255, 255, 255, 0.38);
  border-radius: 50%;
  text-align: center;
  font-size: 15px;
  font-weight: 900;
}

.shop-visual.tokens {
  background: linear-gradient(135deg, #1455b8, #0f9f8f);
}

.shop-visual.gifts {
  background: linear-gradient(135deg, #c2410c, #f59f00);
}

.shop-visual.items {
  background: linear-gradient(135deg, #0f766e, #2563eb);
}

.shop-visual.effects {
  background: linear-gradient(135deg, #7c3aed, #db2777);
}

.shop-copy {
  display: grid;
  gap: 8px;
}

.shop-recipient-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  gap: 10px;
  padding: 14px;
  background: #f6f9fc;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.shop-recipient-panel h3,
.shop-recipient-panel .form-note {
  grid-column: 1 / -1;
}

.token-donation-card {
  align-content: start;
}

.token-donation-card .full-span {
  grid-column: 1 / -1;
}

.shop-function {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  background: #f6f9fc;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.shop-function strong {
  color: var(--primary-dark);
  font-size: 12px;
  text-transform: uppercase;
}

.shop-function span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.shop-card-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  padding: 10px;
  background: #f5f9ff;
  border: 1px solid #dbe9ff;
  border-radius: var(--radius);
}

.shop-card-footer span,
.shop-item-card p {
  color: var(--muted);
}

.shop-admin-form,
.shop-admin-row,
.announcement-admin-form,
.announcement-admin-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(120px, 0.7fr) repeat(3, minmax(86px, 0.5fr)) minmax(100px, 0.6fr) minmax(180px, 1fr) auto;
  gap: 8px;
  align-items: end;
}

.shop-admin-list,
.announcement-admin-list {
  display: grid;
  gap: 10px;
}

.shop-admin-row,
.announcement-admin-row {
  padding: 10px;
  background: #f6f9fc;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.token-package strong {
  color: var(--primary-dark);
  font-size: 24px;
}

.gift-card-btn em,
.token-rate-list span,
.moderator-list small,
.moderation-user-card small {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.token-rate-list,
.moderator-list,
.admin-mini-form,
.override-history {
  display: grid;
  gap: 10px;
}

.admin-reset-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.moderator-list > div,
.override-history > div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 58px;
  padding: 10px;
  background: #f5f8fb;
  border: 1px solid #e5edf5;
  border-radius: var(--radius);
}

.moderator-list span,
.moderation-user-cell span,
.moderation-user-cell small,
.override-history span {
  display: block;
}

.admin-metric-card {
  min-height: 112px;
  background: linear-gradient(180deg, #fff, #f7fbff);
}

.admin-metric-card strong {
  color: var(--primary-dark);
  font-size: 34px;
}

.admin-metric-card span {
  color: var(--muted);
  font-weight: 900;
}

.admin-metric-card.danger strong {
  color: var(--danger);
}

.admin-metric-card.revenue {
  background: #f0fbf7;
  border-color: #bce8de;
}

.admin-plan-chart,
.admin-revenue-chart {
  display: grid;
  gap: 10px;
}

.visual-card {
  align-content: start;
  overflow: hidden;
}

.admin-donut-layout {
  display: grid;
  grid-template-columns: minmax(116px, 140px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  min-width: 0;
}

.admin-donut {
  position: relative;
  display: grid;
  place-items: center;
  width: min(140px, 100%);
  aspect-ratio: 1;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(35, 48, 76, 0.08);
}

.admin-donut::after {
  position: absolute;
  inset: 32%;
  content: "";
  background: #fff;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px var(--line);
}

.admin-donut span,
.admin-donut small {
  position: relative;
  z-index: 1;
  display: block;
  text-align: center;
}

.admin-donut span {
  color: var(--primary-dark);
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
}

.admin-donut small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-donut-legend {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.admin-donut-legend span {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
  min-height: 34px;
  padding: 7px 9px;
  color: var(--muted);
  background: #f6f9fc;
  border: 1px solid #e5edf5;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 800;
}

.admin-donut-legend i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.admin-donut-legend b {
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-donut-legend strong,
.admin-donut-legend small {
  white-space: nowrap;
}

.admin-donut-legend .empty-legend {
  grid-template-columns: 1fr;
  color: var(--muted);
  text-align: center;
}

.admin-paid-column-chart {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
  min-height: 220px;
}

.admin-paid-column {
  display: grid;
  gap: 7px;
  justify-items: center;
  min-width: 0;
}

.admin-paid-column div {
  display: flex;
  align-items: end;
  width: 100%;
  height: 132px;
  overflow: hidden;
  background: #edf2f7;
  border-radius: var(--radius);
}

.admin-paid-column i {
  display: block;
  width: 100%;
  min-height: 8px;
  border-radius: var(--radius) var(--radius) 0 0;
}

.admin-paid-column strong {
  color: var(--primary-dark);
  font-size: 20px;
}

.admin-paid-column span {
  color: var(--muted);
  text-align: center;
  font-size: 12px;
  font-weight: 900;
}

.admin-plan-row,
.admin-revenue-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) 78px;
  gap: 10px;
  align-items: center;
}

.admin-plan-row div,
.admin-revenue-row div {
  height: 12px;
  overflow: hidden;
  background: #e7edf4;
  border-radius: 99px;
}

.admin-plan-row i,
.admin-revenue-row i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--teal));
  border-radius: 99px;
}

.profit-chip {
  padding: 10px 12px;
  color: #087f5b;
  background: #e7f7ee;
  border-radius: var(--radius);
  font-weight: 900;
}

.admin-location-table table,
.admin-revenue-table table {
  min-width: 980px;
}

.admin-source-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.admin-history-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.admin-history-tabs button {
  padding: 10px 14px;
  color: var(--primary-dark);
  background: #eef5ff;
  border: 1px solid #d7e7f8;
  border-radius: var(--radius);
  font-weight: 900;
  cursor: pointer;
}

.admin-history-tabs button.active {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--teal));
  border-color: transparent;
}

.upgrade-source-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.upgrade-source-chip.paypal {
  color: #0a3a87;
  background: #e9f2ff;
  border: 1px solid #cfe3ff;
}

.upgrade-source-chip.admin {
  color: #087f5b;
  background: #e8f8f0;
  border: 1px solid #c5ead8;
}

.admin-location-point {
  display: grid;
  gap: 4px;
}

.admin-location-point span,
.admin-location-point a {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.admin-location-point a {
  color: var(--primary-dark);
}

.profile-location-audit {
  display: grid;
  gap: 10px;
  padding: 12px;
  background: #f8fbff;
  border: 1px solid #d7e7f8;
  border-radius: var(--radius);
}

.admin-online-toggle {
  padding: 10px 12px;
  background: #e7f7ee;
  border: 1px solid #bce8de;
  border-radius: var(--radius);
  color: #087f5b;
  font-weight: 900;
}

.profile-location-audit h4 {
  margin: 0;
  color: var(--primary-dark);
}

.profile-location-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.profile-location-grid > div {
  display: grid;
  gap: 6px;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.override-history > div {
  grid-template-columns: minmax(0, 1fr);
  min-height: 46px;
}

.ban-live {
  color: var(--danger) !important;
  font-weight: 900;
}

.moderation-queue-table {
  display: grid;
  gap: 8px;
}

.moderation-queue-head,
.moderation-queue-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 78px 118px 130px auto;
  gap: 10px;
  align-items: center;
}

.moderation-queue-head {
  padding: 0 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.moderation-queue-row {
  min-height: 58px;
  padding: 10px;
  background: #f7fafc;
  border: 1px solid #e5edf5;
  border-radius: var(--radius);
}

.moderation-user-cell {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.moderation-count-chip,
.moderation-status {
  display: inline-grid;
  place-items: center;
  min-height: 30px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
}

.moderation-count-chip {
  color: var(--primary-dark);
  background: #e8f0ff;
}

.moderation-status.clear {
  color: var(--emerald);
  background: #e8f7ef;
}

.moderation-status.danger {
  color: var(--danger);
  background: #fff0ed;
}

.location-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: 18px;
  align-items: start;
}

.location-card {
  display: grid;
  gap: 14px;
}

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

.map-embed {
  width: 100%;
  min-height: 260px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.danger-kicker {
  color: var(--danger);
}

.privacy-hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.75fr);
  gap: 18px;
  align-items: stretch;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(29, 104, 216, 0.08), rgba(15, 159, 143, 0.1)),
    #fff;
  border: 1px solid #d7e7f8;
  border-radius: var(--radius);
  box-shadow: 0 14px 34px rgba(35, 48, 76, 0.08);
}

.privacy-hero-panel h2,
.privacy-lifecycle-panel h2,
.privacy-rights-panel h2 {
  margin: 0 0 8px;
}

.privacy-status-grid {
  display: grid;
  gap: 10px;
}

.privacy-status-grid div,
.privacy-policy-card,
.privacy-protection-grid article,
.privacy-lifecycle-list li,
.privacy-rights-grid span {
  min-width: 0;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.privacy-status-grid strong,
.privacy-status-grid span,
.privacy-lifecycle-list strong,
.privacy-lifecycle-list span {
  display: block;
}

.privacy-status-grid strong {
  overflow-wrap: anywhere;
  color: var(--primary-dark);
  font-size: 20px;
}

.privacy-status-grid span,
.privacy-policy-card p,
.privacy-protection-grid span,
.privacy-lifecycle-list span,
.privacy-rights-panel p,
.privacy-rights-grid span {
  color: var(--muted);
}

.privacy-policy-grid,
.privacy-protection-grid,
.privacy-rights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 14px;
}

.privacy-policy-card {
  display: grid;
  gap: 10px;
  align-content: start;
  box-shadow: 0 10px 28px rgba(35, 48, 76, 0.06);
}

.privacy-protection-panel,
.privacy-lifecycle-panel,
.privacy-rights-panel {
  display: grid;
  gap: 16px;
  padding: 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 28px rgba(35, 48, 76, 0.07);
}

.privacy-protection-grid article {
  display: grid;
  gap: 6px;
  background: #f8fbff;
}

.privacy-protection-grid strong,
.privacy-lifecycle-list strong {
  color: var(--primary-dark);
}

.privacy-lifecycle-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: privacy-step;
}

.privacy-lifecycle-list li {
  position: relative;
  display: grid;
  gap: 5px;
  padding-left: 52px;
  background: #f7fbff;
}

.privacy-lifecycle-list li::before {
  position: absolute;
  left: 14px;
  top: 14px;
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--teal));
  border-radius: 50%;
  content: counter(privacy-step);
  counter-increment: privacy-step;
  font-size: 12px;
  font-weight: 900;
}

.privacy-rights-grid span {
  background: #f6f9fc;
  font-weight: 800;
}

.safety-alert-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.64fr);
  gap: 20px;
  align-items: center;
  padding: 24px;
  background: #fff8f2;
  border-color: #f0c3a4;
  box-shadow: 0 14px 34px rgba(194, 49, 49, 0.1);
}

.safety-alert-panel h2 {
  color: #7f1d1d;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(28px, 4vw, 46px);
}

.safety-alert-panel p {
  color: #5d3b31;
}

.safety-metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.safety-metric {
  min-height: 92px;
  padding: 14px;
  background: #fff;
  border: 1px solid #f0c3a4;
  border-radius: var(--radius);
}

.safety-metric strong,
.safety-metric span {
  display: block;
}

.safety-metric strong {
  color: var(--danger);
  font-size: 30px;
}

.safety-metric span {
  color: var(--muted);
  font-weight: 800;
}

.safety-chart-grid {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.74fr);
}

.safety-chart-card {
  background: #fffdfb;
  border-color: #efd7c8;
}

.safety-bar-row {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr) 34px;
  gap: 10px;
  align-items: center;
}

.safety-bar-row div {
  height: 12px;
  overflow: hidden;
  background: #f0e5dc;
  border-radius: 99px;
}

.safety-bar-row i {
  display: block;
  height: 100%;
  border-radius: 99px;
}

.safety-pie-chart::after {
  background: #fffdfb;
}

.safety-case-card {
  display: grid;
  gap: 10px;
  background: #fff;
  border-left: 5px solid var(--gold);
}

.safety-case-card.critical {
  border-left-color: var(--danger);
}

.safety-case-card.high {
  border-left-color: #d9480f;
}

.safety-case-card p {
  margin: 0;
  color: var(--muted);
}

.safety-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 3px 9px;
  color: #fff;
  background: #5f6b7a;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 900;
}

.safety-status.banned {
  background: var(--danger);
}

.safety-status.suspended {
  background: #d9480f;
}

.safety-status.watchlisted {
  background: var(--gold);
}

.safety-table-wrap table {
  min-width: 1040px;
}

.table-wrap {
  overflow-x: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
}

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--primary-dark);
  background: #eef5ff;
  font-size: 13px;
}

.chat-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 18px;
  align-items: start;
  min-height: calc(100vh - 94px);
  padding: 18px 0;
}

.member-panel,
.chat-panel {
  min-width: 0;
  padding: 18px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 14px 32px rgba(35, 48, 76, 0.08);
}

.member-panel {
  display: grid;
  align-content: start;
  gap: 12px;
  position: sticky;
  top: 92px;
  max-height: calc(100vh - 108px);
  overflow: auto;
  border-color: #b8d7f6;
  box-shadow: 0 20px 48px rgba(19, 77, 146, 0.14);
}

.member-panel h2 {
  margin: 0;
  font-size: clamp(22px, 2vw, 30px);
  line-height: 1.08;
  color: #0f1f3d;
}

.member-panel h3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 6px 0 0;
  padding-top: 12px;
  color: #0f4fa8;
  font-size: 18px;
  font-weight: 950;
  border-top: 1px solid #d8e7f7;
}

.room-live-count {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  padding: 7px 10px;
  color: #063f8f;
  background: #eef6ff;
  border: 1px solid #cbe0fa;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 950;
}

.room-quick-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.room-quick-actions .small {
  min-height: 42px;
}

.room-media-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  align-items: center;
  padding: 10px;
  background: #f8fbff;
  border: 1px solid #d8e7f7;
  border-radius: var(--radius);
}

.room-media-actions .small {
  min-height: 40px;
}

.room-media-note {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.member-media-focus,
.room-media-errors {
  display: grid;
  gap: 10px;
}

.room-media-viewer {
  display: grid;
  gap: 10px;
  padding: 10px;
  background: #f8fbff;
  border: 1px solid #d8e7f7;
  border-radius: var(--radius);
}

.room-media-viewer.compact {
  padding-bottom: 4px;
}

.room-media-selector {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 4px;
  scrollbar-width: thin;
}

.room-media-selector button {
  display: grid;
  grid-template-columns: auto minmax(78px, 1fr);
  gap: 8px;
  align-items: center;
  flex: 0 0 min(190px, 72vw);
  min-height: 58px;
  padding: 7px 9px;
  color: #102033;
  text-align: left;
  background: #f6fbff;
  border: 1px solid #cfe2f7;
  border-radius: var(--radius);
  cursor: pointer;
}

.room-media-selector button.selected {
  color: #062f2a;
  background: #e7fbf6;
  border-color: #44c0ad;
  box-shadow: 0 0 0 3px rgba(68, 192, 173, 0.18);
}

.room-media-selector button.screen.selected {
  color: #3a2500;
  background: #fff6da;
  border-color: #ffc857;
  box-shadow: 0 0 0 3px rgba(255, 200, 87, 0.22);
}

.room-media-selector-avatar {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  overflow: hidden;
  color: #fff;
  font-size: 13px;
  font-weight: 950;
  background: linear-gradient(135deg, var(--primary), var(--teal));
  border-radius: 999px;
}

.room-media-selector span,
.room-media-selector strong,
.room-media-selector small {
  display: block;
  min-width: 0;
}

.room-media-selector strong,
.room-media-selector small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.room-media-selector strong {
  font-size: 13px;
  line-height: 1.15;
}

.room-media-selector small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.member-media-focus {
  padding: 10px;
  color: #fff;
  background: #101828;
  border: 1px solid #1f2a44;
  border-radius: var(--radius);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.18);
}

.member-media-focus-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.member-media-focus-head span {
  display: grid;
  min-width: 0;
}

.member-media-focus-head strong,
.member-media-focus-head small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-media-focus-head small {
  color: #c9d6e8;
  font-size: 12px;
  font-weight: 800;
}

.member-media-focus-slot {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: clamp(180px, 28vw, 420px);
  max-height: min(58vh, 560px);
  overflow: hidden;
  color: #dbeafe;
  background: #060b14;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 900;
}

.room-control-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  background: #f5fbff;
  border: 1px solid #cfe6ff;
  border-radius: var(--radius);
}

.room-controls-details:not([open]) {
  padding: 0;
  background: transparent;
  border-color: transparent;
}

.room-controls-details:not([open]) > :not(summary) {
  display: none !important;
}

.room-controls-details summary {
  min-height: 40px;
  padding: 9px 12px;
  color: var(--primary-dark);
  background: #eef7ff;
  border: 1px solid #cce2f8;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 13px;
  font-weight: 950;
  list-style: none;
  text-align: center;
}

.room-controls-details summary::-webkit-details-marker {
  display: none;
}

.room-controls-details summary::after {
  content: " +";
}

.room-controls-details[open] summary::after {
  content: " -";
}

.room-control-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.room-control-actions .small {
  flex: 1 1 auto;
}

.room-host-donation {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 86px auto;
  gap: 8px;
  align-items: center;
  padding: 10px;
  background: #fffdf3;
  border: 1px solid #f4d37b;
  border-radius: var(--radius);
}

.room-host-donation div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.room-host-donation strong,
.room-host-donation small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.room-host-donation strong {
  color: #7a4a00;
  font-size: 13px;
}

.room-host-donation small {
  color: #6b5c3a;
  font-size: 11px;
  font-weight: 800;
}

.room-host-donation input {
  width: 100%;
  min-height: 38px;
}

.host-room-settings {
  display: grid;
  gap: 10px;
  padding: 12px;
  background: #f8fbff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.host-room-settings:not([open]) {
  padding: 0;
  background: transparent;
}

.host-room-settings:not([open]) > :not(summary) {
  display: none !important;
}

.host-room-settings summary {
  display: grid;
  gap: 2px;
  min-height: var(--touch);
  padding: 10px 12px;
  color: var(--primary-dark);
  background: #eef5ff;
  border: 1px solid #c9dcff;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 900;
  list-style: none;
}

.host-room-settings summary::-webkit-details-marker {
  display: none;
}

.host-room-settings summary span::after {
  content: " +";
}

.host-room-settings[open] summary span::after {
  content: " -";
}

.host-room-settings summary small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.host-room-settings form {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.host-room-settings label,
.room-moderator-form label {
  display: grid;
  gap: 5px;
  font-size: 13px;
  color: var(--muted);
}

.room-moderator-form,
.room-moderator-list {
  display: grid;
  gap: 10px;
}

.room-moderator-list > div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 9px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.passcode-display {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 10px;
  align-items: center;
  padding: 12px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: var(--radius);
}

.passcode-display span,
.passcode-display small {
  grid-column: 1 / -1;
}

.passcode-display strong {
  font-size: 32px;
  line-height: 1;
  letter-spacing: 0;
  color: #9a3412;
}

.private-room-gate .form-panel {
  margin: 14px 0;
}

.chat-panel {
  position: sticky;
  top: 92px;
  display: block;
  height: auto;
  max-height: calc(100vh - 108px);
  min-height: 0;
  overflow: hidden;
}

.room-chat-details {
  display: grid;
  gap: 12px;
}

.room-chat-details summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: var(--touch);
  padding: 12px 14px;
  color: var(--primary-dark);
  background: #eef7ff;
  border: 1px solid #cce2f8;
  border-radius: var(--radius);
  cursor: pointer;
  list-style: none;
}

.room-chat-details summary::-webkit-details-marker {
  display: none;
}

.room-chat-details summary span {
  font-size: 16px;
  font-weight: 950;
}

.room-chat-details summary b {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.room-chat-details[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: min(560px, calc(100vh - 156px));
  overflow: hidden;
}

.room-chat-details[open] .room-chat-body {
  display: grid;
}

.room-chat-body {
  display: none;
  grid-template-rows: minmax(0, 1fr) auto auto;
  gap: 12px;
  min-height: 0;
  overflow: hidden;
  padding-top: 12px;
}

.room-chat-details[open] .message-list {
  height: min(340px, calc(100vh - 356px));
  min-height: 220px;
}

.voice-room-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  background: #fbfdff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.voice-member-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(178px, 1fr));
  gap: 10px;
  overflow: visible;
  padding: 2px;
}

.voice-member {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 104px;
  padding: 12px;
  background: #f3f7fb;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.voice-member .avatar-mini {
  width: 58px;
  height: 58px;
  font-size: 18px;
}

.voice-member.speaking {
  background: #edf9f5;
  border-color: #bbe7dc;
  box-shadow: 0 0 0 1px rgba(20, 184, 166, 0.12), 0 16px 34px rgba(20, 184, 166, 0.16);
  transform: translateY(-1px);
}

.voice-member.speaking .avatar-mini {
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.2), 0 0 22px rgba(20, 184, 166, 0.34);
}

.voice-member.listening {
  background: #f8fbff;
}

.voice-member.muted:not(.speaking) {
  border-color: #dfe7ef;
}

.voice-member.self {
  background: #eef5ff;
  border-color: #c9dcff;
}

.voice-member.recent-join {
  background: #fff8e7;
  border-color: #ffc857;
  box-shadow: 0 0 0 2px rgba(255, 200, 87, 0.24), 0 18px 34px rgba(255, 146, 43, 0.16);
  animation: member-join-pop 900ms ease both;
}

.voice-member strong,
.voice-member span {
  display: block;
}

.voice-member span {
  color: var(--muted);
  font-size: 13px;
}

.voice-level {
  grid-column: 1 / -1;
  height: 8px;
  overflow: hidden;
  background: #dde6ef;
  border-radius: 99px;
}

.voice-level span {
  display: block;
  height: 100%;
  min-width: 0;
  background: linear-gradient(90deg, var(--green), var(--teal));
  transition: width 120ms ease;
}

.voice-member.muted .voice-level span,
.voice-member.listening .voice-level span {
  background: #ccd6e1;
}

@keyframes member-join-pop {
  0% {
    transform: translateY(0) scale(0.98);
  }
  45% {
    transform: translateY(-3px) scale(1.02);
  }
  100% {
    transform: translateY(0) scale(1);
  }
}

.voice-error {
  margin: 0;
  padding: 10px 12px;
  color: #744d00;
  background: #fff6d9;
  border: 1px solid #f0d58b;
  border-radius: var(--radius);
}

.voice-actions span,
.preview-actions span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.noise-toggle.enabled {
  color: #063f2f;
  background: #dff6ec;
  box-shadow: inset 0 0 0 1px #9edfcf;
}

.room-media-stage {
  display: grid;
  gap: 12px;
  padding: 14px;
  background: #101828;
  border: 1px solid #1f2a44;
  border-radius: var(--radius);
}

.media-call-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #fff;
}

.media-call-head h3,
.media-call-head p {
  margin: 0;
}

.media-call-head span {
  min-height: 30px;
  padding: 5px 10px;
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 900;
}

.media-preview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(220px, 0.75fr);
  grid-auto-flow: dense;
  gap: 12px;
}

.media-preview {
  position: relative;
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 10px;
  color: #fff;
  background: #172033;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
}

.media-preview.active {
  background: #132d32;
  border-color: #51d3bf;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.18);
}

.media-preview.primary-media {
  grid-row: span 2;
}

.media-video-slot {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  background: #060b14;
  border-radius: 8px;
}

.media-preview.primary-media .media-video-slot {
  min-height: 340px;
}

.media-video-slot video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-preview strong,
.media-preview small {
  display: block;
  min-width: 0;
}

.media-preview small {
  color: #b7c3d4;
  font-weight: 800;
}

.message-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  min-height: 0;
  padding: 14px;
  background: #f7fbff;
  border: 1px solid #d7e7f8;
  border-radius: var(--radius);
  overscroll-behavior: contain;
}

.message {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  width: min(78%, 620px);
  padding: 12px 14px;
  background: #eef4fb;
  border-radius: var(--radius);
}

.message.own {
  align-self: flex-end;
  color: #fff;
  background: var(--primary);
}

.message.system {
  display: block;
  align-self: center;
  width: auto;
  max-width: min(92%, 520px);
  padding: 9px 13px;
  color: #31506d;
  text-align: center;
  background: #eef7f4;
  border: 1px solid #c8e8df;
  border-radius: 999px;
}

.message.system span {
  display: inline;
  margin: 0 6px 0 0;
  color: #08705d;
  font-size: 11px;
}

.message.system p {
  display: inline;
  font-size: 13px;
  font-weight: 800;
}

.message span {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 900;
}

.message p {
  margin: 0;
}

.chat-photo-message {
  display: grid;
  gap: 8px;
}

.chat-photo-preview {
  display: block;
  width: min(100%, 360px);
  padding: 0;
  overflow: hidden;
  background: #dbe8f7;
  border: 1px solid rgba(11, 35, 64, 0.12);
  border-radius: var(--radius);
  cursor: zoom-in;
}

.chat-photo-preview:focus-visible {
  outline: 3px solid rgba(29, 104, 216, 0.28);
  outline-offset: 3px;
}

.chat-photo-message img {
  display: block;
  width: 100%;
  max-height: 360px;
  object-fit: cover;
}

.chat-photo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chat-photo-missing {
  display: grid;
  place-items: center;
  min-height: 140px;
  width: min(100%, 360px);
  color: var(--muted);
  background: #edf4fb;
  border: 1px dashed #b5c7d9;
  border-radius: var(--radius);
  font-weight: 900;
}

.photo-viewer-backdrop {
  padding: 18px;
}

.photo-viewer-modal {
  width: min(96vw, 980px);
}

.photo-viewer-frame {
  display: grid;
  place-items: center;
  max-height: min(72vh, 760px);
  overflow: auto;
  background: #07111f;
  border-radius: var(--radius);
}

.photo-viewer-frame img {
  width: auto;
  max-width: 100%;
  max-height: 72vh;
  object-fit: contain;
}

.photo-viewer-caption {
  color: var(--muted);
  font-weight: 800;
}

.direct-message-feed {
  display: grid;
  gap: 10px;
  max-height: 520px;
  overflow-y: auto;
  padding: 12px;
  background: #f7fbff;
  border: 1px solid #d7e7f8;
  border-radius: var(--radius);
}

.direct-message-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.direct-message-card.incoming {
  border-color: #f7c6c6;
  background: #fff7f7;
}

.direct-message-card.own {
  border-color: #cfe6ff;
  background: #f2f8ff;
}

.direct-message-card p,
.direct-message-card small {
  margin: 4px 0 0;
}

.dm-message-head {
  justify-content: space-between;
  flex-wrap: wrap;
}

.direct-message-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.dm-compose {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.dm-compose label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.dm-compose input[name="message"] {
  width: 100%;
}

.reply-context,
.reply-draft {
  display: grid;
  gap: 3px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.58);
  border-left: 3px solid var(--teal);
  border-radius: var(--radius);
}

.message.own .reply-context {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
}

.reply-context strong,
.reply-context span,
.reply-draft strong,
.reply-draft span {
  margin: 0;
  font-size: 12px;
}

.reply-context span,
.reply-draft span {
  color: var(--muted);
}

.reply-btn {
  width: fit-content;
  min-height: 28px;
  margin-top: 8px;
  padding: 4px 9px;
  color: var(--primary-dark);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 900;
}

.reply-draft {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  background: #f0f8ff;
  border: 1px solid #cfe6ff;
  border-left: 4px solid var(--primary);
}

.ai-chat-helper {
  display: grid;
  gap: 12px;
  padding: 14px;
  background: #fffdf5;
  border: 1px solid #f0d58b;
  border-radius: var(--radius);
}

.ai-chat-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.ai-chat-form .full-span,
.ai-help-actions.full-span {
  grid-column: 1 / -1;
}

.ai-chat-form textarea {
  min-height: 78px;
  resize: vertical;
}

.ai-help-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ai-help-result {
  display: grid;
  gap: 6px;
  padding: 12px;
  background: #f8fbff;
  border: 1px solid #d7e7f8;
  border-radius: var(--radius);
}

.ai-help-result.warning {
  background: #fff8e8;
  border-color: #f0d58b;
}

.ai-help-result.ok {
  background: #eefaf6;
  border-color: #bce8de;
}

.ai-help-result p,
.ai-help-result small {
  margin: 0;
}

.ai-help-result small {
  color: var(--muted);
  font-weight: 800;
}

.chat-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 76px auto auto;
  gap: 10px;
  align-items: end;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.chat-input textarea[name="message"] {
  grid-column: 1 / -1;
  min-height: 84px;
  max-height: 150px;
  resize: none;
  line-height: 1.35;
}

.chat-input select[name="messageType"] {
  width: 76px;
  min-width: 0;
  padding-inline: 8px;
}

.chat-photo-picker {
  display: inline-grid;
  place-items: center;
  min-height: 42px;
  padding: 0 12px;
  color: var(--primary-dark);
  background: #eef6ff;
  border: 1px solid #cfe2f4;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
}

.chat-photo-picker input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.chat-photo-picker.disabled {
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.7;
}

.online-dot {
  width: 10px;
  height: 10px;
  margin-left: auto;
  background: var(--green);
  border-radius: 50%;
}

.profile-card,
.story-card {
  display: grid;
  gap: 12px;
}

.story-ring-rail {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 10px;
}

.story-ring-card {
  display: grid;
  justify-items: center;
  gap: 6px;
  flex: 0 0 118px;
  min-height: 154px;
  padding: 14px 10px;
  text-align: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 28px rgba(35, 48, 76, 0.07);
}

.story-ring-card.specific_friend,
.story-ring-card.mutual_friends,
.story-ring-card.best_friends {
  background: #f7f4ff;
}

.story-ring-avatar {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  color: #fff;
  background:
    linear-gradient(#fff, #fff) padding-box,
    conic-gradient(#ff922b, #e03131, #7c3aed, #1d68d8, #ff922b) border-box;
  border: 4px solid transparent;
  border-radius: 50%;
  box-shadow: 0 12px 24px rgba(35, 48, 76, 0.14);
  font-weight: 900;
}

.story-ring-avatar::before {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  content: attr(data-initials);
  background: linear-gradient(135deg, var(--primary), var(--teal));
  border-radius: 50%;
}

.story-ring-avatar {
  color: transparent;
}

.small-ring {
  width: 54px;
  height: 54px;
  border-width: 3px;
}

.small-ring::before {
  width: 40px;
  height: 40px;
}

.story-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: 16px;
}

.story-analytics-card {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 28px rgba(35, 48, 76, 0.07);
}

.story-rank-chart,
.profile-visit-list,
.story-comments {
  display: grid;
  gap: 10px;
}

.story-rank-row {
  display: grid;
  grid-template-columns: 28px auto minmax(68px, 0.5fr) minmax(0, 1fr) 44px;
  gap: 9px;
  align-items: center;
}

.story-rank-row div {
  height: 10px;
  overflow: hidden;
  background: #e7edf4;
  border-radius: 99px;
}

.story-rank-row i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--teal));
  border-radius: 99px;
}

.profile-visit-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  min-height: 54px;
  padding: 10px;
  background: #f6f9fc;
  border-radius: var(--radius);
}

.profile-visit-row span,
.profile-visit-row small,
.story-ring-card span,
.story-author-row span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.story-list.enhanced {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 310px), 1fr));
}

.story-feed-card.public {
  border-color: #bce8de;
}

.story-feed-card.specific_friend,
.story-feed-card.mutual_friends,
.story-feed-card.best_friends {
  border-color: #d6c8ff;
  background: #fbfaff;
}

.best-friend-grid {
  display: grid;
  gap: 9px;
}

.best-friend-option {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 52px;
  padding: 9px 10px;
  background: #f6f9fc;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.best-friend-option input {
  width: 18px;
  min-height: 18px;
}

.story-author-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

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

.story-comment-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  padding: 9px 10px;
  background: #f2f6fb;
  border-radius: var(--radius);
}

.story-comment-row p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.wall-feed {
  display: grid;
  gap: 16px;
}

.wall-post-card {
  display: grid;
  gap: 12px;
  padding: 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 28px rgba(35, 48, 76, 0.07);
}

.wall-post-card.friends {
  border-color: #bce8de;
}

.wall-post-card.best_friends {
  border-color: #d6c8ff;
  background: #fbfaff;
}

.wall-post-head,
.wall-comment {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.wall-post-head span,
.wall-comment p {
  color: var(--muted);
}

.wall-post-card p,
.wall-comment p {
  margin: 0;
}

.wall-comment-list {
  display: grid;
  gap: 10px;
}

.wall-reactions {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.wall-reaction-btn {
  display: grid;
  grid-template-columns: auto auto;
  gap: 4px 7px;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 7px 8px;
  color: #15335f;
  background: #f4f8ff;
  border: 1px solid #d8e7ff;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 900;
}

.wall-reaction-btn span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--teal));
  border-radius: 50%;
  font-size: 12px;
}

.wall-reaction-btn.active {
  background: #eaf7f4;
  border-color: #a9ded4;
  box-shadow: 0 8px 18px rgba(15, 159, 143, 0.12);
}

.wall-reaction-btn.active span {
  background: linear-gradient(135deg, var(--teal), var(--emerald));
}

.wall-reaction-btn[data-reaction="angry"] span {
  background: linear-gradient(135deg, #d9480f, var(--danger));
}

.wall-reaction-btn[data-reaction="angry"].active {
  background: #fff1ec;
  border-color: #ffc9b8;
  box-shadow: 0 8px 18px rgba(217, 72, 15, 0.12);
}

.wall-reaction-btn em {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.wall-comment {
  padding: 10px;
  background: #f3f7fb;
  border-radius: var(--radius);
}

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

.profile-extra {
  display: grid;
  gap: 8px;
  padding: 12px;
  background: #f3f7fb;
  border-radius: var(--radius);
}

.profile-social-graph {
  display: grid;
  gap: 12px;
  padding: 14px;
  background: #f6f9fc;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.profile-social-graph.locked {
  background: #fff8e8;
  border-color: #f0d58b;
}

.public-social-counts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.public-social-counts span {
  min-height: 64px;
  padding: 10px;
  color: var(--muted);
  background: #fff;
  border: 1px solid #f0d58b;
  border-radius: var(--radius);
  font-weight: 900;
}

.public-social-counts strong {
  display: block;
  color: var(--primary-dark);
  font-size: 22px;
}

.profile-device-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  background: #f0fbf7;
  border: 1px solid #bce8de;
  border-radius: var(--radius);
}

.profile-device-panel.locked {
  background: #f6f9fc;
  border-color: var(--line);
}

.device-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 120px), 1fr));
  gap: 10px;
}

.device-summary-grid div {
  min-height: 74px;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.device-summary-grid strong,
.device-summary-grid span {
  display: block;
}

.device-summary-grid strong {
  color: var(--primary-dark);
  font-size: 22px;
}

.device-summary-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.device-rule-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  gap: 10px;
}

.device-rule-grid span {
  min-height: 70px;
  padding: 10px;
  color: var(--muted);
  background: #fff;
  border: 1px solid #d8efe7;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 800;
}

.device-rule-grid strong {
  display: block;
  margin-bottom: 4px;
  color: var(--primary-dark);
  font-size: 13px;
}

.profile-social-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 12px;
}

.profile-social-columns > div {
  display: grid;
  gap: 8px;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.social-person-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 42px;
  padding: 7px 8px;
  background: #f7fbff;
  border: 1px solid #e3edf8;
  border-radius: var(--radius);
}

.online-status {
  gap: 7px;
  color: var(--muted);
  background: #edf1f5;
}

.online-status::before {
  display: inline-block;
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  background: #394655;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(57, 70, 85, 0.12);
  content: "";
}

.online-status.online {
  color: var(--emerald);
  background: #e5f6ee;
}

.online-status.online::before {
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.16);
}

.profile-location-status {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 10px;
  color: var(--primary-dark);
  background: #e8f0ff;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 800;
}

.auto-location-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  background: #f7fbff;
  border: 1px solid #d7e8fb;
  border-radius: var(--radius);
}

.auto-location-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.auto-location-summary span,
.auto-location-summary small {
  display: block;
}

.auto-location-summary small {
  color: var(--muted);
  font-weight: 800;
}

.profile-editor-head {
  align-items: center;
}

.photo-slots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 10px;
}

.photo-slots span {
  display: grid;
  place-items: center;
  min-height: 82px;
  color: var(--muted);
  background: #f4f7fa;
  border: 1px dashed #b9c5d4;
  border-radius: var(--radius);
}

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

.story-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.story-stats span {
  padding: 8px 10px;
  background: #e8f0ff;
  border-radius: var(--radius);
  color: var(--primary-dark);
  font-weight: 800;
}

.dm-layout {
  grid-template-columns: minmax(280px, 340px) 1fr;
}

.friend-request-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.friend-request-list {
  display: grid;
  gap: 10px;
}

.friend-request-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  background: #f8fbff;
  border: 1px solid #d8e7f8;
  border-radius: var(--radius);
}

.friend-request-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.friend-request-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: end;
}

.dm-list,
.dm-thread {
  display: grid;
  gap: 10px;
}

.dm-list {
  align-content: start;
}

.dm-list-head {
  display: grid;
  gap: 4px;
  padding: 4px 2px 10px;
}

.dm-list-head h2,
.dm-list-head p,
.dm-thread-head h2,
.dm-thread-head p,
.dm-call-panel h3,
.dm-call-panel p {
  margin: 0;
}

.dm-list-head p,
.dm-thread-head p,
.dm-call-panel p,
.dm-contact-preview {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.dm-contact {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  min-height: var(--touch);
  gap: 10px;
  width: 100%;
  padding: 10px;
  color: var(--ink);
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: #f2f6fb;
  text-align: left;
  cursor: pointer;
}

.dm-contact.active {
  background: #eefaf6;
  border-color: #8fd8c7;
  box-shadow: inset 3px 0 0 var(--teal);
}

.dm-contact-main,
.dm-contact-meta,
.dm-thread-person,
.dm-message-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.dm-contact-main {
  display: grid;
  gap: 3px;
}

.dm-contact-name,
.dm-contact-preview {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dm-contact-meta {
  justify-content: end;
  flex-wrap: wrap;
}

.dm-relationship,
.dm-unread,
.dm-request-dot,
.dm-call-dot {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: var(--radius);
  font-size: 11px;
  font-weight: 900;
}

.dm-relationship.friend {
  color: #065f46;
  background: #dff8ef;
}

.dm-relationship.stranger {
  color: #7a5200;
  background: #fff3cd;
}

.dm-unread {
  color: #fff;
  background: var(--danger);
}

.dm-call-dot {
  color: #075985;
  background: #e0f2fe;
}

.dm-request-dot {
  color: #7c2d12;
  background: #ffedd5;
}

.dm-thread-head {
  display: grid;
  gap: 14px;
}

.dm-request-banner {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  color: #7c2d12;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: var(--radius);
}

.dm-request-banner.outgoing {
  color: #075985;
  background: #eff6ff;
  border-color: #bfdbfe;
}

.dm-request-banner strong,
.dm-request-banner span {
  margin: 0;
}

.dm-request-banner span {
  color: inherit;
  font-size: 13px;
  font-weight: 800;
}

.dm-thread-person {
  justify-content: space-between;
  padding: 12px;
  background: #f7fbff;
  border: 1px solid #d7e7f8;
  border-radius: var(--radius);
}

.avatar-mini.large {
  width: 58px;
  height: 58px;
  font-size: 18px;
}

.dm-call-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  background: #fbfdff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.dm-call-panel.locked {
  background: #fffaf0;
  border-color: #f0d58b;
}

.profile-summary,
.profile-detail {
  display: grid;
  gap: 14px;
}

.profile-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  padding: 6px;
  background: #eef4fb;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.profile-tabs a {
  min-height: 38px;
  padding: 9px 16px;
  color: var(--muted);
  border-radius: calc(var(--radius) - 2px);
  font-weight: 900;
}

.profile-tabs a.active {
  color: var(--primary-dark);
  background: #fff;
  box-shadow: 0 6px 16px rgba(35, 48, 76, 0.08);
}

.profile-id-chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 28px;
  padding: 5px 9px;
  color: var(--primary-dark);
  background: #eef6ff;
  border: 1px solid #d3e7ff;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 900;
}

.profile-id-chip.large {
  min-height: 34px;
  font-size: 13px;
}

.profile-user-id-block {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 11px 12px;
  color: #12345c;
  background: linear-gradient(180deg, #eef6ff, #f8fbff);
  border: 1px solid #cfe3fb;
  border-radius: var(--radius);
}

.profile-user-id-block.compact {
  width: auto;
}

.profile-user-id-block span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.profile-user-id-block strong {
  overflow-wrap: anywhere;
  font-size: 16px;
}

.public-user-id-card,
.profile-message-panel,
.profile-direct-call-panel {
  display: grid;
  gap: 10px;
  padding: 14px;
  background: #f6f9fc;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.public-user-id-card strong,
.public-user-id-card span,
.profile-message-panel p,
.profile-direct-call-panel p {
  display: block;
}

.public-user-id-card span,
.profile-message-panel p,
.profile-direct-call-panel p,
.direct-call-row span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.profile-message-panel.locked,
.profile-direct-call-panel.locked {
  background: #fff8e8;
  border-color: #f0d58b;
}

.direct-call-row {
  display: grid;
  gap: 8px;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.direct-call-row.incoming {
  background: #eefaf6;
  border-color: #bce8de;
}

.direct-call-row.pending {
  background: #f8fbff;
  border-color: #d7e7f8;
}

.direct-call-row.accepted {
  background: #f7f4ff;
  border-color: #d9ccff;
}

.permission-list.compact {
  gap: 6px;
}

.embedded-wall {
  padding: 0;
}

.safety-section {
  display: grid;
  gap: 16px;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 88px;
  z-index: 80;
  max-width: min(360px, calc(100% - 36px));
  padding: 14px 16px;
  color: #fff;
  background: #172033;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.active-room-browse-bar {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 76;
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(560px, calc(100% - 36px));
  padding: 10px;
  color: #fff;
  background: #172033;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transform: translateX(-50%);
}

.active-room-browse-bar span {
  display: grid;
  min-width: 0;
  flex: 1;
}

.active-room-browse-bar strong,
.active-room-browse-bar small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.active-room-browse-bar small {
  color: #c9d6e8;
  font-weight: 800;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 20px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: rgba(23, 32, 51, 0.42);
}

.upgrade-modal {
  position: relative;
  width: min(520px, 100%);
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 26px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.payment-modal {
  display: grid;
  gap: 14px;
}

.payment-method-grid,
.payment-result-grid,
.payment-region-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
  gap: 10px;
}

.payment-confirm-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.payment-confirm-grid > div {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 12px;
  background: #f7fbff;
  border: 1px solid #d6e7f8;
  border-radius: var(--radius);
}

.payment-confirm-grid .full-span {
  grid-column: 1 / -1;
}

.payment-confirm-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.payment-confirm-grid strong {
  overflow-wrap: anywhere;
  color: var(--primary-dark);
  font-size: 18px;
}

.payment-confirm-warning {
  margin: 0;
  padding: 12px;
  color: #704900;
  background: #fff8db;
  border: 1px solid #f2d77a;
  border-radius: var(--radius);
  font-weight: 850;
}

.payment-region-grid span {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  color: var(--muted);
  background: #f6f9fc;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 800;
}

.payment-region-grid strong {
  color: var(--primary-dark);
}

.paypal-checkout-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.paypal-main-button,
.paypal-card-button {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 1000;
  letter-spacing: 0;
}

.paypal-main-button {
  color: #003087;
  background: linear-gradient(180deg, #ffd86f, #ffc439);
  box-shadow: 0 12px 24px rgba(255, 196, 57, 0.28);
}

.paypal-card-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #fff;
  background: #222f3e;
  box-shadow: 0 12px 24px rgba(34, 47, 62, 0.16);
}

.card-glyph {
  width: 25px;
  height: 18px;
  border: 2px solid currentColor;
  border-radius: 3px;
  box-shadow: inset 0 5px 0 rgba(255, 255, 255, 0.16);
}

.paypal-powered {
  margin: 0;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
  font-weight: 900;
}

.paypal-powered strong {
  color: #0070ba;
  font-size: 15px;
}

.payment-method-card {
  display: grid;
  gap: 5px;
  min-height: 108px;
  padding: 14px;
  color: var(--text);
  background: #f7fbff;
  border: 1px solid #dce9f7;
  border-radius: var(--radius);
  cursor: pointer;
  text-align: left;
  box-shadow: 0 10px 22px rgba(35, 48, 76, 0.07);
  text-decoration: none;
}

.payment-method-card strong {
  color: var(--primary-dark);
  font-size: 17px;
}

.payment-method-card span {
  color: var(--muted);
  font-weight: 800;
}

.payment-method-card.mock {
  border-color: #bfe8dd;
  background: linear-gradient(180deg, #f4fffb, #e8fbf5);
}

.payment-result-grid > div {
  display: grid;
  gap: 4px;
  padding: 12px;
  background: #f7fbff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.payment-result-grid strong {
  overflow-wrap: anywhere;
  color: var(--primary-dark);
}

.payment-result-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: var(--touch);
  height: var(--touch);
  border: 0;
  border-radius: var(--radius);
  background: #f0f4f7;
  cursor: pointer;
}

.mobile-nav {
  display: none;
}

.floating-room-actions {
  position: fixed;
  right: 22px;
  bottom: 28px;
  z-index: 60;
  display: grid;
  gap: 10px;
  justify-items: center;
}

.floating-room-action {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 0;
  border-radius: 50%;
  box-shadow: var(--shadow);
  cursor: pointer;
  font-weight: 950;
  line-height: 1;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.floating-room-action:hover,
.floating-room-action:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(20, 67, 116, 0.24);
  outline: 3px solid rgba(25, 118, 210, 0.18);
}

.floating-room-action-create {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--teal));
  font-size: 31px;
}

.floating-room-action-map {
  color: var(--primary-strong);
  background: #fff;
  border: 1px solid rgba(25, 118, 210, 0.22);
  font-size: 13px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.text-link {
  color: var(--primary);
  font-weight: 900;
}

@media (min-width: 1280px) {
  .section,
  .page-heading,
  .chat-shell {
    width: min(1400px, calc(100% - 64px));
  }

  .room-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1199px) {
  .topbar {
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 10px;
  }

  .desktop-nav {
    display: none;
  }

  .tablet-menu {
    display: block;
  }

  .account-strip {
    min-width: 0;
  }

  .two-column,
  .split-form,
  .auth-panel,
  .dm-layout,
  .public-profile-layout,
  .dashboard-grid,
  .earth-explorer-grid,
  .world-explorer-grid,
  .safety-chart-grid,
  .location-panel,
  .safety-alert-panel,
  .section-intro-row {
    grid-template-columns: 1fr;
  }

  .room-feedback-form,
  .shop-admin-form,
  .shop-admin-row,
  .admin-money-type-box,
  .plan-pricing-row,
  .connect-offer-row,
  .connect-search-summary-grid,
  .connect-location-verify-panel,
  .connect-profile-section,
  .connect-profile-form fieldset,
  .connect-usage-panel {
    grid-template-columns: 1fr;
  }

  .connect-profile-preview {
    position: static;
  }

  .connect-token-box,
  .connect-token-box span {
    justify-items: start;
  }

  .friend-request-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .friend-request-actions {
    grid-column: 1 / -1;
    justify-content: stretch;
  }

  .friend-request-actions button {
    flex: 1 1 120px;
  }

  .world-stat-grid,
  .continent-activity-row {
    grid-template-columns: 1fr;
  }

  .privacy-hero-panel {
    grid-template-columns: 1fr;
  }

  .admin-donut-layout,
  .admin-paid-column-chart {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .profile-location-grid {
    grid-template-columns: 1fr;
    justify-items: stretch;
    width: 100%;
  }

  .admin-paid-column {
    width: 100%;
  }

  .chat-shell {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-bottom: 132px;
  }

  .member-panel {
    order: 0;
    position: sticky;
    top: 82px;
    z-index: 22;
    max-height: min(58vh, 560px);
  }

  .member-list {
    max-height: 360px;
  }

  .member-list.video-gallery-active {
    max-height: min(46vh, 480px);
  }

  .chat-panel {
    order: 1;
    position: fixed;
    top: auto;
    left: max(18px, calc((100vw - 720px) / 2));
    right: max(18px, calc((100vw - 720px) / 2));
    bottom: 18px;
    z-index: 70;
    max-height: min(52vh, 520px);
    min-height: 0;
  }

  .room-chat-details[open] {
    height: min(500px, calc(100vh - 180px));
  }

  .room-chat-details[open] .message-list {
    height: min(300px, calc(100vh - 410px));
    min-height: 190px;
  }
}

@media (max-width: 767px) {
  body {
    padding-bottom: 86px;
  }

  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 64px;
    padding: 10px 14px;
  }

  .login-location-prompt {
    top: 64px;
    grid-template-columns: 1fr;
    align-items: stretch;
    padding: 10px 14px;
  }

  .tablet-menu {
    justify-self: end;
  }

  .tablet-menu summary span {
    display: none;
  }

  .tablet-menu summary {
    width: var(--touch);
    padding: 0;
  }

  .tablet-menu summary::before {
    margin-right: 0;
  }

  .tablet-menu-panel {
    grid-template-columns: 1fr;
    width: min(280px, calc(100vw - 28px));
  }

  .connect-tabs {
    width: 100%;
  }

  .connect-tabs button {
    flex: 1 1 100%;
  }

  .connect-photo-upload-grid {
    grid-template-columns: 1fr;
  }

  .payment-confirm-grid {
    grid-template-columns: 1fr;
  }

  .account-strip {
    grid-column: 1 / -1;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-start;
    width: 100%;
  }

  .plan-status span,
  .language-switcher span {
    display: none;
  }

  .brand small {
    display: none;
  }

  .hero-band {
    grid-template-columns: 1fr;
    min-height: 620px;
    padding: 40px 20px 70px;
    background:
      linear-gradient(180deg, rgba(247, 249, 252, 0.98) 0%, rgba(247, 249, 252, 0.92) 58%, rgba(247, 249, 252, 0.66) 100%),
      url("/assets/language-rooms-hero.png") center bottom / cover no-repeat;
    text-align: center;
  }

  .hero-preview {
    text-align: left;
  }

  .hero-actions,
  .trust-row {
    justify-content: center;
  }

  .section,
  .page-heading,
  .chat-shell {
    width: min(100% - 28px, 720px);
  }

  .chat-shell {
    padding-bottom: 154px;
  }

  .section {
    padding: 30px 0;
  }

  .page-heading {
    padding: 32px 0 10px;
  }

  .form-grid,
  .chat-input {
    grid-template-columns: 1fr;
  }

  .ai-chat-form {
    grid-template-columns: 1fr;
  }

  .filter-bar {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .filter-bar label {
    min-width: 0;
  }

  .pricing-grid,
  .feature-grid,
  .profile-grid,
  .admin-grid,
  .room-list {
    grid-template-columns: 1fr;
  }

  .voice-room-card {
    min-height: auto;
    gap: 10px;
    padding: 16px;
    border-left-width: 5px;
  }

  .voice-room-card h3 {
    font-size: 17px;
  }

  .room-stage {
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 12px;
    min-height: 128px;
    padding: 4px 0;
  }

  .room-host-spotlight,
  .room-roomcast-panel {
    min-height: 124px;
    padding: 10px;
  }

  .room-stage-avatar.main-speaker {
    width: 86px;
    height: 86px;
    font-size: 25px;
  }

  .room-rail-avatar,
  .room-avatar-overflow {
    width: 42px;
    height: 42px;
    margin-left: -8px;
    font-size: 12px;
  }

  .chat-panel {
    position: fixed;
    top: auto;
    left: 14px;
    right: 14px;
    bottom: calc(84px + env(safe-area-inset-bottom, 0px));
    z-index: 70;
    height: auto;
    max-height: min(50vh, 430px);
    min-height: 0;
    padding: 12px;
    border-radius: var(--radius);
    box-shadow: 0 14px 32px rgba(35, 48, 76, 0.08);
  }

  .room-chat-details {
    gap: 8px;
  }

  .room-chat-details summary {
    min-height: 44px;
    padding: 9px 12px;
  }

  .room-chat-details summary span {
    font-size: 15px;
  }

  .room-chat-details[open] {
    display: flex;
    flex-direction: column;
    height: auto;
    max-height: min(46vh, 420px);
    overflow: hidden;
  }

  .room-chat-details[open] .message-list {
    height: clamp(150px, 28vh, 260px);
    min-height: 150px;
    max-height: 260px;
    padding: 10px;
  }

  .room-chat-details[open] .room-chat-body {
    display: grid;
    grid-template-rows: auto auto;
    gap: 8px;
    min-height: 0;
    overflow: hidden;
    padding-top: 8px;
  }

  .member-list {
    gap: 7px;
    max-height: 260px;
    padding-bottom: 6px;
  }

  .member-list.video-gallery-active {
    display: flex;
    max-height: min(44vh, 360px);
    gap: 8px;
    overflow: auto;
  }

  .member-row {
    flex-basis: 68px;
    min-height: 92px;
    padding: 8px 6px;
  }

  .member-row.host {
    flex-basis: 76px;
  }

  .member-row.video,
  .member-row.screen {
    flex-basis: 118px;
    min-height: 126px;
  }

  .member-row.host.video,
  .member-row.host.screen {
    flex-basis: 128px;
  }

  .member-list.video-gallery-active .member-row {
    flex: 1 0 118px;
    min-height: 132px;
  }

  .member-list.video-gallery-active .member-row.video,
  .member-list.video-gallery-active .member-row.screen {
    min-height: 152px;
  }

  .member-list.video-gallery-active .member-media-slot {
    min-height: 78px;
  }

  .member-row .avatar-mini {
    width: 42px;
    height: 42px;
    font-size: 14px;
  }

  .member-row.host .avatar-mini {
    width: 48px;
    height: 48px;
  }

  .member-media-slot {
    min-height: 58px;
  }

  .member-media-focus {
    padding: 10px;
  }

  .member-media-focus-slot {
    min-height: clamp(170px, 46vw, 280px);
    max-height: min(50vh, 340px);
  }

  .room-media-viewer {
    padding: 8px;
  }

  .room-media-selector button {
    flex-basis: min(164px, 70vw);
    min-height: 54px;
  }

  .member-row-meta a {
    font-size: 11px;
  }

  .member-row small {
    display: none;
  }

  .member-panel {
    gap: 9px;
    padding: 14px;
    max-height: min(54vh, 430px);
  }

  .member-panel h2 {
    margin: 0;
    font-size: 20px;
    line-height: 1.15;
  }

  .member-panel h3 {
    margin: 0;
    font-size: 15px;
  }

  .room-language-line,
  .room-mode-strip {
    margin: 0;
  }

  .room-control-panel,
  .host-room-settings summary {
    padding: 8px;
  }

  .host-room-settings summary {
    min-height: 38px;
  }

  .host-room-settings summary small {
    display: none;
  }

  .member-voice-meter {
    margin-top: 4px;
  }

  .voice-state-pill {
    min-width: 0;
    padding: 4px 7px;
    font-size: 9px;
  }

  .voice-head,
  .voice-actions,
  .preview-actions,
  .media-call-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .voice-member {
    flex-basis: 170px;
  }

  .media-preview-grid {
    grid-template-columns: 1fr;
  }

  .media-preview.primary-media {
    grid-row: auto;
  }

  .media-preview.primary-media .media-video-slot,
  .media-video-slot {
    min-height: 220px;
  }

  .chat-input {
    grid-template-columns: minmax(0, 1fr) 74px auto auto;
    z-index: 12;
  }

  .chat-input textarea[name="message"] {
    min-height: 68px;
  }

  .room-host-donation {
    grid-template-columns: minmax(0, 1fr) 72px auto;
    padding: 8px;
  }

  .chat-input select[name="messageType"] {
    width: 74px;
    min-width: 0;
    padding-inline: 8px;
  }

  .chat-photo-picker,
  .chat-input .primary-btn {
    min-height: 40px;
    padding-inline: 10px;
  }

  .message {
    width: min(92%, 620px);
  }

  .current-talking-room-card,
  .current-room-actions {
    justify-items: stretch;
  }

  .current-room-actions,
  .current-room-actions .primary-btn {
    width: 100%;
  }

  .mobile-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 50;
    display: flex;
    gap: 6px;
    min-height: 72px;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    padding: 8px 84px calc(8px + env(safe-area-inset-bottom)) 10px;
    background: rgba(255, 255, 255, 0.96);
    border-top: 1px solid var(--line);
    backdrop-filter: blur(16px);
    scroll-snap-type: x proximity;
  }

  .mobile-nav a {
    flex: 0 0 auto;
    min-width: 64px;
    padding: 0 9px;
    font-size: 12px;
    white-space: nowrap;
    scroll-snap-align: center;
  }

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

  .column-chart {
    display: flex;
    overflow-x: auto;
    padding-bottom: 8px;
  }

  .cup-board-head,
  .room-race-row {
    grid-template-columns: 1fr;
  }

  .cup-board-head {
    display: grid;
  }

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

  .cup-podium {
    grid-template-columns: 1fr;
  }

  .podium-player,
  .podium-player.first,
  .podium-player.second,
  .podium-player.third {
    grid-column: 1;
    grid-row: auto;
    min-height: 230px;
    transform: none;
  }

  .podium-player.first {
    order: -1;
  }

  .podium-player.second {
    order: 0;
  }

  .podium-player.third {
    order: 1;
  }

  .room-race-row {
    display: grid;
    gap: 7px;
  }

  .room-race-row div {
    width: 100%;
  }

  .ranking-panel-meta {
    grid-template-columns: 1fr;
  }

  .story-rank-row,
  .profile-visit-row,
  .wall-comment-form {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .wall-comment-form {
    grid-template-columns: 1fr;
  }

  .story-rank-row div {
    grid-column: 2 / -1;
  }

  .profile-visit-row small {
    grid-column: 2 / -1;
  }

  .chart-column {
    flex: 0 0 76px;
    min-width: 76px;
  }

  .pie-layout,
  .safety-pie-layout {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .ranking-row {
    grid-template-columns: 28px auto minmax(0, 1fr);
  }

  .moderation-queue-head {
    display: none;
  }

  .moderation-queue-row {
    grid-template-columns: 1fr 1fr;
  }

  .moderation-user-cell {
    grid-column: 1 / -1;
  }

  .ranking-row > strong {
    grid-column: 3;
    justify-self: start;
  }

  .room-ranking-row {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .room-ranking-row .mini-capacity {
    grid-column: 2;
    width: 100%;
  }

  .learning-language-editor-row,
  .language-review-row {
    grid-template-columns: 1fr;
  }

  .safety-metric-grid {
    grid-template-columns: 1fr;
  }

  .safety-bar-row {
    grid-template-columns: 92px minmax(0, 1fr) 32px;
  }

  .floating-room-actions {
    right: 16px;
    bottom: 92px;
    gap: 8px;
  }

  .floating-room-action {
    width: 54px;
    height: 54px;
  }

  .modal-backdrop {
    align-items: end;
    justify-items: stretch;
    padding: 14px;
  }

  .upgrade-modal {
    width: 100%;
    max-height: calc(100dvh - 28px);
    padding: 22px 18px 18px;
    border-radius: 16px 16px 0 0;
  }

  .payment-modal .modal-actions {
    position: sticky;
    bottom: -1px;
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
    margin: 0 -2px -2px;
    padding: 10px 2px 2px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.84), #fff 42%);
    z-index: 2;
  }

  .payment-modal .modal-actions .primary-btn,
  .payment-modal .modal-actions .secondary-btn,
  .payment-modal .modal-actions .ghost-btn {
    width: 100%;
  }

  .payment-confirm-warning {
    font-size: 14px;
  }

  .toast {
    right: 14px;
    bottom: 146px;
  }

  .active-room-browse-bar {
    bottom: 148px;
  }

  .partner-location-panel {
    grid-template-columns: 1fr;
  }

  .partner-filter-bar {
    align-items: stretch;
  }

  .partner-filter-bar label,
  .partner-filter-bar button {
    width: 100%;
  }

  .partner-filter-bar .distance-preset {
    width: auto;
  }

  .partner-admin-rule-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 479px) {
  .brand strong {
    font-size: 15px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .account-strip .small {
    padding-inline: 9px;
  }

  .hero-copy p,
  .page-heading p,
  .section-copy {
    font-size: 16px;
  }

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

  .room-actions,
  .profile-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .room-stage {
    grid-template-columns: 1fr;
  }

  .room-host-spotlight,
  .room-roomcast-panel {
    min-height: auto;
  }

  .room-avatar-stack {
    justify-content: flex-start;
  }

}
