:root {
  --site-bg: #f5f7fb;
  --site-surface: #ffffff;
  --site-surface-soft: #eef3fa;
  --site-text: #111827;
  --site-muted: #5d6878;
  --site-line: rgba(17, 24, 39, 0.13);
  --site-accent: #376b96;
  --site-accent-ink: #ffffff;
  --site-shadow: rgba(0, 0, 0, 0.12);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --site-bg: #0d111b;
  --site-surface: #171d29;
  --site-surface-soft: #202838;
  --site-text: #f5f7fb;
  --site-muted: #b9c2d0;
  --site-line: rgba(255, 255, 255, 0.15);
  --site-accent: #8fc8ff;
  --site-accent-ink: #0d111b;
  --site-shadow: rgba(0, 0, 0, 0.38);
  color-scheme: dark;
}

body[data-app="rollorbust"] { --site-accent: #a06a05; }
:root[data-theme="dark"] body[data-app="rollorbust"] { --site-accent: #efc46b; }
body[data-app="easyhdrglow"] { --site-accent: #3853c8; }
:root[data-theme="dark"] body[data-app="easyhdrglow"] { --site-accent: #9bafff; }
body[data-app="lobbo"] { --site-accent: #315f52; }
:root[data-theme="dark"] body[data-app="lobbo"] { --site-accent: #8bd5bf; }

html { scroll-behavior: smooth; }

body {
  display: block !important;
  min-height: 100vh;
  margin: 0 !important;
  padding: 0 !important;
  background-color: var(--site-bg) !important;
  color: var(--site-text) !important;
}

body > .page,
body > main.page,
body > .wrapper {
  margin-left: auto;
  margin-right: auto;
}

:root[data-theme="light"] {
  --bg: var(--site-bg);
  --bg0: var(--site-bg);
  --bg1: var(--site-surface);
  --bg2: var(--site-surface-soft);
  --card: var(--site-surface);
  --text: var(--site-text);
  --muted: var(--site-muted);
  --line: var(--site-line);
  --hairline: var(--site-line);
  --accent: var(--site-accent);
  --shadow: var(--site-shadow);
  --shadow-strong: var(--site-shadow);
}

:root[data-theme="dark"] {
  --bg: var(--site-bg);
  --bg0: var(--site-bg);
  --bg1: var(--site-surface);
  --bg2: var(--site-surface-soft);
  --card: var(--site-surface);
  --text: var(--site-text);
  --muted: var(--site-muted);
  --line: var(--site-line);
  --hairline: var(--site-line);
  --accent: var(--site-accent);
  --shadow: var(--site-shadow);
  --shadow-strong: var(--site-shadow);
}

:root[data-theme] .hero,
:root[data-theme] article,
:root[data-theme] .card,
:root[data-theme] .app-card,
:root[data-theme] .resource-card,
:root[data-theme] .about-card,
:root[data-theme] .faq-panel,
:root[data-theme] .tab-container,
:root[data-theme] .privacy-card,
:root[data-theme] .support-card {
  background-color: var(--site-surface) !important;
  border-color: var(--site-line) !important;
  color: var(--site-text) !important;
}

:root[data-theme] p,
:root[data-theme] li,
:root[data-theme] .lede,
:root[data-theme] .sub,
:root[data-theme] .app-subtitle,
:root[data-theme] .fineprint {
  color: var(--site-muted);
}

:root[data-theme] article .note {
  background: color-mix(in srgb, var(--site-accent) 10%, var(--site-surface)) !important;
  border-left-color: var(--site-accent) !important;
  color: var(--site-muted) !important;
}

:root[data-theme] article .note strong {
  color: var(--site-text) !important;
}

:root[data-theme] a:not(.button):not(.store-badge):not(.chip):not(.card-action) {
  color: var(--site-accent);
}

.site-shell-header {
  position: relative;
  z-index: 100;
  width: min(1120px, calc(100% - 32px));
  margin: 16px auto 0;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid var(--site-line);
  border-radius: 18px;
  background: color-mix(in srgb, var(--site-surface) 94%, transparent);
  box-shadow: 0 12px 36px var(--site-shadow);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--site-text) !important;
  text-decoration: none;
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
}

.site-brand img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  box-shadow: 0 6px 16px var(--site-shadow);
}

.site-shell-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  flex-wrap: wrap;
}

.site-mobile-menu { display: contents; }

.site-menu-toggle {
  display: none;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--site-line);
  border-radius: 999px;
  background: transparent;
  color: var(--site-muted);
  font: inherit;
  font-size: 14px;
  font-weight: 750;
  cursor: pointer;
}

.site-menu-toggle:hover,
.site-menu-toggle[aria-expanded="true"] {
  background: var(--site-surface-soft);
  color: var(--site-text);
}

.site-menu-toggle svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.site-menu-icon-close { display: none; }
.site-menu-toggle[aria-expanded="true"] .site-menu-icon-open { display: none; }
.site-menu-toggle[aria-expanded="true"] .site-menu-icon-close { display: block; }

.site-shell-nav a,
.site-theme-toggle {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 8px 12px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--site-muted) !important;
  text-decoration: none;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.site-shell-nav a:hover,
.site-theme-toggle:hover {
  border-color: var(--site-line);
  background: var(--site-surface-soft);
  color: var(--site-text) !important;
}

.site-theme-toggle {
  gap: 7px;
  border-color: var(--site-line);
}

.site-theme-toggle-icon { font-size: 15px; line-height: 1; }

.site-breadcrumbs {
  width: min(960px, calc(100% - 40px));
  margin: 15px auto -4px;
  display: flex;
  gap: 7px;
  align-items: center;
  flex-wrap: wrap;
  color: var(--site-muted);
  font: 600 13px/1.4 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.site-breadcrumbs a { color: var(--site-accent) !important; text-decoration: none; }
.site-breadcrumbs a:hover { text-decoration: underline; }
.site-breadcrumbs span[aria-hidden="true"] { opacity: .55; }

.site-shell-footer {
  width: min(960px, calc(100% - 32px));
  margin: 34px auto 18px;
  padding: 22px 12px 8px;
  border-top: 1px solid var(--site-line);
  text-align: center;
  color: var(--site-muted);
  font: 13px/1.6 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.site-shell-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 16px;
  margin-bottom: 10px;
}

.site-shell-footer a { color: var(--site-accent) !important; font-weight: 700; text-decoration: none; }
.site-shell-footer a:hover { text-decoration: underline; }
.site-shell-footer p { margin: 0; color: var(--site-muted) !important; }

.card-actions {
  position: relative;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 5px;
}

.card-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 13px;
  border-radius: 999px;
  border: 1px solid var(--site-line);
  background: var(--site-surface-soft);
  color: var(--site-text) !important;
  text-decoration: none;
  font-size: 14px;
  font-weight: 750;
}

.card-action.primary { background: var(--site-accent); color: var(--site-accent-ink) !important; border-color: transparent; }
.card-action:hover { transform: translateY(-1px); }

.legacy-theme-toggle { display: none !important; }

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--site-accent) 72%, white);
  outline-offset: 3px;
}

