/* RadiiMC theme — design system + LeaderOS/Tabler integration layer.
   Loaded after Tabler and flat's extra.css. Dark-first by design. */

/* ── Tokens ──────────────────────────────────────────────────────────────────── */
:root {
  --rm-bg: #080d1a;
  --rm-bg-2: #0b1222;
  --rm-surface: #0f172b;
  --rm-surface-2: #142038;
  --rm-surface-3: #1a2947;
  --rm-line: rgba(140, 170, 220, 0.13);
  --rm-line-strong: rgba(140, 170, 220, 0.26);
  --rm-text: #eef3fb;
  --rm-text-2: #b6c2d8;
  --rm-text-3: #8d9ab3;
  --rm-cyan: #22d3ee;
  --rm-teal: #14b8a6;
  --rm-amber: #f5b544;
  --rm-on-amber: #1a1205;
  --rm-online: #34d399;
  --rm-maint: #fbbf24;
  --rm-offline: #f87171;
  --rm-unknown: #94a3b8;
  --rm-soon: #a5b4fc;
  --rm-radius: 16px;
  --rm-radius-sm: 10px;
  --rm-gutter: 16px;
  --rm-max: 1240px;
  --rm-header-h: 64px;
  --rm-font-display: "Unbounded", "Inter", system-ui, sans-serif;
  --rm-font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --rm-font-pixel: "Silkscreen", ui-monospace, monospace;
  --rm-ease: cubic-bezier(.2, .7, .2, 1);
  --rm-shadow: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 18px 40px -24px rgba(0, 0, 0, .7);
  color-scheme: dark;
}
@media (min-width: 768px) { :root { --rm-gutter: 24px; } }

/* Map Tabler (Bootstrap) variables onto RadiiMC so native module pages inherit the theme. */
[data-bs-theme=dark], :root {
  --tblr-body-bg: var(--rm-bg);
  --tblr-body-color: var(--rm-text);
  --tblr-bg-surface: var(--rm-surface);
  --tblr-bg-surface-secondary: var(--rm-surface-2);
  --tblr-bg-surface-tertiary: var(--rm-surface-3);
  --tblr-bg-surface-dark: var(--rm-bg-2);
  --tblr-border-color: var(--rm-line);
  --tblr-border-color-translucent: var(--rm-line);
  --tblr-secondary: var(--rm-text-3);
  --tblr-secondary-color: var(--rm-text-3);
  --tblr-muted: var(--rm-text-3);
  --tblr-emphasis-color: var(--rm-text);
  --tblr-heading-color: var(--rm-text);
  --tblr-link-color: var(--rm-cyan);
  --tblr-link-hover-color: #67e8f9;
  --tblr-primary: var(--rm-cyan);
  --tblr-primary-rgb: 34, 211, 238;
  --tblr-primary-fg: #04121a;
  --tblr-font-sans-serif: var(--rm-font-body);
  --tblr-border-radius: var(--rm-radius-sm);
  --tblr-card-bg: var(--rm-surface);
  --tblr-box-shadow-card: var(--rm-shadow);
}

