/* =========================================================
   SPIRITBOX.NET
   Main site stylesheet
   File: /assets/css/app.css
   ========================================================= */

/* =========================================================
   01. THEME / RESET
   ========================================================= */

:root {
  --bg: #05070d;
  --panel: #0b1022;
  --panel2: #070a16;
  --panelA: #070b12;
  --panelB: #03050a;

  --text: #e9efff;
  --muted: #b6c3de;
  --border: rgba(255, 255, 255, .12);
  --line: rgba(255, 255, 255, .12);

  --accent: #39ff14;
  --brand: #39ff14;
  --danger: #ff3b3b;
  --focus: #9bff3a;

  --ok: #7cff4d;
  --warn: #ffe27a;
  --bad: #ff3b3b;

  --radius: 12px;
  --shadow: 0 18px 45px rgba(0, 0, 0, .75);
  --font: Tahoma, Verdana, Arial, sans-serif;

  --edgeLight: rgba(255, 255, 255, .35);
  --edgeDark: rgba(0, 0, 0, .75);

  --chrome1: #e3e9f2;
  --chrome2: #95a2b8;
  --chrome3: #3d475b;

  --lcdGlow: rgba(155, 255, 58, .35);
  --cyanGlow: rgba(54, 230, 255, .22);

  --safe-top: env(safe-area-inset-top);
  --safe-right: env(safe-area-inset-right);
  --safe-bottom: env(safe-area-inset-bottom);
  --safe-left: env(safe-area-inset-left);

  --max: 1100px;
}

* {
  box-sizing: border-box
}

html,
body {
  height: 100%
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(900px 540px at 22% 10%, rgba(57, 255, 20, .16) 0%, transparent 55%),
    radial-gradient(1100px 600px at 80% -10%, rgba(0, 255, 204, .10) 0%, transparent 60%),
    radial-gradient(900px 600px at 50% 110%, rgba(57, 255, 20, .08) 0%, transparent 60%),
    linear-gradient(180deg, #05070d, #02030a);
  font-size: 12px;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .18;
  background-image:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, .05) 0 1px, transparent 1px 6px),
    repeating-linear-gradient(0deg, rgba(0, 0, 0, .40) 0 1px, transparent 1px 3px);
  mix-blend-mode: overlay;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .18;
  background:
    repeating-linear-gradient(90deg,
      rgba(57, 255, 20, .00) 0 18px,
      rgba(57, 255, 20, .06) 18px 19px),
    repeating-linear-gradient(180deg,
      rgba(57, 255, 20, .00) 0 10px,
      rgba(57, 255, 20, .05) 10px 11px);
  mix-blend-mode: screen;
  animation: matrixDrift 9s linear infinite;
}

@keyframes matrixDrift {
  from {
    transform: translateY(-40px)
  }

  to {
    transform: translateY(40px)
  }
}

a {
  color: #bfefff;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
}

.wrap {
  width: min(100% - 24px, var(--max));
  margin: 0 auto;
}

.hidden {
  display: none !important;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

/* =========================================================
   02. SHARED SITE SHELL
   ========================================================= */

.site-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, 0) 40%),
    linear-gradient(180deg, #bfe7c2, #6aa872 60%, #23402b);
  border-bottom: 1px solid rgba(0, 0, 0, .55);
  box-shadow:
    0 14px 28px rgba(0, 0, 0, .55),
    inset 0 1px 0 rgba(255, 255, 255, .45),
    inset 0 -1px 0 rgba(0, 0, 0, .35);
}

.site-topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  color: #0a0f16;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.site-brand img {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  border-top: 1px solid rgba(255, 255, 255, .5);
  border-left: 1px solid rgba(255, 255, 255, .35);
  border-right: 1px solid rgba(0, 0, 0, .45);
  border-bottom: 1px solid rgba(0, 0, 0, .65);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25);
  display: block;
}

.site-brand-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  line-height: 1.1;
}

.site-brand-text strong {
  font-size: 15px;
  letter-spacing: .2px;
}

.site-brand-text span {
  font-size: 11px;
  color: rgba(0, 0, 0, .75);
}

.site-social,
.site-footer-links {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.site-toolbar {
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  background: rgba(0, 0, 0, .18);
  backdrop-filter: blur(8px);
}

.site-toolbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  overflow-x: auto;
}

.site-toolbar-inner a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 12px;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, 0) 38%),
    linear-gradient(180deg, #1a2a55, #0b132c);
  border-top: 1px solid var(--edgeLight);
  border-left: 1px solid var(--edgeLight);
  border-right: 1px solid var(--edgeDark);
  border-bottom: 1px solid var(--edgeDark);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .10),
    0 8px 18px rgba(0, 0, 0, .45);
}

.site-toolbar-inner a.is-active,
.site-toolbar-inner a[aria-current="page"] {
  border-top-color: rgba(57, 255, 20, .45);
  border-left-color: rgba(57, 255, 20, .30);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .12),
    0 10px 22px rgba(57, 255, 20, .10),
    0 12px 24px rgba(0, 0, 0, .55);
  outline: 1px solid rgba(57, 255, 20, .18);
}

