/* SocialOrbit+ — base structure (dark = Spider Venom default via themes.css) */

:root {
  --ms-orange: #84cc16;
  --ms-orange-dark: #65a30d;
  --ms-navy: #06060a;
  --ms-blue: #7c3aed;
  --ms-blue-dark: #5b21b6;
  --ms-link: #c4b5fd;
  --ms-bg: #08080c;
  --ms-panel: rgba(14, 10, 22, 0.94);
  --ms-soft: rgba(20, 14, 32, 0.9);
  --ms-border: rgba(124, 58, 237, 0.28);
  --ms-text: #ece8f4;
  --ms-muted: #9d8bb8;
  --orbit-magenta: #a855f7;
  --orbit-glow: rgba(132, 204, 22, 0.15);
  --avatar-ring: #7c3aed;
  --venom-toxic: #84cc16;
  --venom-purple: #a855f7;
  --page-bg-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(124, 58, 237, 0.18), transparent 55%),
    repeating-radial-gradient(circle at 50% 50%, transparent 0, transparent 23px, rgba(124, 58, 237, 0.04) 23px, rgba(124, 58, 237, 0.04) 24px),
    linear-gradient(180deg, #050508 0%, #0a0612 45%, #0e0818 100%);
  --page-bg-size: 100% 100%, 48px 48px, 100% 100%;
  --page-bg-animation: venomWebDrift 90s linear infinite;
}

@keyframes venomWebDrift {
  from { background-position: 0 0, 0 0, 0 0; }
  to { background-position: 0 0, 48px 48px, 0 0; }
}

@keyframes starDrift {
  from { background-position: 0 0, 40px 60px; }
  to { background-position: 0 180px, 40px 240px; }
}

@keyframes orbitSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

html, body {
  margin: 0;
  padding: 0;
  background-color: var(--ms-bg);
  background-image: var(--page-bg-image);
  background-size: var(--page-bg-size);
  animation: var(--page-bg-animation);
  color: var(--ms-text);
  font-family: "Space Grotesk", Verdana, Geneva, Tahoma, sans-serif;
  font-size: 13px;
  line-height: 1.5;
  min-height: 100%;
  -webkit-text-size-adjust: 100%;
}

.site-wrap {
  display: block;
  width: 100%;
  max-width: 100%;
}

a {
  color: var(--ms-link);
  text-decoration: none;
}

a:hover {
  color: #d4d8de;
  text-decoration: underline;
}

.accent-text {
  color: #e2e4e8;
  text-shadow: none;
}

.hero-lead {
  margin: 0 0 12px;
  color: var(--ms-muted);
  font-size: 13px;
}

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

.text-meta {
  color: var(--ms-muted);
  font-size: 10px;
}

.text-meta-11 {
  color: var(--ms-muted);
  font-size: 11px;
}

.shell {
  width: 1120px;
  max-width: calc(100vw - 24px);
  margin: 0 auto 24px;
  border: 1px solid var(--ms-border);
  background: linear-gradient(180deg, rgba(18, 12, 28, 0.98), rgba(10, 6, 16, 0.99));
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(124, 58, 237, 0.12),
    inset 0 1px 0 rgba(168, 85, 247, 0.08);
  overflow: hidden;
  border-radius: 12px;
}