/* ── Base ────────────────────────────────────────────────────────────────────── */
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body.rm {
  margin: 0;
  background: var(--rm-bg);
  color: var(--rm-text);
  font-family: var(--rm-font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
.rm *, .rm *::before, .rm *::after { box-sizing: border-box; }
.rm img { max-width: 100%; }
.rm a { color: var(--rm-cyan); text-underline-offset: 3px; }
.rm a:hover { color: #67e8f9; }
.rm :focus-visible { outline: 3px solid var(--rm-amber); outline-offset: 3px; border-radius: 6px; }
.rm ::selection { background: rgba(34, 211, 238, .35); }
.rm .rm-display, .rm h1.rm-h1, .rm .rm-h2 { font-family: var(--rm-font-display); letter-spacing: -0.02em; }
.rm-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.rm-skip { position: absolute; left: 12px; top: -60px; z-index: 1000; background: var(--rm-amber); color: var(--rm-on-amber) !important; padding: 10px 16px; border-radius: 10px; font-weight: 700; text-decoration: none; transition: top .15s; }
.rm-skip:focus { top: 12px; }
.rm-wrap { width: 100%; max-width: var(--rm-max); margin: 0 auto; padding: 0 var(--rm-gutter); }
.rm-section { padding: 56px 0; }
@media (min-width: 992px) { .rm-section { padding: 88px 0; } }
.rm-eyebrow { font-family: var(--rm-font-pixel); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--rm-cyan); margin: 0 0 10px; }
.rm-h2 { font-size: clamp(1.6rem, 3.6vw, 2.5rem); font-weight: 700; line-height: 1.1; margin: 0; color: var(--rm-text); }
.rm-lede { color: var(--rm-text-2); font-size: 1.05rem; max-width: 62ch; margin: 12px 0 0; }
.rm-section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.rm-link-arrow { font-weight: 600; text-decoration: none; display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; }
.rm-link-arrow i { transition: transform .2s var(--rm-ease); }
.rm-link-arrow:hover i { transform: translateX(3px); }
.rm-muted { color: var(--rm-text-3); }

/* Voxel motif: a stepped block divider */
.rm-steps-divider { height: 12px; background:
  linear-gradient(90deg, var(--rm-surface-2) 0 12px, transparent 12px) 0 0 / 48px 6px repeat-x,
  linear-gradient(90deg, transparent 24px, var(--rm-surface-2) 24px 36px, transparent 36px) 0 6px / 48px 6px repeat-x; opacity: .9; }

/* ── Buttons ─────────────────────────────────────────────────────────────────── */
.rm-btn { --b: var(--rm-surface-3); display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; padding: 0 20px; border-radius: 12px; border: 1px solid var(--rm-line-strong); background: var(--b); color: var(--rm-text) !important; font-weight: 700; font-size: .98rem; text-decoration: none; cursor: pointer; transition: transform .15s var(--rm-ease), background-color .15s, border-color .15s, box-shadow .15s; white-space: nowrap; font-family: var(--rm-font-body); line-height: 1; }
.rm-btn:hover { transform: translateY(-1px); border-color: rgba(140, 170, 220, .45); }
.rm-btn:active { transform: translateY(0); }
.rm-btn[disabled], .rm-btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; }
.rm-btn-play { background: var(--rm-amber); border-color: transparent; color: var(--rm-on-amber) !important; box-shadow: 0 0 0 0 rgba(245, 181, 68, .0), 0 10px 24px -12px rgba(245, 181, 68, .65); }
.rm-btn-play:hover { background: #ffc85e; }
.rm-btn-cyan { background: var(--rm-cyan); border-color: transparent; color: #04121a !important; }
.rm-btn-ghost { background: transparent; }
.rm-btn-sm { min-height: 38px; padding: 0 14px; font-size: .9rem; border-radius: 10px; }
.rm-btn-lg { min-height: 54px; padding: 0 24px; font-size: 1.05rem; }
.rm-btn .rm-kbd { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 600; letter-spacing: 0; background: rgba(0, 0, 0, .14); padding: 5px 8px; border-radius: 7px; }
.rm-btn i { font-size: 1.15em; }

/* ── Pills (status / availability) ───────────────────────────────────────────── */
.rm-pill { display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600; line-height: 1.4; background: rgba(148, 163, 184, .12); color: var(--rm-text-2); border: 1px solid var(--rm-line); white-space: nowrap; }
.rm-pill::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: currentColor; flex: none; }
.rm-pill[data-tone=online] { color: var(--rm-online); background: rgba(52, 211, 153, .1); border-color: rgba(52, 211, 153, .28); }
.rm-pill[data-tone=maintenance] { color: var(--rm-maint); background: rgba(251, 191, 36, .1); border-color: rgba(251, 191, 36, .28); }
.rm-pill[data-tone=offline] { color: var(--rm-offline); background: rgba(248, 113, 113, .1); border-color: rgba(248, 113, 113, .28); }
.rm-pill[data-tone=unknown] { color: var(--rm-unknown); }
.rm-pill[data-tone=soon] { color: var(--rm-soon); background: rgba(165, 180, 252, .08); border-color: rgba(165, 180, 252, .24); }
.rm-pill[data-tone=online]::before { animation: rm-pulse 2.4s ease-in-out infinite; }
.rm-pill[data-tone=dev] { color: #fda4af; background: rgba(253, 164, 175, .08); border-color: rgba(253, 164, 175, .3); }
.rm-pill[data-tone=dev]::before { border-radius: 50%; }
@keyframes rm-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* ── Announcement + maintenance bars ─────────────────────────────────────────── */
.rm-bar { background: linear-gradient(90deg, rgba(34, 211, 238, .14), rgba(20, 184, 166, .1)); border-bottom: 1px solid var(--rm-line); font-size: .9rem; }
.rm-bar .rm-wrap { display: flex; gap: 18px; padding-top: 8px; padding-bottom: 8px; overflow-x: auto; scrollbar-width: none; }
.rm-bar a { color: var(--rm-text); text-decoration: none; white-space: nowrap; }
.rm-bar a:hover { text-decoration: underline; }
.rm-bar-maint { background: rgba(251, 191, 36, .12); color: #fde68a; }
.rm-bar-maint .rm-wrap { align-items: center; gap: 10px; }

/* ── Header ──────────────────────────────────────────────────────────────────── */
/* The blur lives on a pseudo-element: backdrop-filter on the header itself would become the
   containing block for the fixed-position mobile drawer and clip it to the header's height. */
.rm-header { position: sticky; top: 0; z-index: 50; isolation: isolate; border-bottom: 1px solid var(--rm-line); }
.rm-header::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(8, 13, 26, .86); backdrop-filter: saturate(140%) blur(12px); -webkit-backdrop-filter: saturate(140%) blur(12px); }
.rm-header .rm-wrap { display: flex; align-items: center; gap: 18px; height: var(--rm-header-h); }
.rm-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--rm-text) !important; flex: none; }
.rm-brand img { width: 34px; height: 34px; border-radius: 9px; }
.rm-brand span { font-family: var(--rm-font-display); font-weight: 700; font-size: 1.12rem; letter-spacing: -0.02em; }
.rm-brand span b { color: var(--rm-cyan); font-weight: 700; }
.rm-nav { display: none; flex: 1; }
.rm-nav > ul { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.rm-nav li { position: relative; }
.rm-nav > ul > li > a { display: inline-flex; align-items: center; gap: 6px; padding: 10px 12px; border-radius: 10px; color: var(--rm-text-2); text-decoration: none; font-weight: 600; font-size: .95rem; }
.rm-nav > ul > li > a:hover, .rm-nav > ul > li:focus-within > a, .rm-nav > ul > li > a[aria-current] { color: var(--rm-text); background: rgba(140, 170, 220, .08); }
.rm-nav > ul > li > a[aria-current] { box-shadow: inset 0 -2px 0 var(--rm-cyan); border-radius: 10px 10px 4px 4px; }
.rm-nav .rm-caret { font-size: .8rem; opacity: .7; }
.rm-menu { position: absolute; top: calc(100% + 6px); left: 0; min-width: 240px; padding: 8px; border-radius: 14px; background: var(--rm-surface); border: 1px solid var(--rm-line-strong); box-shadow: 0 24px 48px -20px rgba(0, 0, 0, .8); opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity .15s, transform .15s var(--rm-ease), visibility .15s; list-style: none; margin: 0; }
.rm-nav li:hover > .rm-menu, .rm-nav li:focus-within > .rm-menu { opacity: 1; visibility: visible; transform: none; }
.rm-menu a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; color: var(--rm-text-2); text-decoration: none; font-weight: 500; }
.rm-menu a:hover, .rm-menu a:focus-visible { background: var(--rm-surface-2); color: var(--rm-text); }
.rm-menu-games { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; min-width: 460px; }
.rm-menu-games img { width: 44px; height: 30px; object-fit: cover; border-radius: 6px; flex: none; }
.rm-menu-games small { display: block; color: var(--rm-text-3); font-size: .78rem; }
.rm-menu-games .rm-menu-all { grid-column: 1 / -1; border-top: 1px solid var(--rm-line); margin-top: 6px; padding-top: 12px; color: var(--rm-cyan); font-weight: 600; }
.rm-header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.rm-header-actions .rm-btn-login { display: none; }
@media (min-width: 1080px) {
  .rm-nav { display: block; }
  .rm-burger { display: none !important; }
  .rm-header-actions .rm-btn-login { display: inline-flex; }
}

/* Account menu (native <details>) */
.rm-account { position: relative; }
.rm-account > summary { list-style: none; display: flex; align-items: center; gap: 8px; padding: 4px; border-radius: 12px; cursor: pointer; }
.rm-account > summary::-webkit-details-marker { display: none; }
.rm-account > summary:hover { background: rgba(140, 170, 220, .08); }
.rm-account > summary img { width: 34px; height: 34px; border-radius: 9px; image-rendering: pixelated; }
.rm-account-name { display: none; font-weight: 600; font-size: .92rem; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (min-width: 1280px) { .rm-account-name { display: inline; } }
.rm-account .rm-menu { left: auto; right: 0; opacity: 1; visibility: visible; transform: none; min-width: 250px; }
.rm-account .rm-menu button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; background: none; border: 0; color: #fca5a5; font: inherit; font-weight: 500; cursor: pointer; text-align: left; }
.rm-account .rm-menu button:hover { background: var(--rm-surface-2); }
.rm-account .rm-menu hr { border: 0; border-top: 1px solid var(--rm-line); margin: 6px 0; }
.rm-account-head { padding: 8px 10px 10px; }
.rm-account-head strong { display: block; }
.rm-account-head small { color: var(--rm-text-3); }

/* Mobile navigation (native <details>, enhanced by JS) */
.rm-burger { position: static; }
.rm-burger > summary { list-style: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; border: 1px solid var(--rm-line-strong); cursor: pointer; color: var(--rm-text); font-size: 1.4rem; }
.rm-burger > summary::-webkit-details-marker { display: none; }
.rm-drawer { position: fixed; inset: var(--rm-header-h) 0 0 0; background: var(--rm-bg); overflow-y: auto; padding: 20px var(--rm-gutter) 40px; border-top: 1px solid var(--rm-line); }
.rm-drawer h2 { font-family: var(--rm-font-pixel); font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--rm-text-3); margin: 22px 0 8px; font-weight: 400; }
.rm-drawer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.rm-drawer a { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 12px; border-radius: 12px; background: var(--rm-surface); color: var(--rm-text); text-decoration: none; font-weight: 600; }
.rm-drawer a img { width: 40px; height: 28px; border-radius: 6px; object-fit: cover; }
.rm-drawer .rm-drawer-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.rm-drawer .rm-drawer-actions a { justify-content: center; }

/* ── Hero ────────────────────────────────────────────────────────────────────── */
.rm-hero { position: relative; isolation: isolate; overflow: hidden; border-bottom: 1px solid var(--rm-line); }
.rm-hero-media { position: absolute; inset: 0; z-index: -2; }
.rm-hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 70% 40%; }
.rm-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background:
  linear-gradient(90deg, rgba(8, 13, 26, .97) 0%, rgba(8, 13, 26, .88) 38%, rgba(8, 13, 26, .35) 70%, rgba(8, 13, 26, .15) 100%),
  linear-gradient(0deg, var(--rm-bg) 0%, rgba(8, 13, 26, 0) 30%); }