.site-footer {
  margin-top: 16px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
  padding-bottom: 22px;
}

.site-footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.site-thanks {
  margin: 0;
  max-width: 780px;
}

/* =========================================================
   03. SHARED BANNERS / RAILS
   ========================================================= */

.site-body {
  display: grid;
  grid-template-columns: 160px minmax(0, 1100px) 160px;
  gap: 18px;
  align-items: start;
  width: min(100% - 24px, 1440px);
  margin: 0 auto;
}

.site-main {
  min-width: 0;
}

.site-rail {
  min-width: 0;
}

.site-rail-inner {
  position: sticky;
  top: 130px;
}

.ad-wrap {
  width: 100%;
}

.ad-wrap-top,
.ad-wrap-footer {
  width: min(100% - 24px, 1100px);
  margin: 14px auto;
}

.ad-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
  color: var(--muted);
  border: 1px dashed rgba(255, 255, 255, .18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .02));
  border-radius: 16px;
  box-shadow:
    0 18px 40px rgba(0, 0, 0, .70),
    0 0 28px rgba(57, 255, 20, .06),
    inset 0 1px 0 rgba(255, 255, 255, .08);
  overflow: hidden;
  position: relative;
}

.ad-slot-top,
.ad-slot-footer {
  width: 728px;
  max-width: 100%;
  height: 90px;
  margin: 0 auto;
}

.ad-slot-side {
  width: 160px;
  height: 600px;
  margin: 0 auto;
}

.ad-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px;
  font-weight: 700;
  letter-spacing: .2px;
}

.ad-label small {
  display: block;
  font-size: 12px;
  color: var(--muted);
  opacity: .9;
}

.ad-slot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* =========================================================
   04. SHARED COMPONENTS
   ========================================================= */

.hero {
  margin-top: 12px;
  border-radius: calc(var(--radius) + 2px);
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, 0) 30%),
    linear-gradient(180deg, var(--panel), var(--panel2));
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .10);
}

.hero-inner {
  padding: 18px;
}

.h1 {
  font-size: 26px;
  margin: 0 0 6px 0;
  letter-spacing: .2px;
  text-shadow: 0 0 18px rgba(54, 230, 255, .10);
}

.lede {
  color: var(--muted);
  line-height: 1.45;
  margin: 0 0 10px 0;
}

.kpis {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 800;
  color: #dbffd0;
  background:
    linear-gradient(180deg, rgba(155, 255, 58, .22), rgba(155, 255, 58, .06)),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, .22) 0 2px, transparent 2px 6px);
  border: 1px solid rgba(155, 255, 58, .45);
  text-shadow: 0 0 10px rgba(155, 255, 58, .22);
  white-space: nowrap;
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 12px;
}

@media (min-width:860px) {
  .grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

.card {
  border-radius: var(--radius);
  background:
    radial-gradient(120px 80px at 20% 20%, rgba(57, 255, 20, .10), transparent 60%),
    radial-gradient(160px 120px at 85% 30%, rgba(0, 255, 204, .06), transparent 65%),
    linear-gradient(180deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, 0) 35%),
    linear-gradient(180deg, var(--panelA), var(--panelB));
  border-top: 1px solid rgba(255, 255, 255, .14);
  border-left: 1px solid rgba(255, 255, 255, .10);
  border-right: 1px solid rgba(0, 0, 0, .55);
  border-bottom: 1px solid rgba(0, 0, 0, .70);
  box-shadow:
    0 18px 40px rgba(0, 0, 0, .70),
    0 0 28px rgba(57, 255, 20, .06),
    inset 0 1px 0 rgba(255, 255, 255, .08);
  overflow: hidden;
}

.card .pad,
.card-b {
  padding: 14px 16px 16px;
}

.card-h {
  padding: 14px 16px 10px;
  border-bottom: 1px solid rgba(57, 255, 20, .14);
  position: relative;
}

.card-h::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: -10px;
  height: 18px;
  background:
    radial-gradient(circle at 10% 0%, rgba(57, 255, 20, .35) 0 18px, transparent 19px),
    radial-gradient(circle at 30% 0%, rgba(57, 255, 20, .28) 0 14px, transparent 15px),
    radial-gradient(circle at 55% 0%, rgba(57, 255, 20, .32) 0 16px, transparent 17px),
    radial-gradient(circle at 78% 0%, rgba(57, 255, 20, .25) 0 12px, transparent 13px);
  opacity: .55;
  pointer-events: none;
}

.card h2 {
  font-size: 14px;
  margin: 0 0 6px 0;
  letter-spacing: .2px;
}

.card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
  font-size: 12px;
}

