/* ============================================================================
 * WOLFCOM-KIT — CANONICAL OPTICAL, GLACÉ & GRANULAR REACT GRID TOKENS
 * 100% React Platform · Zero Page Silos · Instant Hot-Swap Widget Grid
 * ============================================================================ */

:root,
html[data-mode="dark"] {
  --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-core: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'DM Mono', 'SF Mono', ui-monospace, monospace;

  /* Canonical Optical Monochrome Palette (Mark 9af315dc / 2026-09-19) */
  --brand-50: rgb(242 242 242 / 0.95);
  --brand-100: rgb(245 245 245 / 0.80);
  --brand-110: rgb(200 200 204 / 0.08);
  --brand-120: rgb(245 245 245 / 0.50);
  --brand-150: rgb(192 194 198 / 0.15);
  --brand-200: rgb(185 188 192 / 0.22);
  --brand-300: rgb(140 144 148);
  --brand-400: rgb(94 94 94 / 0.80);
  --brand-800: rgb(28 28 28);
  --brand-900: rgb(7 8 9);
  --brand-1000: rgb(2 2 2);

  --floor: #020202;
  --wa: 242 242 242;
  --ink: var(--brand-50);
  --ink-2: var(--brand-100);
  --ink-3: var(--brand-300);
  --ink-4: rgb(140 144 148 / 0.45);
  --line: rgb(255 255 255 / 0.10);
  --line-2: rgb(255 255 255 / 0.18);

  /* Monochrome Optical Accents (No Rainbow Vector Colors) */
  --cyan: var(--brand-50);
  --emerald: var(--brand-100);
  --amber: var(--brand-300);
  --crimson: rgb(214 31 31);
  --violet: var(--brand-100);

  --radius-card: 12px;
  --card-bg: linear-gradient(165deg, rgba(255, 255, 255, 0.058) 0%, rgba(255, 255, 255, 0.018) 100%);
  --card-border: 1px solid rgba(255, 255, 255, 0.11);
  --card-shadow: 0 12px 34px rgba(0, 0, 0, 0.54), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  --card-backdrop: blur(22px) saturate(155%);

  --overlay-bg: linear-gradient(160deg, rgba(20, 24, 34, 0.84) 0%, rgba(10, 12, 18, 0.74) 100%);
  --overlay-border: 1px solid rgba(255, 255, 255, 0.19);
  --overlay-shadow: 0 24px 60px rgba(0, 0, 0, 0.74), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  --overlay-backdrop: blur(30px) saturate(180%);

  color-scheme: dark;
}

html[data-mode="light"] {
  --floor: #f3f4f8;
  --wa: 20 22 28;
  --ink: rgb(20 22 28 / 0.94);
  --ink-2: rgb(20 22 28 / 0.72);
  --ink-3: rgb(20 22 28 / 0.50);
  --line: rgb(20 22 28 / 0.10);
  --line-2: rgb(20 22 28 / 0.18);
  --card-bg: linear-gradient(165deg, rgba(255, 255, 255, 0.86) 0%, rgba(255, 255, 255, 0.68) 100%);
  --card-border: 1px solid rgba(20, 22, 28, 0.12);
  --overlay-bg: linear-gradient(160deg, rgba(255, 255, 255, 0.92) 0%, rgba(244, 246, 252, 0.82) 100%);
  color-scheme: light;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body, #app {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--floor);
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 200;
  -webkit-font-smoothing: antialiased;
}

/* ============================================================================
 * WOLFSHELL + GRANULAR 24x12 MICRO-GRID CANVAS
 * ============================================================================ */

.wc-wolfshell {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 16% 14%, rgba(0, 247, 255, 0.05), transparent 40%),
    radial-gradient(circle at 84% 82%, rgba(167, 139, 250, 0.045), transparent 45%),
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    var(--floor);
  background-size: 100% 100%, 100% 100%, 36px 36px, 36px 36px, 100% 100%;
}

.wc-shell-header {
  position: fixed;
  top: 12px;
  left: 20px;
  right: 20px;
  height: 52px;
  z-index: 9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--card-bg);
  border: var(--card-border);
  box-shadow: var(--card-shadow);
  -webkit-backdrop-filter: var(--card-backdrop);
  backdrop-filter: var(--card-backdrop);
}

.wc-snap-prompt-bar {
  flex: 1;
  max-width: 680px;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 6px 0 14px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.36);
  border: 1px solid rgba(0, 247, 255, 0.28);
}

.wc-snap-prompt-input {
  flex: 1;
  background: transparent;
  border: 0;
  color: var(--ink);
  font-family: inherit;
  font-size: 12px;
  font-weight: 300;
  outline: none;
}

.wc-wolfrail {
  position: fixed;
  top: 76px;
  left: 20px;
  bottom: 40px;
  width: 64px;
  z-index: 9;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-radius: 999px;
  background: var(--card-bg);
  border: var(--card-border);
  box-shadow: var(--card-shadow);
  -webkit-backdrop-filter: var(--card-backdrop);
  backdrop-filter: var(--card-backdrop);
}

.wc-rail-btn {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-3);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 160ms ease;
}

.wc-rail-btn:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
}