.rm-hero-media img { object-position: 72% 62%; }
@media (max-width: 767px) {
  .rm-hero-media { bottom: auto; height: 300px; }
  .rm-hero-media img { object-position: 66% 55%; }
  .rm-hero::before { background: linear-gradient(180deg, rgba(8, 13, 26, .1) 0, rgba(8, 13, 26, .25) 180px, var(--rm-bg) 300px); }
}
.rm-hero .rm-wrap { min-height: min(78vh, 760px); display: flex; flex-direction: column; justify-content: center; padding-top: 72px; padding-bottom: 72px; }
@media (max-width: 767px) { .rm-hero .rm-wrap { min-height: 0; padding-top: 250px; padding-bottom: 44px; } }
.rm-hero h1 { font-family: var(--rm-font-display); font-size: clamp(2.3rem, 6.4vw, 4.6rem); line-height: 1.02; font-weight: 800; letter-spacing: -0.035em; margin: 0; max-width: 13ch; }
.rm-hero h1 em { font-style: normal; color: var(--rm-cyan); }
.rm-hero-copy { font-size: clamp(1.02rem, 1.6vw, 1.2rem); color: var(--rm-text-2); max-width: 52ch; margin: 20px 0 0; }
.rm-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.rm-hero-meta { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; margin-top: 22px; color: var(--rm-text-3); font-size: .9rem; }
.rm-hero-meta .rm-dot { width: 4px; height: 4px; background: var(--rm-line-strong); border-radius: 1px; }
@media (max-width: 479px) { .rm-hero-actions .rm-btn { width: 100%; } }

/* Copy address button */
.rm-copy { position: relative; }
.rm-copy[data-copied="true"] .rm-copy-label::after { content: attr(data-copied-label); }
.rm-copy[data-copied="true"] .rm-copy-label > span { display: none; }