.actions {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn {
  appearance: none;
  padding: 9px 11px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  touch-action: manipulation;
  color: var(--text);
  background:
    radial-gradient(14px 10px at 30% 25%, rgba(255, 255, 255, .26), rgba(255, 255, 255, 0) 60%),
    linear-gradient(180deg, rgba(57, 255, 20, .16), rgba(57, 255, 20, 0) 45%),
    linear-gradient(180deg, #123019, #07140b);
  border-top: 1px solid rgba(57, 255, 20, .22);
  border-left: 1px solid rgba(57, 255, 20, .14);
  border-right: 1px solid var(--edgeDark);
  border-bottom: 1px solid var(--edgeDark);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .10),
    0 14px 26px rgba(0, 0, 0, .55),
    0 0 22px rgba(57, 255, 20, .10);
}

.btn:hover {
  outline: 1px solid rgba(57, 255, 20, .22);
}

.btn:active {
  transform: translateY(1px);
  box-shadow:
    inset 0 2px 6px rgba(0, 0, 0, .60),
    0 10px 18px rgba(0, 0, 0, .45),
    0 0 18px rgba(57, 255, 20, .08);
}

.btn.primary {
  outline: 1px solid rgba(57, 255, 20, .18);
}

.btn.danger {
  outline: 1px solid rgba(255, 59, 59, .18);
  border-top-color: rgba(255, 59, 59, .55);
  border-left-color: rgba(255, 59, 59, .35);
}

.btn:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.section {
  margin-top: 14px;
  border-radius: var(--radius);
  padding: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, 0) 35%),
    linear-gradient(180deg, #0b1230, #070b18);
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .08);
}

.small {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.45;
}

.footer {
  margin-top: 16px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.hr {
  height: 1px;
  margin: 12px 0;
  background: linear-gradient(90deg, transparent, rgba(54, 230, 255, .18), transparent);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, 0) 40%),
    linear-gradient(180deg, #1a2a55, #0b132c);
  border-top: 1px solid var(--edgeLight);
  border-left: 1px solid var(--edgeLight);
  border-right: 1px solid var(--edgeDark);
  border-bottom: 1px solid var(--edgeDark);
}

.badge.ok {
  outline: 1px solid rgba(155, 255, 58, .18);
  box-shadow: 0 0 18px rgba(155, 255, 58, .10);
}

.badge.warn {
  outline: 1px solid rgba(255, 59, 59, .18);
  box-shadow: 0 0 18px rgba(255, 59, 59, .10);
}

.badge.bad {
  outline: 1px solid rgba(255, 59, 59, .18);
  box-shadow: 0 0 18px rgba(255, 59, 59, .10);
}

.notice {
  border-left: 3px solid rgba(155, 255, 58, .70);
  padding: 10px 12px;
  border-radius: 10px;
  color: #dbffd0;
  background:
    linear-gradient(180deg, rgba(57, 255, 20, .22), rgba(57, 255, 20, .07)),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, .22) 0 2px, transparent 2px 6px);
  box-shadow: 0 0 22px rgba(155, 255, 58, .08);
  font-size: 11px;
  line-height: 1.45;
}

.notice.warn {
  border-left-color: rgba(255, 59, 59, .70);
  color: #ffe3e3;
  background:
    linear-gradient(180deg, rgba(255, 59, 59, .18), rgba(255, 59, 59, .06)),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, .22) 0 2px, transparent 2px 6px);
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table td {
  padding: 7px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  font-size: 12px;
  color: var(--muted);
}

.table td strong {
  color: var(--text);
}

.videoWrap {
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, 0) 35%),
    linear-gradient(180deg, #050814, #090e1f);
  border: 1px solid rgba(54, 230, 255, .18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
}

video.sensorVideo {
  width: 100%;
  height: auto;
  display: block;
}

.control-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width:860px) {
  .control-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.ctrl {
  padding: 12px;
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, 0) 35%),
    linear-gradient(180deg, #0e1634, #070a18);
  border-top: 1px solid rgba(255, 255, 255, .14);
  border-left: 1px solid rgba(255, 255, 255, .10);
  border-right: 1px solid rgba(0, 0, 0, .55);
  border-bottom: 1px solid rgba(0, 0, 0, .70);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ctrl label {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
}

.ctrl input[type="range"] {
  width: 100%;
}

.ctrl select,
.ctrl input[type="text"] {
  width: 100%;
  padding: 9px 10px;
  border-radius: 8px;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, 0) 40%),
    linear-gradient(180deg, #061022, #040711);
  border-top: 1px solid rgba(255, 255, 255, .14);
  border-left: 1px solid rgba(255, 255, 255, .10);
  border-right: 1px solid rgba(0, 0, 0, .70);
  border-bottom: 1px solid rgba(0, 0, 0, .85);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
}

.ctrl input[type="checkbox"] {
  accent-color: var(--focus);
}

.statusrow {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}

kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 6px;
  color: #0a0f16;
  background:
    linear-gradient(180deg, var(--chrome1), var(--chrome2) 55%, var(--chrome3));
  border: 1px solid rgba(0, 0, 0, .45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45);
}

/* =========================================================
   05. LEGACY MOBILE.CSS COMPATIBILITY
   ========================================================= */

.appbar {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(10px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, 0) 40%),
    linear-gradient(180deg, #bfe7c2, #6aa872 60%, #23402b);
  border-bottom: 1px solid rgba(0, 0, 0, .55);
  box-shadow:
    0 14px 28px rgba(0, 0, 0, .55),
    inset 0 1px 0 rgba(255, 255, 255, .45),
    inset 0 -1px 0 rgba(0, 0, 0, .35);
}

.appbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  color: #0a0f16;
}

.appbar .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}

.appbar .logo {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background:
    radial-gradient(circle at 30% 30%, rgba(61, 220, 151, .9), rgba(122, 167, 255, .65));
  box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
}

.appbar .title {
  display: flex;
  flex-direction: column;
  gap: 1px;
  line-height: 1.1;
}

.appbar .title strong {
  font-size: 15px;
}

.appbar .title span {
  font-size: 11px;
  color: rgba(0, 0, 0, .75);
}

.top-slot {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px 12px;
}

.slot {
  padding: 10px 12px;
  border-radius: 10px;
  color: #dbffd0;
  background:
    linear-gradient(180deg, rgba(57, 255, 20, .22), rgba(57, 255, 20, .07)),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, .22) 0 2px, transparent 2px 6px);
  border: 1px solid rgba(57, 255, 20, .35);
  box-shadow: 0 0 22px rgba(155, 255, 58, .08);
  font-size: 11px;
  line-height: 1.45;
}

.slot .hint {
  opacity: .9;
  color: var(--muted);
  margin-top: 4px;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 14px;
  width: min(100% - 24px, 1440px);
  margin: 14px auto 0;
}

.side-rail {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bottom-nav {
  position: sticky;
  bottom: 0;
  z-index: 30;
  background: rgba(0, 0, 0, .55);
  backdrop-filter: blur(8px);
  border-top: 1px solid rgba(255, 255, 255, .08);
  margin-top: 20px;
}

.nav-inner {
  width: min(100% - 24px, 1100px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 10px 0;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 52px;
  padding: 8px 10px;
  border-radius: 12px;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .03);
  text-decoration: none;
}

.nav-item.active {
  outline: 1px solid rgba(57, 255, 20, .18);
}

.nav-item .ico {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  background:
    radial-gradient(10px 10px at 35% 30%, rgba(255, 255, 255, .35), rgba(255, 255, 255, 0) 60%),
    radial-gradient(14px 12px at 65% 70%, rgba(0, 255, 204, .22), rgba(0, 255, 204, 0) 60%),
    linear-gradient(135deg, rgba(57, 255, 20, .75), rgba(0, 0, 0, .18));
  border: 1px solid rgba(57, 255, 20, .18);
  box-shadow: 0 0 16px rgba(57, 255, 20, .10);
}

/* =========================================================
   10. HOMEPAGE
   ========================================================= */

/* Homepage uses shared .hero, .grid, .card, .btn, .section, .notice */

/* =========================================================
   20. WORDBOARD
   ========================================================= */

.wordboard-page {
  max-width: 980px;
  margin: 0 auto;
  padding: 18px 14px 28px;
}

.wordboard-page .wb-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.wordboard-page .wb-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .08);
  padding: 10px 12px;
  border-radius: 999px;
  box-shadow: 0 2px 18px rgba(0, 0, 0, .25);
  color: var(--text);
  font-weight: 700;
}

.wordboard-page .wb-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--ok);
  box-shadow: 0 0 0 6px rgba(32, 227, 111, .12);
  flex: 0 0 auto;
}

.wordboard-page .wb-btn {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, .10);
  background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .02));
  color: var(--text);
  padding: 12px 14px;
  border-radius: 14px;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
  min-height: 44px;
}

.wordboard-page .wb-btn:active {
  transform: translateY(1px);
}

.wordboard-page .wb-btn.wb-exit {
  border-color: rgba(255, 77, 77, .35);
  color: #ffd6d6;
}

.wordboard-page .wb-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width:860px) {
  .wordboard-page .wb-grid {
    grid-template-columns: 1.1fr .9fr;
  }
}

.wordboard-page .wb-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .02));
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 20px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .55);
  overflow: hidden;
}

.wordboard-page .wb-card h2 {
  margin: 0;
  padding: 14px 16px 10px;
  font-size: 16px;
  color: var(--muted);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.wordboard-page .wb-card-content {
  padding: 14px 16px 16px;
}

.wordboard-page .wb-buffer {
  font-size: 28px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: .6px;
  padding: 12px 14px;
  background: rgba(0, 0, 0, .28);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 16px;
  min-height: 64px;
  display: flex;
  align-items: center;
  word-break: break-word;
}

.wordboard-page .wb-subrow {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.wordboard-page .wb-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(0, 0, 0, .18);
  user-select: none;
}

.wordboard-page .wb-toggle input {
  width: 22px;
  height: 22px;
}

.wordboard-page .wb-small {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.35;
}

.wordboard-page .wb-kbd {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 10px;
  margin-top: 14px;
}

@media (max-width:520px) {
  .wordboard-page .wb-kbd {
    grid-template-columns: repeat(7, 1fr);
  }
}

.wordboard-page .wb-key {
  min-height: 56px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .02));
  border: 1px solid rgba(255, 255, 255, .10);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: .6px;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  touch-action: manipulation;
  cursor: pointer;
}