.banner-cell {
  background: linear-gradient(90deg, #0c0614 0%, #1a0a2e 35%, #12081c 65%, #0c0614 100%);
  border-bottom: 1px solid rgba(124, 58, 237, 0.35);
  padding: 12px 16px !important;
  position: relative;
}

.brand-mark {
  font-family: "Exo 2", "Trebuchet MS", sans-serif;
  font-size: 30px;
  font-weight: 800;
  color: #f0ecfa;
  letter-spacing: -0.5px;
  text-shadow: 0 0 20px rgba(168, 85, 247, 0.35);
}

.brand-mark .dot {
  color: var(--venom-toxic, #84cc16);
  text-shadow: 0 0 12px rgba(132, 204, 22, 0.55);
}

.brand-tag {
  color: var(--ms-muted);
  font-size: 11px;
  margin-top: 2px;
  letter-spacing: 0.3px;
}

.banner-greet {
  color: var(--ms-muted);
  font-size: 11px;
  font-weight: bold;
}

.top-banner {
  background: transparent;
}

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

.brand-text {
  min-width: 0;
}

.brand-logo-circle {
  width: 74px;
  height: 70px;
  min-width: 74px;
  min-height: 64px;
  flex: 0 0 74px;
  box-sizing: border-box;
  border-radius: 14px;
  overflow: hidden;
  border: 2px solid #7c3aed;
  box-shadow: 0 0 14px rgba(124, 58, 237, 0.35), 0 2px 8px rgba(0, 0, 0, 0.45);
  background: #140a20;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 2px;
}

.brand-logo-circle img {
  width: 100% !important;
  height: 85% !important;
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 10px;
  transform: none;
}

.nav-bar {
  background: linear-gradient(180deg, #1a0a2e, #100818);
  border-bottom: 1px solid rgba(124, 58, 237, 0.3);
}

.nav-shell {
  position: relative;
}

.nav-toggle {
  display: none;
}

.nav-menu {
  display: block;
}

.nav-item {
  font-family: "Space Grotesk", Verdana, sans-serif;
  font-size: 11px;
  font-weight: bold;
  padding: 8px 4px;
  border-right: 1px solid rgba(124, 58, 237, 0.15);
}

.nav-item a {
  color: #d4c4f0;
  padding: 4px 8px;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}

.nav-item a:hover {
  background: rgba(124, 58, 237, 0.2);
  color: #f0ecfa;
  box-shadow: 0 0 10px rgba(132, 204, 22, 0.15);
  text-decoration: none;
}

.nav-signup {
  color: #e8eaee !important;
}

.nav-btn {
  font-family: "Space Grotesk", Verdana, sans-serif;
  font-size: 11px;
  font-weight: bold;
  background: #3a3a42;
  border: 1px solid #52525b;
  border-radius: 8px;
  cursor: pointer;
  padding: 3px 10px;
  color: #ececef;
}

.nav-btn:hover {
  border-color: #6b7280;
  color: #fff;
  background: #45454d;
}

.main-table {
  background: transparent;
}

.sidebar {
  background: rgba(24, 24, 28, 0.6);
  border-right: 1px solid var(--ms-border);
}

.content {
  background: rgba(22, 22, 26, 0.5);
  min-height: 460px;
  padding: 4px;
}

.panel {
  border: 1px solid var(--ms-border) !important;
  background: var(--ms-panel);
  border-collapse: collapse;
  border-radius: 8px;
  overflow: hidden;
}

.panel-title {
  background: linear-gradient(90deg, #1a0a2e, #2d1b4e) !important;
  font-weight: bold;
  color: #d4c4f0 !important;
  padding: 6px 10px !important;
  font-size: 11px;
  text-shadow: 0 0 8px rgba(168, 85, 247, 0.3);
}

.panel td {
  font-size: 11px;
}

.panel-body {
  padding: 8px;
  background: var(--ms-soft);
}

.page-title {
  font-family: "Exo 2", "Trebuchet MS", sans-serif;
  font-size: 22px;
  margin: 0 0 12px 0;
  color: #f4f4f6;
  border-bottom: 1px solid var(--ms-border);
  padding-bottom: 6px;
}

.bevel-btn,
.ms-btn {
  font-family: "Space Grotesk", Verdana, sans-serif;
  font-size: 11px;
  font-weight: bold;
  background: linear-gradient(180deg, #3d2a5c 0%, #1a1028 48%, #2d1b4e 52%, #241538 100%);
  color: #f0ecfa !important;
  border: 1px solid #7c3aed;
  border-radius: 8px;
  padding: 6px 14px;
  cursor: pointer;
  text-decoration: none !important;
  box-shadow:
    0 0 12px rgba(124, 58, 237, 0.25),
    inset 0 1px 0 rgba(168, 85, 247, 0.2);
}

.bevel-btn:hover,
.ms-btn:hover {
  filter: brightness(1.1);
  background: linear-gradient(180deg, #4c3570 0%, #241538 48%, #3d2a5c 52%, #2d1b4e 100%);
  box-shadow:
    0 0 18px rgba(132, 204, 22, 0.2),
    0 0 12px rgba(124, 58, 237, 0.35),
    inset 0 1px 0 rgba(168, 85, 247, 0.3);
}

.bevel-in {
  font-family: "Space Grotesk", Verdana, sans-serif;
  font-size: 12px;
  border: 1px solid rgba(124, 58, 237, 0.4);
  border-radius: 8px;
  background: rgba(10, 6, 18, 0.85);
  color: var(--ms-text);
  padding: 6px 8px;
  max-width: 100%;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.35);
}

.home-shout-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.home-shout-input {
  flex: 1 1 220px;
  min-width: 0;
}

.counter {
  display: inline-block;
  font-family: "Exo 2", Georgia, serif;
  font-weight: bold;
  background: rgba(255, 255, 255, 0.06);
  color: #d4d8de;
  padding: 2px 8px;
  border: 1px solid var(--ms-border);
  border-radius: 999px;
}

.flash {
  margin: 8px 10px;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 11px;
}

.flash-ok {
  background: #e7f8e7;
  border: 1px solid #8bc98b;
  color: #226622;
}

.flash-error {
  background: #fdeaea;
  border: 1px solid #e0a0a0;
  color: #8a2222;
}

.section-bar {
  background: linear-gradient(90deg, #1a0a2e, #2d1b4e, #1a0a2e);
  color: #d4c4f0;
  font-weight: bold;
  font-size: 11px;
  padding: 6px 10px;
  border-bottom: 1px solid rgba(132, 204, 22, 0.25);
  letter-spacing: 0.3px;
  text-transform: lowercase;
  text-shadow: 0 0 10px rgba(168, 85, 247, 0.35);
}

.ms-box {
  border: 1px solid rgba(124, 58, 237, 0.3);
  background: var(--ms-panel);
  margin-bottom: 10px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow:
    inset 0 1px 0 rgba(168, 85, 247, 0.1),
    0 4px 16px rgba(0, 0, 0, 0.3);
}

.ms-box-body {
  padding: 12px 14px;
  background: var(--ms-soft);
}

.contact-link {
  display: block;
  padding: 3px 0;
  font-size: 11px;
}

.content {
  padding: 4px 6px 8px 12px;
}

.avatar-frame {
  width: 180px;
  height: 180px;
  border: 3px solid var(--ms-orange);
  background: linear-gradient(145deg, #fff, #e8eef6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  margin: 0 auto 8px;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.profile-name {
  font-family: "Trebuchet MS", "Segoe UI", Tahoma, sans-serif;
  font-size: 26px;
  font-weight: bold;
  margin: 0 0 6px;
  letter-spacing: -0.3px;
}

.mood-line {
  font-size: 12px;
  color: var(--ms-muted);
  margin-bottom: 14px;
  line-height: 1.55;
}

.online-dot {
  color: #84cc16;
  font-weight: bold;
  text-shadow: 0 0 10px rgba(132, 204, 22, 0.7);
}

.nav-badge {
  display: inline-block;
  background: linear-gradient(180deg, #7c3aed, #5b21b6);
  color: #f0ecfa;
  font-size: 9px;
  padding: 0 5px;
  border-radius: 8px;
  vertical-align: top;
  margin-left: 2px;
  font-weight: bold;
  box-shadow: 0 0 8px rgba(124, 58, 237, 0.4);
}

.presence-dot {
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 10px;
  height: 10px;
  background: #84cc16;
  border: 2px solid #0a0614;
  border-radius: 50%;
  z-index: 2;
  box-shadow: 0 0 8px rgba(132, 204, 22, 0.7);
}

.dm-log {
  border-top: none;
}

.dm-mine .chat-user {
  color: #7ec8ff;
}

.dm-theirs .chat-user {
  color: var(--ms-orange);
}

.shout-feed {
  max-height: 320px;
  overflow-y: auto;
}

.shout-row {
  padding: 6px 0;
  border-bottom: 1px solid #e5ebf3;
  font-size: 12px;
}

.shout-body {
  margin-left: 6px;
}

.shout-time {
  display: block;
  color: var(--ms-muted);
  font-size: 10px;
  margin-top: 2px;
}

.photo-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 14px;
}

.photo-card {
  width: 160px;
  text-align: center;
  font-size: 11px;
}

.photo-card img {
  width: 160px;
  height: 130px;
  object-fit: cover;
  border: 2px solid #88aacc;
  background: #eee;
}

.photo-cap {
  margin-top: 3px;
  color: var(--ms-muted);
}


.friend-grid {
  width: 100%;
  border-collapse: collapse;
}

.friend-grid td {
  width: 25%;
  text-align: center;
  vertical-align: top;
  padding: 6px 4px;
  font-size: 10px;
}

.friend-avatar-slot {
  position: relative;
  width: 70px;
  height: 70px;
  margin: 0 auto 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.friend-avatar {
  width: 70px;
  height: 70px;
  margin: 0 auto 4px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  background: rgba(12, 8, 24, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  border-radius: 50%;
}

.user-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(12, 8, 24, 0.9);
  border: 2px solid var(--avatar-ring, rgba(255, 255, 255, 0.2));
  flex-shrink: 0;
  vertical-align: middle;
  position: relative;
}

.user-avatar img {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: cover !important;
  display: block !important;
  border: 0;
}

.user-avatar-fallback {
  font-size: 0.85em;
  line-height: 1;
  color: var(--ms-orange);
}

.user-avatar-xs { width: 24px; height: 24px; font-size: 11px; }
.user-avatar-sm { width: 40px; height: 40px; font-size: 16px; }
.user-avatar-md { width: 70px; height: 70px; font-size: 24px; }
.user-avatar-lg { width: 96px; height: 96px; font-size: 32px; }
.user-avatar-xl { width: 180px; height: 180px; font-size: 48px; }

.user-avatar-orbit::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  pointer-events: none;
}

.profile-avatar-frame {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
}

.shout-user-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ms-link);
}

.member-link,
.post-author-inline,
.bulletin-author {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.chat-avatar-img {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  object-fit: cover;
  vertical-align: middle;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.chat-avatar-fallback {
  display: inline-block;
  vertical-align: middle;
}

.post-author-cell {
  background: rgba(12, 8, 24, 0.6) !important;
  text-align: center;
  padding: 10px !important;
}

.comment-row td {
  border-top: 1px solid var(--ms-border);
  padding: 8px;
  vertical-align: top;
  background: rgba(12, 8, 24, 0.4);
}

.comment-author {
  width: 120px;
  background: rgba(18, 12, 36, 0.7) !important;
  text-align: center;
  font-size: 11px;
}

.homepage-body {
  min-height: 60px;
  word-wrap: break-word;
  padding: 8px;
  background: rgba(12, 8, 24, 0.5);
}

.post-body {
  white-space: pre-wrap;
  word-wrap: break-word;
  font-size: 12px;
}

.codey {
  font-family: Consolas, "Courier New", monospace;
  font-size: 11px;
}

.chat-log {
  height: 320px;
  overflow-y: auto;
  padding: 10px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
  color: #e8e4f0;
  background: linear-gradient(180deg, #12081c, #08040e);
  text-align: left;
  border: 1px solid rgba(124, 58, 237, 0.25);
}

.chat-line { margin-bottom: 6px; }
.chat-user { color: #a3e635; font-weight: bold; text-shadow: 0 0 6px rgba(132, 204, 22, 0.4); }
.chat-time { color: #7c6b94; font-size: 10px; }

.form-box {
  max-width: 460px;
  border: 1px solid var(--ms-border) !important;
  border-radius: 4px;
  overflow: hidden;
}

.home-hero {
  background: linear-gradient(180deg, rgba(26, 10, 46, 0.9), rgba(14, 8, 24, 0.95));
  border: 1px solid rgba(124, 58, 237, 0.35);
  border-radius: 12px;
  padding: 20px 22px;
  margin-bottom: 16px;
  box-shadow: 0 0 24px rgba(124, 58, 237, 0.12);
}

.home-hero h1 {
  font-family: "Exo 2", "Trebuchet MS", sans-serif;
  font-size: 30px;
  margin: 0 0 8px;
  color: #f0ecfa;
  border: none;
  padding: 0;
  text-shadow: 0 0 16px rgba(168, 85, 247, 0.3);
}

.pill-stat {
  display: inline-block;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--ms-border);
  border-radius: 999px;
  padding: 4px 12px;
  margin: 2px 4px 2px 0;
  font-size: 11px;
  color: var(--ms-muted);
}

.interest-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.interest-table th {
  width: 90px;
  text-align: left;
  vertical-align: top;
  color: var(--ms-muted);
  padding: 4px 6px 4px 0;
  font-weight: bold;
}

.interest-table td {
  padding: 4px 0;
  color: var(--ms-text);
}

/* —— Profile page polish —— */
#profile-root {
  font-size: 13px;
  line-height: 1.6;
}

.profile-layout > tbody > tr > td {
  padding: 6px 10px;
}

.profile-sidebar {
  width: 300px;
}

.profile-meta {
  text-align: center;
  margin: 0 0 16px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--ms-muted);
}

.profile-blurb-label {
  display: block;
  font-size: 12px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 6px;
}

.profile-blurb-text {
  margin: 0 0 18px;
  white-space: pre-wrap;
  line-height: 1.65;
}

.profile-section-note {
  font-size: 11px;
  color: var(--ms-muted);
  margin-top: 4px;
}

.upload-box {
  background: var(--ms-soft);
  border: 1px dashed var(--ms-border);
  border-radius: 4px;
  padding: 12px 14px;
  margin-bottom: 10px;
  color: var(--ms-text);
}

.upload-box label {
  display: block;
  font-size: 11px;
  color: var(--ms-muted);
  margin-bottom: 6px;
}

.upload-or {
  text-align: center;
  font-size: 11px;
  color: var(--ms-muted);
  margin: 10px 0;
}

.avatar-upload-form {
  text-align: center;
  margin: 0 0 14px;
}

.avatar-upload-form input[type="file"] {
  font-size: 11px;
  max-width: 100%;
}

#profile-root .interest-table {
  font-size: 12px;
}

#profile-root .interest-table th {
  width: 100px;
  padding: 6px 8px 6px 0;
}

#profile-root .interest-table td {
  padding: 6px 0;
  line-height: 1.55;
}

#profile-root .contact-link {
  font-size: 12px;
  padding: 5px 0;
}

#profile-root .comment-row td {
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.55;
}

#profile-root .comment-author {
  width: 130px;
}

#profile-root .ms-box {
  margin-bottom: 14px;
}