@media (max-width: 720px) {
  .site-shell-header {
    align-items: center;
    gap: 10px;
    padding: 10px;
  }

  .site-shell-nav {
    flex-wrap: nowrap;
    gap: 6px;
  }

  .site-menu-toggle { display: inline-flex; }

  .site-mobile-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    display: none;
    padding: 8px;
    border: 1px solid var(--site-line);
    border-radius: 14px;
    background: var(--site-surface);
    box-shadow: 0 18px 44px var(--site-shadow);
  }

  .site-shell-nav.is-open .site-mobile-menu {
    display: flex;
    flex-direction: column;
    gap: 3px;
  }

  .site-mobile-menu a {
    min-height: 48px;
    justify-content: flex-start;
    padding: 11px 14px;
    border-radius: 10px;
    color: var(--site-text) !important;
  }

  .site-mobile-menu a.site-nav-primary {
    background: var(--site-surface-soft);
  }

  .site-theme-toggle {
    min-width: 44px;
    min-height: 44px;
    padding: 8px 11px;
  }

  .site-theme-toggle-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
}

@media (max-width: 430px) {
  .site-shell-header {
    width: min(100% - 20px, 1120px);
    margin-top: 10px;
  }

  .site-brand { font-size: 14px; }

  .site-menu-toggle {
    min-width: 44px;
    padding-inline: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