.wordboard-page .wb-key:active {
  transform: translateY(1px);
  filter: brightness(1.05);
}

.wordboard-page .wb-key.wide {
  grid-column: span 2
}

.wordboard-page .wb-key.xwide {
  grid-column: span 3
}

.wordboard-page .wb-key.action {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .2px;
  color: var(--muted);
  background: rgba(0, 0, 0, .22);
}

.wordboard-page .wb-key.commit {
  color: #07200f;
  background: linear-gradient(180deg, rgba(32, 227, 111, .92), rgba(32, 227, 111, .65));
  border-color: rgba(32, 227, 111, .55);
}

.wordboard-page .wb-key.danger {
  border-color: rgba(255, 77, 77, .32);
}

.wordboard-page .wb-log {
  height: 420px;
  overflow: auto;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(0, 0, 0, .28);
  border: 1px solid rgba(255, 255, 255, .08);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.wordboard-page .wb-log .row {
  padding: 6px 6px;
  border-bottom: 1px dashed rgba(255, 255, 255, .07);
}

.wordboard-page .wb-log .row:last-child {
  border-bottom: none;
}

.wordboard-page .wb-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  flex-wrap: wrap;
}

.wordboard-page .wb-meta-right {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.wordboard-page .wb-badge {
  font-size: 12px;
  color: var(--muted);
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(0, 0, 0, .18);
}

/* =========================================================
   21. CATBALL
   ========================================================= */

.catball-page {
  max-width: 1040px;
  margin: 0 auto;
  padding: 14px;
  display: grid;
  gap: 14px;
}

.catball-page .cb-pagehead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.catball-page .cb-pagehead-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.catball-page .cb-pagehead-left h1 {
  margin: 0;
  font-size: 22px;
  line-height: 1.1;
}

.catball-page .cb-pagehead-left p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.catball-page .cb-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .03));
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 16px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .35);
  overflow: hidden;
}

.catball-page .cb-card-hd {
  padding: 14px 14px 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.catball-page .cb-card-hd h2 {
  margin: 0;
  font-size: 15px;
  letter-spacing: .2px;
}

.catball-page .cb-card-bd {
  padding: 14px;
  display: grid;
  gap: 12px;
}

.catball-page .cb-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

@media (min-width:760px) {
  .catball-page .cb-row {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

.catball-page .cb-btn {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(122, 167, 255, .12);
  color: var(--text);
  padding: 12px 12px;
  border-radius: 14px;
  font-weight: 650;
  letter-spacing: .2px;
  cursor: pointer;
  box-shadow: 0 10px 18px rgba(0, 0, 0, .25);
}

.catball-page .cb-btn:active {
  transform: translateY(1px);
}

.catball-page .cb-btn.cb-secondary {
  background: rgba(255, 255, 255, .06);
  font-weight: 600;
}

.catball-page .cb-btn.cb-danger {
  background: rgba(255, 107, 107, .12);
  border-color: rgba(255, 107, 107, .22);
}

.catball-page .cb-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  user-select: none;
  background: rgba(0, 0, 0, .18);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 14px;
  padding: 10px 12px;
  min-height: 44px;
}

.catball-page .cb-toggle input {
  transform: scale(1.2);
}

.catball-page .cb-hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.catball-page .cb-grid2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width:760px) {
  .catball-page .cb-grid2 {
    grid-template-columns: 1fr 1fr;
  }
}

.catball-page .cb-kpi {
  background: rgba(0, 0, 0, .18);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.catball-page .cb-kpi-label {
  color: var(--muted);
  font-size: 12px;
}

.catball-page .cb-kpi-val {
  font-size: 20px;
  font-weight: 750;
  letter-spacing: .2px;
}

.catball-page .cb-kpi-stack {
  display: grid;
  gap: 4px;
  min-width: 180px;
}

.catball-page .cb-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(255, 255, 255, .05);
  color: var(--muted);
  white-space: nowrap;
  min-width: 170px;
  justify-content: flex-start;
}

.catball-page .cb-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .25);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .06);
}

.catball-page .cb-dot.good {
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(61, 220, 151, .10);
}

.catball-page .cb-dot.warn {
  background: var(--warn);
  box-shadow: 0 0 0 3px rgba(255, 204, 102, .10);
}

.catball-page .cb-dot.bad {
  background: var(--bad);
  box-shadow: 0 0 0 3px rgba(255, 107, 107, .10);
}

.catball-page .cb-range {
  display: grid;
  gap: 6px;
  background: rgba(0, 0, 0, .18);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 14px;
  padding: 10px 12px;
}

.catball-page .cb-range-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
}

.catball-page .cb-range input[type="range"] {
  width: 100%;
}

/* Cat Ball overlay canvas (global) */
canvas#catFX{
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  transition: opacity 120ms linear;
  mix-blend-mode: screen;
}

.site-body {
  overflow-x: clip;
}

@supports not (overflow: clip) {
  .site-body {
    overflow-x: hidden;
  }
}

