:root {
  color-scheme: dark;
  --bg: #080a0d;
  --bg-2: #0b0f14;
  --panel: #10151c;
  --panel-2: #141b24;
  --panel-3: #0c1117;
  --line: #202a36;
  --line-2: #2b3848;
  --text: #edf2f7;
  --muted: #92a0ad;
  --faint: #687684;
  --accent: #00c8dd;
  --accent-2: #37e0b1;
  --danger: #ff5570;
  --warn: #f0bd55;
  --good: #37e0b1;
  --radius: 8px;
  --font: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
}

* { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; }
body {
  background:
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(180deg, #080a0d 0%, #0a0d12 100%);
  background-size: 72px 72px, auto;
  color: var(--text);
  font-family: var(--font);
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
}

button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
img { max-width: 100%; }
.hidden { display: none !important; }
.wide { grid-column: 1 / -1; }

.ambient-grid, .hero-visual, .orbital-card, .orbit, .core, .floating-chip { display: none !important; }

.shell {
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  background: #090d12;
  border-right: 1px solid #1b2530;
  height: 100vh;
  padding: 16px 12px;
  position: sticky;
  top: 0;
}

.brand {
  align-items: center;
  border-bottom: 1px solid #1b2530;
  color: #f7fbff;
  display: flex;
  font-size: .95rem;
  font-weight: 900;
  gap: 10px;
  margin-bottom: 14px;
  padding: 0 2px 14px;
  text-decoration: none;
}

.brand img {
  border-radius: 8px;
  height: 34px;
  width: 34px;
}

.nav {
  display: grid;
  gap: 4px;
}

.nav-link {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: #8f9ba8;
  display: flex;
  font-size: .9rem;
  font-weight: 800;
  gap: 10px;
  min-height: 40px;
  padding: 9px 10px;
  text-align: left;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}

.nav-link:hover,
.nav-link.active {
  background: #111821;
  border-color: #273444;
  box-shadow: inset 3px 0 0 var(--accent);
  color: #f2f7fb;
}

.icon, .mobile-icon {
  align-items: center;
  background: #141c25;
  border: 1px solid #293646;
  border-radius: 6px;
  color: #b9c5d0;
  display: inline-flex;
  font-size: .72rem;
  font-weight: 900;
  height: 24px;
  justify-content: center;
  width: 24px;
}

.more-wrap { position: relative; }
.more-menu {
  background: #101720;
  border: 1px solid #2a3747;
  border-radius: var(--radius);
  box-shadow: 0 22px 60px rgba(0,0,0,.55);
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  left: 0;
  padding: 8px;
  position: absolute;
  top: calc(100% + 8px);
  width: 292px;
  z-index: 100;
}
.more-menu button {
  background: #151d27;
  border: 1px solid #293646;
  border-radius: 7px;
  color: var(--text);
  display: grid;
  gap: 4px;
  min-height: 58px;
  padding: 9px;
  text-align: left;
}
.more-menu button:hover { border-color: rgba(0,200,221,.58); }
.more-menu span { color: var(--muted); font-size: .72rem; font-weight: 700; }

.main {
  min-width: 0;
  padding: 14px clamp(12px, 2vw, 26px) 38px;
}

.topbar {
  align-items: center;
  background: rgba(12, 17, 23, .94);
  border: 1px solid #202b38;
  border-radius: 10px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 14px;
  padding: 9px;
  position: sticky;
  top: 10px;
  z-index: 60;
}

.search-wrap {
  align-items: center;
  background: #101720;
  border: 1px solid #2a3747;
  border-radius: 8px;
  display: flex;
  flex: 1;
  gap: 10px;
  max-width: 780px;
  padding: 0 12px;
}
.search-wrap span { color: var(--accent); font-family: var(--mono); }
.search-wrap input {
  background: transparent;
  border: 0;
  color: var(--text);
  height: 40px;
  outline: 0;
  width: 100%;
}
.search-wrap:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,200,221,.1); }
.top-actions { align-items: center; display: flex; gap: 8px; }