/* ── Live activity strip ─────────────────────────────────────────────────────── */
.rm-activity { margin-top: -1px; background: var(--rm-bg-2); border-bottom: 1px solid var(--rm-line); }
.rm-activity .rm-wrap { display: grid; grid-template-columns: 1fr; gap: 0; }
@media (min-width: 768px) { .rm-activity .rm-wrap { grid-template-columns: 1.25fr 1fr; } }
.rm-activity-group { padding: 20px 0; display: flex; flex-direction: column; gap: 12px; }
.rm-activity-group + .rm-activity-group { border-top: 1px solid var(--rm-line); }
@media (min-width: 768px) { .rm-activity-group + .rm-activity-group { border-top: 0; border-left: 1px solid var(--rm-line); padding-left: 28px; } .rm-activity-group:first-child { padding-right: 28px; } }
.rm-activity-label { display: flex; align-items: center; gap: 8px; font-family: var(--rm-font-pixel); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--rm-text-3); }
.rm-activity-label i { font-size: 1rem; color: var(--rm-cyan); }
.rm-activity-group[data-kind=web] .rm-activity-label i { color: var(--rm-teal); }
.rm-stats { display: flex; flex-wrap: wrap; gap: 14px 32px; align-items: baseline; }
.rm-stat { display: flex; flex-direction: column; min-width: 0; }
.rm-stat-value { font-family: var(--rm-font-display); font-size: clamp(1.7rem, 3.4vw, 2.3rem); font-weight: 700; line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.rm-stat-value[data-state=unknown] { color: var(--rm-unknown); }
.rm-stat-label { color: var(--rm-text-2); font-size: .9rem; margin-top: 6px; }
.rm-stat-note { color: var(--rm-text-3); font-size: .8rem; }
.rm-activity-foot { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; color: var(--rm-text-3); font-size: .82rem; }

/* ── Cards / surfaces ────────────────────────────────────────────────────────── */
.rm-card { position: relative; background: var(--rm-surface); border: 1px solid var(--rm-line); border-radius: var(--rm-radius); box-shadow: var(--rm-shadow); overflow: hidden; }
.rm-card-pad { padding: 22px; }
@media (min-width: 768px) { .rm-card-pad { padding: 28px; } }

/* Discover: flagship + stacked rows */
.rm-discover { display: grid; gap: 16px; }
@media (min-width: 992px) { .rm-discover { grid-template-columns: 1.35fr 1fr; gap: 20px; } }
.rm-flagship { --accent: var(--rm-amber); display: flex; flex-direction: column; text-decoration: none; color: var(--rm-text) !important; min-height: 100%; transition: border-color .2s, transform .2s var(--rm-ease); }
.rm-flagship:hover { border-color: color-mix(in srgb, var(--accent) 55%, transparent); transform: translateY(-2px); }
.rm-flagship-media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; }
.rm-flagship-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--rm-ease); }
.rm-flagship:hover .rm-flagship-media img { transform: scale(1.03); }
.rm-flagship-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, var(--rm-surface) 100%); }
.rm-flagship-badge { position: absolute; top: 14px; left: 14px; z-index: 1; font-family: var(--rm-font-pixel); font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; background: var(--accent); color: var(--rm-on-amber); padding: 5px 9px; border-radius: 6px; }
.rm-flagship-body { padding: 0 22px 24px; margin-top: -40px; position: relative; z-index: 1; display: flex; flex-direction: column; gap: 12px; flex: 1; }
@media (min-width: 768px) { .rm-flagship-body { padding: 0 30px 30px; } }
.rm-flagship h3 { font-family: var(--rm-font-display); font-size: clamp(1.45rem, 2.6vw, 2rem); line-height: 1.1; margin: 0; letter-spacing: -0.02em; }
.rm-flagship p { margin: 0; color: var(--rm-text-2); }
.rm-pillars { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 6px 0 0; padding: 0; list-style: none; }
@media (min-width: 576px) { .rm-pillars { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.rm-pillars li { background: var(--rm-surface-2); border: 1px solid var(--rm-line); border-radius: 12px; padding: 12px; font-size: .88rem; color: var(--rm-text-2); }
.rm-pillars li strong { display: flex; align-items: center; gap: 6px; color: var(--rm-text); font-size: .95rem; margin-bottom: 2px; }
.rm-pillars li i { color: var(--accent); }
.rm-card-foot { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 6px; }

.rm-rows { display: grid; gap: 16px; }
.rm-row { --accent: var(--rm-cyan); display: grid; grid-template-columns: 116px 1fr; gap: 16px; align-items: center; padding: 12px; text-decoration: none; color: var(--rm-text) !important; transition: border-color .2s, transform .2s var(--rm-ease), background-color .2s; }
@media (min-width: 576px) { .rm-row { grid-template-columns: 168px 1fr; } }
.rm-row:hover { border-color: color-mix(in srgb, var(--accent) 50%, transparent); transform: translateX(2px); background: var(--rm-surface-2); }
.rm-row-media { aspect-ratio: 16 / 10; border-radius: 11px; overflow: hidden; background: var(--rm-surface-2); }
.rm-row-media img { width: 100%; height: 100%; object-fit: cover; }
.rm-row h3 { font-family: var(--rm-font-display); font-size: 1.12rem; margin: 0 0 4px; letter-spacing: -0.01em; }
.rm-row p { margin: 0 0 10px; color: var(--rm-text-2); font-size: .92rem; line-height: 1.45; }
.rm-row .rm-accent-bar { position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }

/* Minigames bento */
.rm-bento { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 768px) { .rm-bento { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; } .rm-tile-wide { grid-column: span 2; } }
.rm-tile { --accent: var(--rm-cyan); display: flex; flex-direction: column; text-decoration: none; color: var(--rm-text) !important; transition: transform .2s var(--rm-ease), border-color .2s; }
.rm-tile:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
.rm-tile-media { aspect-ratio: 16 / 10; overflow: hidden; position: relative; }
.rm-tile-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--rm-ease); }
.rm-tile:hover .rm-tile-media img { transform: scale(1.04); }
.rm-tile-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.rm-tile h3 { font-family: var(--rm-font-display); font-size: 1rem; margin: 0; letter-spacing: -0.01em; display: flex; align-items: center; gap: 8px; }
.rm-tile h3::before { content: ""; width: 10px; height: 10px; background: var(--accent); border-radius: 2px; flex: none; }
.rm-tile p { margin: 0; color: var(--rm-text-2); font-size: .88rem; line-height: 1.45; }
.rm-tile .rm-pill { align-self: flex-start; margin-top: auto; }
@media (max-width: 479px) { .rm-tile p { display: none; } .rm-tile-body { padding: 12px; } .rm-tile h3 { font-size: .9rem; } }
.rm-tile-variant { position: absolute; top: 10px; left: 10px; font-size: .72rem; font-weight: 700; background: rgba(8, 13, 26, .82); border: 1px solid var(--rm-line-strong); padding: 3px 8px; border-radius: 6px; }