.catball-page .cb-meter {
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .08);
  overflow: hidden;
}

.catball-page .cb-meter>i {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, rgba(122, 167, 255, .8), rgba(61, 220, 151, .8), rgba(255, 204, 102, .8), rgba(255, 107, 107, .8));
  border-radius: 999px;
  transition: width 80ms linear;
}

.catball-page .cb-chart-wrap {
  background: rgba(0, 0, 0, .18);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 14px;
  padding: 12px;
}

.catball-page canvas#chart {
  width: 100%;
  height: 120px;
  display: block;
}

.catball-page .cb-log {
  background: rgba(0, 0, 0, .18);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 14px;
  overflow: hidden;
}

.catball-page .cb-log-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.catball-page .cb-log-head strong {
  font-size: 13px;
}

.catball-page .cb-log-body {
  max-height: 210px;
  overflow: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  padding: 10px 12px;
  color: rgba(232, 234, 240, .92);
}

.catball-page .cb-log-body .line {
  display: flex;
  gap: 10px;
  padding: 4px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, .06);
}

.catball-page .cb-log-body .line:last-child {
  border-bottom: none;
}

.catball-page .cb-log-body .t {
  color: var(--muted);
  min-width: 92px;
}

.catball-page .cb-log-body .s {
  color: #dfe7ff;
}

.catball-page .cb-log-body .k {
  color: #b9ffc7;
}

.catball-page .cb-mini-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.catball-page .cb-mini-row .cb-btn {
  flex: 1 1 160px;
}

.catball-page #qText {
  display: inline-block;
  width: 120px;
  text-align: left;
}

.catball-page .is-hidden {
  display: none !important;
}

.catball-page #btnStart {
  color: greenyellow
}

.catball-page #btnStop {
  color: red
}

.catball-page .cb-notes ul {
  margin: 6px 0 0 18px;
  padding: 0;
}

.catball-page .cb-notes li {
  margin: 4px 0;
}

/* =========================================================
   22. GEOLOCATION
   ========================================================= */

.geo-page {
  width: min(1100px, calc(100% - 24px));
  margin: 0 auto;
  padding: 16px 0 40px;
}

.geo-page .gl-hero {
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 24px;
  padding: 22px;
  background:
    radial-gradient(circle at top right, rgba(125, 211, 252, .12), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .02));
  margin-bottom: 18px;
}

.geo-page .gl-hero h1 {
  margin: 0 0 10px;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1.1;
}

.geo-page .gl-hero p {
  margin: 0;
  color: var(--muted);
  max-width: 70ch;
}

.geo-page .gl-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.geo-page .gl-actions button,
.geo-page .gl-actions select {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, .08);
  background: #111821;
  color: var(--text);
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
}

.geo-page .gl-actions button {
  cursor: pointer;
  font-weight: 700;
}

.geo-page .gl-actions button.gl-primary {
  background: linear-gradient(180deg, rgba(125, 211, 252, .18), rgba(125, 211, 252, .08));
  border-color: rgba(125, 211, 252, .35);
}

.geo-page .gl-actions button:disabled {
  opacity: .6;
  cursor: not-allowed;
}

.geo-page .gl-pillbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.geo-page .gl-pill {
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, .03);
  color: var(--muted);
  font-size: .95rem;
}

.geo-page .gl-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 18px;
}

@media (min-width:880px) {
  .geo-page .gl-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.geo-page details.gl-drop {
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 18px;
  background: #0f151d;
  overflow: hidden;
}

.geo-page details.gl-drop[open] {
  box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
}

.geo-page details.gl-drop summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-weight: 800;
}

.geo-page details.gl-drop summary::-webkit-details-marker {
  display: none;
}

.geo-page .gl-sum-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.geo-page .gl-sum-sub {
  color: var(--muted);
  font-weight: 500;
  font-size: .95rem;
}

.geo-page .gl-chev {
  color: var(--muted);
  font-size: 1.15rem;
  transition: transform .2s ease;
}

.geo-page details[open] .gl-chev {
  transform: rotate(180deg);
}

.geo-page .gl-drop-body {
  border-top: 1px solid rgba(255, 255, 255, .08);
  padding: 16px 18px 18px;
}

.geo-page .gl-statgrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@media (min-width:700px) {
  .geo-page .gl-statgrid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.geo-page .gl-stat {
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .03);
  border-radius: 14px;
  padding: 12px;
}

.geo-page .gl-label {
  color: var(--muted);
  font-size: .9rem;
  margin-bottom: 6px;
}

.geo-page .gl-val {
  font-weight: 800;
  line-height: 1.25;
  word-break: break-word;
}

.geo-page .gl-big {
  font-size: 1.2rem;
}

.geo-page .gl-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  padding: 8px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .03);
}

.geo-page .gl-status.good {
  color: #34d399
}

.geo-page .gl-status.warn {
  color: #fbbf24
}

.geo-page .gl-status.bad {
  color: #fb7185
}

.geo-page .gl-card {
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 16px;
  background: rgba(255, 255, 255, .03);
  padding: 14px;
}