#profile-root .section-bar {
  font-size: 12px;
  padding: 7px 12px;
}

.shout-history-item {
  font-size: 12px;
  margin-bottom: 6px;
  line-height: 1.5;
  opacity: 0.92;
}

.shout-history-time {
  opacity: 0.6;
  font-size: 11px;
}

.cool-count {
  color: var(--ms-muted);
  font-size: 11px;
}

.footer-bar {
  background: linear-gradient(180deg, #100818, #0a0610);
  border-top: 1px solid rgba(124, 58, 237, 0.3);
  color: var(--ms-muted);
  font-size: 10px;
}

@media (max-width: 820px) {
  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }

  html,
  body {
    overflow-x: hidden;
    max-width: 100%;
  }

  .site-wrap {
    padding: 0;
    overflow-x: hidden;
    max-width: 100%;
  }

  .shell {
    width: 100% !important;
    max-width: 100%;
    margin: 0;
    border-left: none;
    border-right: none;
    border-radius: 0;
    box-shadow: none;
    overflow-x: hidden;
  }

  .shell > tbody > tr > td,
  .top-banner,
  .top-banner table,
  .banner-cell table,
  .nav-shell,
  .nav-menu,
  .nav-bar,
  .main-table,
  .footer-bar,
  .footer-bar table {
    width: 100% !important;
    max-width: 100%;
  }

  .main-table {
    table-layout: fixed;
  }

  .main-table > tbody > tr > td {
    padding: 10px !important;
  }

  .brand-row {
    max-width: 100%;
    flex-wrap: wrap;
  }

  .brand-text {
    min-width: 0;
    flex: 1 1 180px;
  }

  .brand-tag {
    word-break: break-word;
  }

  .content {
    overflow-x: hidden;
    min-width: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .content img,
  .content video,
  .content embed,
  .content object,
  .homepage-body img,
  .homepage-body video,
  .homepage-body embed,
  .homepage-body iframe,
  .post-body img,
  .ms-box-body img {
    max-width: 100% !important;
    height: auto !important;
  }

  /* Keep member avatars icon-sized — don't let the rule above blow them up */
  .user-avatar img {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: cover !important;
  }

  .user-avatar {
    flex-shrink: 0;
    max-width: 100%;
  }

  .homepage-body,
  .post-body,
  .codey,
  pre {
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: pre-wrap;
    max-width: 100%;
  }

  #profile-root {
    overflow-x: hidden;
    padding: 12px 10px !important;
    background-attachment: scroll !important;
  }

  .ms-box,
  .panel,
  .home-hero,
  .form-box {
    max-width: 100%;
    overflow: hidden;
  }

  .friend-grid {
    width: 100% !important;
    table-layout: fixed;
  }

  .friend-grid td {
    overflow: hidden;
    word-wrap: break-word;
  }

  .friend-grid td a {
    word-break: break-word;
  }

  .groups-layout,
  .groups-layout > tbody > tr,
  .groups-layout > tbody > tr > td {
    display: block;
    width: 100% !important;
  }

  .post-box,
  .post-box > tbody > tr,
  .post-box > tbody > tr > td {
    display: block;
    width: 100% !important;
  }

  .post-author-cell {
    width: 100% !important;
    text-align: left !important;
    border-bottom: 1px solid var(--ms-border);
  }

  .stack-table {
    width: 100% !important;
    table-layout: fixed;
  }

  .stack-table > tbody > tr:first-child {
    display: none;
  }

  .stack-table > tbody > tr {
    display: block;
    border-bottom: 1px solid var(--ms-border);
    padding: 10px 8px;
  }

  .stack-table > tbody > tr > td {
    display: block;
    width: 100% !important;
    padding: 3px 0;
    border: none;
    text-align: left !important;
    word-break: break-word;
  }

  .inbox-table,
  .friend-request-table {
    width: 100% !important;
    table-layout: fixed;
  }

  .inbox-table tr,
  .friend-request-table tr {
    display: block;
    border-bottom: 1px solid var(--ms-border);
    padding: 10px 0;
  }

  .inbox-table td,
  .friend-request-table td {
    display: block;
    width: 100% !important;
    text-align: left !important;
    padding: 4px 0;
  }

  .inbox-table td:first-child,
  .friend-request-table td:first-child {
    width: auto !important;
    padding-bottom: 8px;
  }

  .friend-request-table td[align="right"] form {
    display: block;
    margin: 6px 0;
  }

  .chat-frame,
  .chat-frame > tbody,
  .chat-frame > tbody > tr,
  .chat-frame > tbody > tr > td {
    display: block;
    width: 100% !important;
  }

  .dm-form,
  #chat-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  #dm-input,
  #chat-input {
    width: 100% !important;
    display: block;
    margin-bottom: 0;
  }

  .interest-table,
  .interest-table tbody,
  .interest-table tr,
  .interest-table th,
  .interest-table td {
    display: block;
    width: 100% !important;
  }

  .interest-table th {
    padding-bottom: 2px;
  }

  .interest-table td {
    padding-bottom: 10px;
  }

  .settings-option {
    flex-direction: column;
    gap: 6px;
  }

  .settings-option select.bevel-in {
    width: 100% !important;
    max-width: 100% !important;
  }

  .upload-box,
  .avatar-upload-form input[type="file"] {
    max-width: 100%;
  }

  .member-link,
  .shout-user-link,
  .post-author-inline,
  .bulletin-author {
    max-width: 100%;
    flex-wrap: wrap;
  }

  .pill-stat,
  .counter {
    max-width: 100%;
    word-break: break-word;
  }

  .ms-box-body form input.bevel-in + .bevel-btn,
  .ms-box-body form input.bevel-in + input.bevel-btn,
  .ms-box-body form textarea.bevel-in + .bevel-btn,
  .ms-box-body form textarea.bevel-in + input.bevel-btn {
    display: block;
    width: 100%;
    margin-top: 8px;
  }

  #profile-root table {
    width: 100% !important;
    max-width: 100%;
    table-layout: fixed;
  }

  #profile-root .homepage-body img {
    max-width: 100% !important;
    height: auto !important;
  }

  #profile-root .user-avatar img {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    object-fit: cover !important;
  }

  .banner-cell {
    padding: 10px 12px !important;
  }

  .banner-cell > table > tbody > tr {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .banner-greet-cell {
    text-align: left !important;
    width: 100%;
  }

  .brand-mark {
    font-size: 24px;
  }

  .brand-tag {
    font-size: 10px;
  }

  .nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 11px 14px;
    margin: 0;
    border: none;
    border-bottom: 1px solid var(--ms-border);
    background: linear-gradient(180deg, #1a0a2e, #100818);
    color: var(--ms-text);
    font-family: inherit;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.15s, box-shadow 0.15s;
  }

  .nav-toggle:hover,
  .nav-toggle.is-open {
    background: linear-gradient(180deg, #241538, #140a20);
    box-shadow: inset 0 0 12px rgba(124, 58, 237, 0.15);
  }

  .nav-toggle-icon {
    font-size: 16px;
    line-height: 1;
  }

  .nav-menu {
    display: none;
  }

  .nav-menu.is-open {
    display: block;
  }

  .nav-bar > tbody > tr {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .nav-item {
    flex: none;
    width: 100%;
    min-width: 0;
    border-right: none;
    border-bottom: 1px solid var(--ms-border);
    padding: 0;
    text-align: left;
  }

  .nav-item a,
  .nav-item .nav-btn {
    display: block;
    padding: 12px 16px;
    min-height: 44px;
    box-sizing: border-box;
  }

  .nav-item .theme-toolbar {
    padding: 10px 16px;
    justify-content: flex-start;
  }

  .nav-theme-cell {
    flex: none;
    min-width: 0;
  }

  .main-table > tbody > tr {
    display: flex;
    flex-direction: column;
  }

  .main-table .content {
    order: 1;
    padding: 12px;
    min-height: auto;
  }

  .main-table .sidebar {
    order: 2;
    width: 100% !important;
    border-right: none;
    border-top: 1px solid var(--ms-border);
    padding: 12px;
  }

  .home-columns,
  .home-columns > tbody > tr,
  .home-columns > tbody > tr > td,
  .profile-layout,
  .profile-layout > tbody > tr,
  .profile-layout > tbody > tr > td {
    display: block;
    width: 100% !important;
    max-width: 100%;
  }

  #profile-root {
    padding: 12px;
  }

  .profile-sidebar {
    margin-bottom: 12px;
  }

  .avatar-frame {
    width: 160px;
    height: 160px;
  }

  .photo-grid {
    justify-content: center;
    padding: 10px;
  }

  .photo-card {
    width: calc(50% - 8px);
  }

  .photo-card img {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
  }

  .friend-grid td {
    width: 50%;
    padding: 10px 6px;
    font-size: 11px;
  }

  tr.comment-row {
    display: block;
    border-top: 1px solid #d5deea;
  }

  tr.comment-row td {
    display: block;
    width: 100% !important;
  }

  .comment-author {
    width: 100% !important;
    text-align: left !important;
    padding-bottom: 4px !important;
  }

  .bevel-in,
  input[type="text"],
  input[type="url"],
  input[type="email"],
  input[type="password"],
  input[type="search"],
  input[type="file"],
  textarea,
  select {
    width: 100% !important;
    max-width: 100%;
    font-size: 16px;
  }

  .home-shout-form {
    flex-direction: column;
    align-items: stretch;
  }

  .home-shout-input {
    width: 100% !important;
  }

  .bevel-btn,
  .ms-btn,
  .nav-btn,
  input[type="submit"].bevel-btn {
    min-height: 42px;
    padding: 10px 14px;
    font-size: 13px;
  }

  .form-box {
    max-width: 100%;
  }

  .home-hero {
    padding: 16px;
  }

  .home-hero h1 {
    font-size: 24px;
  }

  .page-title {
    font-size: 18px;
  }

  .chat-log {
    height: 50vh;
    min-height: 220px;
  }

  #chat-input {
    width: 100% !important;
    display: block;
    margin-bottom: 8px;
  }

  #chat-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .user-avatar-xl {
    width: 160px;
    height: 160px;
    font-size: 48px;
  }

  .flash {
    margin: 8px;
  }
}