/* News + events */
.rm-split { display: grid; gap: 28px; }
@media (min-width: 992px) { .rm-split { grid-template-columns: 1.6fr 1fr; gap: 36px; } }
.rm-news { display: grid; gap: 14px; }
.rm-news-item { display: grid; grid-template-columns: 120px 1fr; gap: 16px; padding: 12px; text-decoration: none; color: var(--rm-text) !important; transition: background-color .2s, border-color .2s; }
@media (min-width: 576px) { .rm-news-item { grid-template-columns: 200px 1fr; } }
.rm-news-item:hover { background: var(--rm-surface-2); border-color: var(--rm-line-strong); }
.rm-news-item img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 10px; background: var(--rm-surface-2); }
.rm-news-item h3 { font-size: 1.08rem; margin: 2px 0 6px; line-height: 1.3; font-weight: 700; }
.rm-news-item p { margin: 0; color: var(--rm-text-2); font-size: .9rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rm-meta { color: var(--rm-text-3); font-size: .8rem; display: flex; gap: 8px; flex-wrap: wrap; }
.rm-events { display: grid; gap: 12px; }
.rm-event { display: grid; grid-template-columns: 64px 1fr; gap: 14px; align-items: center; padding: 14px; }
.rm-event-date { text-align: center; background: var(--rm-surface-2); border-radius: 10px; padding: 8px 4px; border: 1px solid var(--rm-line); }
.rm-event-date b { display: block; font-family: var(--rm-font-display); font-size: 1.3rem; line-height: 1; }
.rm-event-date small { font-family: var(--rm-font-pixel); font-size: .64rem; text-transform: uppercase; color: var(--rm-cyan); }
.rm-event h3 { font-size: 1rem; margin: 0 0 2px; }

/* Empty states */
.rm-empty { display: flex; gap: 16px; align-items: flex-start; padding: 22px; border: 1px dashed var(--rm-line-strong); border-radius: var(--rm-radius); background: rgba(15, 23, 43, .5); color: var(--rm-text-2); }
.rm-empty i { font-size: 1.5rem; color: var(--rm-text-3); flex: none; margin-top: 2px; }
.rm-empty strong { display: block; color: var(--rm-text); margin-bottom: 2px; }
.rm-empty p { margin: 0; font-size: .92rem; }
.rm-empty a { font-weight: 600; }

/* Community */
.rm-community { display: grid; gap: 20px; }
@media (min-width: 992px) { .rm-community { grid-template-columns: 1fr 1.2fr; gap: 28px; } }
.rm-avatars { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin: 0; padding: 0; }
.rm-avatar { position: relative; display: block; width: 52px; height: 52px; border-radius: 12px; overflow: visible; }
.rm-avatar img { width: 52px; height: 52px; border-radius: 12px; image-rendering: pixelated; background: var(--rm-surface-2); border: 1px solid var(--rm-line); }
.rm-avatar .rm-badge-dot { position: absolute; right: -4px; bottom: -4px; width: 18px; height: 18px; border-radius: 6px; display: grid; place-items: center; font-size: .7rem; background: var(--rm-teal); color: #032420; border: 2px solid var(--rm-surface); }
.rm-avatar .rm-badge-dot[data-kind=game] { background: var(--rm-amber); color: var(--rm-on-amber); }
.rm-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: .82rem; color: var(--rm-text-3); margin-top: 14px; }
.rm-legend span { display: inline-flex; gap: 6px; align-items: center; }
.rm-legend i.sw { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.rm-threads { list-style: none; margin: 0; padding: 0; }
.rm-threads li + li { border-top: 1px solid var(--rm-line); }
.rm-threads a { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 14px 4px; text-decoration: none; color: var(--rm-text) !important; }
.rm-threads a:hover strong { color: var(--rm-cyan); }
.rm-threads strong { font-weight: 600; line-height: 1.35; }
.rm-threads .rm-meta { grid-column: 1; }
.rm-threads .rm-replies { grid-row: 1 / span 2; grid-column: 2; align-self: center; color: var(--rm-text-3); font-size: .85rem; display: inline-flex; gap: 4px; align-items: center; }

/* Join steps */
.rm-join { position: relative; overflow: hidden; }
.rm-join-steps { display: grid; gap: 14px; counter-reset: step; list-style: none; padding: 0; margin: 28px 0 0; }
@media (min-width: 992px) { .rm-join-steps { grid-template-columns: repeat(3, 1fr); gap: 18px; } }
.rm-join-steps li { position: relative; padding: 22px 22px 22px 76px; background: var(--rm-surface); border: 1px solid var(--rm-line); border-radius: var(--rm-radius); }
.rm-join-steps li::before { counter-increment: step; content: counter(step); position: absolute; left: 20px; top: 20px; width: 40px; height: 40px; display: grid; place-items: center; font-family: var(--rm-font-display); font-weight: 800; background: var(--rm-surface-3); border-radius: 10px; color: var(--rm-cyan); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .25); }
.rm-join-steps h3 { margin: 0 0 6px; font-size: 1.05rem; }
.rm-join-steps p { margin: 0; color: var(--rm-text-2); font-size: .94rem; }
.rm-address { display: flex; align-items: stretch; gap: 0; margin-top: 12px; max-width: 100%; }
.rm-address code { flex: 1; min-width: 0; display: flex; align-items: center; padding: 0 14px; min-height: 44px; background: var(--rm-bg); border: 1px solid var(--rm-line-strong); border-right: 0; border-radius: 10px 0 0 10px; color: var(--rm-text); font-size: .95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rm-address .rm-btn { border-radius: 0 10px 10px 0; min-height: 44px; }

/* ── Footer ──────────────────────────────────────────────────────────────────── */
.rm-footer { margin-top: 40px; background: var(--rm-bg-2); border-top: 1px solid var(--rm-line); padding: 56px 0 28px; }
.rm-footer-grid { display: grid; gap: 32px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 992px) { .rm-footer-grid { grid-template-columns: 1.6fr repeat(4, 1fr); } }
.rm-footer-brand { grid-column: 1 / -1; }
@media (min-width: 992px) { .rm-footer-brand { grid-column: auto; } }
.rm-footer-brand p { color: var(--rm-text-3); font-size: .92rem; max-width: 38ch; margin: 14px 0 0; }
.rm-footer h2 { font-family: var(--rm-font-pixel); font-size: .72rem; font-weight: 400; letter-spacing: .08em; text-transform: uppercase; color: var(--rm-text-3); margin: 0 0 12px; }
.rm-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rm-footer ul a { color: var(--rm-text-2); text-decoration: none; font-size: .94rem; }
.rm-footer ul a:hover { color: var(--rm-text); text-decoration: underline; }
.rm-social { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.rm-social a { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; background: var(--rm-surface); border: 1px solid var(--rm-line); color: var(--rm-text-2); font-size: 1.15rem; text-decoration: none; }
.rm-social a:hover { color: var(--rm-text); border-color: var(--rm-line-strong); }
.rm-footer-base { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; align-items: center; margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--rm-line); color: var(--rm-text-3); font-size: .85rem; }
.rm-footer-base .powered-by, .rm-footer-base a { color: var(--rm-text-3); }
.rm-footer-base .rm-picker { position: relative; }
.rm-footer-base .rm-picker > summary { list-style: none; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; padding: 6px 10px; border: 1px solid var(--rm-line); border-radius: 9px; color: var(--rm-text-2); }
.rm-footer-base .rm-picker > summary::-webkit-details-marker { display: none; }
.rm-footer-base .rm-picker .rm-menu { position: absolute; bottom: calc(100% + 6px); top: auto; left: 0; max-height: 320px; overflow-y: auto; opacity: 1; visibility: visible; transform: none; min-width: 200px; }
.rm-footer-base .rm-picker .rm-menu a[aria-current] { color: var(--rm-text); background: var(--rm-surface-2); }
.rm-footer-tools { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── Join dialog ─────────────────────────────────────────────────────────────── */
.rm-dialog { width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 32px); padding: 0; border: 1px solid var(--rm-line-strong); border-radius: 20px; background: var(--rm-surface); color: var(--rm-text); box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .9); }
.rm-dialog::backdrop { background: rgba(3, 6, 14, .72); backdrop-filter: blur(3px); }
.rm-dialog[open] { animation: rm-dialog-in .22s var(--rm-ease); }
@keyframes rm-dialog-in { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.rm-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 22px 0; }
.rm-dialog-head h2 { font-family: var(--rm-font-display); font-size: 1.3rem; margin: 0; }
.rm-dialog-close { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--rm-line); background: transparent; color: var(--rm-text-2); font-size: 1.2rem; cursor: pointer; display: grid; place-items: center; }
.rm-dialog-close:hover { color: var(--rm-text); border-color: var(--rm-line-strong); }
.rm-dialog-body { padding: 16px 22px 24px; }
.rm-dialog ol { padding-left: 1.2em; margin: 16px 0 0; display: grid; gap: 8px; color: var(--rm-text-2); }
.rm-dialog .rm-note { margin: 16px 0 0; font-size: .86rem; color: var(--rm-text-3); }
.rm-tabs { display: flex; gap: 6px; margin-top: 14px; background: var(--rm-bg); padding: 4px; border-radius: 12px; border: 1px solid var(--rm-line); }
.rm-tabs button { flex: 1; min-height: 38px; border: 0; border-radius: 9px; background: transparent; color: var(--rm-text-2); font-weight: 600; cursor: pointer; font: inherit; }
.rm-tabs button[aria-selected=true] { background: var(--rm-surface-3); color: var(--rm-text); }