.geo-page .gl-card h3 {
  margin: 0 0 8px;
  font-size: 1.08rem;
}

.geo-page .gl-card p {
  margin: 0;
  color: var(--muted);
}

.geo-page .gl-stack,
.geo-page .gl-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.geo-page .gl-item {
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 14px;
  background: rgba(255, 255, 255, .03);
  padding: 12px;
}

.geo-page .gl-item-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.geo-page .gl-item-title {
  font-weight: 800;
  font-size: 1rem;
}

.geo-page .gl-meta {
  color: var(--muted);
  font-size: .93rem;
}

.geo-page .gl-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.geo-page .gl-badge {
  font-size: .85rem;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 999px;
  background: rgba(255, 255, 255, .03);
  color: var(--muted);
}

.geo-page .gl-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.geo-page .gl-links a {
  color: #7dd3fc;
  text-decoration: none;
  font-weight: 700;
  border: 1px solid rgba(125, 211, 252, .24);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(125, 211, 252, .08);
}

.geo-page .gl-empty {
  color: var(--muted);
  font-style: italic;
}

.geo-page .gl-footnote {
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.5;
}

.geo-page .gl-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* =========================================================
   23. LIGHT METER
   ========================================================= */

.lightmeter-page .lm-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.lightmeter-page .lm-row>* {
  flex: 0 0 auto;
}

.lightmeter-page .lm-kpi-wrap {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
}

@media (min-width:860px) {
  .lightmeter-page .lm-kpi-wrap {
    grid-template-columns: 1.2fr .8fr;
  }
}

.lightmeter-page .lm-meter-big {
  font-size: 56px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.lightmeter-page .lm-meter-sub {
  color: var(--muted);
  margin-top: 6px;
}

.lightmeter-page .lm-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.lightmeter-page .lm-bar {
  height: 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .10);
}

.lightmeter-page .lm-bar>i {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, rgba(122, 167, 255, .35), rgba(61, 220, 151, .55));
}

.lightmeter-page .lm-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .04);
  color: var(--text);
  font-size: 13px;
  user-select: none;
}

.lightmeter-page .lm-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(174, 180, 194, .55);
}

.lightmeter-page .lm-dot.ok {
  background: rgba(61, 220, 151, .85)
}

.lightmeter-page .lm-dot.warn {
  background: rgba(255, 204, 102, .85)
}

.lightmeter-page .lm-dot.bad {
  background: rgba(255, 107, 107, .85)
}

.lightmeter-page .lm-btn {
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .06);
  color: var(--text);
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
  font-weight: 650;
}

.lightmeter-page .lm-btn:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.lightmeter-page .lm-btn.lm-primary {
  border-color: rgba(122, 167, 255, .35);
  background: rgba(122, 167, 255, .10);
}

.lightmeter-page .lm-btn.lm-danger {
  border-color: rgba(255, 107, 107, .35);
  background: rgba(255, 107, 107, .10);
}

.lightmeter-page .lm-btn.lm-mini {
  padding: 8px 10px;
  border-radius: 10px;
  font-weight: 600;
}

.lightmeter-page .lm-hidden {
  display: none !important;
}

.lightmeter-page video.lm-preview {
  width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(255, 255, 255, .03);
}

.lightmeter-page canvas.lm-spark {
  width: 100%;
  height: 90px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(255, 255, 255, .03);
  display: block;
}

.lightmeter-page .lm-small {
  font-size: 13px;
  color: var(--muted);
}

.lightmeter-page .lm-badge.ok {
  border-color: rgba(0, 255, 160, .35)
}

.lightmeter-page .lm-badge.warn {
  border-color: rgba(255, 200, 0, .35)
}

.lightmeter-page .lm-badge.bad {
  border-color: rgba(255, 80, 80, .45)
}

/* =========================================================
   24. MOTION
   ========================================================= */

.motion-page {
  width: min(1100px, calc(100% - 24px));
  margin: 0 auto;
  padding: 16px 0 40px;
  color: var(--text);
}

.motion-page .mt-card {
  background: linear-gradient(180deg, rgba(17, 24, 39, .92), rgba(15, 23, 42, .88));
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 18px;
  padding: 14px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .35);
}

.motion-page .mt-h1 {
  margin: 0 0 6px 0;
  font-size: 24px;
  line-height: 1.1;
}

.motion-page .mt-sub {
  color: var(--muted);
  margin-bottom: 12px;
}

.motion-page .mt-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.motion-page .mt-btn {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .04);
  color: var(--text);
  font-weight: 700;
  min-width: 108px;
  cursor: pointer;
}

.motion-page .mt-btn.mt-primary {
  border-color: rgba(122, 167, 255, .55);
  background: rgba(122, 167, 255, .14);
}

.motion-page .mt-btn.mt-bad {
  border-color: rgba(255, 107, 107, .55);
  background: rgba(255, 107, 107, .12);
}

.motion-page .mt-btn:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.motion-page .mt-pills {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 12px 0;
}

.motion-page .mt-pill {
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(0, 0, 0, .18);
  color: var(--muted);
  font-size: 12px;
}