.nav-theme-cell {
  min-width: 72px;
}

@media (max-width: 820px) {
  .nav-theme-cell {
    flex: none;
    min-width: 0;
  }

  .theme-toolbar {
    justify-content: flex-start;
  }
}

@media (max-width: 480px) {
  .main-table > tbody > tr > td {
    padding: 8px !important;
  }

  .main-table .content,
  .main-table .sidebar {
    padding: 10px 8px !important;
  }

  .brand-mark {
    font-size: 20px;
  }

  .brand-tag {
    font-size: 9px;
    line-height: 1.35;
  }

  .home-hero h1 {
    font-size: 20px;
  }

  .page-title {
    font-size: 17px;
  }

  .friend-grid td {
    width: 50%;
    padding: 8px 4px;
    font-size: 10px;
  }

  .friend-avatar-slot,
  .friend-avatar {
    width: 56px;
    height: 56px;
  }

  .user-avatar-md {
    width: 56px;
    height: 56px;
    font-size: 20px;
  }

  .brand-logo-circle {
    width: 60px;
    height: 52px;
    min-width: 60px;
    min-height: 52px;
    flex: 0 0 60px;
  }

  .photo-card {
    width: 100%;
  }

  .profile-name {
    font-size: 22px;
    word-break: break-word;
  }

  .mood-line {
    word-break: break-word;
  }
}