.primary-btn, .secondary-btn, .ghost-btn, .danger-btn, .chip {
  align-items: center;
  border-radius: 7px;
  display: inline-flex;
  font-size: .86rem;
  font-weight: 850;
  justify-content: center;
  min-height: 38px;
  padding: 0 13px;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease, transform 140ms ease;
}
.primary-btn { background: var(--accent); border: 1px solid #52e1ea; color: #041114; }
.primary-btn:hover { background: #37d8e7; }
.secondary-btn, .ghost-btn, .chip { background: #141c25; border: 1px solid #2a3747; color: #d7e0e9; }
.secondary-btn:hover, .ghost-btn:hover, .chip:hover, .chip.active { background: #192330; border-color: rgba(0,200,221,.65); color: #fff; }
.danger-btn { background: rgba(255,85,112,.12); border: 1px solid rgba(255,85,112,.42); color: #ffb4c0; }
button:disabled { cursor: not-allowed; opacity: .55; }
.icon-btn { padding: 0; width: 40px; }

.profile-pill {
  align-items: center;
  background: #101720;
  border: 1px solid #2a3747;
  border-radius: var(--radius);
  display: flex;
  gap: 9px;
  min-height: 42px;
  padding: 5px 7px 5px 5px;
}
.profile-pill span { color: var(--muted); display: block; font-size: .72rem; }
.profile-pill button { background: transparent; border: 0; color: var(--muted); font-size: .78rem; font-weight: 800; }
.avatar {
  align-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-radius: 7px;
  color: #031114;
  display: inline-flex;
  font-weight: 900;
  height: 34px;
  justify-content: center;
  width: 34px;
}
.big-avatar { height: 62px; width: 62px; }
.tiny-avatar { height: 34px; width: 34px; }

.view { display: none; }
.view.active { animation: viewIn 180ms ease both; display: block; }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.hero {
  background: #101720;
  border: 1px solid #263342;
  border-radius: 10px;
  margin-bottom: 12px;
  overflow: hidden;
  padding: clamp(22px, 4vw, 38px);
  position: relative;
  text-align: left;
}
.hero::before {
  background: linear-gradient(90deg, var(--accent), transparent 72%);
  content: "";
  height: 2px;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
}
.eyebrow { color: var(--accent); font-size: .72rem; font-weight: 950; letter-spacing: .08em; margin: 0 0 6px; text-transform: uppercase; }
.hero h1 { color: #f8fbff; font-size: clamp(2.2rem, 5vw, 4.4rem); letter-spacing: 0; line-height: .95; margin: 0; max-width: 760px; }
.hero-copy { color: #9aa6b3; font-size: 1rem; line-height: 1.62; max-width: 650px; }
.hero-actions, .filter-bar, .card-actions, .detail-actions, .table-actions, .badge-checks { display: flex; flex-wrap: wrap; gap: 8px; }

.showcase-strip {
  background: #101720;
  border: 1px solid #263342;
  border-radius: var(--radius);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 12px 0;
  overflow: hidden;
}
.showcase-strip div { border-right: 1px solid #263342; display: grid; gap: 4px; padding: 14px; }
.showcase-strip div:last-child { border-right: 0; }
.showcase-strip strong { color: #f2f6fa; }
.showcase-strip span { color: var(--muted); font-size: .88rem; }

.section-head {
  align-items: end;
  border-bottom: 1px solid #1b2530;
  display: flex;
  justify-content: space-between;
  margin: 24px 0 12px;
  padding-bottom: 9px;
}
.section-head h2 { color: #f2f6fa; font-size: clamp(1.12rem, 2vw, 1.45rem); margin: 0; }
.home-sections { display: grid; gap: 12px; margin: 16px 0; }

.script-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(276px, 1fr)); }
.compact-grid { grid-template-columns: repeat(auto-fill, minmax(226px, 1fr)); }
.script-card, .detail-layout, .profile-card, .table-item, .creator-card, .collection-card, .detail-panel, .comments, .search-panel, .info-page, .moderation-card, .dash-stat, .admin-hero-card, .creator-dashboard-card, .site-notice {
  background: #101720;
  border: 1px solid #263342;
  border-radius: var(--radius);
}
.script-card { display: grid; gap: 11px; overflow: hidden; padding-bottom: 12px; transition: border-color 140ms ease, transform 140ms ease; }
.script-card:hover, .creator-card:hover, .table-item:hover, .collection-card:hover { border-color: rgba(0,200,221,.62); transform: translateY(-2px); }
.script-image { aspect-ratio: 16 / 9; background: #0a0e13; border-bottom: 1px solid #263342; object-fit: cover; width: 100%; }
.card-top, .script-card > p, .script-card > div:not(.card-top):not(.card-actions), .script-card pre, .script-card .game-link-btn { margin-left: 12px; margin-right: 12px; }
.card-top { align-items: start; display: flex; gap: 10px; justify-content: space-between; }
.script-card h3 { color: #f2f6fa; font-size: 1rem; line-height: 1.22; margin: 0; }
.script-card p { color: var(--muted); line-height: 1.45; margin-top: 0; }
.card-meta { color: var(--muted); display: flex; flex-wrap: wrap; font-size: .78rem; gap: 7px; margin-top: 5px; }
.card-actions { border-top: 1px solid #1b2530; padding: 10px 12px 0; }

.code-preview, .detail-code {
  background: #080c11;
  border: 1px solid #1d2834;
  border-radius: 7px;
  color: #9cebdc;
  font-family: var(--mono);
  font-size: .78rem;
  overflow: auto;
  padding: 12px;
  white-space: pre-wrap;
}

.status-badge, .user-badge {
  align-items: center;
  background: rgba(0,200,221,.1);
  border: 1px solid rgba(0,200,221,.26);
  border-radius: 999px;
  color: #b8f6fb;
  display: inline-flex;
  font-size: .68rem;
  font-weight: 900;
  gap: 5px;
  min-height: 23px;
  padding: 4px 8px;
  text-transform: uppercase;
  white-space: nowrap;
}
.status-badge.warning { background: rgba(240,189,85,.12); border-color: rgba(240,189,85,.3); color: #ffe1a0; }
.status-badge.danger { background: rgba(255,85,112,.12); border-color: rgba(255,85,112,.32); color: #ffb8c3; }
.badge-row { display: inline-flex; flex-wrap: wrap; gap: 5px; margin-left: 5px; }
.badge-icon { align-items: center; border-radius: 999px; display: inline-flex; height: 16px; justify-content: center; width: 16px; }
.badge-owner { background: rgba(240,189,85,.14); border-color: rgba(240,189,85,.42); color: #ffe2a4; }
.badge-owner .badge-icon { background: var(--warn); color: #211400; }
.badge-admin { background: rgba(255,85,112,.14); border-color: rgba(255,85,112,.42); color: #ffc0ca; }
.badge-admin .badge-icon { background: var(--danger); color: #260009; }
.badge-moderator { background: rgba(0,200,221,.14); border-color: rgba(0,200,221,.42); color: #b8f6fb; }
.badge-moderator .badge-icon, .badge-verified .badge-icon { background: var(--accent); color: #031114; }
.badge-verified { background: rgba(55,224,177,.13); border-color: rgba(55,224,177,.38); color: #c7ffed; }
.badge-featured { background: rgba(176,122,255,.14); border-color: rgba(176,122,255,.4); color: #eadcff; }
.badge-featured .badge-icon { background: #b07aff; color: #17002d; }
.badge-trusted { background: rgba(55,224,177,.12); border-color: rgba(55,224,177,.36); color: #d6fff6; }
.badge-trusted .badge-icon { background: var(--accent-2); color: #00231c; }

.filter-bar { border-bottom: 1px solid #1b2530; margin: 18px 0 12px; padding-bottom: 12px; }
.search-panel { display: grid; gap: 12px; padding: 14px; }
.filter-grid { display: grid; gap: 10px; grid-template-columns: repeat(6, minmax(110px, 1fr)); }
.filter-grid label, .editor-layout label, .modal-card-form label, .badge-manager-grid label { color: var(--muted); display: grid; font-size: .74rem; font-weight: 900; gap: 7px; text-transform: uppercase; }
input, textarea, select { background: #0a0e13; border: 1px solid #283545; border-radius: 7px; color: var(--text); min-height: 40px; padding: 9px 10px; }
textarea { resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--accent); outline: 0; }
.search-memory { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mini-chip-row { display: flex; flex-wrap: wrap; gap: 7px; }
.mini-chip { background: #141c25; border: 1px solid #2a3747; border-radius: 999px; color: #b9edf1; min-height: 30px; padding: 0 10px; }

.detail-layout { display: grid; gap: 14px; padding: 16px; }
.detail-image, .review-image, .image-preview img { background: #0a0e13; border: 1px solid #263342; border-radius: var(--radius); object-fit: cover; width: 100%; }
.detail-body h2 { color: #f7fbff; font-size: clamp(1.6rem, 4vw, 2.6rem); margin: 0; }
.detail-panel, .comments { display: grid; gap: 12px; padding: 14px; }
.timeline-list { display: grid; gap: 10px; }
.timeline-list div, .creator-stats-row span, .profile-stats div, .compact-record, .mini-results span, .report-item, .leader-row { background: #0a0e13; border: 1px solid #202b38; border-radius: 7px; padding: 10px; }
.timeline-list p, .timeline-list span, .detail-body p { color: var(--muted); }

.collection-grid, .creator-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.collection-card { color: var(--text); display: grid; gap: 7px; min-height: 98px; padding: 14px; text-align: left; }
.collection-card span, .creator-card p { color: var(--muted); }
.creator-card { display: grid; gap: 14px; grid-template-columns: auto minmax(0, 1fr); padding: 14px; }
.creator-avatar-wrap, .creator-body { display: grid; gap: 10px; }
.creator-heading { align-items: center; display: flex; flex-wrap: wrap; gap: 8px; }
.creator-card h3 { color: #f2f6fa; margin: 0; }
.creator-stats-row { display: grid; gap: 7px; grid-template-columns: repeat(3, 1fr); }
.creator-stats-row strong { color: var(--accent); }

.editor-layout { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.code-input { min-height: 230px; font-family: var(--mono); }
.image-preview { align-items: center; background: #0a0e13; border: 1px dashed #2a3747; border-radius: var(--radius); color: var(--muted); display: grid; min-height: 130px; place-items: center; }
.submit-feedback { background: rgba(55,224,177,.1); border: 1px solid rgba(55,224,177,.28); border-radius: var(--radius); color: #c7ffed; padding: 11px; }
.submit-feedback.danger { background: rgba(255,85,112,.1); border-color: rgba(255,85,112,.28); color: #ffbbc5; }
.check-row { align-items: center; background: rgba(0,200,221,.07); border: 1px solid rgba(0,200,221,.18); border-radius: var(--radius); display: flex !important; flex-direction: row !important; gap: 9px; padding: 11px; }
.check-row input { width: auto; }
.form-actions { align-items: center; display: flex; gap: 8px; }

.table-list { display: grid; gap: 12px; }
.table-item { padding: 14px; }
.table-row { align-items: center; display: flex; gap: 12px; justify-content: space-between; }
.table-title { align-items: center; display: flex; gap: 10px; }
.mini-image { border-radius: 7px; height: 52px; object-fit: cover; width: 72px; }
.admin-review { overflow: hidden; padding: 0; }
.admin-review > :not(.review-image) { margin-left: 14px; margin-right: 14px; }
.review-image { aspect-ratio: 16 / 7; border: 0; border-bottom: 1px solid #263342; border-radius: 0; }

.profile-card { display: grid; gap: 14px; padding: 16px; }
.profile-hero { align-items: center; display: flex; gap: 14px; }
.profile-stats { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.profile-stats strong { color: #f7fbff; display: block; font-size: 1.45rem; }
.profile-stats span { color: var(--muted); font-size: .75rem; font-weight: 850; text-transform: uppercase; }

.comment { background: #0a0e13; border: 1px solid #202b38; border-radius: var(--radius); margin-bottom: 10px; padding: 12px; }
.comment-header { align-items: flex-start; display: flex; gap: 10px; justify-content: space-between; }
.comment-author-line { align-items: center; display: flex; gap: 9px; }
.comment p { color: #cfd8e2; line-height: 1.5; white-space: pre-wrap; }
.reply-list { border-left: 1px solid #263342; display: grid; gap: 9px; margin: 10px 0 0 12px; padding-left: 12px; }
.reply-form, .comment-form { display: grid; gap: 9px; margin-top: 10px; }
.reply-form.hidden { display: none; }
.heart-btn.liked { background: rgba(255,85,112,.12); border-color: rgba(255,85,112,.38); color: #ffb4c0; }

.notification-wrap { position: relative; }
.notification-btn { overflow: visible; position: relative; }
.notification-btn img { height: 21px; width: 21px; }
.notification-count { align-items: center; background: var(--danger); border: 2px solid #0a0e13; border-radius: 999px; color: white; display: inline-flex; font-size: .62rem; font-weight: 950; height: 18px; justify-content: center; min-width: 18px; padding: 0 5px; position: absolute; right: -6px; top: -6px; }
.notification-panel { max-height: min(460px, calc(100vh - 88px)); overflow: auto; position: absolute; right: 0; top: calc(100% + 10px); width: min(360px, calc(100vw - 24px)); z-index: 10000; }
.notification-head { align-items: center; border-bottom: 1px solid #263342; display: flex; justify-content: space-between; padding: 10px; }
.notification-list { display: grid; padding: 7px; }
.notification-item { background: transparent; border: 0; border-radius: 7px; color: var(--text); display: grid; gap: 8px; grid-template-columns: 8px 1fr; padding: 10px; text-align: left; }
.notification-item:hover, .notification-item.unread { background: rgba(0,200,221,.08); }
.notification-dot { background: #526171; border-radius: 999px; height: 7px; margin-top: 7px; width: 7px; }
.notification-item.unread .notification-dot { background: var(--danger); }
.notification-item em, .notification-item small { color: var(--muted); display: block; font-style: normal; }

.admin-console, .admin-grid-main, .admin-stat-grid, .leaderboard-grid { display: grid; gap: 12px; }
.admin-stat-grid { grid-template-columns: repeat(4, 1fr); }
.admin-grid-main { grid-template-columns: repeat(3, 1fr); }
.admin-card-wide { grid-column: span 2; }
.admin-hero-card, .moderation-card, .dash-stat { padding: 14px; }
.admin-hero-card { align-items: center; display: flex; justify-content: space-between; }
.admin-hero-card h2 { color: #f8fbff; margin: 0; }
.dash-stat strong { color: #f8fbff; display: block; font-size: 1.9rem; }
.dash-stat span { color: var(--muted); font-size: .72rem; font-weight: 900; text-transform: uppercase; }
.bar-chart { align-items: end; display: grid; gap: 8px; grid-template-columns: repeat(3, 1fr); height: 150px; }
.bar-chart span { align-items: end; background: var(--accent); border-radius: 7px 7px 3px 3px; color: #041114; display: flex; font-size: .72rem; font-weight: 900; height: var(--h); justify-content: center; min-height: 28px; padding: 8px 4px; }
.badge-manager-grid { display: grid; gap: 10px; grid-template-columns: 1.3fr .8fr 1fr; }
.badge-checks label { align-items: center; background: #0a0e13; border: 1px solid #202b38; border-radius: 7px; display: inline-flex; gap: 8px; padding: 8px 10px; }
.badge-checks input { width: auto; }
.badge-manager-actions { align-items: center; display: grid; gap: 10px; grid-template-columns: max-content 1fr; }

.action-modal, .auth-modal { background: transparent; border: 0; color: var(--text); max-width: min(520px, calc(100vw - 24px)); padding: 0; }
.action-modal::backdrop, .auth-modal::backdrop { background: rgba(0,0,0,.65); backdrop-filter: blur(8px); }
.modal-card-form, .auth-form.active { background: #101720; border: 1px solid #263342; border-radius: var(--radius); display: grid; gap: 12px; padding: 20px; }
.modal-close-wrap { text-align: right; }
.modal-close { background: #141c25; border: 1px solid #2a3747; border-radius: 7px; color: var(--text); height: 32px; width: 32px; }
.auth-tabs { display: flex; gap: 8px; margin-bottom: 10px; }
.auth-tabs button, .google-btn { background: #141c25; border: 1px solid #2a3747; border-radius: 7px; color: var(--text); min-height: 38px; padding: 0 12px; }
.auth-tabs button.active { border-color: var(--accent); color: #fff; }
.auth-form { display: none; }

.site-notice { align-items: center; color: #d9f7ff; display: flex; gap: 12px; justify-content: space-between; margin: 12px 0; padding: 12px; }
.info-page { margin-inline: auto; max-width: 820px; padding: 24px; }
.discord-widget { align-items: center; color: var(--text); display: flex; gap: 12px; padding: 12px; text-decoration: none; }
.discord-widget img { height: 32px; width: 32px; }

.mobile-bottom-nav { display: none; }
.toast { background: #101720; border: 1px solid #2a3747; border-radius: 999px; bottom: 22px; color: var(--text); left: 50%; padding: 10px 14px; position: fixed; transform: translateX(-50%); z-index: 100000; }

@media (max-width: 1100px) {
  .filter-grid { grid-template-columns: repeat(3, 1fr); }
  .admin-stat-grid, .admin-grid-main, .badge-manager-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-card-wide { grid-column: 1 / -1; }
}

@media (max-width: 980px) {
  .shell { display: block; }
  .sidebar { display: none; }
  .main { padding: 12px 12px 96px; }
  .topbar { top: 8px; }
  .top-actions { gap: 6px; }
  .profile-pill div:not(.avatar) { display: none; }
  .showcase-strip, .filter-grid, .search-memory, .admin-stat-grid, .admin-grid-main, .badge-manager-grid, .editor-layout { grid-template-columns: 1fr; }
  .showcase-strip div { border-bottom: 1px solid #263342; border-right: 0; }
  .showcase-strip div:last-child { border-bottom: 0; }
  .hero { padding: 22px 18px; }
  .hero h1 { font-size: clamp(2rem, 13vw, 3.2rem); }
  .script-grid, .compact-grid { grid-template-columns: 1fr; }
  .table-row, .comment-header, .admin-hero-card { align-items: stretch; flex-direction: column; }
  .mobile-bottom-nav {
    align-items: center;
    background: rgba(10,14,19,.97);
    border: 1px solid #283545;
    border-radius: 14px;
    bottom: 12px;
    box-shadow: 0 16px 44px rgba(0,0,0,.48);
    display: grid;
    gap: 0;
    grid-template-columns: repeat(var(--mobile-nav-count, 5), 1fr);
    height: 64px;
    left: 12px;
    padding: 7px;
    position: fixed;
    right: 12px;
    z-index: 9999;
  }
  .mobile-bottom-link { background: transparent; border: 0; color: var(--muted); display: grid; font-size: .68rem; font-weight: 900; gap: 3px; justify-items: center; min-width: 0; position: relative; z-index: 2; }
  .mobile-bottom-link.active { color: #f2fbff; }
  .mobile-nav-glider { background: #172331; border: 1px solid rgba(0,200,221,.42); border-radius: 11px; bottom: 7px; left: 7px; position: absolute; top: 7px; transform: translateX(var(--mobile-glider-x, 0)); transition: transform 240ms cubic-bezier(.2,.8,.2,1); width: calc((100% - 14px) / var(--mobile-nav-count, 5)); z-index: 1; }
}
/* Quantum Studio redesign */
:root {
  --bg: #09080d;
  --bg-2: #0e0c14;
  --panel: #131119;
  --panel-2: #191621;
  --panel-3: #0d0b12;
  --line: #2b2635;
  --line-2: #3c3448;
  --text: #f7f4fb;
  --muted: #9b94a7;
  --faint: #6f687b;
  --accent: #b8ff35;
  --accent-2: #8e5cff;
  --danger: #ff5c7a;
  --warn: #ffcb66;
  --good: #b8ff35;
  --radius: 16px;
  --font: "DM Sans", system-ui, sans-serif;
  --display: "Space Grotesk", "DM Sans", sans-serif;
  --mono: "JetBrains Mono", monospace;
}

html { background: var(--bg); }
body {
  background:
    radial-gradient(circle at 75% 2%, rgba(142,92,255,.15), transparent 25rem),
    linear-gradient(rgba(255,255,255,.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.022) 1px, transparent 1px),
    var(--bg);
  background-size: auto, 64px 64px, 64px 64px, auto;
}
body::before {
  background: var(--accent);
  content: "";
  height: 3px;
  left: 0;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 10000;
}
.shell { grid-template-columns: 224px minmax(0, 1fr); }
.sidebar {
  background: rgba(10,9,14,.94);
  border-color: var(--line);
  padding: 27px 16px;
  backdrop-filter: blur(18px);
}
.brand {
  border: 0;
  font-family: var(--display);
  gap: 11px;
  margin-bottom: 32px;
  padding: 0 6px;
}
.brand img { border-radius: 10px; height: 38px; width: 38px; box-shadow: 0 0 28px rgba(184,255,53,.18); }
.brand > span { display: grid; line-height: 1; gap: 4px; }
.brand strong { font-size: .96rem; letter-spacing: .08em; }
.brand small { color: var(--accent); font-size: .58rem; letter-spacing: .24em; }
.nav { gap: 7px; }
.nav-link {
  border-radius: 12px;
  color: var(--muted);
  font-size: .84rem;
  letter-spacing: .01em;
  min-height: 46px;
  padding: 9px 10px;
}
.nav-link:hover, .nav-link.active {
  background: linear-gradient(90deg, rgba(184,255,53,.1), rgba(184,255,53,.025));
  border-color: rgba(184,255,53,.18);
  box-shadow: none;
  color: var(--text);
}
.icon, .mobile-icon {
  background: transparent;
  border: 0;
  color: var(--faint);
  font-family: var(--mono);
  font-size: .63rem;
}
.nav-link.active .icon { color: var(--accent); }
.more-menu {
  background: #15121c;
  border-color: var(--line-2);
  border-radius: 16px;
  box-shadow: 0 28px 70px rgba(0,0,0,.6);
}
.more-menu button { background: #1a1721; border-color: var(--line); border-radius: 11px; }
.more-menu button:hover { border-color: var(--accent); }

.main { padding: 20px clamp(18px, 3vw, 48px) 60px; }
.topbar {
  background: rgba(13,11,18,.74);
  border-color: rgba(255,255,255,.08);
  border-radius: 16px;
  margin-bottom: 22px;
  padding: 8px;
  top: 14px;
  backdrop-filter: blur(18px);
}
.search-wrap { background: transparent; border: 0; max-width: 720px; }
.search-wrap span { color: var(--accent); }
.search-wrap:focus-within { box-shadow: none; }
.search-wrap input { color: var(--text); }
.search-wrap input::placeholder { color: #777080; }
.primary-btn, .secondary-btn, .ghost-btn, .danger-btn, .chip {
  border-radius: 11px;
  font-weight: 700;
  min-height: 41px;
  padding: 0 15px;
}
.primary-btn { background: var(--accent); border-color: var(--accent); color: #101407; box-shadow: 0 8px 24px rgba(184,255,53,.12); }
.primary-btn:hover { background: #c9ff66; transform: translateY(-1px); }
.secondary-btn, .ghost-btn, .chip { background: #191620; border-color: var(--line); color: #d9d4df; }
.secondary-btn:hover, .ghost-btn:hover, .chip:hover, .chip.active { background: #211d29; border-color: #716781; color: white; }
.chip.active { background: var(--accent); border-color: var(--accent); color: #111407; }
.profile-pill { background: #17141d; border-color: var(--line); border-radius: 13px; }
.avatar { background: linear-gradient(135deg, var(--accent), #7cdd37); border-radius: 10px; }

.hero {
  align-items: center;
  background:
    radial-gradient(circle at 78% 50%, rgba(142,92,255,.22), transparent 28%),
    linear-gradient(120deg, #16121e 0%, #100e16 70%);
  border-color: #332b40;
  border-radius: 28px;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  min-height: 480px;
  padding: clamp(38px, 5vw, 78px);
}
.hero::before { background: var(--accent); height: 100%; left: 0; right: auto; top: 0; width: 4px; }
.hero::after {
  border: 1px solid rgba(184,255,53,.18);
  border-radius: 50%;
  content: "";
  height: 270px;
  position: absolute;
  right: -90px;
  top: -110px;
  width: 270px;
}
.eyebrow { color: var(--accent); font-family: var(--mono); font-size: .67rem; letter-spacing: .13em; }
.hero .eyebrow { align-items: center; display: flex; gap: 9px; }
.hero .eyebrow span { background: var(--accent); border-radius: 50%; box-shadow: 0 0 12px var(--accent); height: 6px; width: 6px; }
.hero h1 {
  font-family: var(--display);
  font-size: clamp(3rem, 6vw, 6.2rem);
  letter-spacing: -.075em;
  line-height: .88;
  margin-top: 24px;
}
.hero h1 em { color: var(--accent); font-style: normal; }
.hero-copy { font-size: 1.04rem; line-height: 1.7; margin: 24px 0 28px; max-width: 560px; }
.hero-actions { gap: 11px; }
.hero-actions .primary-btn, .hero-actions .secondary-btn { min-height: 50px; padding: 0 20px; }
.hero-art { min-height: 300px; position: relative; transform: rotate(2deg); }
.code-window {
  background: rgba(10,9,14,.92);
  border: 1px solid #473b58;
  border-radius: 18px;
  box-shadow: 0 35px 70px rgba(0,0,0,.45), 18px 18px 0 rgba(142,92,255,.1);
  overflow: hidden;
  position: absolute;
  right: 0;
  top: 18px;
  width: min(410px, 100%);
}
.window-bar { align-items: center; background: #191520; border-bottom: 1px solid #30293a; display: flex; gap: 6px; padding: 13px 15px; }
.window-bar i { background: #625b6b; border-radius: 50%; height: 7px; width: 7px; }
.window-bar i:first-child { background: var(--accent); }
.window-bar span { color: #766f81; font: .64rem var(--mono); margin-left: auto; }
.code-window pre { color: #e7e0ed; font: .78rem/1.9 var(--mono); margin: 0; padding: 25px; }
.code-window b, .code-window strong { color: var(--accent); }
.code-window em, .code-window mark { background: none; color: #b99cff; font-style: normal; }
.code-window pre span { color: #706979; }
.trust-chip {
  align-items: center;
  background: var(--accent);
  border: 5px solid #121018;
  border-radius: 50%;
  bottom: -5px;
  color: #0d1106;
  display: flex;
  flex-direction: column;
  height: 128px;
  justify-content: center;
  position: absolute;
  right: -24px;
  text-align: center;
  transform: rotate(8deg);
  width: 128px;
}
.trust-chip strong { font: 700 1.5rem var(--display); }
.trust-chip span { font-size: .6rem; font-weight: 700; line-height: 1.2; text-transform: uppercase; }

.showcase-strip {
  background: transparent;
  border: 0;
  gap: 1px;
  margin: 22px 0 38px;
}
.showcase-strip div { background: #121018; border-color: var(--line); gap: 7px; padding: 22px; }
.showcase-strip div:first-child { border-radius: 16px 0 0 16px; }
.showcase-strip div:last-child { border-radius: 0 16px 16px 0; }
.showcase-strip b { color: var(--accent); font: .65rem var(--mono); }
.showcase-strip strong { font: 600 1rem var(--display); }
.showcase-strip span { font-size: .82rem; line-height: 1.5; }

.section-head { align-items: center; border: 0; margin: 38px 0 15px; padding: 0; }
.section-head h2 { font: 600 clamp(1.4rem,2.5vw,2rem) var(--display); letter-spacing: -.035em; }
.home-sections { gap: 8px; }
.script-grid { gap: 18px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.compact-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.script-card, .detail-layout, .profile-card, .table-item, .creator-card, .collection-card, .detail-panel, .comments, .search-panel, .info-page, .moderation-card, .dash-stat, .admin-hero-card, .creator-dashboard-card, .site-notice {
  background: #131119;
  border-color: var(--line);
  border-radius: 16px;
}
.script-card { gap: 12px; padding-bottom: 14px; position: relative; transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease; }
.script-card:hover { border-color: #554866; box-shadow: 0 24px 55px rgba(0,0,0,.3); transform: translateY(-5px); }
.script-image { border: 0; filter: saturate(.8); transition: filter .25s ease, transform .4s ease; }
.script-card:hover .script-image { filter: saturate(1.1); transform: scale(1.025); }
.card-top, .script-card > p, .script-card > div:not(.card-top):not(.card-actions), .script-card pre { margin-left: 15px; margin-right: 15px; }
.script-card h3 { font: 600 1.08rem/1.25 var(--display); letter-spacing: -.025em; }
.script-card p { font-size: .86rem; min-height: 2.5em; }
.card-meta { color: #7e7688; }
.card-meta span:first-child { color: #c9c2d2; }
.code-preview, .detail-code { background: #0b0910; border-color: #27212f; color: #c8f58a; }
.card-actions { border-color: var(--line); padding: 12px 15px 0; }
.card-actions .secondary-btn:first-child { background: var(--accent); border-color: var(--accent); color: #101407; }
.status-badge, .user-badge { background: rgba(184,255,53,.08); border-color: rgba(184,255,53,.24); color: #d9ff9b; }
.filter-bar { border: 0; gap: 8px; margin: 36px 0 14px; overflow-x: auto; padding: 0 0 3px; }
.search-panel { padding: 18px; }
.filter-grid label, .editor-layout label, .modal-card-form label, .badge-manager-grid label { color: #9e96aa; }
input, textarea, select { background: #0d0b12; border-color: #342d3e; border-radius: 11px; }
input:focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(184,255,53,.08); }
.collection-card:hover, .creator-card:hover, .table-item:hover { border-color: #625273; }
.creator-stats-row strong { color: var(--accent); }
.editor-layout { background: #131119; border: 1px solid var(--line); border-radius: 20px; padding: clamp(18px,3vw,32px); }
.image-preview { background: #0d0b12; border-color: #41364c; }
.timeline-list div, .creator-stats-row span, .profile-stats div, .compact-record, .mini-results span, .report-item, .leader-row, .comment { background: #0d0b12; border-color: #2c2634; }
.modal-card-form, .auth-form.active { background: #15121c; border-color: #41364e; border-radius: 20px; }
.auth-tabs button.active { background: var(--accent); border-color: var(--accent); color: #101407; }
.notification-panel { background: #15121c; border: 1px solid var(--line-2); border-radius: 16px; }
.toast { background: #f3eff7; border: 0; color: #121016; font-weight: 700; }

@keyframes viewIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.reveal-card { animation: cardReveal .4s cubic-bezier(.2,.8,.2,1) both; animation-delay: var(--delay); }
@keyframes cardReveal { from { opacity: 0; transform: translateY(18px); } }

@media (max-width: 1180px) {
  .hero { grid-template-columns: 1fr .75fr; padding: 45px; }
  .hero h1 { font-size: clamp(3rem,6vw,5rem); }
  .trust-chip { right: -10px; }
}
@media (max-width: 980px) {
  body { background-size: auto, 44px 44px, 44px 44px, auto; }
  .main { padding: 12px 12px 96px; }
  .hero { grid-template-columns: 1fr; min-height: auto; padding: 44px 24px 30px; }
  .hero h1 { font-size: clamp(3rem,15vw,5rem); }
  .hero-art { display: none; }
  .showcase-strip div:first-child { border-radius: 14px 14px 0 0; }
  .showcase-strip div:last-child { border-radius: 0 0 14px 14px; }
  .mobile-bottom-nav { background: rgba(15,13,20,.94); border-color: #3a3145; border-radius: 18px; }
  .mobile-nav-glider { background: rgba(184,255,53,.1); border-color: rgba(184,255,53,.35); border-radius: 13px; }
  .mobile-bottom-link.active { color: var(--accent); }
}
@media (max-width: 560px) {
  .topbar { border-radius: 13px; }
  .top-actions .icon-btn { display: none; }
  .hero { border-radius: 20px; padding-top: 38px; }
  .hero h1 { letter-spacing: -.065em; }
  .hero-copy { font-size: .94rem; }
  .hero-actions { display: grid; }
  .showcase-strip { margin-top: 14px; }
  .section-head { margin-top: 30px; }
}

html.light {
  color-scheme: light;
  --bg: #f3f0e9;
  --bg-2: #ebe7df;
  --panel: #fffdf8;
  --panel-2: #f6f2eb;
  --panel-3: #ece8e0;
  --line: #d8d1c6;
  --line-2: #bdb4c2;
  --text: #17141c;
  --muted: #6f6875;
  --faint: #8b838f;
}
html.light body { background: radial-gradient(circle at 75% 2%, rgba(142,92,255,.12), transparent 25rem), #f3f0e9; }
html.light .sidebar { background: rgba(247,244,237,.96); }
html.light .topbar { background: rgba(255,253,248,.8); }
html.light .hero { background: radial-gradient(circle at 78% 50%, rgba(142,92,255,.18), transparent 28%), linear-gradient(120deg,#fffdf8,#f0ebe4); }
html.light .hero h1, html.light .section-head h2, html.light .script-card h3 { color: #17141c; }
html.light .script-card, html.light .detail-layout, html.light .profile-card, html.light .table-item, html.light .creator-card, html.light .collection-card, html.light .detail-panel, html.light .comments, html.light .search-panel, html.light .info-page, html.light .moderation-card, html.light .dash-stat, html.light .admin-hero-card, html.light .creator-dashboard-card, html.light .site-notice { background: #fffdf8; }
html.light .showcase-strip div { background: #fffdf8; }
html.light input, html.light textarea, html.light select, html.light .code-preview, html.light .detail-code { background: #f3efe8; }
html.light .secondary-btn, html.light .ghost-btn, html.light .chip { background: #f4f0e9; color: #39333f; }
html.light .code-window { background: #17131d; }

/* Keep the final More menu above every content layer. */
.sidebar {
  isolation: isolate;
  z-index: 500;
}
.main {
  position: relative;
  z-index: 1;
}
.more-wrap {
  position: relative;
  z-index: 600;
}
.more-menu {
  bottom: 0;
  left: calc(100% + 12px);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  top: auto;
  z-index: 1000;
}

/* Interface repair: admin queue, tools, topbar identity and icons */
.notification-btn {
  align-items: center;
  display: inline-flex;
  justify-content: center;
}
.notification-btn img {
  display: block;
  height: 22px;
  max-height: 22px;
  max-width: 22px;
  object-fit: contain;
  width: auto;
}

.theme-btn .theme-icon {
  align-items: center;
  color: #f4df80;
  display: inline-flex;
  font-family: "Segoe UI Symbol", sans-serif;
  font-size: 1.25rem;
  height: 22px;
  justify-content: center;
  line-height: 1;
  width: 22px;
}
.theme-btn .theme-icon::before { content: "☀"; }
.theme-btn.is-light .theme-icon { color: #7764a8; }
.theme-btn.is-light .theme-icon::before { content: "☾"; }

.profile-pill {
  flex: 0 1 auto;
  max-width: 330px;
  min-width: 0;
  padding: 6px 9px 6px 6px;
}
.profile-pill > div:not(.avatar) {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.profile-pill #profileName {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.profile-pill #profileRole {
  align-items: center;
  display: flex;
  line-height: 1;
  min-height: 20px;
}
.profile-pill #profileRole .badge-row {
  display: inline-flex;
  margin: 0;
}
.profile-pill .user-badge {
  font-size: .6rem;
  min-height: 20px;
  padding: 2px 7px 2px 4px;
}
.profile-pill .badge-icon {
  height: 14px;
  width: 14px;
}
.profile-pill #logoutBtn {
  flex: 0 0 auto;
  white-space: nowrap;
}
.badge-row {
  align-items: center;
  vertical-align: middle;
}
.user-badge {
  line-height: 1;
  width: max-content;
}
.badge-owner {
  background: rgba(255,203,102,.1);
  border-color: rgba(255,203,102,.35);
  color: #ffe1a3;
}

/* Pending submissions stay compact and scannable. */
#adminQueue {
  gap: 16px;
  margin-top: 18px;
}
.admin-review {
  display: grid;
  gap: 12px 16px;
  grid-template-columns: 190px minmax(0, 1fr);
  padding: 14px;
}
.admin-review > :not(.review-image) {
  margin-left: 0;
  margin-right: 0;
}
.admin-review .review-image {
  aspect-ratio: 16 / 10;
  border: 1px solid var(--line);
  border-radius: 12px;
  grid-column: 1;
  grid-row: 1 / span 4;
  height: 118px;
  object-fit: cover;
  width: 190px;
}
.admin-review .table-row,
.admin-review > p,
.admin-review > .game-link-btn,
.admin-review > div:not(.table-row) {
  grid-column: 2;
}
.admin-review .table-row {
  align-items: flex-start;
}
.admin-review > p {
  font-size: .86rem;
  line-height: 1.5;
  margin-bottom: 0;
  margin-top: 0;
}
.admin-review .game-link-btn {
  justify-self: start;
  width: max-content;
}
.admin-review .code-preview {
  grid-column: 1 / -1;
  margin: 0;
  max-height: 150px;
  min-height: 72px;
  overflow: auto;
  padding: 12px 14px;
}
.admin-review .table-actions {
  justify-content: flex-end;
}
.admin-review .table-actions button {
  min-height: 34px;
  padding: 0 11px;
}

/* Admin searches use resilient cards and readable results. */
.admin-grid-main {
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
  margin-top: 4px;
}
.admin-grid-main .moderation-card {
  display: flex;
  flex-direction: column;
  gap: 11px;
  min-width: 0;
}
.admin-grid-main .moderation-card h3 {
  font-family: var(--display);
  margin: 0;
}
.admin-grid-main .moderation-card input {
  width: 100%;
}
.admin-grid-main .admin-card-wide {
  grid-column: span 2;
}
.mini-results {
  display: grid;
  gap: 6px;
  max-height: 230px;
  overflow-y: auto;
  min-width: 0;
}
.mini-results span {
  display: block;
  font-size: .8rem;
  line-height: 1.35;
  min-width: 0;
  overflow-wrap: anywhere;
  padding: 9px 10px;
}
.compact-record {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}
.compact-record > span {
  min-width: 0;
}
.admin-card-head {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}
.admin-card-head h3 { margin: 0; }

@media (max-width: 760px) {
  .admin-review { grid-template-columns: 1fr; }
  .admin-review .review-image {
    grid-column: 1;
    grid-row: auto;
    height: 170px;
    width: 100%;
  }
  .admin-review .table-row,
  .admin-review > p,
  .admin-review > .game-link-btn,
  .admin-review > div:not(.table-row),
  .admin-review .code-preview { grid-column: 1; }
  .admin-review .table-actions { justify-content: flex-start; }
  .admin-grid-main .admin-card-wide { grid-column: 1; }
}

/* Final topbar account sizing */
.profile-pill {
  box-sizing: border-box;
  flex-wrap: nowrap;
  height: 56px;
  max-height: 56px;
  max-width: 310px;
  min-height: 56px;
  padding: 6px 10px 6px 6px;
}
.profile-pill .avatar {
  flex: 0 0 42px;
  height: 42px;
  width: 42px;
}
.profile-pill > div:not(.avatar) {
  align-items: center;
  display: flex;
  flex: 1 1 auto;
  flex-direction: row;
  gap: 8px;
  min-width: 0;
}
.profile-pill #profileName {
  flex: 0 1 auto;
  font-size: .9rem;
  line-height: 1;
  max-width: 125px;
}
.profile-pill #profileRole {
  display: inline-flex;
  flex: 0 0 auto;
  min-height: 0;
}
.profile-pill #profileRole .badge-row {
  display: inline-flex;
  flex-wrap: nowrap;
}
.profile-pill #profileRole .user-badge {
  font-size: .55rem;
  min-height: 19px;
  padding: 2px 6px 2px 3px;
}
.profile-pill #profileRole .badge-icon {
  font-size: .58rem;
  height: 13px;
  width: 13px;
}
.profile-pill #logoutBtn {
  font-size: .72rem;
  margin-left: 2px;
}

/* More sits below Home and opens beside it. */
.more-menu {
  bottom: auto;
  top: 0;
}

/* Owner identity is represented by the crown alone. */
.user-badge.badge-owner {
  font-size: 0;
  gap: 0;
  min-height: 24px;
  min-width: 24px;
  padding: 3px;
}
.user-badge.badge-owner .badge-icon {
  font-size: .7rem;
  height: 16px;
  width: 16px;
}
.profile-pill #profileRole .user-badge.badge-owner {
  min-height: 22px;
  min-width: 22px;
  padding: 3px;
}

.profile-pill #profileRole .user-badge.badge-owner,
.profile-pill .user-badge.badge-owner {
  font-size: 0 !important;
  gap: 0;
}
.profile-pill #profileRole .user-badge.badge-owner .badge-icon,
.profile-pill .user-badge.badge-owner .badge-icon {
  font-size: .7rem !important;
}

/* Thumbnail-first marketplace cards */
.script-grid,
.compact-grid {
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
}
.script-card {
  background: #1b2940;
  border: 1px solid #263854;
  border-radius: 15px;
  display: block;
  overflow: hidden;
  padding: 0 0 13px;
}
.script-card:hover {
  border-color: #49698f;
  transform: translateY(-4px);
}
.script-card-media {
  aspect-ratio: 16 / 9;
  background: #0d1523;
  margin: 0 !important;
  overflow: hidden;
  position: relative;
  width: 100%;
}
.script-card .script-image {
  aspect-ratio: auto;
  border: 0;
  display: block;
  filter: none;
  height: 100%;
  object-fit: cover;
  width: 100%;
}
.script-card:hover .script-image {
  filter: none;
  transform: scale(1.02);
}
.card-view-count,
.card-age {
  align-items: center;
  backdrop-filter: blur(7px);
  background: rgba(10,18,34,.92);
  border-radius: 12px;
  color: #f7faff;
  display: inline-flex;
  font-size: .84rem;
  font-weight: 700;
  min-height: 35px;
  padding: 0 13px;
  position: absolute;
  top: 10px;
}
.card-view-count { left: 10px; }
.card-age { right: 10px; }
.key-system-badge {
  background: #ffbd00;
  border-radius: 999px;
  bottom: 10px;
  color: #111722;
  font-size: .82rem;
  font-weight: 800;
  left: 10px;
  padding: 7px 16px;
  position: absolute;
}
.script-card .card-top {
  align-items: center;
  display: flex;
  margin: 0 !important;
  padding: 12px 10px 3px;
}
.script-card .card-top > div {
  min-width: 0;
  width: 100%;
}
.script-card h3 {
  color: #3e9cff;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.25;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.script-card h3::after {
  color: #b9ff74;
  content: "  🖊";
  font-size: .78rem;
}
.script-card .card-meta,
.script-card .card-top > .status-badge,
.script-card > .game-link-btn,
.script-card > .code-preview,
.script-card > .card-actions,
.script-card > div:not(.script-card-media):not(.card-top):not(.card-actions) {
  display: none;
}
.script-card > p {
  align-items: center;
  color: #f8f9fc;
  display: flex;
  font-size: .96rem;
  font-weight: 600;
  gap: 9px;
  line-height: 1.35;
  margin: 0 !important;
  min-height: 0;
  overflow: hidden;
  padding: 2px 10px 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.script-card > p::before {
  align-items: center;
  background: #238ee5;
  border-radius: 50%;
  color: white;
  content: "◆";
  display: inline-flex;
  flex: 0 0 20px;
  font-size: .62rem;
  height: 20px;
  justify-content: center;
  width: 20px;
}
html.light .script-card {
  background: #e8eff8;
  border-color: #cad7e7;
}
html.light .script-card > p { color: #172238; }

@media (max-width: 520px) {
  .script-grid,
  .compact-grid { grid-template-columns: 1fr; }
  .card-view-count,
  .card-age { min-height: 32px; padding: 0 10px; }
}

/* Match marketplace cards to the Quantum lime palette. */
.script-card {
  background: #15191b;
  border-color: #29352d;
}
.script-card:hover {
  border-color: rgba(184,255,53,.55);
  box-shadow: 0 24px 55px rgba(0,0,0,.3), 0 0 0 1px rgba(184,255,53,.08);
}
.script-card h3 {
  color: var(--accent);
}
.script-card > p::before {
  background: #85c92d;
  color: #101407;
}
html.light .script-card {
  background: #f7f9f2;
  border-color: #d5dfc8;
}
html.light .script-card h3 {
  color: #568c10;
}

.script-card > .card-primary-tag {
  color: #dfffb0;
  font-size: .82rem;
  font-weight: 700;
}
.script-card > .card-primary-tag::before {
  background: rgba(184,255,53,.14);
  border: 1px solid rgba(184,255,53,.35);
  color: var(--accent);
  content: "#";
  font-size: .72rem;
}
html.light .script-card > .card-primary-tag {
  color: #47780b;
}

/* Remove the decorative pen from script titles. */
.script-card h3::after {
  content: none;
  display: none;
}

/* Clean featured creator cards */
.creator-grid {
  grid-template-columns: repeat(auto-fill, minmax(320px, 390px));
  gap: 16px;
}
.creator-card.polished-creator {
  align-items: start;
  background: linear-gradient(145deg, #15131a, #100e15);
  border: 1px solid #302a38;
  border-radius: 18px;
  display: grid;
  gap: 16px;
  grid-template-columns: 64px minmax(0, 1fr);
  min-height: 0;
  padding: 18px;
}
.creator-card.polished-creator:hover {
  border-color: rgba(184,255,53,.42);
  box-shadow: 0 18px 45px rgba(0,0,0,.22);
  transform: translateY(-3px);
}
.polished-creator .creator-avatar-wrap {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.polished-creator .big-avatar {
  border-radius: 14px;
  flex: 0 0 58px;
  font-size: 1.05rem;
  height: 58px;
  width: 58px;
}
.polished-creator .creator-avatar-wrap > .user-badge.featured {
  background: rgba(184,255,53,.09);
  border: 1px solid rgba(184,255,53,.28);
  border-radius: 999px;
  color: #cfff82;
  font-size: .52rem;
  min-height: 20px;
  padding: 3px 7px;
  text-transform: uppercase;
  width: auto;
}
.polished-creator .creator-body {
  display: grid;
  gap: 13px;
  min-width: 0;
}
.polished-creator .creator-heading {
  min-height: 28px;
}
.polished-creator .creator-heading h3 {
  font-family: var(--display);
  font-size: 1.08rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.polished-creator .creator-heading .badge-row {
  margin-left: 0;
}
.polished-creator .creator-stats-row {
  display: grid;
  gap: 7px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.polished-creator .creator-stats-row span {
  background: #0d0b11;
  border: 1px solid #2b2532;
  border-radius: 10px;
  color: #8f8799;
  display: grid;
  font-size: .66rem;
  gap: 2px;
  min-width: 0;
  padding: 9px 7px;
  text-align: center;
}
.polished-creator .creator-stats-row strong {
  color: var(--accent);
  font-size: .95rem;
}
.polished-creator .card-actions {
  border-top: 1px solid #29232f;
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 12px 0 0;
}
.polished-creator .card-actions button {
  flex: 1 1 0;
  min-height: 36px;
  min-width: 0;
  padding: 0 10px;
}
.polished-creator .card-actions .secondary-btn {
  background: var(--accent);
  border-color: var(--accent);
  color: #101407;
}
html.light .creator-card.polished-creator {
  background: #fffdf8;
  border-color: #d8d1c6;
}
html.light .polished-creator .creator-stats-row span {
  background: #f3efe8;
  border-color: #ddd5ca;
}

@media (max-width: 480px) {
  .creator-grid { grid-template-columns: 1fr; }
  .creator-card.polished-creator {
    grid-template-columns: 52px minmax(0, 1fr);
    padding: 14px;
  }
  .polished-creator .big-avatar {
    height: 48px;
    width: 48px;
  }
}

.card-view-count {
  gap: 7px;
}
.card-view-count img {
  display: block;
  filter: none;
  height: 16px;
  object-fit: contain;
  width: 16px;
}
html.light .card-view-count img {
  filter: invert(1);
}

html.light .card-view-count img {
  filter: none;
}

/* Full authentication experience */
.auth-modal.auth-shell {
  background: #100e15;
  border: 1px solid #3b3345;
  border-radius: 24px;
  box-shadow: 0 42px 110px rgba(0,0,0,.72);
  color: var(--text);
  display: none;
  grid-template-columns: .82fr 1.18fr;
  max-height: min(780px, calc(100vh - 30px));
  max-width: min(940px, calc(100vw - 28px));
  overflow: hidden;
  padding: 0;
  width: 940px;
}
.auth-modal.auth-shell[open] {
  display: grid;
}
.auth-shell::backdrop {
  background: rgba(5,4,8,.82);
  backdrop-filter: blur(12px);
}
.auth-close {
  align-items: center;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px;
  color: white;
  display: inline-flex;
  font-size: 1.2rem;
  height: 36px;
  justify-content: center;
  position: absolute;
  right: 14px;
  top: 14px;
  width: 36px;
  z-index: 4;
}
.auth-brand-panel {
  background:
    radial-gradient(circle at 20% 20%, rgba(184,255,53,.14), transparent 15rem),
    linear-gradient(155deg, #191621, #0d0b12);
  border-right: 1px solid #302938;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 660px;
  overflow: hidden;
  padding: 34px;
  position: relative;
}
.auth-brand-panel::after {
  border: 1px solid rgba(184,255,53,.12);
  border-radius: 50%;
  bottom: -110px;
  content: "";
  height: 320px;
  position: absolute;
  right: -130px;
  width: 320px;
}
.auth-brand-mark {
  align-items: center;
  display: flex;
  font: 700 .9rem var(--display);
  gap: 10px;
  letter-spacing: .08em;
  text-decoration: none;
}
.auth-brand-mark img {
  border-radius: 10px;
  height: 38px;
  width: 38px;
}
.auth-brand-mark span { display: grid; }
.auth-brand-mark small {
  color: var(--accent);
  font-size: .52rem;
  letter-spacing: .22em;
}
.auth-brand-panel h2 {
  font: 600 clamp(2rem,4vw,3.2rem)/.96 var(--display);
  letter-spacing: -.06em;
  margin: 12px 0 18px;
}
.auth-brand-panel h2 em {
  color: var(--accent);
  font-style: normal;
}
.auth-brand-panel p {
  color: var(--muted);
  line-height: 1.65;
}
.auth-brand-panel ul {
  display: grid;
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
  z-index: 1;
}
.auth-brand-panel li {
  align-items: center;
  color: #c9c2d0;
  display: flex;
  font-size: .82rem;
  gap: 9px;
}
.auth-brand-panel li span {
  align-items: center;
  background: rgba(184,255,53,.12);
  border-radius: 50%;
  color: var(--accent);
  display: inline-flex;
  height: 22px;
  justify-content: center;
  width: 22px;
}
.auth-main-panel {
  background: #131019;
  max-height: min(780px, calc(100vh - 30px));
  overflow-y: auto;
  padding: 42px clamp(28px,5vw,58px);
}
.auth-shell .auth-tabs {
  background: #0c0a10;
  border: 1px solid #2b2532;
  border-radius: 12px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 0 0 28px;
  padding: 4px;
}
.auth-shell .auth-tabs button {
  background: transparent;
  border: 0;
  border-radius: 9px;
  color: #8f8799;
  min-height: 40px;
}
.auth-shell .auth-tabs button.active {
  background: #211d28;
  color: white;
}
.auth-shell .auth-form {
  display: none;
}
.auth-shell .auth-form.active {
  background: transparent;
  border: 0;
  border-radius: 0;
  display: grid;
  gap: 16px;
  padding: 0;
}
.auth-form-head { margin-bottom: 3px; }
.auth-form-head h2 {
  font: 600 1.75rem var(--display);
  letter-spacing: -.04em;
  margin: 5px 0 7px;
}
.auth-form-head > p:last-child {
  color: var(--muted);
  font-size: .86rem;
  margin: 0;
}
.auth-shell label {
  color: #aaa2b4;
  display: grid;
  font-size: .72rem;
  font-weight: 700;
  gap: 7px;
  letter-spacing: .035em;
  text-transform: uppercase;
}
.auth-shell input {
  background: #0c0a10;
  border-color: #342d3e;
  min-height: 47px;
  width: 100%;
}
.auth-shell input::placeholder { color: #625a69; }
.auth-field-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr 1fr;
}
.auth-shell .google-btn {
  align-items: center;
  background: #f8f6fa;
  border: 0;
  color: #17131b;
  display: flex;
  font-weight: 700;
  gap: 12px;
  justify-content: center;
  min-height: 47px;
}
.google-btn span {
  color: #4285f4;
  font: 700 1rem Arial;
}
.auth-shell .splitter {
  align-items: center;
  color: #716978;
  display: flex;
  font-size: .68rem;
  gap: 10px;
  text-transform: uppercase;
}
.auth-shell .splitter::before,
.auth-shell .splitter::after {
  background: #2b2532;
  content: "";
  flex: 1;
  height: 1px;
}
.auth-row {
  align-items: center;
  display: flex;
  justify-content: space-between;
}
.auth-shell .remember-check,
.auth-shell .terms-check {
  align-items: center;
  display: flex;
  flex-direction: row;
  gap: 8px;
  letter-spacing: 0;
  text-transform: none;
}
.auth-shell .remember-check input,
.auth-shell .terms-check input {
  accent-color: var(--accent);
  flex: 0 0 auto;
  min-height: 0;
  width: 16px;
}
.terms-check span { line-height: 1.5; }
.terms-check button,
.text-btn {
  background: none;
  border: 0;
  color: var(--accent);
  font-size: inherit;
  padding: 0;
}
.auth-submit { min-height: 49px; width: 100%; }
.auth-feedback {
  background: rgba(255,92,122,.1);
  border: 1px solid rgba(255,92,122,.3);
  border-radius: 10px;
  color: #ffb8c5;
  font-size: .8rem;
  line-height: 1.4;
  padding: 10px 12px;
}
.auth-feedback[data-type="success"] {
  background: rgba(184,255,53,.08);
  border-color: rgba(184,255,53,.25);
  color: #d8ffa0;
}
.auth-fineprint {
  color: #716978;
  font-size: .7rem;
  margin: -4px 0 0;
  text-align: center;
}
.verification-view {
  align-items: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 520px;
  text-align: center;
}
.verification-view.hidden { display: none; }
.verification-view h2 {
  font: 600 2rem var(--display);
  margin: 8px 0;
}
.verification-view > p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.65;
  max-width: 390px;
}
.verification-view > small {
  color: #716978;
  margin-top: 18px;
}
.mail-orbit {
  align-items: center;
  background: rgba(184,255,53,.1);
  border: 1px solid rgba(184,255,53,.3);
  border-radius: 50%;
  color: var(--accent);
  display: flex;
  font-size: 1.8rem;
  height: 80px;
  justify-content: center;
  margin-bottom: 22px;
  width: 80px;
}

@media (max-width: 760px) {
  .auth-modal.auth-shell[open] { display: block; }
  .auth-brand-panel { display: none; }
  .auth-main-panel {
    max-height: calc(100vh - 28px);
    min-height: 620px;
    padding: 54px 20px 28px;
  }
  .auth-field-grid { grid-template-columns: 1fr; }
  .auth-row { align-items: flex-start; gap: 10px; }
}

/* Keep homepage filtering compact: chips only. */
#homeView > .search-panel {
  display: none;
}

/* Keep advanced filters; remove only the history area beneath them. */
#homeView > .search-panel {
  display: grid;
}
#homeView > .search-panel .search-memory {
  display: none;
}

/* Keep the full filter/search area; remove only its duplicate card results. */
#homeView > .search-panel .search-memory {
  display: grid;
}
#homeView > #scriptGrid,
#homeView > #emptyState {
  display: none !important;
}

/* Live presence dashboard */
.presence-card {
  min-height: 330px;
}
.live-indicator {
  align-items: center;
  background: rgba(184,255,53,.08);
  border: 1px solid rgba(184,255,53,.24);
  border-radius: 999px;
  color: #d8ffa0;
  display: inline-flex;
  font-size: .65rem;
  font-weight: 800;
  gap: 7px;
  padding: 6px 9px;
  text-transform: uppercase;
}
.live-indicator i,
.online-person i {
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(184,255,53,.75);
  height: 7px;
  width: 7px;
}
#onlinePresenceMount {
  display: grid;
  gap: 14px;
}
.presence-summary {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.presence-summary > div {
  background: #0d0b12;
  border: 1px solid #2b2532;
  border-radius: 12px;
  padding: 13px;
}
.presence-summary strong {
  color: var(--accent);
  display: block;
  font: 700 1.7rem var(--display);
}
.presence-summary span {
  color: var(--muted);
  font-size: .68rem;
  text-transform: uppercase;
}
.presence-chart {
  align-items: end;
  background: #0d0b12;
  border: 1px solid #2b2532;
  border-radius: 12px;
  display: flex;
  gap: 4px;
  height: 105px;
  overflow: hidden;
  padding: 12px;
}
.presence-chart > span {
  background: linear-gradient(180deg, var(--accent), #5d8e1d);
  border-radius: 4px 4px 2px 2px;
  flex: 1;
  height: var(--online-height, 8%);
  min-width: 3px;
  transition: height .25s ease;
}
.presence-chart .presence-empty-bar {
  opacity: .25;
  width: 100%;
}
.online-list {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.online-person {
  align-items: center;
  background: #0d0b12;
  border: 1px solid #2b2532;
  border-radius: 10px;
  display: grid;
  gap: 7px;
  grid-template-columns: 8px minmax(0,1fr) auto;
  padding: 9px 10px;
}
.online-person strong {
  font-size: .78rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.online-person span {
  color: var(--muted);
  font-size: .62rem;
  text-transform: uppercase;
}
.presence-empty {
  color: var(--muted);
  font-size: .8rem;
}
html.light .presence-summary > div,
html.light .presence-chart,
html.light .online-person {
  background: #f3efe8;
  border-color: #ddd5ca;
}

/* Compact, usable mobile header */
@media (max-width: 700px) {
  .topbar {
    align-items: center;
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 7px;
    width: 100%;
  }
  .search-wrap {
    flex: none;
    max-width: none;
    min-width: 0;
    padding: 0 9px;
    width: 100%;
  }
  .search-wrap input {
    font-size: .82rem;
    height: 42px;
    min-width: 0;
    padding: 7px 2px;
  }
  .search-wrap input::placeholder {
    font-size: .78rem;
  }
  .top-actions {
    flex: 0 0 auto;
    min-width: 0;
  }
  .profile-pill {
    border-radius: 12px;
    flex: 0 0 46px;
    height: 46px;
    max-height: 46px;
    max-width: 46px;
    min-height: 46px;
    overflow: hidden;
    padding: 4px;
    width: 46px;
  }
  .profile-pill .avatar {
    flex: 0 0 36px;
    font-size: .85rem;
    height: 36px;
    width: 36px;
  }
  .profile-pill > div:not(.avatar),
  .profile-pill #logoutBtn {
    display: none !important;
  }
  .top-actions > .primary-btn {
    min-height: 42px;
    padding: 0 12px;
    white-space: nowrap;
  }
}

@media (max-width: 420px) {
  .main { padding-left: 8px; padding-right: 8px; }
  .topbar { top: 6px; }
  .search-wrap input::placeholder { color: #777080; }
}

/* Profile avatar editor and real avatar images */
.avatar-image { overflow: hidden; padding: 0; }
.avatar-image img { display: block; height: 100%; object-fit: cover; width: 100%; }
#settingsForm { margin-inline: auto; max-width: 760px; }
#settingsForm .avatar-preview { align-content: center; display: grid; gap: 8px; justify-items: center; min-height: 0; padding: 14px; }
#settingsForm .avatar-preview img { border: 2px solid var(--accent); border-radius: 50%; height: clamp(96px, 14vw, 132px); object-fit: cover; width: clamp(96px, 14vw, 132px); }
#settingsForm .avatar-preview span { font-size: .75rem; }
.profile-hero > img { border: 2px solid var(--accent); border-radius: 50%; height: 76px; object-fit: cover; width: 76px; }
@media (max-width: 700px) { #settingsForm { padding: 14px; } #settingsForm .avatar-preview img { height: 92px; width: 92px; } }

/* Executor-style script viewer */
.executor-shell { background: #09070d; border: 1px solid #30273b; border-radius: 14px; box-shadow: 0 18px 45px rgba(0,0,0,.28); overflow: hidden; }
.executor-toolbar { align-items: center; background: linear-gradient(180deg,#18131f,#110e16); border-bottom: 1px solid #30273b; display: grid; gap: 12px; grid-template-columns: auto minmax(0,1fr) auto; min-height: 54px; padding: 8px 11px; }
.executor-window-controls { display: flex; gap: 6px; }
.executor-window-controls i { background: #ff5f57; border-radius: 50%; height: 9px; width: 9px; }
.executor-window-controls i:nth-child(2) { background: #febc2e; }
.executor-window-controls i:nth-child(3) { background: var(--accent); }
.executor-title, .executor-tools, .executor-ready { align-items: center; display: flex; }
.executor-title { gap: 8px; min-width: 0; }
.executor-title strong { color: #f8f4ff; font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.executor-logo { align-items: center; display: flex; flex: 0 0 42px; height: 38px; justify-content: center; width: 42px; }
.executor-logo img { display: block; height: 38px; max-width: 42px; object-fit: contain; width: auto; }
.executor-language { background: rgba(171,255,38,.09); border: 1px solid rgba(171,255,38,.25); border-radius: 999px; color: var(--accent); font: 700 .6rem var(--mono); padding: 4px 7px; }
.executor-tools { gap: 9px; }
.executor-ready { color: #a7a0af; font-size: .62rem; gap: 5px; text-transform: uppercase; }
.executor-ready i { background: var(--accent); border-radius: 50%; box-shadow: 0 0 9px var(--accent); height: 6px; width: 6px; }
.code-copy-btn { align-items: center; background: #211a29; border: 1px solid #41354d; border-radius: 8px; color: #fff; cursor: pointer; display: flex; height: 34px; justify-content: center; transition: border-color .15s ease,color .15s ease,transform .15s ease; width: 34px; }
.code-copy-btn:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.code-copy-btn svg { fill: none; height: 17px; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; width: 17px; }
.detail-code-wrap .executor-editor { background: radial-gradient(circle at 85% 10%,rgba(171,255,38,.035),transparent 30%),#08070b; border: 0; border-radius: 0; counter-reset: executor-line; margin: 0; max-height: 420px; min-height: 150px; padding: 12px 0; white-space: pre; }
.executor-editor code { display: block; min-width: max-content; }
.executor-line { counter-increment: executor-line; display: grid; grid-template-columns: 46px minmax(max-content,1fr); min-height: 24px; }
.executor-line:hover { background: rgba(171,255,38,.045); }
.executor-line-number { border-right: 1px solid #241e2b; color: #554c60; padding-right: 11px; text-align: right; user-select: none; }
.executor-line-number::before { content: counter(executor-line); }
.executor-line-code { color: #c7f58e; padding: 0 16px; }
.executor-statusbar { align-items: center; background: #120f17; border-top: 1px solid #282030; color: #736a7d; display: flex; font: 600 .58rem var(--mono); gap: 14px; justify-content: flex-end; min-height: 27px; padding: 5px 11px; text-transform: uppercase; }
html.light .executor-shell { border-color: #cfc6d8; }
html.light .executor-toolbar, html.light .executor-statusbar { background: #f0eaf4; border-color: #d8cedf; }
html.light .executor-title strong, html.light .code-copy-btn { color: #1b1521; }
html.light .detail-code-wrap .executor-editor { background: #faf7fc; }
html.light .executor-line-code { color: #3e6610; }
html.light .code-copy-btn { background: #fff; border-color: #cfc4d6; }
@media (max-width:700px) { .executor-toolbar { gap: 7px; grid-template-columns: auto minmax(0,1fr) auto; padding: 7px 8px; } .executor-language, .executor-ready { display: none; } .executor-window-controls { gap: 4px; } .executor-window-controls i { height: 7px; width: 7px; } .executor-line { grid-template-columns: 36px minmax(max-content,1fr); } .executor-line-code { padding: 0 10px; } .executor-statusbar span:first-child { display:none; } }
@media (max-width:700px) { .executor-logo { flex-basis: 36px; height: 34px; width: 36px; } .executor-logo img { height: 34px; max-width: 36px; } }

/* Match More to full sidebar navigation rows */
.more-wrap { width: 100%; }
.more-wrap > .nav-link { box-sizing: border-box; width: 100%; }
.more-wrap > .nav-link[aria-expanded="true"] {
  background: linear-gradient(90deg, rgba(184,255,53,.1), rgba(184,255,53,.025));
  border-color: rgba(184,255,53,.18);
  color: var(--text);
}
.more-wrap > .nav-link[aria-expanded="true"] .icon { color: var(--accent); }
/* Full community rules page */
.rules-page { max-width: 920px; }
.rules-intro { border-left: 3px solid var(--accent); color: var(--muted); font-size: 1rem; line-height: 1.7; padding: 8px 0 8px 16px; }
.rules-list { display: grid; gap: 12px; margin-top: 22px; }
.rule-section { background: #0d0b12; border: 1px solid var(--line); border-radius: 14px; padding: clamp(15px,2.5vw,22px); }
.rule-section h3 { color: var(--text); font-size: 1.05rem; margin: 0 0 8px; }
.rule-section p, .rule-section li { color: var(--muted); line-height: 1.65; }
.rule-section p { margin: 0; }
.rule-section ul { display: grid; gap: 6px; margin: 12px 0 0; padding-left: 20px; }
.rule-section li::marker { color: var(--accent); }
.rules-finish { background: linear-gradient(135deg,rgba(184,255,53,.11),rgba(184,255,53,.025)); border: 1px solid rgba(184,255,53,.25); border-radius: 16px; margin-top: 18px; padding: 20px; }
.rules-finish h3 { margin-top: 0; }
.rules-finish p { color: var(--muted); line-height: 1.65; }
.rules-finish strong { color: var(--text); }
html.light .rule-section { background: #fffdf8; }
@media (max-width:700px) { .rules-page { padding: 16px; } .rule-section { border-radius: 12px; } }
/* Spacious creator submission dashboard */
.creator-dashboard-card { display: grid; gap: 18px; padding: clamp(18px,2.5vw,28px); }
.creator-dashboard-card > .profile-stats { gap: 12px; grid-template-columns: repeat(3,minmax(0,1fr)); }
.creator-dashboard-card > .profile-stats > div { align-content: center; border-radius: 12px; min-height: 104px; padding: 17px 18px; }
.creator-dashboard-card > .profile-stats strong { color: var(--text); font-size: clamp(1.65rem,2.4vw,2.15rem); line-height: 1; margin-bottom: 10px; }
.creator-dashboard-card > .profile-stats span { font-size: .72rem; letter-spacing: .055em; }
.creator-dashboard-card > p { border-top: 1px solid var(--line); color: var(--muted); line-height: 1.6; margin: 0; padding-top: 17px; }
@media (max-width:900px) { .creator-dashboard-card > .profile-stats { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width:480px) { .creator-dashboard-card { gap: 13px; padding: 13px; } .creator-dashboard-card > .profile-stats { gap: 8px; } .creator-dashboard-card > .profile-stats > div { min-height: 86px; padding: 13px; } .creator-dashboard-card > .profile-stats strong { font-size: 1.45rem; } }
/* Quantum search easter egg */
.quantum-easter-egg { background: radial-gradient(circle at 82% 8%,rgba(184,255,53,.15),transparent 31%),linear-gradient(145deg,#121018,#09080d); border: 1px solid rgba(184,255,53,.32); border-radius: 20px; box-shadow: 0 24px 70px rgba(0,0,0,.38),inset 0 1px 0 rgba(255,255,255,.04); margin-top: 14px; overflow: hidden; padding: clamp(18px,3vw,30px); position: relative; }
.quantum-easter-egg::before { background: repeating-linear-gradient(90deg,transparent 0 39px,rgba(184,255,53,.025) 40px),repeating-linear-gradient(0deg,transparent 0 39px,rgba(184,255,53,.025) 40px); content:""; inset:0; pointer-events:none; position:absolute; }
.quantum-secret-head,.quantum-secret-grid,.quantum-secret-foot,.quantum-login-gate { position:relative; z-index:1; }
.quantum-secret-head { align-items:flex-start; display:flex; gap:16px; justify-content:space-between; }
.quantum-secret-head h2 { font-size:clamp(1.65rem,4vw,2.7rem); margin:3px 0; }
.quantum-secret-head p { color:var(--muted); margin:0; }
.quantum-live { align-items:center; background:rgba(184,255,53,.08); border:1px solid rgba(184,255,53,.28); border-radius:999px; color:var(--accent); display:flex; font:800 .65rem var(--mono); gap:7px; padding:7px 10px; text-transform:uppercase; }
.quantum-live i { animation:quantumPulse 1.4s infinite; background:var(--accent); border-radius:50%; box-shadow:0 0 12px var(--accent); height:7px; width:7px; }
.quantum-secret-grid { display:grid; gap:10px; grid-template-columns:repeat(4,minmax(0,1fr)); margin-top:22px; }
.quantum-secret-grid > div { background:rgba(8,7,11,.78); border:1px solid #30283a; border-radius:14px; display:grid; min-height:130px; padding:16px; }
.quantum-secret-grid span { color:#93899f; font-size:.67rem; font-weight:850; letter-spacing:.07em; text-transform:uppercase; }
.quantum-secret-grid strong { color:var(--accent); font:700 clamp(2rem,5vw,3.2rem) var(--display); line-height:1; margin:10px 0; text-shadow:0 0 24px rgba(184,255,53,.18); }
.quantum-secret-grid small { align-self:end; color:#655d6d; font-size:.65rem; }
.quantum-secret-foot { border-top:1px solid #2c2534; color:#62596b; display:flex; font:700 .58rem var(--mono); justify-content:space-between; margin-top:16px; padding-top:13px; }
.quantum-login-gate { padding:28px 0 4px; text-align:center; }
.quantum-login-gate strong { color:var(--accent); font-size:1.2rem; }
.quantum-login-gate p { color:var(--muted); }
@keyframes quantumPulse { 50% { opacity:.35; transform:scale(.72); } }
html.light .quantum-easter-egg { background:radial-gradient(circle at 82% 8%,rgba(116,168,25,.14),transparent 31%),#fffdf8; }
html.light .quantum-secret-grid > div { background:#f4f0e9; border-color:#d9d1c7; }
@media(max-width:850px){.quantum-secret-grid{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:480px){.quantum-easter-egg{border-radius:15px;padding:15px}.quantum-secret-grid{gap:8px}.quantum-secret-grid>div{min-height:108px;padding:12px}.quantum-secret-head{align-items:flex-start}.quantum-secret-foot{gap:8px;flex-direction:column}}
/* Make the easter egg the first search result */
#homeView.quantum-search-active > *:not(#quantumEasterEgg) { display: none !important; }
#homeView.quantum-search-active #quantumEasterEgg { display: block !important; margin-top: 0; }
/* Clickable post creator name */
.detail-creator-link { background:transparent; border:0; color:var(--accent); cursor:pointer; font:inherit; font-weight:850; padding:0; text-decoration:none; }
.detail-creator-link:hover { text-decoration:underline; text-underline-offset:3px; }
.detail-creator-link:focus-visible { border-radius:3px; outline:2px solid var(--accent); outline-offset:3px; }
/* Quantum synchronized release takeover */
html.release-locked,html.release-locked body{overflow:hidden!important}.release-takeover{align-items:center;background:#050407;display:flex;inset:0;justify-content:center;overflow:hidden;position:fixed;z-index:2147483647}.release-takeover.release-leaving{opacity:0;transform:scale(1.04);transition:opacity .7s ease,transform .7s ease}.release-takeover::before{background:repeating-linear-gradient(90deg,transparent 0 79px,rgba(184,255,53,.035) 80px),repeating-linear-gradient(0deg,transparent 0 79px,rgba(184,255,53,.035) 80px);content:"";inset:0;mask-image:radial-gradient(circle,#000,transparent 75%);position:absolute}.release-stage{align-items:center;display:flex;flex-direction:column;max-width:900px;padding:24px;position:relative;text-align:center;z-index:4}.release-logo{filter:drop-shadow(0 0 32px rgba(184,255,53,.35));height:clamp(76px,12vw,140px);margin-bottom:18px;object-fit:contain;width:clamp(76px,12vw,140px)}.release-kicker{color:var(--accent);font:800 clamp(.62rem,1.5vw,.85rem) var(--mono);letter-spacing:.24em;margin:0 0 12px;text-transform:uppercase}.release-stage h1{color:#fff;font:800 clamp(2.7rem,9vw,7.5rem)/.9 var(--display);letter-spacing:-.055em;margin:0;text-shadow:0 0 45px rgba(184,255,53,.14)}.release-clock{align-items:center;display:flex;gap:clamp(12px,4vw,34px);margin:clamp(25px,5vw,48px) 0 25px}.release-clock>div{display:grid;gap:7px}.release-clock strong{color:#fff;font:700 clamp(4.4rem,16vw,11rem)/.7 var(--mono);font-variant-numeric:tabular-nums;letter-spacing:-.11em}.release-clock span{color:#777080;font:700 .62rem var(--mono);letter-spacing:.17em;text-transform:uppercase}.release-clock b{color:var(--accent);font:600 clamp(2.7rem,9vw,7rem) var(--mono);line-height:.7}.release-progress{background:#201b27;border:1px solid #332a3c;border-radius:999px;height:8px;max-width:620px;overflow:hidden;width:min(78vw,620px)}.release-progress i{background:linear-gradient(90deg,#6d941b,var(--accent),#fff);box-shadow:0 0 24px var(--accent);display:block;height:100%;transition:width .2s linear;width:0}.release-message{color:#9991a1;font-size:clamp(.8rem,2vw,1rem);margin:17px 0 0}.release-enter{background:var(--accent);border:0;border-radius:12px;color:#101407;cursor:pointer;font:900 .9rem var(--display);margin-top:25px;min-height:48px;padding:0 24px;text-transform:uppercase}.release-enter:hover{box-shadow:0 0 35px rgba(184,255,53,.35);transform:translateY(-2px)}.release-light{border-radius:50%;filter:blur(75px);opacity:.22;position:absolute}.release-light-one{background:#b8ff35;height:45vw;left:-18vw;top:-15vw;width:45vw}.release-light-two{background:#7137ff;bottom:-20vw;height:50vw;right:-17vw;width:50vw}.release-light-three{background:#00d8ff;height:32vw;right:20%;top:-20vw;width:32vw}.release-corner{bottom:18px;color:#4d4654;font:700 .55rem var(--mono);letter-spacing:.16em;position:absolute;z-index:4}.release-corner-left{left:20px}.release-corner-right{right:20px}.release-confetti{inset:0;overflow:hidden;pointer-events:none;position:absolute;z-index:8}.release-confetti i{animation:releaseFall var(--duration) cubic-bezier(.15,.65,.35,1) var(--delay) forwards;background:var(--color);height:calc(var(--size)*1.8);left:var(--x);opacity:0;position:absolute;top:-30px;width:var(--size)}.is-released{animation:releaseDisco .62s linear infinite}.is-released .release-stage h1{animation:releaseTitle .7s ease-in-out infinite alternate;color:var(--accent);text-shadow:0 0 18px var(--accent),0 0 70px #8d4dff}.is-released .release-light-one{animation:releaseLightOne .8s linear infinite}.is-released .release-light-two{animation:releaseLightTwo .65s linear infinite}.is-released .release-light-three{animation:releaseLightThree .9s linear infinite}@keyframes releaseFall{0%{opacity:1;transform:translate3d(0,-5vh,0) rotate(0)}100%{opacity:.9;transform:translate3d(var(--drift),110vh,0) rotate(var(--spin))}}@keyframes releaseDisco{0%,100%{background:#050407}25%{background:#130621}50%{background:#071911}75%{background:#061521}}@keyframes releaseTitle{to{filter:hue-rotate(130deg);transform:scale(1.035)}}@keyframes releaseLightOne{50%{background:#ff3cac;opacity:.48;transform:translate(20vw,10vw)}}@keyframes releaseLightTwo{50%{background:#b8ff35;opacity:.52;transform:translate(-20vw,-8vw)}}@keyframes releaseLightThree{50%{background:#ffea00;opacity:.45;transform:translate(-8vw,22vw)}}@media(max-width:600px){.release-stage{padding:18px}.release-clock{gap:12px}.release-clock strong{font-size:clamp(4rem,24vw,6.5rem)}.release-clock b{font-size:3.2rem}.release-corner{display:none}.release-logo{margin-bottom:12px}}@media(prefers-reduced-motion:reduce){.is-released,.is-released *,.release-confetti i{animation-duration:3s!important}.release-takeover *{scroll-behavior:auto!important}}
/* Rejection moderation dialog */
.reject-modal { width:min(520px,calc(100vw - 24px)); }
.reject-modal h2 { margin:2px 0 7px; }
.reject-help { color:var(--muted); line-height:1.55; margin:0; }
.reject-modal textarea { min-height:130px; resize:vertical; text-transform:none; }
.reject-modal-actions { display:flex; gap:9px; justify-content:flex-end; }
.reject-modal-actions button { min-width:120px; }
@media(max-width:480px){.reject-modal-actions{display:grid;grid-template-columns:1fr}.reject-modal-actions button{width:100%}}