/* Toast (copy confirmation) */
.rm-toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--rm-surface-3); color: var(--rm-text); border: 1px solid var(--rm-line-strong); padding: 12px 18px; border-radius: 12px; font-weight: 600; box-shadow: 0 20px 40px -20px #000; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s var(--rm-ease); z-index: 2000; display: flex; gap: 8px; align-items: center; }
.rm-toast[data-show=true] { opacity: 1; transform: translate(-50%, 0); }
.rm-toast i { color: var(--rm-online); }

/* ── Page header (inner pages) ───────────────────────────────────────────────── */
.rm-pagehead { position: relative; padding: 40px 0 28px; border-bottom: 1px solid var(--rm-line); background: radial-gradient(1200px 300px at 80% -10%, rgba(34, 211, 238, .12), transparent 60%), var(--rm-bg); }
@media (min-width: 992px) { .rm-pagehead { padding: 64px 0 40px; } }
.rm-pagehead h1 { font-family: var(--rm-font-display); font-size: clamp(1.9rem, 4.6vw, 3.1rem); line-height: 1.05; letter-spacing: -0.03em; margin: 0; }
.rm-crumbs { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0 0 14px; padding: 0; font-size: .86rem; color: var(--rm-text-3); }
.rm-crumbs li + li::before { content: "/"; margin-right: 6px; opacity: .6; }
.rm-crumbs a { color: var(--rm-text-2); text-decoration: none; }
.rm-crumbs a:hover { color: var(--rm-text); text-decoration: underline; }

