  :root { --theme-r: calc(max(16px, env(safe-area-inset-right)) + 168px); --spark: 150, 160, 155; --spark-hi: 185, 194, 189; }
  .about-btn.theme-btn { right: var(--theme-r); display: grid; place-items: center; }
  .theme-btn svg { width: 16px; height: 16px; }
  .theme-btn[aria-expanded="true"] { color: var(--ink); border-color: rgba(185, 194, 189, 0.5); }
  .theme-menu {
    position: fixed; right: var(--theme-r); bottom: calc(max(16px, env(safe-area-inset-bottom)) + 46px); z-index: 7;
    display: grid; min-width: 156px; background: rgba(1, 2, 3, 0.62); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    opacity: 0; transform: translateY(6px); pointer-events: none; transition: opacity .3s, transform .3s;
  }
  .theme-menu.open { opacity: 1; transform: none; pointer-events: auto; }
  .theme-menu button { display: flex; align-items: center; gap: 8px; margin: 0; padding: 9px 12px; border: 1px solid var(--line); background: transparent;
    color: var(--dim); font: 400 10.5px/1.4 var(--font); letter-spacing: 0.2em; text-transform: uppercase; text-align: left; cursor: pointer; transition: color .25s, background-color .25s; }
  .theme-menu button + button { margin-top: -1px; }
  .theme-menu button::before { content: ""; width: 5px; height: 5px; border-radius: 50%; flex: none; background: transparent; }
  .theme-menu button:hover, .theme-menu button:focus-visible { color: var(--ink); background: rgba(150, 160, 155, 0.06); outline: none; }
  .theme-menu button[aria-checked="true"] { color: var(--ink); }
  .theme-menu button[aria-checked="true"]::before { background: var(--ink); }
  .embed .theme-menu { display: none; }
  @media (prefers-reduced-motion: reduce) { .theme-menu { transition: none; } }

  .views { position: fixed; top: max(16px, env(safe-area-inset-top)); right: var(--views-r, max(16px, env(safe-area-inset-right))); z-index: 5;
    display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: flex-start; gap: 6px; max-width: calc(100vw - 32px); }
  .views-set { display: flex; }
  .views button { margin: 0; padding: 8px 10px; border: 1px solid var(--line); background: rgba(1, 2, 3, 0.5); color: var(--muted);
    font: 400 9.5px/1.2 var(--font); letter-spacing: 0.18em; text-transform: uppercase; white-space: nowrap; cursor: pointer;
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); transition: color .25s, border-color .25s, background-color .25s; }
  .views-set button + button { margin-left: -1px; }
  .views button:hover, .views button:focus-visible { color: var(--ink); background: rgba(150, 160, 155, 0.08); outline: none; }
  .views button[aria-pressed="true"] { position: relative; color: var(--ink); border-color: rgba(185, 194, 189, 0.5); }
  .node-menu { position: absolute; top: calc(100% + 6px); right: 0; display: grid; min-width: 150px; background: rgba(1, 2, 3, 0.62);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); opacity: 0; transform: translateY(-4px); pointer-events: none; transition: opacity .25s, transform .25s; }
  .node-menu.open { opacity: 1; transform: none; pointer-events: auto; }
  .node-menu button { display: flex; align-items: center; gap: 8px; backdrop-filter: none; -webkit-backdrop-filter: none; background: transparent; text-transform: none; letter-spacing: 0.06em; }
  .node-menu button + button { margin-top: -1px; }
  .node-menu button i { width: 6px; height: 6px; border-radius: 50%; flex: none; }
  .node-menu button[aria-checked="true"] { color: var(--ink); }
  .node-menu p { margin: 0; padding: 8px 10px; border: 1px solid var(--line); color: var(--muted); font: 300 10.5px/1.4 var(--font); letter-spacing: 0.04em; }
  .embed .views { display: none; }
  .views .eye-btn { display: grid; place-items: center; padding: 6px 8px; }
  .eye-btn svg { width: 14px; height: 14px; }
  .eye-btn .off, .ui-views-off .eye-btn .on { display: none; }
  .ui-views-off .eye-btn .off { display: block; }
  .ui-views-off .views > :not(.eye-btn) { display: none; }
  .about-btn.gear-btn { right: max(16px, env(safe-area-inset-right)); display: grid; place-items: center; }
  .gear-btn svg { width: 16px; height: 16px; transition: transform .4s; }
  .ui-tools-off .gear-btn svg { transform: rotate(-90deg); }
  .about-btn.tool { transition: color .25s, border-color .25s, opacity .25s, transform .25s, visibility 0s; }
  .ui-tools-off .about-btn.tool { opacity: 0; transform: translateX(14px); visibility: hidden; pointer-events: none;
    transition: color .25s, border-color .25s, opacity .25s, transform .25s, visibility 0s linear .25s; }
  .ui-tools-off .theme-menu { display: none; }
  @media (max-width: 900px) { .nv-key.nv-key { top: calc(max(14px, env(safe-area-inset-top)) + 44px); } }
  @media (max-width: 600px) {
    .views button { padding: 7px 7px; letter-spacing: 0.1em; font-size: 9px; }
    .nv-key.nv-key { top: calc(max(14px, env(safe-area-inset-top)) + 80px); }
  }
  @media (prefers-reduced-motion: reduce) { .node-menu, .about-btn.tool, .ui-tools-off .about-btn.tool, .gear-btn svg { transition: none; } }

  :root[data-theme] { --font: "DM Mono", ui-monospace, "Cascadia Mono", Consolas, monospace; --tts: none; --press: var(--text); --pressc: var(--bg); --lead: var(--line); --hover: rgba(127, 127, 127, 0.08); }
  :root[data-theme] body { text-shadow: var(--tts); }
  :root[data-theme] #net-field-stage { background: var(--stage, var(--bg)); }
  :root[data-theme] #net-field-stage canvas { filter: var(--cf, none); mix-blend-mode: var(--cb, normal); }
  :root[data-theme] #net-field-stage::before, :root[data-theme] #net-field-stage::after { content: ""; position: absolute; inset: 0; pointer-events: none; }
  :root[data-theme] .about { background: var(--chip); backdrop-filter: none; -webkit-backdrop-filter: none; border-radius: 0; color: var(--dim); box-shadow: var(--edge, none); }
  :root[data-theme] .about-btn { border-radius: 0; background: var(--chip); color: var(--btn, var(--dim)); box-shadow: var(--edge, none); }
  :root[data-theme] .about-btn:hover, :root[data-theme] .about-btn:focus-visible, :root[data-theme] .about-btn[aria-pressed="true"], :root[data-theme] .theme-btn[aria-expanded="true"],
  :root[data-theme] .fly-btn[aria-pressed="true"], :root[data-theme] .about .tour[aria-pressed="true"] { background: var(--press); color: var(--pressc); border-color: var(--press); text-shadow: none; }
  :root[data-theme] .about .tour { border-radius: 0; }
  :root[data-theme] .about .tour:hover, :root[data-theme] .about .tour:focus-visible { background: var(--hover); }
  :root[data-theme] .about .tour[aria-pressed="true"] .h, :root[data-theme] .about .tour[aria-pressed="true"] .d { color: inherit; }
  :root[data-theme] .views button { background: var(--chip); color: var(--dim); backdrop-filter: none; -webkit-backdrop-filter: none; border-radius: 0; box-shadow: var(--edge, none); }
  :root[data-theme] .views button:hover, :root[data-theme] .views button:focus-visible { color: var(--text); background: var(--hover); }
  :root[data-theme] .views button[aria-pressed="true"] { background: var(--press); color: var(--pressc); border-color: var(--press); text-shadow: none; }
  :root[data-theme] .node-menu { background: var(--chip); backdrop-filter: none; -webkit-backdrop-filter: none; }
  :root[data-theme] .theme-menu { background: var(--chip); backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: var(--edge, none); }
  :root[data-theme] .theme-menu button { color: var(--dim); }
  :root[data-theme] .theme-menu button:hover, :root[data-theme] .theme-menu button:focus-visible { color: var(--text); background: var(--hover); }
  :root[data-theme] .theme-menu button[aria-checked="true"] { color: var(--head, var(--text)); }
  :root[data-theme] .theme-menu button[aria-checked="true"]::before { background: var(--head, var(--text)); border-radius: 0; }
  :root[data-theme] .nv-labels text { stroke: var(--lstroke, var(--chip)); stroke-width: 4px; }
  :root[data-theme] .nv-labels .t { fill: var(--label, var(--text)) !important; font-weight: 500; }
  :root[data-theme] .nv-labels .s { fill: var(--muted) !important; }
  :root[data-theme] .nv-labels .lead { stroke: var(--lead); }
  :root[data-theme] .nv-labels g:hover .lead { stroke: var(--text); }
  :root[data-theme] .nv-labels .dot { fill: var(--label, var(--text)) !important; }
  :root[data-theme] .nv-key b, :root[data-theme] .nv-feed .h, :root[data-theme] .about h1, :root[data-theme] .about h2, :root[data-theme] .nv-key h1, :root[data-theme] .about .tour .h { color: var(--head, var(--text)); font-weight: 500; text-shadow: var(--hts, var(--tts)); }
  :root[data-theme] .nv-feed button i { background: var(--feed, var(--text)) !important; border-radius: 0; }
  :root[data-theme] .loader svg { color: var(--text); }
  :root[data-theme] .loader .note { color: var(--muted); }
  :root[data-theme] .shot .shot-img { background: var(--bg); border-radius: 0; }
  :root[data-theme] .shot-acts button { border-radius: 0; }
  :root[data-theme] .rp-btn { border-radius: 0; background: var(--chip); color: var(--btn, var(--dim)); box-shadow: var(--edge, none); }
  :root[data-theme] .rp-btn:hover, :root[data-theme] .rp-btn:focus-visible { background: var(--press); color: var(--pressc); border-color: var(--press); text-shadow: none; }
  :root[data-theme] .rp-speed button[aria-pressed="true"] { color: var(--text); border-bottom-color: var(--text); }
  :root[data-theme] .rp-loader p { color: var(--muted); }

  :root[data-theme="printer"] { --spark: 46, 46, 49; --spark-hi: 10, 10, 12; --bg: #F6F5F1; --text: #0A0A0C; --muted: #77777B; --line: rgba(46, 46, 49, 0.32); --ink: #1F1F22; --dim: #2E2E31; --chip: rgba(246, 245, 241, 0.94);
    --tts: 0 0 0.6px rgba(10, 10, 12, 0.75); --press: #2E2E31; --lead: rgba(46, 46, 49, 0.55); --hover: rgba(46, 46, 49, 0.05);
    --cf: invert(1) grayscale(1) contrast(1.35); --cb: multiply; }
  :root[data-theme="printer"] #net-field-stage::after { background: repeating-linear-gradient(to bottom, rgba(246, 245, 241, 0) 0px, rgba(246, 245, 241, 0) 1px, rgba(246, 245, 241, 0.48) 1px, rgba(246, 245, 241, 0.48) 2px); }

  :root[data-theme="amber"] { --spark: 255, 181, 71; --spark-hi: 255, 197, 110; --bg: #050301; --text: #FFB547; --muted: #A86A1E; --line: rgba(255, 181, 71, 0.35); --ink: #FFC56E; --dim: #E89B35; --chip: rgba(20, 12, 3, 0.92);
    --tts: 0 0 4px rgba(255, 160, 40, 0.6); --edge: 0 0 0 1px rgba(255, 181, 71, 0.4); --btn: var(--text); --pressc: #140C03; --lstroke: #0A0602; --lead: rgba(255, 181, 71, 0.5);
    --hover: rgba(255, 181, 71, 0.08); --stage: radial-gradient(ellipse at center, #1A0F04 0%, #0A0602 70%); --cf: url(#tf-amber); --cb: screen; }
  :root[data-theme="amber"] #net-field-stage { border-radius: 22px; overflow: hidden; }
  :root[data-theme="amber"] #net-field-stage::after { border-radius: 22px; animation: amber-flicker 5s steps(1, end) infinite;
    background: repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0) 0px, rgba(0, 0, 0, 0) 2px, rgba(0, 0, 0, 0.32) 2px, rgba(0, 0, 0, 0.32) 3px), radial-gradient(ellipse at center, rgba(0, 0, 0, 0) 58%, rgba(0, 0, 0, 0.6) 100%); }
  @keyframes amber-flicker { 0%, 100% { opacity: 1; } 31% { opacity: .9; } 32% { opacity: 1; } 67% { opacity: .94; } 68% { opacity: 1; } }

  :root[data-theme="blueprint"] { --spark: 238, 244, 255; --spark-hi: 255, 255, 255; --bg: #144A86; --text: #EEF4FF; --muted: #9DB8DC; --line: rgba(238, 244, 255, 0.35); --ink: #FFFFFF; --dim: #CFDDF2; --chip: rgba(18, 66, 120, 0.94);
    --tts: 0 0 1.5px rgba(238, 244, 255, 0.45); --edge: 0 0 0 1px rgba(238, 244, 255, 0.45); --btn: var(--text); --lstroke: var(--bg); --lead: rgba(238, 244, 255, 0.6); --hover: rgba(238, 244, 255, 0.08);
    --cf: grayscale(1) contrast(1.15) brightness(1.15); --cb: screen; }
  :root[data-theme="blueprint"] #net-field-stage::before {
    background-image: linear-gradient(rgba(238, 244, 255, 0.13) 1px, transparent 1px), linear-gradient(90deg, rgba(238, 244, 255, 0.13) 1px, transparent 1px),
      linear-gradient(rgba(238, 244, 255, 0.055) 1px, transparent 1px), linear-gradient(90deg, rgba(238, 244, 255, 0.055) 1px, transparent 1px);
    background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px; background-position: -1px -1px; }
  :root[data-theme="blueprint"] #net-field-stage::after { inset: 14px; border: 1px solid rgba(238, 244, 255, 0.4); outline: 1px solid rgba(238, 244, 255, 0.18); outline-offset: 4px; }
  :root[data-theme="blueprint"] .about h1, :root[data-theme="blueprint"] .nv-key h1, :root[data-theme="blueprint"] .nv-feed .h { text-transform: uppercase; letter-spacing: 0.12em; }
  :root[data-theme="blueprint"] .nv-labels .lead { stroke-dasharray: 4 3; }
  :root[data-theme="blueprint"] .nv-labels .dot { fill: none !important; stroke: var(--text); stroke-width: 1px; }

  :root[data-theme="anaglyph"] { --spark: 242, 242, 242; --spark-hi: 255, 255, 255; --bg: #050505; --text: #F2F2F2; --muted: #9A9A9A; --line: rgba(242, 242, 242, 0.3); --ink: #FFFFFF; --dim: #D0D0D0; --chip: rgba(8, 8, 8, 0.9);
    --tts: -1.5px 0 rgba(255, 40, 40, 0.75), 1.5px 0 rgba(0, 230, 255, 0.75); --edge: -1.5px 0 0 0 rgba(255, 40, 40, 0.7), 1.5px 0 0 0 rgba(0, 230, 255, 0.7); --btn: var(--text);
    --lstroke: #050505; --lead: rgba(242, 242, 242, 0.45); --hover: rgba(242, 242, 242, 0.06); --cf: url(#tf-anaglyph); }
  :root[data-theme="anaglyph"] .nv-labels { filter: drop-shadow(-1.5px 0 rgba(255, 40, 40, 0.7)) drop-shadow(1.5px 0 rgba(0, 230, 255, 0.6)); }

  @media (prefers-reduced-motion: reduce) { :root[data-theme="amber"] #net-field-stage::after { animation: none; } }
