/* ---------- Remix: themed overrides (only when a visitor picked something) ---------- */
html[data-remix] .mx,
html[data-remix] .mxa {
  --bg: var(--r-bg) !important; --bg2: var(--r-bg2) !important; --bg3: var(--r-bg3) !important;
  --ink: var(--r-ink) !important; --mute: var(--r-mute) !important; --dim: var(--r-dim) !important;
  --line: var(--r-line) !important; --acc: var(--r-acc) !important;
  font-family: var(--r-body) !important;
}
html[data-remix] .mx h1, html[data-remix] .mx h2, html[data-remix] .mx h3, html[data-remix] .mx h4,
html[data-remix] .mxa h1, html[data-remix] .mxa h2 { font-family: var(--r-font) !important; }
html[data-remix] body,
html[data-remix] #pagewrap,
html[data-remix] #body,
html[data-remix] #headerwrap,
html[data-remix] #mobile-menu,
html[data-remix] #footerwrap,
html[data-remix] .mrkt-company-line { background: var(--r-bg) !important; color: var(--r-ink); transition: background-color .35s ease; }
html[data-remix] #footerwrap { border-top-color: var(--r-line) !important; }
html[data-remix] #headerwrap a,
html[data-remix] #footerwrap a,
html[data-remix] #main-nav > li > a { color: var(--r-ink) !important; font-family: var(--r-body); }
html[data-remix] #main-nav .highlight-link > a,
html[data-remix] #main-nav li.highlight-link a { background: var(--r-acc) !important; color: var(--r-on, #fff) !important; }
html[data-remix] .mrkt-company-line, html[data-remix] #footer, html[data-remix] #footer p { color: var(--r-mute) !important; }
/* Spots in the page CSS that use fixed colors instead of the variables. */
html[data-remix] .mx .band { background: linear-gradient(135deg, var(--r-bg3), var(--r-bg2)) !important; }
html[data-remix] .mx .ticks li, html[data-remix] .mx .tier li { color: var(--r-ink) !important; }
html[data-remix] .mx .strip .nm { color: var(--r-mute) !important; }
html[data-remix] .mx .btn.ghost, html[data-remix] .mx .flt button:hover { border-color: var(--r-line) !important; color: var(--r-ink) !important; }
html[data-remix] .mx .btn:not(.ghost) { color: var(--r-on, #fff) !important; }
html[data-remix] .mx .btn:hover { background: var(--r-acc) !important; filter: brightness(1.1); }
html[data-remix] .mx .cta .btn { background: #0b0b0d !important; color: #fff !important; }
html[data-remix] .mx .cta .btn.ghost { color: #fff !important; border-color: rgba(255,255,255,.5) !important; background: transparent !important; }
/* The header logo is light artwork; flip it so it stays visible on light themes. */
html[data-remix="light"] #site-logo img, html[data-remix="light"] .site-logo img { filter: invert(1) hue-rotate(180deg); }
html[data-remix="light"] #headerwrap { box-shadow: 0 1px 0 var(--r-line); }
/* Halftone dots, a nod to Halftone Kit. */
html[data-remix-dots] body {
  background-image: radial-gradient(color-mix(in srgb, var(--r-acc, #ff4d2e) 30%, transparent) 1.4px, transparent 1.6px) !important;
  background-size: 18px 18px !important; background-attachment: fixed !important;
}
html[data-remix-dots] .mx, html[data-remix-dots] .mx section, html[data-remix-dots] #pagewrap, html[data-remix-dots] #body { background-color: transparent !important; }
/* Pixel font runs very wide: scale headings down so they fit. */
html[data-remix-pixel] .mx h1, html[data-remix-pixel] .mxa h1 { font-size: clamp(26px, 4.6vw, 54px) !important; line-height: 1.3 !important; letter-spacing: 0 !important; }
html[data-remix-pixel] .mx h2, html[data-remix-pixel] .mxa h2 { font-size: clamp(18px, 2.6vw, 30px) !important; line-height: 1.35 !important; letter-spacing: 0 !important; }
html[data-remix-pixel] .mx h3 { font-size: 15px !important; line-height: 1.5 !important; letter-spacing: 0 !important; }
html[data-remix] ::selection { background: var(--r-acc); color: var(--r-on, #fff); }

/* ---------- Remix button + panel (always available) ---------- */
.remix-fab {
  position: fixed; left: 16px; bottom: 16px; z-index: 99990; display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px 10px 12px; border: 1px solid rgba(255,255,255,.18); border-radius: 999px; cursor: pointer;
  background: var(--r-acc, #ff4d2e); color: var(--r-on, #fff); font: 700 14px/1 Inter, system-ui, sans-serif; letter-spacing: .01em;
  box-shadow: 0 10px 30px rgba(0,0,0,.35); transition: transform .2s ease, box-shadow .2s ease;
}
.remix-fab:hover { transform: translateY(-2px) rotate(-2deg); box-shadow: 0 14px 34px rgba(0,0,0,.45); }
.remix-fab:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.remix-fab svg { width: 20px; height: 20px; fill: currentColor; }
.remix-panel {
  position: fixed; left: 16px; bottom: 72px; z-index: 99991; width: min(340px, calc(100vw - 32px)); max-height: calc(100vh - 100px); overflow: auto;
  background: #141418; color: #f4f4f1; border: 1px solid #2a2a31; border-radius: 18px; padding: 16px 16px 14px;
  box-shadow: 0 24px 70px rgba(0,0,0,.55); font: 14px/1.4 Inter, system-ui, sans-serif;
}
.remix-panel[hidden] { display: none; }
.remix-head { display: flex; justify-content: space-between; align-items: center; font-size: 16px; }
.remix-x { background: none; border: 0; color: #9a9aa3; font-size: 24px; line-height: 1; cursor: pointer; padding: 0 4px; }
.remix-sub { margin: 4px 0 12px; color: #9a9aa3; font-size: 13px; }
.remix-label { display: block; margin: 12px 0 6px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #9a9aa3; }
.remix-themes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.remix-theme {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px; cursor: pointer; text-align: left;
  border: 1px solid #2a2a31; background: #1b1b21; color: #f4f4f1; font: 600 13px/1.2 Inter, system-ui, sans-serif;
}
.remix-theme i { width: 22px; height: 22px; border-radius: 50%; flex: none; background: linear-gradient(135deg, var(--a) 50%, var(--b) 50%); box-shadow: inset 0 0 0 2px var(--c); }
.remix-theme[aria-pressed="true"] { border-color: var(--r-acc, #ff4d2e); box-shadow: 0 0 0 2px var(--r-acc, #ff4d2e); }
.remix-panel select { width: 100%; padding: 9px 10px; border-radius: 10px; border: 1px solid #2a2a31; background: #1b1b21; color: #f4f4f1; font: inherit; }
.remix-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.remix-row .remix-label { margin: 12px 0; }
.remix-panel input[type=color] { width: 54px; height: 34px; border: 1px solid #2a2a31; border-radius: 10px; background: #1b1b21; padding: 2px; cursor: pointer; }
.remix-check { display: flex; align-items: center; gap: 8px; margin-top: 4px; cursor: pointer; }
.remix-actions { display: flex; gap: 8px; margin-top: 14px; }
.remix-go, .remix-reset { flex: 1; padding: 10px; border-radius: 999px; cursor: pointer; font: 700 13px/1 Inter, system-ui, sans-serif; }
.remix-go { background: var(--r-acc, #ff4d2e); color: var(--r-on, #fff); border: 0; }
.remix-reset { background: transparent; color: #f4f4f1; border: 1px solid #3a3a42; }
@media print { .remix-fab, .remix-panel { display: none !important; } }
@media (prefers-reduced-motion: reduce) { .remix-fab, html[data-remix] body { transition: none; } }

.remix-hint { color: #6b6b74; font-size: 12px; }
.remix-share { width: 100%; margin-top: 8px; padding: 10px; border-radius: 999px; cursor: pointer; background: #1b1b21; color: #f4f4f1; border: 1px solid #2a2a31; font: 700 13px/1 Inter, system-ui, sans-serif; }
.remix-share:hover { border-color: var(--r-acc, #ff4d2e); }
.remix-secret { margin: 10px 0 0; text-align: center; font-size: 11px; color: #55555d; letter-spacing: .04em; }
.remix-toast {
  position: fixed; left: 50%; top: 22px; transform: translateX(-50%); z-index: 99995; max-width: calc(100vw - 32px);
  padding: 12px 18px; border-radius: 999px; background: #141418; color: #f4f4f1; border: 1px solid var(--r-acc, #ff4d2e);
  font: 600 14px/1.3 Inter, system-ui, sans-serif; box-shadow: 0 16px 40px rgba(0,0,0,.45); transition: opacity .5s, transform .5s;
}
.remix-toast a { color: var(--r-acc, #ff4d2e); font-weight: 800; text-decoration: none; }
.remix-toast.out { opacity: 0; transform: translateX(-50%) translateY(-10px); }
.remix-confetti { position: fixed; inset: 0; z-index: 99994; pointer-events: none; }

/* Keep the button off the game while someone is playing on a phone. */
@media (max-width: 720px), (max-height: 500px) { body.mx-gaming .remix-fab, body.mx-gaming .remix-panel { display: none !important; } }