/* Game detail */
.rm-gamehero { --accent: var(--rm-cyan); position: relative; overflow: hidden; border-bottom: 1px solid var(--rm-line); background: var(--rm-bg); }
.rm-gamehero .rm-wrap { display: grid; gap: 24px; padding-top: 32px; padding-bottom: 36px; align-items: center; }
@media (min-width: 992px) { .rm-gamehero .rm-wrap { grid-template-columns: 1.05fr 1fr; gap: 48px; padding-top: 56px; padding-bottom: 56px; } }
.rm-gamehero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(800px 360px at 85% 30%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%); pointer-events: none; }
.rm-gamehero h1 { font-family: var(--rm-font-display); font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.04; letter-spacing: -0.03em; margin: 0 0 12px; }
.rm-gamehero .rm-tagline { font-size: 1.15rem; color: var(--rm-text-2); margin: 0 0 18px; }
.rm-gamehero-art { border-radius: 18px; overflow: hidden; border: 1px solid var(--rm-line-strong); aspect-ratio: 16 / 10; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .8); position: relative; z-index: 1; }
.rm-gamehero-art img { width: 100%; height: 100%; object-fit: cover; }
.rm-gamehero-status { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.rm-gamehero-status .rm-count { font-weight: 600; color: var(--rm-text-2); font-size: .92rem; }
.rm-layout { display: grid; gap: 28px; padding: 40px 0 0; }
@media (min-width: 992px) { .rm-layout { grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; padding-top: 56px; } }
/* Grid items default to min-width:auto and refuse to shrink below their content (e.g. an address row). */
.rm-layout > *, .rm-discover > *, .rm-split > *, .rm-community > *, .rm-status-hero > * { min-width: 0; }
.rm-join-steps li { min-width: 0; }
@media (max-width: 479px) { .rm-join-steps li { padding: 18px 16px 18px 66px; } .rm-join-steps li::before { left: 14px; top: 18px; } .rm-address .rm-btn { padding: 0 12px; } }
.rm-prose { color: var(--rm-text-2); font-size: 1.04rem; max-width: 70ch; }
.rm-prose p { margin: 0 0 16px; }
.rm-prose h2 { font-family: var(--rm-font-display); color: var(--rm-text); font-size: 1.35rem; margin: 36px 0 14px; letter-spacing: -0.01em; }
.rm-features { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.rm-features li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; background: var(--rm-surface); border: 1px solid var(--rm-line); border-radius: 12px; color: var(--rm-text); }
.rm-features li i { color: var(--accent, var(--rm-cyan)); font-size: 1.2rem; margin-top: 1px; }
.rm-features li[data-status=proposed] { border-style: dashed; color: var(--rm-text-2); }
.rm-facts { display: grid; gap: 0; margin: 0; }
.rm-facts div { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--rm-line); font-size: .94rem; }
.rm-facts div:last-child { border-bottom: 0; }
.rm-facts dt { color: var(--rm-text-3); font-weight: 500; }
.rm-facts dd { margin: 0; text-align: right; color: var(--rm-text); font-weight: 600; }
.rm-side { display: grid; gap: 16px; align-content: start; }
.rm-side h2 { font-family: var(--rm-font-display); font-size: 1.05rem; margin: 0 0 12px; }
.rm-twist { position: relative; padding: 26px; border-radius: var(--rm-radius); border: 1px solid rgba(245, 181, 68, .35); background: linear-gradient(135deg, rgba(245, 181, 68, .12), rgba(245, 181, 68, .02)); color: var(--rm-text); margin: 28px 0; }
.rm-twist .rm-eyebrow { color: var(--rm-amber); }
.rm-twist p { margin: 0; font-size: 1.12rem; font-weight: 600; }
.rm-devnote { margin: 16px 0; padding: 12px 14px; border-radius: 12px; border: 1px dashed rgba(253, 164, 175, .45); background: rgba(253, 164, 175, .06); color: #fecdd3; font-size: .88rem; }

/* Directory */
.rm-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.rm-filter a { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--rm-line-strong); color: var(--rm-text-2); text-decoration: none; font-weight: 600; font-size: .9rem; }
.rm-filter a:hover { color: var(--rm-text); background: var(--rm-surface); }
.rm-grid-3 { display: grid; gap: 16px; }
@media (min-width: 640px) { .rm-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .rm-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; } }

/* Status page */
.rm-status-hero { display: grid; gap: 16px; }
@media (min-width: 992px) { .rm-status-hero { grid-template-columns: 1.3fr 1fr; gap: 20px; } }
.rm-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.rm-table th { text-align: left; font-weight: 600; color: var(--rm-text-3); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; padding: 10px 12px; border-bottom: 1px solid var(--rm-line-strong); }
.rm-table td { padding: 12px; border-bottom: 1px solid var(--rm-line); vertical-align: middle; }
.rm-table td.rm-num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.rm-table a { color: var(--rm-text); text-decoration: none; font-weight: 600; }
.rm-table a:hover { color: var(--rm-cyan); }
.rm-table-wrap { overflow-x: auto; }
.rm-players { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; list-style: none; margin: 0; padding: 0; }
.rm-players li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: var(--rm-surface); border: 1px solid var(--rm-line); border-radius: 10px; min-width: 0; }
.rm-players img { width: 28px; height: 28px; border-radius: 6px; image-rendering: pixelated; flex: none; }
.rm-players span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.rm-pager { display: flex; gap: 8px; justify-content: center; margin-top: 20px; }
.rm-diag { font-size: .85rem; }
.rm-diag code { color: #fde68a; }

/* FAQ / rules */
.rm-faq { display: grid; gap: 10px; max-width: 820px; }
.rm-faq details { background: var(--rm-surface); border: 1px solid var(--rm-line); border-radius: 14px; }
.rm-faq summary { cursor: pointer; padding: 18px 20px; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.rm-faq summary::-webkit-details-marker { display: none; }
.rm-faq summary::after { content: "+"; font-family: var(--rm-font-display); color: var(--rm-cyan); font-size: 1.3rem; line-height: 1; transition: transform .2s; }
.rm-faq details[open] summary::after { transform: rotate(45deg); }
.rm-faq .rm-faq-a { padding: 0 20px 18px; color: var(--rm-text-2); }
.rm-faq .rm-faq-a p { margin: 0 0 10px; }

/* Settings toggles */
.rm-toggle { display: flex; gap: 14px; align-items: flex-start; padding: 16px 0; border-bottom: 1px solid var(--rm-line); }
.rm-toggle:last-of-type { border-bottom: 0; }
.rm-toggle input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--rm-cyan); flex: none; }
.rm-toggle label { font-weight: 700; display: block; cursor: pointer; }
.rm-toggle p { margin: 4px 0 0; color: var(--rm-text-2); font-size: .92rem; }