.wc-rail-btn[data-active="true"] {
  color: var(--cyan);
  background: rgba(0, 247, 255, 0.12);
  border-color: rgba(0, 247, 255, 0.45);
  box-shadow: 0 0 16px rgba(0, 247, 255, 0.22);
}

/* Granular 24-Column x 12-Row Widget Matrix (No Pages!) */
.wc-granular-grid {
  position: fixed;
  z-index: 1;
  top: 76px;
  left: 98px;
  right: 20px;
  bottom: 40px;
  display: grid;
  grid-template-columns: repeat(24, minmax(0, 1fr));
  grid-template-rows: repeat(12, minmax(0, 1fr));
  gap: 10px;
}

.wc-widget-frame {
  container-type: size;
  position: relative;
  min-width: 0;
  min-height: 0;
  padding: 10px 12px 10px 32px;
  border-radius: var(--radius-card);
  background: var(--card-bg);
  border: var(--card-border);
  box-shadow: var(--card-shadow);
  -webkit-backdrop-filter: var(--card-backdrop);
  backdrop-filter: var(--card-backdrop);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.wc-widget-frame:hover {
  border-color: rgba(0, 247, 255, 0.32);
}

.wc-spine-strip {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 22px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 10px;
}

.wc-spine-label {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-2);
  white-space: nowrap;
}

/* ============================================================================
 * ENDLESS SOLID FLOATING OVERLAY (z-index: 8) + EXPOSÉ STASH / HOT CORNER
 * ============================================================================ */

.wc-endless-layer {
  position: fixed;
  inset: 0;
  z-index: 8;
  pointer-events: none;
  overflow: hidden;
}

.wc-endless-wires {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  transition: opacity 380ms ease;
}

.wc-endless-layer[data-stashed="true"] .wc-endless-wires {
  opacity: 0;
}

.wc-endless-card {
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: auto; /* SOLID: never click-through */
  user-select: none;
  border-radius: 14px;
  background: var(--overlay-bg);
  border: var(--overlay-border);
  box-shadow: var(--overlay-shadow);
  -webkit-backdrop-filter: var(--overlay-backdrop);
  backdrop-filter: var(--overlay-backdrop);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  will-change: transform;
}

.wc-endless-card:hover {
  border-color: rgba(0, 247, 255, 0.55);
}

.wc-endless-card[data-stashed="true"] {
  pointer-events: none;
  opacity: 0.16;
}

.wc-endless-port {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: rgba(0, 247, 255, 0.28);
  border: 1.5px solid var(--cyan);
  cursor: crosshair;
  pointer-events: auto;
}

.wc-endless-port[data-side="left"]  { left: -6px; top: 50%; margin-top: -6px; }
.wc-endless-port[data-side="right"] { right: -6px; top: 50%; margin-top: -6px; }

.wc-expose-hotcorner {
  position: fixed;
  right: 0;
  bottom: 0;
  width: 28px;
  height: 28px;
  z-index: 12;
  pointer-events: auto;
  cursor: pointer;
  border-top-left-radius: 14px;
  background: radial-gradient(circle at 100% 100%, rgba(0, 247, 255, 0.45), transparent 72%);
  transition: width 160ms ease, height 160ms ease;
}

.wc-expose-hotcorner:hover {
  width: 42px;
  height: 42px;
}

.wc-ben-stage {
  position: fixed;
  z-index: 5;
  right: 22px;
  bottom: 0;
  width: 270px;
  height: 350px;
  pointer-events: none;
  transition: transform 500ms cubic-bezier(0.16, 1, 0.3, 1), opacity 400ms ease;
}

.wc-ben-stage[data-minimized="true"] {
  transform: translateY(295px);
  opacity: 0.45;
}

.wc-ben-figure {
  position: absolute;
  inset: 0;
  background: url("https://zydokbevwvdgsmpnkopf.supabase.co/storage/v1/object/public/persona-images/ben/ben-cutout-black-tee-1280x720.png") center bottom / contain no-repeat;
  filter: drop-shadow(0 16px 32px rgba(0, 0, 0, 0.75));
}

.wc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  font-family: inherit;
  font-size: 11px;
  font-weight: 300;
  cursor: pointer;
  white-space: nowrap;
  transition: all 150ms ease;
}

.wc-btn:hover {
  border-color: rgba(0, 247, 255, 0.5);
  background: rgba(0, 247, 255, 0.14);
}

.wc-btn[data-variant="primary"] {
  background: rgba(0, 247, 255, 0.18);
  border-color: rgba(0, 247, 255, 0.6);
  color: #fff;
}

/* 3D Isometric Data Remix Surface */
.wc-3d-stage {
  perspective: 900px;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.wc-3d-plane {
  width: 88%;
  height: 78%;
  transform-style: preserve-3d;
  transform: rotateX(52deg) rotateZ(-28deg);
  border: 1px solid rgba(0, 247, 255, 0.38);
  background:
    linear-gradient(rgba(0, 247, 255, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(167, 139, 250, 0.12) 1px, transparent 1px),
    rgba(6, 12, 22, 0.65);
  background-size: 24px 24px;
  border-radius: 10px;
  position: relative;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.65);
  transition: transform 400ms cubic-bezier(0.16, 1, 0.3, 1);
}
