
:root {
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; font-variant-numeric: tabular-nums; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.5; font-weight: 400;
}
::selection { background: rgba(245, 158, 11, 0.22); color: inherit; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
h1, h2, h3 { text-wrap: balance; letter-spacing: -0.02em; }
p, li { text-wrap: pretty; }
a {
  text-decoration: none; text-underline-offset: 3px;
  transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease, transform 140ms var(--ease-out);
}
button, input, select, textarea { font-family: inherit; font-variant-numeric: tabular-nums; }
button, [type="submit"], .inv-ch-btn, .ludo-post-cta, .mob-nav-link, .plastic-card {
  transition: transform 140ms var(--ease-out), background-color 150ms ease, border-color 150ms ease, color 150ms ease, opacity 150ms ease;
}
button:active, [type="submit"]:active, .inv-ch-btn:active, .ludo-post-cta:active, .mob-nav-link:active, .plastic-card:active {
  transform: scale(0.97);
}
@keyframes inviteModalIn {
  from { transform: scale(0.96); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
@media (hover: hover) and (pointer: fine) {
  .plastic-card:hover { transform: translateY(-1px); }
}
.bell-dropdown {
  position: absolute; right: 0; top: 112%; width: 352px;
  background: #19191b; color: #ededed; border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px; box-shadow: 0 12px 28px rgba(0,0,0,0.42); padding: 12px; z-index: 999;
  transform-origin: top right; transform: scale(0.95) translateY(-4px);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: transform 180ms var(--ease-out), opacity 180ms var(--ease-out), visibility 180ms;
}
.bell-dropdown.open {
  transform: scale(1) translateY(0); opacity: 1; visibility: visible; pointer-events: auto;
}
.notif-item { padding: 8px 4px; border-bottom: 1px solid rgba(255,255,255,0.08); font-size: 13px; color: #a1a1a6; }
.notif-item a { color: #ededed; font-weight: 500; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; transform: none !important; }
}


body { background: #f5f7fa; color: #111827; }
.reddit-Navbar {
  background: #ffffff; border-bottom: 1px solid rgba(17,24,39,0.08); height: 56px;
  position: sticky; top: 0; z-index: 100; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.reddit-brand { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 16px; color: #111827; }
.reddit-snoo {
  width: 28px; height: 28px; border-radius: 6px; background: #111827;
  color: #ffffff; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; font-family: monospace;
}
.reddit-search {
  flex: 1; max-width: 480px; height: 36px; background: #eceff4; border: 1px solid rgba(17,24,39,0.08);
  border-radius: 8px; padding: 0 12px; font-size: 13px; color: #111827;
}
.sub-header-banner {
  background: #0b0d14; color: #eef0f5; padding: 20px 0; border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sub-header-inner {
  max-width: 1280px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px;
}
.sub-pills-bar {
  background: #ffffff; border-bottom: 1px solid rgba(17,24,39,0.08); padding: 8px 24px;
}
.sub-pills-inner { max-width: 1280px; margin: 0 auto; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.sub-pill {
  height: 32px; line-height: 30px; padding: 0 12px; border-radius: 6px; font-size: 13px; font-weight: 500;
  background: #eceff4; color: #4b5565; border: 1px solid rgba(17,24,39,0.08);
}
.sub-pill:hover, .sub-pill.active { background: #111827; color: #ffffff; border-color: #111827; }
.reddit-grid {
  max-width: 1280px; margin: 20px auto; padding: 0 24px;
  display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start;
}
.reddit-post {
  display: grid; grid-template-columns: 48px minmax(0, 1fr);
  background: #ffffff; border: 1px solid rgba(17,24,39,0.08); border-radius: 12px; margin-bottom: 12px; overflow: hidden;
}
.vote-col {
  background: #fafafa; border-right: 1px solid rgba(17,24,39,0.06); padding: 12px 4px; display: flex;
  flex-direction: column; align-items: center; gap: 4px; font-weight: 500; font-size: 13px; color: #4b5565; font-family: monospace;
}
.vote-btn { cursor: pointer; border: none; background: transparent; font-size: 13px; color: #6b7487; }
.r-post-main { padding: 16px 20px; }
.r-meta-top { font-size: 12px; color: #6b7487; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.r-sub-name { font-weight: 500; color: #111827; font-family: monospace; }
.r-ta-flair { background: #eceff4; color: #111827; font-weight: 500; padding: 2px 8px; border-radius: 6px; font-size: 12px; }
.r-title { font-size: 16px; font-weight: 500; color: #111827; display: block; margin-bottom: 8px; line-height: 1.4; }
.r-flair-pill {
  display: inline-block; padding: 2px 8px; border-radius: 6px;
  background: #eceff4; color: #1d4ed8; font-size: 12px; font-weight: 500; margin-right: 8px; font-family: monospace;
}
.turnitin-audit-card {
  background: #fafafa; border: 1px solid rgba(17,24,39,0.08);
  border-radius: 8px; padding: 12px 16px; margin: 12px 0;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 13px;
}
.r-footer-actions {
  display: flex; gap: 16px; align-items: center; margin-top: 12px;
  padding-top: 12px; border-top: 1px solid rgba(17,24,39,0.08); font-size: 12px; font-weight: 500; color: #6b7487;
}
.r-sidebar-box {
  background: #ffffff; border: 1px solid rgba(17,24,39,0.08); border-radius: 12px; overflow: hidden; margin-bottom: 16px;
}
.r-side-head { background: #111827; color: #ffffff; padding: 12px 16px; font-weight: 500; font-size: 14px; }
.r-side-body { padding: 16px; font-size: 13px; }


/* Global Multi-Device & Touch Safety Rules */
html, body { max-width: 100%; overflow-x: hidden; -webkit-text-size-adjust: 100%; }
img, svg, video, canvas, iframe, table { max-width: 100%; }
.table-scroll-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.mobile-top-appbar, .mobile-bottom-nav { display: none; }

/* Tablet & Compact Laptop Breakpoint (<= 1100px) */
@media (max-width: 1100px) {
  .ludo-shell { grid-template-columns: 210px minmax(0, 1fr); }
  .ludo-right-rail {
    grid-column: 1 / -1; border-top: 1px solid #21262d;
    display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 0.85rem;
  }
  .reddit-grid, .xf-container, .kosmo-grid, .banki-grid {
    grid-template-columns: minmax(0, 1fr) 290px; gap: 0.95rem; padding: 0 0.9rem;
  }
  .plastic-cards-row { grid-template-columns: repeat(2, 1fr); }
  .invite-forms-grid, .invite-two-col-grid { grid-template-columns: minmax(0, 1fr) !important; }
}

/* Smartphone & Phablet Breakpoint (<= 768px: iPhone 390x844, Android 360x800, iPad Mini Portrait 768x1024) */
@media (max-width: 768px) {
  body { padding-bottom: calc(66px + env(safe-area-inset-bottom, 0px)); }
  main, aside, section, article { min-width: 0; max-width: 100%; }
  input, select, textarea { font-size: 16px !important; width: 100%; min-width: 0; max-width: 100%; }
  .invite-trap-box { padding: 0.75rem 0.8rem !important; }
  .invite-forms-grid, .invite-two-col-grid { grid-template-columns: minmax(0, 1fr) !important; }
  table { display: block; width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .bell-dropdown {
    position: fixed !important; top: 56px !important; left: 10px !important; right: 10px !important;
    width: auto !important; max-height: 70vh; overflow-y: auto;
  }

  /* Sticky Bottom App Navigation Bar for Mobile Users */
  .mobile-bottom-nav {
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
    position: fixed; bottom: 0; left: 0; right: 0;
    height: calc(60px + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px); z-index: 950;
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.28);
  }
  .mob-nav-link {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 0.12rem; font-size: 0.68rem; font-weight: 700; text-align: center;
    padding: 0.25rem 0.15rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .mob-nav-icon { font-size: 1.12rem; line-height: 1.1; }
  .mob-nav-cta .mob-nav-icon {
    width: 34px; height: 34px; border-radius: 999px;
    display: flex; align-items: center; justify-content: center; font-size: 0.88rem; font-weight: 900;
  }

  /* 1.1 LudoWall Mobile (Port 8101) */
  .mobile-top-appbar.ludo-mob-top {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.55rem 0.85rem; background: #111821; border-bottom: 1px solid #263547;
    position: sticky; top: 0; z-index: 90;
  }
  .ludo-ticker {
    justify-content: flex-start; overflow-x: auto; padding: 0.32rem 0.75rem; font-size: 0.72rem; gap: 1.1rem;
  }
  .ludo-shell { display: block; width: 100%; }
  .ludo-left-rail { display: none !important; }
  .ludo-center-stream { border-right: none; width: 100%; }
  .ludo-sticky-tabs { position: static; padding: 0.35rem 0.65rem; gap: 0.4rem; flex-wrap: wrap; }
  .ludo-tab-links { width: 100%; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }
  .ludo-tab-links a { padding: 0.55rem 0.7rem; font-size: 0.8rem; flex-shrink: 0; }
  .ludo-composer, .ludo-post-card { padding: 0.85rem 0.8rem; }
  .ludo-composer-grid, .ludo-composer-row2, .parlay-legs-grid {
    grid-template-columns: 1fr !important; gap: 0.45rem !important;
  }
  .ludo-post-head { flex-wrap: wrap; gap: 0.45rem; }
  .ludo-top-payout-btn { width: 100%; text-align: center; }
  .slot-replay-topbar { flex-wrap: wrap; gap: 0.25rem; font-size: 0.68rem; padding: 0.4rem 0.65rem; }
  .slot-reels-grid { gap: 0.25rem; padding: 0.55rem; }
  .slot-cell { height: 36px; font-size: 0.98rem; border-radius: 6px; }
  .slot-cell.orb-mult { font-size: 0.72rem; }
  .slot-win-banner {
    flex-direction: column; align-items: flex-start; gap: 0.45rem; padding: 0.65rem 0.75rem;
  }
  .slot-win-banner > div:last-child {
    text-align: left !important; width: 100%; display: flex; justify-content: space-between; align-items: center;
  }
  .slot-mult-badge { font-size: 1.35rem; }
  .ludo-right-rail { display: block; padding: 0.8rem; }

  /* 1.2 CampusThread Reddit Mobile (Port 8102) */
  .reddit-Navbar { height: auto; padding: 0.55rem 0.75rem; flex-wrap: wrap; gap: 0.45rem; }
  .reddit-Navbar form { order: 3; min-width: 100%; max-width: 100% !important; }
  .reddit-Navbar .r-top-actions { display: none !important; }
  .sub-header-banner { padding: 0.8rem 0; }
  .sub-header-inner { padding: 0 0.8rem; gap: 0.65rem; }
  .sub-header-inner h1 { font-size: 1.12rem !important; }
  .sub-pills-bar { padding: 0.4rem 0.75rem; }
  .sub-pills-inner {
    flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; padding-bottom: 2px;
  }
  .sub-pill { flex-shrink: 0; }
  .reddit-grid { grid-template-columns: minmax(0, 1fr); margin: 0.65rem auto; padding: 0 0.55rem; gap: 0.75rem; }
  .r-composer-form { grid-template-columns: minmax(0, 1fr) !important; }
  .reddit-post { grid-template-columns: 34px minmax(0, 1fr); }
  .r-post-main { padding: 0.65rem 0.7rem; }
  .r-title { font-size: 0.96rem; }
  .turnitin-audit-card { flex-direction: column; align-items: flex-start; }
  .r-footer-actions { flex-wrap: wrap; gap: 0.5rem; }

  /* 1.3 EsoForum XenForo 2.x Mobile (Port 8103) */
  .xf-topbar { padding: 0.65rem 0.8rem; }
  .xf-title { font-size: 1.02rem; }
  .xf-subnav { padding: 0.4rem 0.8rem; overflow-x: auto; white-space: nowrap; }
  .xf-subnav-inner { flex-wrap: nowrap; }
  .xf-container { grid-template-columns: minmax(0, 1fr); margin: 0.7rem auto; padding: 0 0.6rem; }
  .tarot-spread-box { padding: 0.8rem; }
  .tarot-cards-row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.35rem; }
  .tarot-visual-card { padding: 0.45rem 0.25rem; min-width: 0; }
  .tarot-symbol { font-size: 1.35rem; }
  .tarot-name { font-size: 0.7rem; }
  .tarot-form-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important; }
  .tarot-form-grid input[name="city_name"], .tarot-form-grid input[name="question"], .tarot-form-grid button {
    grid-column: 1 / -1 !important; width: 100%;
  }
  .xf-node-row { grid-template-columns: 36px minmax(0, 1fr); padding: 0.65rem; gap: 0.5rem; }
  .xf-node-row > div:nth-child(3), .xf-node-row > div:nth-child(4) {
    grid-column: 2 / -1; text-align: left !important; border-left: none !important;
    padding-left: 0 !important; font-size: 0.73rem;
  }
  .xf-message { grid-template-columns: 1fr; }
  .xf-user-bit {
    border-right: none; border-bottom: 1px solid #2e174a; padding: 0.65rem 0.8rem;
    display: flex; align-items: center; gap: 0.65rem; text-align: left;
  }
  .xf-avatar-lg { width: 44px; height: 44px; font-size: 1.25rem; margin: 0; flex-shrink: 0; }
  .xf-user-stats { display: none; }
  .xf-msg-main { padding: 0.75rem 0.8rem; }

  /* 1.4 LadyClubForum Kosmetista/BabyBlog Mobile (Port 8104) */
  .kosmo-masthead { padding: 0.75rem 0.85rem; }
  .kosmo-brand { font-size: 1.25rem; }
  .kosmo-rubrics { padding: 0.45rem 0.8rem; }
  .kosmo-rubrics-inner {
    flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch;
  }
  .kosmo-rubrics-inner a { flex-shrink: 0; }
  .kosmo-grid { grid-template-columns: minmax(0, 1fr); margin: 0.75rem auto; padding: 0 0.65rem; }
  .kosmo-post-card { padding: 0.9rem; border-radius: 12px; }
  .weight-steps { flex-direction: column; align-items: flex-start; gap: 0.22rem; }
  .kosmo-scorecard { flex-direction: column; align-items: flex-start; }

  /* 1.5 FinCardsForum Banki.ru Mobile (Port 8105) */
  .banki-topbar { padding: 0.65rem 0.8rem; }
  .banki-rates-strip { padding: 0.4rem 0.8rem; }
  .banki-rates-inner {
    flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; gap: 1rem;
  }
  .banki-grid { grid-template-columns: minmax(0, 1fr); margin: 0.75rem auto; padding: 0 0.65rem; }
  .plastic-cards-row {
    display: flex; width: 100%; max-width: 100%; overflow-x: auto; scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch; gap: 0.65rem; padding-bottom: 0.35rem;
  }
  .plastic-card { flex: 0 0 230px; scroll-snap-align: start; min-height: 118px; }
  .banki-review-card { padding: 0.85rem; }
  .banki-meta-grid { grid-template-columns: 1fr 1fr !important; }
}