.motion-page .mt-pill b {
  color: var(--text);
  font-weight: 800;
}

.motion-page .mt-stage {
  margin-top: 12px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .12);
  background: #000;
  position: relative;
}

.motion-page canvas {
  display: block;
  width: 100%;
  height: auto;
}

.motion-page video {
  display: none;
}

.motion-page .mt-controls {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

@media (min-width:860px) {
  .motion-page .mt-controls {
    grid-template-columns: 1fr 1fr;
  }
}

.motion-page .mt-full {
  grid-column: 1 / -1;
}

.motion-page .mt-label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}

.motion-page input[type="range"],
.motion-page input[type="number"] {
  width: 100%;
}

.motion-page input[type="number"] {
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: #0f1420;
  color: var(--text);
}

.motion-page .mt-hint {
  color: var(--muted);
  font-size: 12px;
  margin-top: 8px;
}

.motion-page .mt-read {
  margin-top: 10px;
  font: 12px ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  white-space: pre-wrap;
  color: rgba(232, 234, 240, .92);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 14px;
  padding: 10px;
  background: rgba(0, 0, 0, .18);
  max-height: 180px;
  overflow: auto;
}

/* =========================================================
   05. MOBILE / RESPONSIVE
   ========================================================= */

@media (max-width:1024px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .side-rail {
    display: none;
  }
}

@media (max-width:768px) {
  .site-body {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    width: min(100% - 16px, 1100px);
  }

  .site-rail {
    display: none;
  }

  .ad-slot-top,
  .ad-slot-footer {
    width: 320px;
    height: 50px;
  }

  .ad-label {
    font-size: 13px;
  }

  .ad-label small {
    font-size: 11px;
  }

  .wrap {
    width: min(100% - 16px, var(--max));
  }
}

@media (max-width:720px) {

  .site-topbar-inner,
  .site-footer-inner,
  .appbar-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-inner {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .card {
    animation: bioPulse 4.5s ease-in-out infinite;
  }

  @keyframes bioPulse {

    0%,
    100% {
      filter: drop-shadow(0 0 0 rgba(57, 255, 20, 0))
    }

    50% {
      filter: drop-shadow(0 0 10px rgba(57, 255, 20, .10))
    }
  }
}

/* =========================================================
   25. RECORDER
   ========================================================= */

.recorder-page {
  width: min(1100px, calc(100% - 24px));
  margin: 0 auto;
  padding: 16px 0 40px;
}

.recorder-page .rec-grid2 {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
}

@media (min-width:900px) {
  .recorder-page .rec-grid2 {
    grid-template-columns: 1.2fr .8fr;
  }
}

.recorder-page .rec-meter {
  width: 180px;
  height: 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, .18);
  background: rgba(0, 0, 0, .22);
  overflow: hidden;
}

.recorder-page .rec-meter>div {
  height: 100%;
  width: 0%;
  background: rgba(61, 220, 151, .55);
}

.recorder-page .rec-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.recorder-page .rec-item {
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 14px;
  background: rgba(255, 255, 255, .02);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.recorder-page .rec-item .meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}

.recorder-page audio {
  width: 100%;
}

.recorder-page .rec-logbox {
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 14px;
  background: rgba(255, 255, 255, .02);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.recorder-page canvas#wf {
  width: 100%;
  height: 180px;
  display: block;
  border-radius: 12px;
  background: rgba(0, 0, 0, .25);
  border: 1px solid rgba(148, 163, 184, .12);
}

.recorder-page .rec-evlist {
  max-height: 220px;
  overflow: auto;
  border: 1px solid rgba(148, 163, 184, .12);
  border-radius: 12px;
  background: rgba(0, 0, 0, .18);
  padding: 10px;
}

.recorder-page .rec-evrow {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  align-items: flex-start;
  padding: 6px 0;
  border-bottom: 1px solid rgba(148, 163, 184, .10);
}

.recorder-page .rec-evrow:last-child {
  border-bottom: none;
}

.recorder-page .rec-evleft {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.recorder-page .rec-tag {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, .18);
  color: var(--muted);
  white-space: nowrap;
}

.recorder-page .rec-tag.spike {
  border-color: rgba(255, 204, 102, .35);
  color: #ffd37a;
}

.recorder-page .rec-tag.mark {
  border-color: rgba(122, 167, 255, .35);
  color: #b9d0ff;
}

.recorder-page .rec-tag.state {
  border-color: rgba(61, 220, 151, .35);
  color: #9cf0c9;
}

.recorder-page .rec-field {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  padding: 8px 10px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, .14);
  background: rgba(255, 255, 255, .02);
}

.recorder-page .rec-field label {
  font-size: 12px;
  color: var(--muted);
}

.recorder-page .rec-field .val {
  font-size: 12px;
  color: var(--text);
  font-weight: 600;
}

.recorder-page input[type="range"] {
  accent-color: var(--brand);
}

.recorder-page .rec-footer {
  margin-top: 16px;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 16px;
  background: rgba(255, 255, 255, .02);
  padding: 12px;
  color: var(--muted);
}