/* ── Native LeaderOS pages: bring Tabler surfaces into the RadiiMC look ─────── */
.rm .page, .rm .page-wrapper { background: transparent; min-height: 0; }
.rm .section { padding: 40px 0; }
@media (min-width: 992px) { .rm .section { padding: 56px 0; } }
.rm .container, .rm .container-xl { max-width: var(--rm-max); padding-left: var(--rm-gutter); padding-right: var(--rm-gutter); }
.rm .card { background: var(--rm-surface); border: 1px solid var(--rm-line); border-radius: var(--rm-radius); box-shadow: var(--rm-shadow); color: var(--rm-text); }
.rm .card-header, .rm .card-footer { background: transparent; border-color: var(--rm-line); }
.rm .card-title, .rm .page-title, .rm h1, .rm h2, .rm h3, .rm h4 { color: var(--rm-text); }
.rm .page-title { font-family: var(--rm-font-display); letter-spacing: -0.02em; font-size: clamp(1.5rem, 3vw, 2rem); }
.rm .text-muted, .rm .text-secondary { color: var(--rm-text-3) !important; }
.rm .btn { border-radius: 11px; font-weight: 600; min-height: 40px; }
.rm .btn-primary { background: var(--rm-cyan); border-color: var(--rm-cyan); color: #04121a; }
.rm .btn-primary:hover { background: #67e8f9; border-color: #67e8f9; color: #04121a; }
.rm .btn-light, .rm .btn-white, .rm .btn-outline-secondary { background: var(--rm-surface-2); border-color: var(--rm-line-strong); color: var(--rm-text); }
.rm .form-control, .rm .form-select, .rm .input-group-text, .rm .select2-container--bootstrap4 .select2-selection { background-color: var(--rm-bg); border-color: var(--rm-line-strong); color: var(--rm-text); border-radius: 10px; }
.rm .form-control:focus, .rm .form-select:focus { border-color: var(--rm-cyan); box-shadow: 0 0 0 .2rem rgba(34, 211, 238, .2); }
.rm .form-label { color: var(--rm-text-2); font-weight: 600; }
.rm .table { --tblr-table-bg: transparent; color: var(--rm-text); }
.rm .table thead th { color: var(--rm-text-3); background: transparent; border-color: var(--rm-line-strong); }
.rm .table td, .rm .table th { border-color: var(--rm-line); }
.rm .list-group-item { background: transparent; border-color: var(--rm-line); color: var(--rm-text-2); }
.rm .list-group-item.active { background: var(--rm-surface-2); color: var(--rm-text); border-color: var(--rm-line); }
.rm .breadcrumb { font-size: .86rem; }
.rm .breadcrumb a { color: var(--rm-text-2); }
.rm .dropdown-menu { background: var(--rm-surface); border-color: var(--rm-line-strong); }
.rm .dropdown-item { color: var(--rm-text-2); }
.rm .dropdown-item:hover { background: var(--rm-surface-2); color: var(--rm-text); }
.rm .alert { border-radius: 12px; background: var(--rm-surface-2); color: var(--rm-text); border-color: var(--rm-line-strong); }
.rm .alert-danger { border-left: 4px solid var(--rm-offline); }
.rm .alert-success { border-left: 4px solid var(--rm-online); }
.rm .alert-warning { border-left: 4px solid var(--rm-maint); }
.rm .alert-info { border-left: 4px solid var(--rm-cyan); }
.rm .bg-body { background: var(--rm-bg-2) !important; }
.rm .sidebar-link { color: var(--rm-text-2); }
.rm .sidebar-link.active, .rm .sidebar-link:hover { color: var(--rm-text); background: var(--rm-surface-2); }
.rm .pagination .page-link { background: var(--rm-surface); border-color: var(--rm-line); color: var(--rm-text-2); }
.rm .pagination .page-item.active .page-link { background: var(--rm-cyan); border-color: var(--rm-cyan); color: #04121a; }
.rm .modal-content { background: var(--rm-surface); border: 1px solid var(--rm-line-strong); border-radius: 18px; }
.rm .ck-content { color: var(--rm-text-2); }
.rm .ck-content a { color: var(--rm-cyan); }
.rm .badge { border-radius: 7px; }
.rm .nav-tabs .nav-link.active { background: var(--rm-surface); border-color: var(--rm-line); color: var(--rm-text); }
.rm .empty { color: var(--rm-text-2); }

/* Auth + error layouts */
.rm-auth { min-height: 100vh; display: grid; place-items: center; padding: 32px var(--rm-gutter); background: radial-gradient(900px 500px at 50% -10%, rgba(34, 211, 238, .14), transparent 65%), var(--rm-bg); }
.rm-auth-inner { width: 100%; max-width: 460px; }
.rm-auth-brand { display: flex; justify-content: center; margin-bottom: 24px; }
.rm-auth .card { border-radius: 20px; }
.rm-auth-foot { text-align: center; margin-top: 24px; color: var(--rm-text-3); font-size: .85rem; }
.rm-auth-foot a { color: var(--rm-text-3); }
.rm-error { min-height: 100vh; display: grid; place-items: center; padding: 32px var(--rm-gutter); text-align: center; }
.rm-error .empty-img svg { max-width: 220px; height: auto; }
.rm-error .empty-title { font-family: var(--rm-font-display); font-size: 1.6rem; color: var(--rm-text); }

/* ── Motion preferences ──────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rm *, .rm *::before, .rm *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .rm-flagship:hover, .rm-row:hover, .rm-tile:hover, .rm-btn:hover { transform: none; }
  .rm-flagship:hover .rm-flagship-media img, .rm-tile:hover .rm-tile-media img { transform: none; }
}
@media (forced-colors: active) {
  .rm-pill::before, .rm-tile h3::before { forced-color-adjust: none; }
  .rm-btn { border: 2px solid ButtonText; }
}
