:root {
  /* Brand Sviluppatore Migliore: arancione + nero/bianco. Mai blu/azzurro. */
  --bg: #0a0a0b;
  --bg2: #0d0c0d;
  --panel: #111113;
  --panel2: #0d0d0f;
  --line: #2a2a30;
  --text: #f7f7f8;
  --muted: #a6a6af;
  --orange: #ff6a00;
  --orange-l: #ff9442;
  --orange-d: #c44e00;
  --ink: #1a0d00;        /* dark text on orange */
  --danger: #ff4545;
  --ok: #22c55e;
  --status-up: #25d366;
  --status-down: #ff4545;
  --status-unknown: #777782;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; overflow: hidden; overscroll-behavior: none; }
button { font-family: inherit; cursor: pointer; }
body {
  font-family: system-ui, "Segoe UI", Roboto, sans-serif;
  background: radial-gradient(1200px 800px at 70% -10%, rgba(255,106,0,.16) 0%, var(--bg) 55%);
  color: var(--text);
  overflow: hidden;
}
body.booting #login,
body.booting #app {
  display: none !important;
}
.hidden { display: none !important; }
input {
  font-family: inherit; width: 100%; padding: 13px 14px; border-radius: 11px;
  border: 1px solid var(--line); background: var(--panel2); color: var(--text);
  font-size: 16px; outline: none;
}
input:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255,106,0,.18); }
input:disabled { opacity: .68; cursor: not-allowed; }

.primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  width: 100%; padding: 13px; border: none; border-radius: 11px; margin-top: 12px;
  background: linear-gradient(135deg, var(--orange-l), var(--orange) 55%, var(--orange-d));
  color: #fff; font-weight: 800; font-size: 15px;
  transition: transform .08s, filter .15s; box-shadow: 0 6px 20px rgba(255,106,0,.3);
}
.primary:hover { filter: brightness(1.07); }
.primary:active { transform: translateY(1px); }
.primary:disabled { cursor: wait; filter: saturate(.9) brightness(.92); }
.btn-loader {
  display: none;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.42);
  border-top-color: #fff;
  animation: spin .7s linear infinite;
}
.primary.loading .btn-loader { display: inline-block; }
.btn-loader.inline { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.ghost {
  background: transparent; color: var(--muted); border: 1px solid var(--line);
  border-radius: 9px; padding: 9px 12px; margin-top: 10px; width: 100%; font-weight: 600;
}
.ghost:hover { color: var(--text); border-color: var(--orange); }
.ghost.sm { width: auto; padding: 5px 10px; margin: 0; font-size: 12px; }

/* ---------- LOGIN ---------- */
.screen { position: fixed; inset: 0; display: grid; place-items: center; }
.login-card {
  position: relative; z-index: 2; width: min(92vw, 400px);
  background: rgba(12,12,14,.88); backdrop-filter: blur(14px);
  border: 1px solid var(--line); border-radius: 20px; padding: 34px 30px;
  box-shadow: 0 30px 80px rgba(0,0,0,.7);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand h1 { margin: 0; font-size: 30px; letter-spacing: -.5px; }
.brand-orb, .logo-orb {
  width: 26px; height: 26px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #ffd2a3, var(--orange) 45%, var(--orange-d) 100%);
  box-shadow: 0 0 22px rgba(255,106,0,.7);
}
.sub { color: var(--muted); margin: 8px 0 24px; font-size: 14px; }
.step label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 7px; }
.hint { color: #85858f; font-size: 12px; margin-top: 12px; }
.msg { margin-top: 14px; font-size: 13px; min-height: 18px; }
.msg.err { color: var(--danger); }
.msg.ok { color: var(--ok); }
.code-input { letter-spacing: 12px; text-align: center; font-size: 26px; font-weight: 800; }
.login-stars {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background-image:
    radial-gradient(1px 1px at 20% 30%, #fff, transparent),
    radial-gradient(1px 1px at 80% 70%, #ffd2a3, transparent),
    radial-gradient(2px 2px at 50% 20%, #fff, transparent),
    radial-gradient(1px 1px at 65% 45%, #ffb878, transparent),
    radial-gradient(1px 1px at 35% 80%, #fff, transparent);
  opacity: .5;
}

/* ---------- APP ---------- */
#app { position: fixed; inset: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 16px; padding: 10px 16px;
  background: rgba(13,12,13,.72); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line); z-index: 20;
}
.logo { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 18px; }
.logo-orb { width: 18px; height: 18px; }
.views { display: flex; gap: 8px; }
.views button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  background: rgba(255,255,255,.035);
  color: var(--muted);
  border: 1px solid rgba(255,255,255,.075);
  border-radius: 9px;
  padding: 6px 9px 6px 11px;
  font-weight: 750;
  font-size: 13px;
  line-height: 1;
  transition: background .15s, border-color .15s, color .15s;
}
.views button i {
  width: 16px;
  color: #fff;
  font-size: 13px;
  text-align: center;
}
.views button:hover {
  color: var(--text);
  background: rgba(255,255,255,.065);
  border-color: rgba(255,255,255,.14);
}
.views button.active {
  color: #fff;
  background: rgba(255,106,0,.13);
  border-color: rgba(255,106,0,.38);
}
.app-search {
  position: relative;
  display: flex;
  align-items: center;
  flex: 0 1 280px;
  min-width: 190px;
  max-width: 320px;
  min-height: 34px;
  border: 1px solid rgba(255,255,255,.075);
  border-radius: 9px;
  background: rgba(255,255,255,.035);
  color: var(--muted);
}
.app-search > i {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: #fff;
  font-size: 12px;
  opacity: .82;
  pointer-events: none;
}
.app-search input {
  width: 100%;
  height: 32px;
  padding: 0 14px 0 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  outline: none;
  box-shadow: none;
}
.app-search input:focus {
  box-shadow: none;
}
.app-search input::-webkit-search-decoration,
.app-search input::-webkit-search-cancel-button,
.app-search input::-webkit-search-results-button,
.app-search input::-webkit-search-results-decoration {
  display: none;
  appearance: none;
  -webkit-appearance: none;
}
.app-search:focus-within {
  border-color: rgba(255,106,0,.52);
  box-shadow: 0 0 0 3px rgba(255,106,0,.14);
}
.app-search button {
  position: absolute;
  right: 5px;
  top: 50%;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 7px;
  background: rgba(255,255,255,.07);
  color: var(--muted);
  padding: 0;
}
.app-search button:hover {
  color: #fff;
  background: rgba(255,106,0,.2);
}
.app-total {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid rgba(255,255,255,.075);
  border-radius: 9px;
  background: rgba(255,255,255,.035);
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  font-family: inherit;
  cursor: default;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.app-total.editable { cursor: pointer; }
.app-total.editable:hover,
.app-total.editable:focus-visible { color: #fff; border-color: rgba(255,106,0,.52); background: rgba(255,106,0,.1); }
.app-total b {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(255,106,0,.18);
  color: var(--orange-l);
  font-size: 11px;
  font-weight: 900;
  border: 1px solid rgba(255,148,66,.34);
}
.hidden-apps-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 6px 9px;
  border: 1px solid rgba(255,255,255,.075);
  border-radius: 9px;
  background: rgba(255,255,255,.025);
  color: #a99f96;
  font-size: 13px;
  font-weight: 750;
  transition: background .15s, border-color .15s, color .15s;
}
.hidden-apps-toggle:hover {
  background: rgba(255,255,255,.055);
  border-color: rgba(255,255,255,.15);
  color: #f3eee8;
}
.hidden-apps-toggle.active {
  background: rgba(249,115,22,.1);
  border-color: rgba(249,115,22,.42);
  color: #fff;
}
.hidden-apps-toggle i { width: 15px; color: #f97316; text-align: center; }
.hidden-apps-toggle b {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(255,255,255,.07);
  color: #d9d1ca;
  font-size: 10px;
}
.spacer { flex: 1; }
.admin-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,106,0,.12);
  color: var(--orange-l);
  border: 1px solid rgba(255,106,0,.38);
  border-radius: 9px;
  padding: 7px 13px;
  font-weight: 750;
}
.admin-btn i { color: #fff; font-size: 13px; }
.admin-btn:hover,
.admin-btn.active { background: rgba(255,106,0,.22); border-color: rgba(255,106,0,.75); color: #fff; }
.who { position: relative; display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.who-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(255,106,0,.36);
  background: var(--panel);
  box-shadow: 0 0 14px rgba(255,106,0,.18);
}
.user-menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 3px 9px 3px 4px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
}
.user-menu-toggle:hover,
.user-menu-toggle[aria-expanded="true"] {
  border-color: rgba(255,106,0,.34);
  background: rgba(255,106,0,.08);
  color: #fff;
}
.user-menu-toggle i {
  font-size: 10px;
  opacity: .8;
}
#who-name {
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #e9ddd0;
  font-weight: 700;
}
.user-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 40;
  width: 230px;
  padding: 7px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px;
  background: rgba(18,14,12,.96);
  box-shadow: 0 20px 60px rgba(0,0,0,.55);
  backdrop-filter: blur(14px);
}
.user-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 38px;
  padding: 9px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #e9ddd0;
  font-weight: 750;
  text-align: left;
}
.user-menu button:hover {
  background: rgba(255,106,0,.12);
  color: #fff;
}
.user-menu button i {
  width: 16px;
  color: var(--orange-l);
  text-align: center;
}

#viewport { flex: 1; position: relative; }
#viewport::after {
  content: "";
  position: absolute;
  inset: 0 0 0 auto;
  width: min(430px, 27vw);
  border-left: 1px solid rgba(142,119,99, .22);
  pointer-events: none;
  opacity: 0;
}
#viewport canvas { display: block; }
.empty-state {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 7;
  display: grid;
  justify-items: center;
  gap: 8px;
  min-width: min(340px, calc(100vw - 48px));
  transform: translate(-50%, -50%);
  padding: 22px 24px;
  border: 1px solid rgba(255,106,0,.25);
  border-radius: 8px;
  background: rgba(18,14,12,.9);
  box-shadow: 0 22px 70px rgba(0,0,0,.48);
  color: var(--muted);
  text-align: center;
  pointer-events: none;
}
.empty-state i {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255,106,0,.14);
  color: var(--orange-l);
}
.empty-state strong {
  color: #fff;
  font-size: 18px;
}
.empty-state span {
  max-width: 100%;
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
}

.world-map {
  position: absolute;
  inset: 0;
  overflow: hidden;
  outline: none;
  background:
    radial-gradient(circle at 18% 18%, rgba(255,116,28,.2), transparent 25%),
    radial-gradient(circle at 82% 76%, rgba(255,90,0,.13), transparent 32%),
    linear-gradient(180deg, #160903 0%, #0f0603 52%, #080403 100%);
}
.world-ground {
  position: absolute;
  left: clamp(18px, 3vw, 54px);
  right: min(430px, 27vw);
  top: clamp(24px, 5vh, 54px);
  bottom: clamp(28px, 4vh, 42px);
  min-width: 360px;
  border: 0;
  border-radius: 0;
  background:
    radial-gradient(circle at 50% 42%, rgba(255,112,28,.08), transparent 55%),
    linear-gradient(160deg, rgba(35,15,8,.62), rgba(10,5,3,.3));
  background-size: auto;
  box-shadow: none;
}
.world-plane {
  position: absolute;
  inset: 0;
  transform-origin: 50% 50%;
  transition: transform .08s linear;
}
.world-ground::before {
  display: none;
}
.world-paths {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  z-index: 3;
  display: none;
}
.world-paths line {
  stroke: rgba(255,190,92,.88);
  stroke-width: 2.8;
  stroke-linecap: round;
  filter:
    drop-shadow(0 1px 0 rgba(35,13,3,.7))
    drop-shadow(0 0 8px rgba(255,106,0,.28));
}
.world-zones {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}
.world-zone {
  position: absolute;
  left: calc((var(--zx) - var(--zw) / 2) * 1%);
  top: calc((var(--zy) - var(--zh) / 2) * 1%);
  width: calc(var(--zw) * 1%);
  height: calc(var(--zh) * 1%);
  overflow: visible;
  border-radius: 16px;
}
.world-zone::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid color-mix(in srgb, var(--zone) 30%, transparent);
  background: color-mix(in srgb, var(--zone) 13%, rgba(10,6,4,.5));
  box-shadow: none;
}
.world-zone::after {
  display: none;
}
.world-zone-label {
  position: absolute;
  left: calc((var(--zx) - var(--zw) / 2) * 1% + 12px);
  top: calc((var(--zy) - var(--zh) / 2) * 1% + 8px);
  transform: none;
  z-index: 8;
  max-width: calc(var(--zw) * 1% - 18px);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: color-mix(in srgb, var(--zone, #ff7a1a) 72%, white 28%);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
  box-shadow: none;
  text-shadow: 0 2px 8px rgba(0,0,0,.85);
}
.world-nodes {
  position: absolute;
  inset: 0;
  z-index: 4;
}
.world-node {
  position: absolute;
  left: calc(var(--x) * 1%);
  top: calc(var(--y) * 1%);
  transform: translate(-50%, -50%);
  width: 76px;
  min-height: 64px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: center;
  z-index: 2;
  cursor: pointer;
  perspective: 220px;
}
.world-node-aura {
  position: absolute;
  left: 50%;
  top: 30px;
  width: 74px;
  height: 22px;
  transform: translateX(-50%) rotateX(58deg) scale(.72);
  border-radius: 50%;
  background: radial-gradient(ellipse, color-mix(in srgb, var(--node) 78%, white 10%) 0%, rgba(255,106,0,.28) 34%, transparent 72%);
  opacity: 0;
  filter: blur(1px);
  transition: opacity .18s, transform .18s, filter .18s;
  pointer-events: none;
}
.world-node-pad {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: 0 auto 5px;
  border-radius: 50%;
  border: 0;
  background:
    radial-gradient(circle at 30% 22%, rgba(255,255,255,.96) 0 8%, rgba(255,255,255,.42) 9% 18%, transparent 19%),
    radial-gradient(circle at 34% 30%, color-mix(in srgb, var(--node) 34%, #fff 66%) 0%, color-mix(in srgb, var(--node) 76%, #ff9a35 12%) 38%, color-mix(in srgb, var(--node) 78%, #050302 28%) 74%, #120804 100%);
  background-repeat: no-repeat;
  background-position: center center;
  background-size: 100% 100%;
  color: #fff;
  font-size: 16px;
  font-weight: 900;
  transform: translateZ(0) rotateX(0deg);
  transition: filter .18s, border-color .18s, box-shadow .18s;
  overflow: hidden;
  contain: paint;
  isolation: isolate;
  box-shadow:
    inset -12px -15px 20px rgba(0,0,0,.36),
    inset 9px 9px 15px rgba(255,255,255,.24),
    0 12px 20px rgba(0,0,0,.45);
}
.world-node-pad::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 31% 20%, rgba(255,255,255,.56), rgba(255,255,255,.2) 12%, transparent 23%),
    radial-gradient(circle at 70% 82%, rgba(0,0,0,.28), transparent 34%);
  pointer-events: none;
  z-index: 2;
}
.world-node-pad img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  filter: saturate(1.08) contrast(1.06);
  z-index: 1;
  transition: filter .18s, transform .18s;
}
.world-node-pad img + b { display: none; }
.world-node-pad.icon-ready b { display: none; }
.world-node-pad.icon-ready {
  background-repeat: no-repeat !important;
  background-position: center center !important;
  background-size: 100% 100% !important;
}
.world-node-pad.no-icon {
  border-color: color-mix(in srgb, var(--node) 58%, rgba(255,255,255,.18));
}
.world-node-pad.no-icon b { display: block; z-index: 1; text-shadow: 0 2px 6px rgba(0,0,0,.55); }
.world-node-title {
  display: block;
  max-width: 76px;
  border: 0;
  border-radius: 7px;
  padding: 2px 3px;
  background: transparent;
  color: #fff4e9;
  font-size: 9px;
  font-weight: 800;
  line-height: 1.12;
  overflow-wrap: anywhere;
  box-shadow: none;
  text-shadow: 0 2px 5px rgba(0,0,0,.98), 0 0 7px rgba(0,0,0,.8);
}
.world-node:hover .world-node-title,
.world-node.active .world-node-title {
  border-color: rgba(255,148,66,.85);
  color: var(--orange-l);
}
.world-node:hover .world-node-pad {
  transform: translateZ(0) rotateX(0deg);
  filter: brightness(1.08) saturate(1.12);
}
.world-node.active .world-node-pad {
  transform: translateZ(0) rotateX(0deg);
  box-shadow:
    inset -11px -14px 20px rgba(0,0,0,.32),
    inset 9px 9px 16px rgba(255,255,255,.28),
    0 13px 22px rgba(0,0,0,.52),
    0 0 28px rgba(255,106,0,.34);
}
.world-node:hover .world-node-pad img,
.world-node.active .world-node-pad img {
  transform: none;
  filter:
    saturate(1.18)
    contrast(1.08)
    drop-shadow(0 0 14px color-mix(in srgb, var(--node) 80%, white 8%));
}
.world-node.active .world-node-aura {
  opacity: 1;
  transform: translateX(-50%) rotateX(58deg) scale(1.35);
  filter: blur(0);
  animation: selectedAura 1.8s ease-in-out infinite;
}
@keyframes selectedAura { 0%, 100% { opacity: .72; } 50% { opacity: 1; } }
.world-player {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 96px;
  height: 134px;
  transform: translate(-50%, calc(-96% - var(--bob, 0px)));
  transition: left .18s ease, top .18s ease;
  z-index: 6;
  pointer-events: none;
  --facing: 1;
  --look: 0px;
}
.world-player.instant { transition: none; }
.world-player-shadow {
  position: absolute;
  left: 50%;
  bottom: -7px;
  width: 60px;
  height: 17px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0,0,0,.42), transparent 72%);
  filter: blur(2px);
}
.world-player-sprite {
  position: absolute;
  inset: 0;
  transform: scaleX(var(--facing));
  transform-origin: 50% 58%;
  filter: drop-shadow(0 7px 9px rgba(0,0,0,.62)) drop-shadow(0 0 14px rgba(255,106,0,.24));
}
.world-player-canvas {
  display: block;
  width: 100%;
  height: 100%;
}
.world-player-body {
  position: absolute;
  left: 19px;
  top: 47px;
  width: 34px;
  height: 34px;
  border-radius: 16px 16px 12px 12px;
  border: 2px solid rgba(40,34,28,.86);
  background:
    linear-gradient(90deg, #e22525 0 22%, transparent 23% 77%, #e22525 78% 100%),
    linear-gradient(180deg, #5a5148 0%, #3b3630 100%);
  box-shadow: 0 10px 20px rgba(0,0,0,.5), inset 0 7px 11px rgba(255,255,255,.14), 0 0 0 3px rgba(10,6,3,.38);
}
.world-player-head {
  position: absolute;
  left: 10px;
  top: 17px;
  width: 50px;
  height: 44px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 38% 27%, #fff0cf 0%, #ffbd85 45%, #c56e3a 100%);
  border: 0;
  box-shadow: 0 4px 10px rgba(0,0,0,.42), inset -5px -6px 10px rgba(87,34,10,.22);
  z-index: 4;
}
.world-player-cap {
  position: absolute;
  left: -3px;
  top: -14px;
  width: 56px;
  height: 25px;
  border-radius: 999px 999px 14px 14px;
  background:
    radial-gradient(circle at 34% 22%, rgba(255,255,255,.42), transparent 22%),
    linear-gradient(180deg, #ff5151, #db1616 72%, #a90d0d);
  box-shadow: inset 0 -4px 0 rgba(0,0,0,.16), 0 4px 8px rgba(0,0,0,.24);
  z-index: 7;
}
.world-player-cap::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 6px;
  bottom: -5px;
  height: 8px;
  border-radius: 0 0 18px 18px;
  background: linear-gradient(180deg, #f02c2c, #a60e0e);
}
.world-player-cap b {
  position: absolute;
  left: 50%;
  top: 7px;
  width: 17px;
  height: 12px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: rgba(255,255,255,.9);
  box-shadow: inset 0 -2px 0 rgba(0,0,0,.08);
}
.world-player-hair {
  position: absolute;
  top: 8px;
  width: 8px;
  height: 17px;
  border-radius: 999px;
  background: #5a240e;
  z-index: 3;
}
.world-player-hair.left { left: 1px; transform: rotate(18deg); }
.world-player-hair.right { right: 1px; transform: rotate(-18deg); }
.world-player-ear {
  position: absolute;
  top: 19px;
  width: 9px;
  height: 12px;
  border-radius: 50%;
  background: #e59662;
  z-index: -1;
}
.world-player-ear.left { left: -6px; }
.world-player-ear.right { right: -6px; }
.world-player-brow {
  position: absolute;
  top: 14px;
  width: 10px;
  height: 3px;
  border-radius: 999px;
  background: #5b3018;
  transition: transform .12s, top .12s;
}
.world-player-brow.left { left: 11px; transform: rotate(-15deg); }
.world-player-brow.right { right: 11px; transform: rotate(15deg); }
.world-player.walking .world-player-brow.left { transform: rotate(-24deg); top: 12px; }
.world-player.walking .world-player-brow.right { transform: rotate(24deg); top: 12px; }
.world-player-eye {
  position: absolute;
  top: 20px;
  width: 8px;
  height: 11px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 62% 26%, #fff 0 13%, transparent 15%),
    radial-gradient(circle at 50% 58%, #6b6157 0 46%, #2c2723 48% 70%, #120804 72%);
  transform: translateX(var(--look));
  transform-origin: 50% 50%;
  animation: friendlyBlink 5.5s infinite;
}
.world-player-eye.left { left: 12px; }
.world-player-eye.right { right: 12px; }
.world-player-cheek {
  position: absolute;
  top: 33px;
  width: 6px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255,111,85,.34);
}
.world-player-cheek.left { left: 6px; }
.world-player-cheek.right { right: 6px; }
.world-player-nose {
  position: absolute;
  left: 18px;
  top: 25px;
  width: 14px;
  height: 13px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 28%, #ffd5ad, #e9985d 78%);
  box-shadow: 0 1px 3px rgba(0,0,0,.24);
  z-index: 8;
}
.world-player-moustache {
  position: absolute;
  left: 50%;
  top: 35px;
  width: 34px;
  height: 10px;
  transform: translateX(-50%);
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 28% 50%, #16100d 0 48%, transparent 52%),
    radial-gradient(ellipse at 72% 50%, #16100d 0 48%, transparent 52%);
  filter: drop-shadow(0 1px 1px rgba(255,255,255,.14));
  z-index: 7;
}
.world-player-mouth {
  position: absolute;
  left: 50%;
  top: 43px;
  width: 18px;
  height: 8px;
  transform: translateX(-50%);
  border-bottom: 3px solid #8d1c1c;
  border-radius: 0 0 14px 14px;
  transition: height .12s, top .12s, border-width .12s;
}
.world-player.walking .world-player-mouth {
  top: 42px;
  height: 10px;
  border-bottom-width: 3px;
}
.world-player.idle .world-player-head { animation: idleNod 3.2s ease-in-out infinite; }
@keyframes friendlyBlink {
  0%, 92%, 100% { transform: translateX(var(--look)) scaleY(1); }
  94%, 96% { transform: translateX(var(--look)) scaleY(.16); }
}
@keyframes idleNod {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-1px) rotate(-1deg); }
}
.world-player-arm {
  position: absolute;
  top: 52px;
  width: 10px;
  height: 27px;
  border-radius: 999px;
  background: linear-gradient(180deg, #f12828 0 62%, #fff 63%);
  transform-origin: 50% 4px;
  box-shadow: 0 4px 10px rgba(0,0,0,.28);
}
.world-player-arm.left { left: 8px; transform: rotate(16deg); }
.world-player-arm.right { right: 8px; transform: rotate(-16deg); }
.world-player-leg {
  position: absolute;
  top: 78px;
  width: 12px;
  height: 18px;
  border-radius: 999px;
  background: #3b3630;
  transform-origin: 50% 2px;
}
.world-player-leg.left { left: 20px; }
.world-player-leg.right { right: 20px; }
.world-player-leg i {
  position: absolute;
  left: -4px;
  bottom: -3px;
  width: 20px;
  height: 8px;
  border-radius: 5px;
  background: #6f3617;
}
.world-player-button {
  position: absolute;
  top: 51px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ffd329;
  box-shadow: inset 0 -2px 0 rgba(0,0,0,.2), 0 1px 2px rgba(0,0,0,.3);
  z-index: 5;
}
.world-player-button.left { left: 24px; }
.world-player-button.right { right: 24px; }
.world-player.walking .world-player-arm.left,
.world-player.walking .world-player-leg.right { animation: walkA .34s ease-in-out infinite alternate; }
.world-player.walking .world-player-arm.right,
.world-player.walking .world-player-leg.left { animation: walkB .34s ease-in-out infinite alternate; }
@keyframes walkA { from { transform: rotate(24deg); } to { transform: rotate(-22deg); } }
@keyframes walkB { from { transform: rotate(-22deg); } to { transform: rotate(24deg); } }
.world-status {
  position: absolute;
  left: clamp(18px, 3vw, 46px);
  bottom: 22px;
  max-width: min(520px, 58vw);
  border: 1px solid rgba(255,106,0,.28);
  border-radius: 999px;
  padding: 8px 14px;
  background: rgba(12,8,5,.84);
  color: #f5dfc8;
  font-size: 13px;
  font-weight: 700;
  z-index: 6;
}

.hint-overlay {
  position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%);
  background: rgba(13,12,13,.82); border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 18px; font-size: 13px; color: var(--muted); z-index: 5; pointer-events: none;
  white-space: nowrap; max-width: 92vw;
  display: none;
}

.flight-hud {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  color: #f7fbff;
  text-shadow: 0 2px 14px rgba(0,0,0,.48);
}
.flight-hud section,
.flight-boost,
.flight-mode { pointer-events: auto; }
.flight-destination,
.flight-radar,
.flight-boost,
.flight-mode {
  position: absolute;
  border: 1px solid rgba(189,174,160,.66);
  background: linear-gradient(180deg, rgba(49,41,34,.72), rgba(21,17,14,.62));
  box-shadow: 0 20px 56px rgba(0,0,0,.44), inset 0 0 28px rgba(176,157,141,.16);
  backdrop-filter: blur(10px);
}
.flight-radar {
  right: 24px;
  top: 22px;
  width: 160px;
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  background:
    radial-gradient(circle, transparent 0 22%, rgba(184,168,154,.18) 23% 24%, transparent 25% 46%, rgba(184,168,154,.18) 47% 48%, transparent 49%),
    conic-gradient(from 22deg, rgba(179,161,146,.42), rgba(179,161,146,0) 34%, rgba(255,198,72,.2) 54%, rgba(179,161,146,0) 100%),
    rgba(23,19,16,.52);
}
.flight-radar::before,
.flight-radar::after {
  content: "";
  position: absolute;
  inset: 16px;
  border-radius: 50%;
  border: 1px solid rgba(205,193,182,.38);
}
.flight-radar::after {
  inset: 48%;
  width: 7px;
  height: 7px;
  margin: -3px 0 0 -3px;
  background: #fff;
  box-shadow: 30px -42px 0 #ffcb48, -42px -24px 0 #ff8a3d, 46px 30px 0 #ff9442, -22px 43px 0 #b3a79c;
}
.flight-radar div {
  position: absolute;
  inset: 50% 50% auto auto;
  width: 70px;
  height: 2px;
  transform-origin: left center;
  background: linear-gradient(90deg, rgba(193,179,166,.95), transparent);
  animation: radarSweep 3.6s linear infinite;
}
@keyframes radarSweep { to { transform: rotate(360deg); } }
.flight-destination {
  right: 24px;
  bottom: 22px;
  width: min(470px, 36vw);
  min-height: 330px;
  max-height: min(62vh, 470px);
  padding: 18px 18px 16px;
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
  overflow: hidden;
}
.flight-destination p {
  margin: 0 0 8px;
  color: rgba(232,226,221,.72);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .8px;
  text-transform: uppercase;
}
.flight-destination h3 {
  margin: 0;
  color: #fff;
  font-size: clamp(24px, 2.2vw, 32px);
  line-height: 1.05;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}
.flight-dest-row {
  display: grid;
  grid-template-columns: 66px 1fr;
  align-items: center;
  gap: 13px;
}
.flight-dest-row strong {
  display: grid;
  place-items: center;
  width: 66px;
  height: 66px;
  clip-path: polygon(25% 4%, 75% 4%, 100% 50%, 75% 96%, 25% 96%, 0 50%);
  background: linear-gradient(135deg, #ffdf62, #ff9a13 60%, #ff5b00);
  color: #fff;
  font-size: 28px;
  font-weight: 1000;
  box-shadow: 0 0 28px rgba(255,171,34,.62), inset 0 0 0 3px rgba(255,255,255,.24);
  overflow: hidden;
}
.flight-dest-row strong img {
  width: 64%;
  height: 64%;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.45));
}
.flight-destination span {
  display: block;
  min-height: 18px;
  margin-top: 6px;
  color: rgba(242,239,236,.72);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.flight-desc {
  margin-top: 12px;
  color: rgba(248,246,244,.88);
  font-size: 13px;
  line-height: 1.32;
}
.flight-destination ul {
  display: grid;
  gap: 7px;
  margin: 13px 0 0;
  padding: 0;
  list-style: none;
}
.flight-destination li {
  position: relative;
  padding-left: 15px;
  color: rgba(246,244,243,.84);
  font-size: 13px;
  line-height: 1.28;
}
.flight-destination li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .58em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #ff8a3d;
  box-shadow: 0 0 10px rgba(255,138,61,.8);
}
.flight-destination a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 15px;
  min-height: 46px;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 8px;
  background: linear-gradient(135deg, #ffd66b, #ff8a00 62%, #ff5b00);
  color: #171009;
  text-decoration: none;
  font-weight: 950;
  box-shadow: 0 12px 28px rgba(255,106,0,.34);
}
.flight-destination a.disabled { opacity: .45; pointer-events: none; }
.flight-boost {
  left: 24px;
  bottom: 88px;
  width: min(390px, 31vw);
  display: grid;
  grid-template-columns: 52px auto 1fr;
  gap: 13px;
  align-items: center;
  padding: 8px 12px 8px 8px;
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 50%, calc(100% - 18px) 100%, 0 100%);
}
.flight-boost strong {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  clip-path: polygon(25% 4%, 75% 4%, 100% 50%, 75% 96%, 25% 96%, 0 50%);
  background: linear-gradient(135deg, #c44e00, #ff9442);
  color: #fff;
  font-size: 20px;
  box-shadow: 0 0 24px rgba(255,148,66,.68);
}
.flight-boost b {
  color: #fff;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: .6px;
}
.flight-boost span {
  height: 18px;
  border-radius: 999px;
  background: rgba(0,0,0,.38);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
  overflow: hidden;
}
.flight-boost i {
  display: block;
  height: 100%;
  width: 74%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff7a1a, #ffb347, #ffdb62);
  box-shadow: 0 0 16px rgba(255,148,66,.62);
}
.flight-mode {
  left: 24px;
  bottom: 22px;
  display: flex;
  gap: 6px;
  padding: 5px;
  border-radius: 10px;
}
.flight-mode button {
  min-height: 38px;
  border: 0;
  border-radius: 7px;
  padding: 0 12px;
  background: transparent;
  color: rgba(243,240,238,.78);
  font-size: 12px;
  font-weight: 850;
}
.flight-mode button.active {
  background: rgba(255,200,66,.18);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255,200,66,.48);
}
.flight-route {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  display: flex;
  gap: 9px;
  pointer-events: none;
  padding: 10px 18px 26px;
  min-width: 330px;
  justify-content: center;
  background: linear-gradient(90deg, transparent, rgba(52,43,36,.5), transparent);
}
.flight-route::after {
  content: "CURRENT ROUTE";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4px;
  text-align: center;
  color: rgba(237,232,228,.68);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .6px;
}
.flight-route span {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2px solid rgba(200,187,175,.72);
  background: rgba(24,20,16,.5);
  box-shadow: 0 0 14px rgba(184,167,153,.28);
}
.flight-route span.active {
  border-color: #ffd66b;
  background: #ffd66b;
  box-shadow: 0 0 18px rgba(255,214,107,.76);
}

/* analog virtual joystick */
.joystick {
  position: absolute; left: 22px; bottom: 24px; z-index: 7;
  width: 128px; height: 128px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,106,0,.10), rgba(20,16,14,.55));
  border: 1px solid rgba(255,106,0,.4); backdrop-filter: blur(8px);
  touch-action: none; user-select: none; box-shadow: 0 8px 24px rgba(0,0,0,.5);
}
.joy-knob {
  position: absolute; left: 50%; top: 50%; width: 54px; height: 54px; margin: -27px 0 0 -27px;
  border-radius: 50%; background: linear-gradient(135deg, var(--orange-l), var(--orange-d));
  border: 2px solid rgba(255,255,255,.25); box-shadow: 0 4px 14px rgba(255,106,0,.45);
  transition: transform .04s linear;
}
@media (max-width: 640px) {
  .joystick { width: 140px; height: 140px; left: 16px; bottom: 86px; }
  .joy-knob { width: 60px; height: 60px; margin: -30px 0 0 -30px; }
  .hint-overlay:not(.hidden) { display: block; white-space: normal; width: 92%; text-align: center; bottom: 14px; font-size: 12px; }
  .flight-radar { right: 10px; top: 12px; width: 92px; }
  .flight-destination { left: 10px; right: 10px; bottom: 72px; width: auto; min-height: 0; max-height: 40vh; padding: 12px; }
  .flight-destination h3 { font-size: 22px; }
  .flight-desc { -webkit-line-clamp: 2; font-size: 12px; }
  .flight-destination ul { display: none; }
  .flight-destination a { min-height: 40px; margin-top: 10px; }
  .flight-boost { left: 10px; bottom: 18px; width: 180px; }
  .flight-mode { right: 10px; left: auto; bottom: 18px; }
  .flight-mode button { padding: 0 9px; font-size: 11px; }
  .flight-route { display: none; }
  .topbar { gap: 8px; padding: 8px 10px; flex-wrap: wrap; }
  .logo { font-size: 0; gap: 0; }
  .logo-orb { width: 26px; height: 26px; }
  .views { gap: 5px; }
  .views button { gap: 5px; padding: 6px 7px; font-size: 12px; min-height: 32px; }
  .views button > span { display: none; }
  .views button i { font-size: 12px; width: 13px; }
  .app-search {
    order: 2;
    flex: 1 0 100%;
    max-width: none;
    min-width: 0;
  }
  .app-total { gap: 5px; min-height: 32px; padding: 6px 7px; font-size: 0; }
  .app-total b { min-width: 20px; height: 18px; padding: 0 5px; font-size: 10px; }
  .admin-btn { padding: 6px 8px; }
  .admin-btn span { display: none; }
  .world-ground { left: 12px; right: 12px; top: 12px; bottom: 170px; min-width: 0; }
  .world-node { width: 44px; min-height: 52px; }
  .world-node-title {
    max-width: 44px;
    padding: 2px 3px;
    border-radius: 4px;
    font-size: 7px;
    line-height: 1.08;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
  .world-node-pad { width: 38px; height: 38px; margin-bottom: 4px; }
  .world-status { left: 14px; bottom: 18px; max-width: calc(100vw - 28px); }
}

/* ---------- APP DETAIL ---------- */
body.app-detail-open #viewport,
body.app-detail-open .hint-overlay,
body.app-detail-open .joystick,
body.app-detail-open .empty-state,
body.app-detail-open .info-panel { display: none !important; }

.app-detail-view {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  background:
    radial-gradient(900px 520px at 82% -8%, color-mix(in srgb, var(--app-accent) 16%, transparent), transparent 64%),
    linear-gradient(180deg, #0d0c0d 0%, #080809 100%);
  animation: detailReveal .28s ease both;
}
@keyframes detailReveal { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.app-detail-accent { position: absolute; inset: 0 0 auto; height: 2px; pointer-events: none; }
.app-detail-header {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 68px;
  padding: 0 clamp(24px, 5vw, 76px);
  border-bottom: 1px solid rgba(255,255,255,.07);
  background: rgba(10,10,11,.84);
  backdrop-filter: blur(20px);
}
.app-detail-back,
.app-detail-launch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: auto;
  min-height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #c9c9cf;
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
  transition: color .16s ease, background .16s ease, transform .16s ease;
}
.app-detail-back:hover { color: #fff; background: rgba(255,255,255,.05); transform: translateX(-2px); }
.app-detail-launch { color: #fff; background: color-mix(in srgb, var(--app-accent) 18%, rgba(255,255,255,.035)); }
.app-detail-launch:hover { background: color-mix(in srgb, var(--app-accent) 30%, rgba(255,255,255,.04)); transform: translateY(-1px); }
.app-detail-content { width: min(1180px, calc(100% - 48px)); margin: 0 auto; padding: clamp(46px, 7vw, 90px) 0 100px; }
.app-detail-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: clamp(26px, 4vw, 54px);
  padding-bottom: clamp(48px, 7vw, 88px);
  animation: detailHero .42s .05s ease both;
}
@keyframes detailHero { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.app-detail-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: clamp(92px, 10vw, 132px);
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--app-accent) 38%, rgba(255,255,255,.08));
  border-radius: 28%;
  background: color-mix(in srgb, var(--app-accent) 10%, #0d0d0f);
  box-shadow: 0 26px 70px rgba(0,0,0,.38), inset 0 1px 0 rgba(255,255,255,.08);
}
.app-detail-icon b { color: var(--app-accent); font-size: clamp(38px, 5vw, 58px); }
.app-detail-icon img { position: absolute; inset: 14%; width: 72%; height: 72%; object-fit: contain; opacity: 0; transition: opacity .2s ease, transform .25s ease; }
.app-detail-icon img.ready { opacity: 1; }
.app-detail-icon:hover img.ready { transform: scale(1.06); }
.app-detail-heading { max-width: 820px; }
.app-detail-meta { display: flex; flex-wrap: wrap; gap: 10px 18px; margin: 2px 0 18px; color: #94949e; font-size: 11px; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.app-detail-meta span + span { position: relative; }
.app-detail-meta span + span::before { content: ""; position: absolute; left: -10px; top: 50%; width: 3px; height: 3px; border-radius: 50%; background: var(--app-accent); }
.app-detail-heading h1 { margin: 0; max-width: 900px; color: #fff; font-size: clamp(42px, 7vw, 84px); line-height: .98; letter-spacing: -.055em; }
.app-detail-heading > p { max-width: 760px; margin: 24px 0 0; color: #c8c8ce; font-size: clamp(17px, 2vw, 22px); line-height: 1.55; }
.app-detail-host { display: block; margin-top: 22px; color: var(--app-accent); font: 700 12px/1.4 ui-monospace, SFMono-Regular, Consolas, monospace; }
/* tab bar */
.app-detail-tabs {
  position: sticky;
  top: 68px;
  z-index: 3;
  display: flex;
  gap: 6px;
  margin: 0 0 clamp(34px, 5vw, 52px);
  padding: 6px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  background: rgba(11,11,13,.94);
  backdrop-filter: blur(18px);
  overflow-x: auto;
  scrollbar-width: none;
}
.app-detail-tabs::-webkit-scrollbar { display: none; }
.app-detail-tab {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex: 0 0 auto;
  width: auto;
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #9a9aa4;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .01em;
  white-space: nowrap;
  transition: color .16s ease, background .16s ease;
}
.app-detail-tab i { font-size: 12px; opacity: .8; }
.app-detail-tab b {
  min-width: 20px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(255,255,255,.07);
  color: #adadb5;
  font: 800 10px/1.4 ui-monospace, SFMono-Regular, Consolas, monospace;
  text-align: center;
}
.app-detail-tab b:empty { display: none; }
.app-detail-tab:hover { color: #f4f4f6; background: rgba(255,255,255,.045); }
.app-detail-tab.active { color: #fff; background: color-mix(in srgb, var(--app-accent) 22%, rgba(255,255,255,.05)); }
.app-detail-tab.active i { opacity: 1; color: var(--app-accent); }
.app-detail-tab.active b { background: color-mix(in srgb, var(--app-accent) 34%, rgba(0,0,0,.35)); color: #fff; }
.app-detail-panel { animation: detailPanel .26s ease both; }
@keyframes detailPanel { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.app-detail-section-heading { display: grid; grid-template-columns: 34px 1fr; gap: 16px; align-items: start; margin-bottom: 34px; }
.app-detail-section-heading > span { padding-top: 5px; color: var(--app-accent); font: 850 11px/1 ui-monospace, monospace; }
.app-detail-section-heading h2 { margin: 0; color: #f7f7f8; font-size: clamp(24px, 3vw, 34px); letter-spacing: -.025em; }
.app-detail-section-heading p { margin: 7px 0 0; color: #8f8f99; font-size: 13px; line-height: 1.5; }
.app-detail-functions ol { margin: 0; padding: 0; list-style: none; counter-reset: functions; max-width: 860px; }
.app-detail-functions li { counter-increment: functions; position: relative; min-height: 54px; padding: 15px 0 15px 48px; border-bottom: 1px solid rgba(255,255,255,.075); color: #e5e5e8; font-size: 15px; line-height: 1.5; }
.app-detail-functions li::before { content: counter(functions, decimal-leading-zero); position: absolute; left: 0; top: 18px; color: color-mix(in srgb, var(--app-accent) 76%, #fff); font: 800 10px/1 ui-monospace, monospace; }
.app-detail-technologies .technology-group { grid-template-columns: 100px minmax(0, 1fr); }
.app-detail-technologies .technology-item { background: transparent; border-color: rgba(255,255,255,.1); }

/* release cards */
.app-detail-release-list { display: grid; gap: 18px; max-width: 900px; }
.detail-release-card {
  padding: clamp(22px, 3vw, 30px);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.012));
  animation: releaseReveal .35s ease both;
}
.detail-release-card:nth-child(2) { animation-delay: .05s; }
.detail-release-card:nth-child(3) { animation-delay: .1s; }
.detail-release-card.latest { border-color: color-mix(in srgb, var(--app-accent) 46%, transparent); background: linear-gradient(180deg, color-mix(in srgb, var(--app-accent) 11%, transparent), rgba(255,255,255,.012)); }
@keyframes releaseReveal { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.detail-release-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.detail-release-version { padding: 4px 10px; border: 1px solid color-mix(in srgb, var(--app-accent) 40%, transparent); border-radius: 8px; color: #fff; font: 850 12px/1.3 ui-monospace, SFMono-Regular, Consolas, monospace; }
.detail-release-card.latest .detail-release-version { background: color-mix(in srgb, var(--app-accent) 26%, transparent); }
.detail-release-head time { color: #8f8f99; font-size: 12px; }
.detail-release-flag { margin-left: auto; padding: 3px 9px; border-radius: 999px; background: color-mix(in srgb, var(--app-accent) 24%, transparent); color: var(--app-accent); font-size: 10px; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.detail-release-title { margin: 16px 0 0; color: #f7f7f8; font-size: clamp(19px, 2.4vw, 25px); line-height: 1.25; letter-spacing: -.02em; }
.detail-release-areas { display: grid; grid-template-columns: 1fr; gap: 20px; margin-top: 22px; }
.detail-release-area { padding: 16px 18px; border: 1px solid rgba(255,255,255,.07); border-left: 3px solid color-mix(in srgb, var(--app-accent) 70%, transparent); border-radius: 12px; background: rgba(0,0,0,.24); }
.detail-release-area h4 { margin: 0 0 10px; color: #dedee3; font-size: 12px; font-weight: 850; letter-spacing: .07em; text-transform: uppercase; }
.detail-release-area ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 9px; }
.detail-release-area li { position: relative; padding-left: 20px; color: #b8b8c0; font-size: 14px; line-height: 1.55; }
.detail-release-area li::before { content: ""; position: absolute; left: 3px; top: .58em; width: 7px; height: 7px; border-radius: 50%; background: var(--app-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--app-accent) 18%, transparent); }
.app-detail-loading,
.app-detail-empty { padding: 30px 0; color: #94949e; }
.app-detail-loading { display: flex; align-items: center; gap: 12px; }
.app-detail-empty i { color: var(--app-accent); font-size: 22px; }
.app-detail-empty h3 { margin: 12px 0 6px; color: #eeeeef; }
.app-detail-empty p { margin: 0; }

@media (max-width: 760px) {
  .app-detail-header { padding: 0 14px; }
  .app-detail-launch span { display: none; }
  .app-detail-content { width: min(100% - 30px, 1180px); padding-top: 36px; }
  .app-detail-hero { grid-template-columns: 72px minmax(0, 1fr); gap: 18px; padding-bottom: 48px; }
  .app-detail-icon { width: 72px; border-radius: 20px; }
  .app-detail-heading h1 { font-size: clamp(34px, 11vw, 52px); }
  .app-detail-heading > p { grid-column: 1 / -1; font-size: 16px; }
  .app-detail-tabs { top: 60px; margin-left: -2px; margin-right: -2px; }
  .app-detail-tab { padding: 0 12px; font-size: 12px; }
  .detail-release-card { padding: 18px; }
  .detail-release-flag { margin-left: 0; }
}

/* Scrollbar applicativa: sottile, arancione, senza frecce. */
* { scrollbar-width: thin; scrollbar-color: rgba(255,106,0,.45) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,106,0,.35); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,106,0,.6); }
::-webkit-scrollbar-button { display: none; height: 0; width: 0; }

/* Contatore monete del Mondo */
.world-coins {
  position: absolute; top: 16px; left: 16px; z-index: 4;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; border-radius: 999px;
  background: rgba(20,12,6,.72); border: 2px solid #ffc21a;
  color: #fff; font-weight: 900; font-size: 16px; letter-spacing: .5px;
  box-shadow: 0 6px 18px rgba(0,0,0,.3); pointer-events: none;
}
.world-coins i { color: #ffc21a; }
.world-coins.pulse { animation: coinPulse .35s ease; }
@keyframes coinPulse { 40% { transform: scale(1.18); } }

/* info panel */
.info-panel {
  position: absolute; top: 56px; right: 0; height: calc(100% - 56px); width: min(92vw, 420px);
  background: linear-gradient(180deg, rgba(14,14,16,.99), rgba(7,7,9,.995));
  backdrop-filter: blur(24px) saturate(.72);
  border-left: 2px solid #2b2b31; padding: 58px 22px 18px; overflow-y: auto; z-index: 8;
  box-shadow: -30px 0 78px rgba(0,0,0,.7), inset 1px 0 0 rgba(255,180,120,.08); animation: slideIn .22s ease;
  transition: width .2s ease, padding .2s ease, transform .2s ease;
}
@keyframes slideIn { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.info-toggle {
  position: absolute;
  top: 12px;
  left: 12px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.04);
  color: #c8c8ce;
  font-size: 22px;
  line-height: 1;
  padding: 0;
  z-index: 2;
}
.info-toggle i {
  display: block;
  width: 1em;
  height: 1em;
  line-height: 1;
  font-size: 14px;
}
.info-toggle:hover { border-color: rgba(249,115,22,.5); color: #fff; background: rgba(249,115,22,.08); }
.info-close {
  position: absolute; top: 12px; right: 14px; background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.06); color: var(--muted); font-size: 16px; width: 32px; height: 32px; padding: 0;
  border-radius: 10px;
}
.info-close:hover { color: #fff; border-color: rgba(255,128,43,.3); background: rgba(255,128,43,.08); }
.info-panel.collapsed {
  width: 58px;
  padding: 0;
  overflow: hidden;
}
.info-panel.collapsed > :not(.info-toggle) {
  opacity: 0;
  pointer-events: none;
}
.info-panel.collapsed .info-toggle {
  left: 13px;
  top: 13px;
}
.info-accent { position: absolute; top: 0; left: 0; width: 3px; height: 100%; opacity: 1; pointer-events: none; z-index: 0; }
.info-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  margin: 0 0 10px;
}
.info-icon {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255,106,0,.22);
  border-radius: 12px;
  background: rgba(255,106,0,.06);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.045);
  overflow: hidden;
}
.info-icon b { color: #f97316; font-size: 24px; font-weight: 850; }
.info-icon img {
  position: absolute;
  inset: 8px;
  width: calc(100% - 16px);
  height: calc(100% - 16px);
  object-fit: contain;
  opacity: 0;
  transition: opacity .15s ease;
}
.info-icon img.ready { opacity: 1; }
.info-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
}
.info-slug { font-size: 12px; color: #a2a2ab; font-family: ui-monospace, monospace; background: transparent; padding: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.info-panel h2 { margin: 0 0 6px; font-size: 26px; letter-spacing: -.5px; line-height: 1.08; color: #f4f4f6; }
.info-desc { margin: 0; color: #cacad0; line-height: 1.45; font-size: 14px; }
.info-section {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,.09);
}
.info-h3 { font-size: 11px; text-transform: uppercase; letter-spacing: 1.2px; color: #f97316; margin: 0 0 8px; }
.info-panel ul { padding-left: 0; line-height: 1.4; list-style: none; margin: 0; }
.info-panel li { position: relative; padding-left: 16px; margin-bottom: 5px; color: #dddde2; font-size: 13.5px; }
.info-panel li::before { content: ""; position: absolute; left: 2px; top: .6em; width: 5px; height: 5px; border-radius: 50%; background: #f97316; }
.info-tech-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.technology-groups.compact { display: flex; flex-wrap: wrap; gap: 5px; }
.technology-groups.compact .technology-item { min-height: 0; padding: 3px 8px; border-radius: 6px; font-size: 11px; cursor: default; }
.info-panel .metadata-updated { margin-top: 8px; }
.info-panel .info-docs { margin-top: 10px; padding-top: 8px; }
.info-tech-heading .info-h3 { margin: 0; }
.info-tech-summary { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 7px; }
.technology-total { color: #a2a2ab; font-size: 10px; font-weight: 750; white-space: nowrap; }
.metadata-state {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 8px;
  border: 1px solid rgba(255,106,0,.3);
  border-radius: 999px;
  color: #ffab5e;
  background: rgba(255,106,0,.08);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.metadata-state.inferred { color: var(--orange-l); border-color: rgba(255,148,66,.3); background: rgba(255,106,0,.08); }
.technology-groups { display: grid; gap: 14px; }
.technology-group { display: grid; grid-template-columns: 82px minmax(0,1fr); align-items: start; gap: 10px; }
.technology-category { padding-top: 6px; color: #8d8d97; font-size: 10px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.technology-list { display: flex; flex-wrap: wrap; gap: 6px; }
.technology-item {
  display: inline-grid;
  gap: 2px;
  min-height: 27px;
  padding: 5px 9px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 7px;
  color: #dfdfe4;
  background: rgba(255,255,255,.035);
  font-size: 11px;
  font-weight: 720;
}
.technology-item strong { font: inherit; }
.technology-item small { color: #94949e; font-size: 9px; font-weight: 650; line-height: 1.25; }
.technology-missing { margin: 0; color: #8f8f99; font-size: 12px; line-height: 1.5; }
.metadata-updated { margin: 15px 0 0; color: #85858f; font-family: ui-monospace, monospace; font-size: 10px; }
.info-docs { display: grid; gap: 7px; margin-top: 18px; padding-top: 15px; border-top: 1px dashed rgba(255,255,255,.09); }
.info-docs > span { color: #8d8d97; font-size: 10px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.info-docs a { display: flex; align-items: center; gap: 8px; color: var(--orange-l); font-size: 11px; text-decoration: none; }
.info-docs a:hover { color: #fff; }
.info-docs i { color: #f97316; }
.badge { display: inline-flex; align-items: center; font-size: 11px; font-weight: 850; text-transform: uppercase; letter-spacing: .5px; padding: 5px 11px; border-radius: 999px; border: 1px solid rgba(255,255,255,.07); }
.info-panel .badge.live { display: none; }
.badge.live { background: rgba(255,106,0,.18); color: var(--orange-l); }
.badge.wip { background: rgba(255,170,80,.16); color: #ffb061; }
.badge.planned { background: rgba(182,165,150,.16); color: var(--muted); }
.info-link {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  background: rgba(255,255,255,.035);
  color: #fff;
  text-decoration: none;
  padding: 9px 12px;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 12px;
  font-weight: 850;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
  transition: transform .12s, border-color .15s, box-shadow .15s, background .15s;
}
.info-link::after { content: "\203A"; color: #f97316; font-size: 27px; font-weight: 500; line-height: 1; }
.info-link:hover {
  transform: translateY(-2px);
  border-color: rgba(249,115,22,.48);
  background: rgba(249,115,22,.065);
  box-shadow: 0 14px 34px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.05);
}
.info-link-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  color: #f97316;
  background: rgba(255,255,255,.045);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}
.info-link-copy { min-width: 0; display: grid; gap: 2px; }
.info-link-label { font-size: 16px; line-height: 1.05; letter-spacing: 0; }
.info-host { font-size: 11px; font-weight: 650; color: #a99f96; font-family: ui-monospace, monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.info-nolink { margin-top: 14px; padding: 10px 14px; border: 1px dashed var(--line); border-radius: 13px; color: var(--muted); font-size: 14px; text-align: center; }

/* ---------- ADMIN ---------- */
body.admin-open #viewport,
body.admin-open #app-detail,
body.admin-open .hint-overlay,
body.admin-open .joystick,
body.admin-open .info-panel {
  display: none !important;
}

.modal {
  position: relative;
  flex: 1;
  min-height: 0;
  background:
    radial-gradient(circle at 16% 0%, rgba(255,106,0,.12), transparent 32%),
    linear-gradient(180deg, var(--bg2), var(--bg));
  display: flex;
  z-index: 6;
}
.modal-card {
  width: 100%;
  height: 100%;
  max-height: none;
  background: transparent;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: none;
}
.modal-head { display: flex; align-items: center; gap: 16px; padding: 14px 20px; border-bottom: 1px solid var(--line); background: rgba(8,8,10,.84); }
.modal-head h2 { margin: 0; font-size: 20px; }
.tabs { display: flex; gap: 6px; }
.tabs button { background: transparent; color: var(--muted); border: 1px solid transparent; border-radius: 8px; padding: 6px 14px; font-weight: 700; }
.tabs button.active { color: var(--orange); background: rgba(255,106,0,.12); border-color: rgba(255,106,0,.4); }
.modal-head .ghost { width: auto; margin: 0; margin-left: auto; }
.tab {
  padding: 22px clamp(16px, 4vw, 44px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,106,0,.45) transparent;
}
.tab::-webkit-scrollbar { width: 8px; height: 0; }
.tab::-webkit-scrollbar-track { background: transparent; }
.tab::-webkit-scrollbar-thumb { background: rgba(255,106,0,.35); border-radius: 999px; }

/* ---------- DASHBOARD ---------- */
.dashboard-tab {
  --dashboard-accent: #ff7a1a;
  padding-bottom: 52px;
  background:
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 44px 44px;
}
.dashboard-loading,
.dashboard-empty {
  min-height: 220px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 12px;
  color: #81818b;
  font-size: 13px;
}
.dashboard-loader {
  width: 30px;
  height: 30px;
  border: 2px solid rgba(255,122,26,.2);
  border-top-color: var(--dashboard-accent);
  border-radius: 50%;
  animation: dashboardSpin .8s linear infinite;
}
.dashboard-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 12px 0 24px;
  border-bottom: 1px solid rgba(255,255,255,.09);
  animation: dashboardRise .5s cubic-bezier(.2,.8,.2,1) both;
}
.dashboard-kicker,
.dashboard-plot header span {
  color: var(--dashboard-accent);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .15em;
  text-transform: uppercase;
}
.dashboard-heading h3 {
  margin: 6px 0 5px;
  color: #fff;
  font-size: clamp(25px, 3vw, 42px);
  line-height: 1;
  letter-spacing: -.035em;
}
.dashboard-heading p,
.dashboard-heading time { margin: 0; color: #878790; font-size: 12px; }
.dashboard-heading time { flex: 0 0 auto; padding-bottom: 4px; text-transform: capitalize; }
.dashboard-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid rgba(255,255,255,.09);
}
.dashboard-kpis > div {
  position: relative;
  display: grid;
  gap: 3px;
  min-height: 132px;
  align-content: center;
  padding: 20px clamp(12px, 2vw, 28px);
  border-right: 1px solid rgba(255,255,255,.09);
  animation: dashboardRise .52s cubic-bezier(.2,.8,.2,1) both;
}
.dashboard-kpis > div:first-child { padding-left: 0; }
.dashboard-kpis > div:last-child { border-right: 0; }
.dashboard-kpis > div:nth-child(2) { animation-delay: 70ms; }
.dashboard-kpis > div:nth-child(3) { animation-delay: 140ms; }
.dashboard-kpis > div:nth-child(4) { animation-delay: 210ms; }
.dashboard-kpis span { color: #8d8d96; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.dashboard-kpis strong { color: #fff; font-size: clamp(30px, 4vw, 52px); font-weight: 800; line-height: 1; letter-spacing: -.05em; }
.dashboard-kpis small { color: #696972; font-size: 11px; }
.dashboard-plot {
  min-width: 0;
  padding: 28px 0 8px;
  border-bottom: 1px solid rgba(255,255,255,.09);
  animation: dashboardRise .55s .16s cubic-bezier(.2,.8,.2,1) both;
}
.dashboard-plot > header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.dashboard-plot header h4 { margin: 4px 0 0; color: #f5f5f7; font-size: 17px; letter-spacing: -.01em; }
.dashboard-plot > header > b {
  padding: 5px 8px;
  border: 1px solid rgba(255,122,26,.24);
  border-radius: 999px;
  color: #b8b0a9;
  background: rgba(255,122,26,.055);
  font-size: 9px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.dashboard-chart-grid { display: grid; grid-template-columns: minmax(300px, .72fr) minmax(480px, 1.28fr); gap: clamp(28px, 4vw, 64px); }
.dashboard-chart-grid .dashboard-plot { animation-delay: .26s; }
.release-chart { display: block; width: 100%; height: auto; overflow: visible; }
.chart-grid line { stroke: rgba(255,255,255,.065); stroke-width: 1; stroke-dasharray: 3 7; }
.chart-axis text { fill: #66666f; font-size: 9px; font-family: inherit; text-transform: uppercase; }
.chart-area { opacity: 0; animation: dashboardArea .8s .4s ease-out forwards; }
.chart-line,
.chart-glow,
.app-trend path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1600;
  stroke-dashoffset: 1600;
  animation: dashboardDraw 1.35s .24s cubic-bezier(.22,.75,.2,1) forwards;
}
.chart-glow { stroke: rgba(255,122,26,.3); stroke-width: 9; filter: url(#dashboard-glow); }
.chart-line { stroke: #ff8a32; stroke-width: 3; }
.chart-points circle {
  fill: #08080a;
  stroke: #ff9a4c;
  stroke-width: 2;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation: dashboardPoint .35s 1.1s ease-out forwards;
}
.chart-points circle:hover,
.app-trend circle:hover { r: 5; }
.release-bars { display: grid; gap: 12px; padding: 7px 0 24px; max-height: 300px; overflow-y: auto; scrollbar-width: thin; }
.release-bar-label { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 5px; color: #cfcfd4; font-size: 11px; }
.release-bar-label span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.release-bar-label b { color: #fff; font-size: 11px; }
.release-bar-track { height: 4px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.065); }
.release-bar-track span {
  display: block;
  width: var(--bar-size);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, color-mix(in srgb, var(--bar-color) 55%, #ff7a1a), var(--bar-color));
  box-shadow: 0 0 14px color-mix(in srgb, var(--bar-color) 35%, transparent);
  transform: scaleX(0);
  transform-origin: left;
  animation: dashboardBar .8s calc(.35s + var(--bar-delay)) cubic-bezier(.2,.8,.2,1) forwards;
}
.trend-legend { display: flex; flex-wrap: wrap; gap: 7px 15px; min-height: 20px; margin-bottom: 2px; }
.trend-legend span { display: inline-flex; align-items: center; gap: 6px; color: #9898a1; font-size: 9px; }
.trend-legend i { width: 13px; height: 2px; border-radius: 2px; background: var(--series-color); box-shadow: 0 0 7px color-mix(in srgb, var(--series-color) 48%, transparent); }
.app-trend path { stroke: var(--series-color); stroke-width: 2.25; animation-delay: calc(.28s + var(--series-delay)); }
.app-trend circle { fill: #0a0a0c; stroke: var(--series-color); stroke-width: 1.5; opacity: 0; animation: dashboardArea .35s calc(1s + var(--series-delay)) ease-out forwards; }
@keyframes dashboardSpin { to { transform: rotate(360deg); } }
@keyframes dashboardRise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes dashboardDraw { to { stroke-dashoffset: 0; } }
@keyframes dashboardArea { to { opacity: 1; } }
@keyframes dashboardPoint { from { opacity: 0; transform: scale(.35); } to { opacity: 1; transform: scale(1); } }
@keyframes dashboardBar { to { transform: scaleX(1); } }
@media (max-width: 1100px) {
  .dashboard-chart-grid { grid-template-columns: 1fr; gap: 0; }
}
@media (max-width: 700px) {
  .dashboard-tab { padding-inline: 16px; }
  .dashboard-heading { align-items: start; }
  .dashboard-heading time { display: none; }
  .dashboard-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-kpis > div { min-height: 104px; padding: 16px 14px; border-bottom: 1px solid rgba(255,255,255,.09); }
  .dashboard-kpis > div:first-child { padding-left: 0; }
  .dashboard-kpis > div:nth-child(2) { border-right: 0; }
  .dashboard-kpis > div:nth-child(3),
  .dashboard-kpis > div:nth-child(4) { border-bottom: 0; }
  .dashboard-kpis > div:nth-child(3) { padding-left: 0; }
  .release-chart { min-width: 620px; }
  .dashboard-plot-primary,
  .dashboard-plot-trends { overflow-x: auto; scrollbar-width: thin; }
  .dashboard-plot > header { position: sticky; left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .dashboard-loader,
  .dashboard-heading,
  .dashboard-kpis > div,
  .dashboard-plot,
  .chart-area,
  .chart-line,
  .chart-glow,
  .chart-points circle,
  .release-bar-track span,
  .app-trend path,
  .app-trend circle { animation: none !important; opacity: 1; transform: none; stroke-dashoffset: 0; }
}

.admin-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
.admin-section-head h3, .editor h3 { margin: 0 0 4px; font-size: 18px; }
.admin-section-head p { margin: 0; color: var(--muted); font-size: 13px; }
.admin-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  flex-wrap: wrap;
}
.table-shell {
  overflow: visible;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(255,106,0,.025), rgba(255,255,255,.01) 18%, rgba(0,0,0,.08));
  box-shadow: 0 24px 70px rgba(0,0,0,.26), inset 0 1px 0 rgba(255,255,255,.025);
}

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:not(.admin-area-row) { transition: background-color .15s ease; }
tbody tr:not(.admin-area-row):hover { background: linear-gradient(90deg, rgba(255,106,0,.07), rgba(255,255,255,.022) 42%, transparent); }
.admin-app-row td:first-child { box-shadow: inset 2px 0 transparent; transition: box-shadow .15s ease; }
.admin-app-row:hover td:first-child { box-shadow: inset 2px 0 var(--orange); }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .4px; }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; min-width: 0; flex-wrap: wrap; }
.app-url-cell { max-width: 330px; }
.app-url-cell a {
  display: block;
  color: #ffb16f;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
  overflow-wrap: anywhere;
  text-decoration: none;
}
.app-url-cell a:hover { color: #fff; text-decoration: underline; }
.availability-cell { width: 112px; text-align: center; }
.availability-status {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid color-mix(in srgb, currentColor 28%, transparent);
  border-radius: 50%;
  background: color-mix(in srgb, currentColor 9%, #080809);
  color: var(--status-unknown);
  font-size: 11px;
  box-shadow: inset 0 0 0 4px rgba(255,255,255,.018);
}
.availability-status.online { color: var(--status-up); box-shadow: 0 0 18px rgba(37,211,102,.22), inset 0 0 0 4px rgba(37,211,102,.04); }
.availability-status.offline { color: var(--status-down); box-shadow: 0 0 18px rgba(255,69,69,.2), inset 0 0 0 4px rgba(255,69,69,.04); }
.availability-status.online::after,
.availability-status.offline::after {
  content: "";
  position: absolute;
  inset: -1px;
  border: 1px solid currentColor;
  border-radius: inherit;
  opacity: 0;
  animation: availabilityPulse 2.4s ease-out infinite;
}
@keyframes availabilityPulse {
  0% { transform: scale(.72); opacity: .42; }
  72%, 100% { transform: scale(1.42); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .availability-status::after { animation: none !important; }
}
.btn-sm { padding: 5px 10px; border-radius: 7px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font-weight: 600; font-size: 12px; }
.btn-sm:hover { border-color: var(--orange); }
.btn-sm.danger:hover { border-color: var(--danger); color: var(--danger); }
.btn-sm.refresh-icons {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  padding: 7px 12px;
  color: #f7e7d8;
  background: rgba(255,255,255,.035);
}
.btn-sm.refresh-icons i { color: #fff; font-size: 12px; }
.btn-sm.add-group {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  color: #ffc48a;
  border-color: rgba(255,122,26,.32);
  background: rgba(255,122,26,.08);
}
.btn-sm.add-group:hover { color: #fff; border-color: rgba(255,122,26,.72); background: rgba(255,122,26,.16); }
.btn-add { background: linear-gradient(135deg, var(--orange-l), var(--orange-d)); color: #fff; border: none; padding: 8px 16px; border-radius: 9px; font-weight: 800; margin-bottom: 14px; }
.admin-actions .btn-add { margin-bottom: 0; }
.admin-area-row td {
  padding: 10px 13px 8px;
  border-top: 1px solid color-mix(in srgb, var(--area-color) 44%, transparent);
  border-bottom-color: color-mix(in srgb, var(--area-color) 24%, transparent);
  background: linear-gradient(90deg, color-mix(in srgb, var(--area-color) 15%, transparent), transparent 42%);
}
.admin-area-row:first-child td { border-top: 0; }
.admin-area-row td span { color: #fff; font-size: 12px; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; }
.admin-area-row td b {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 20px;
  margin-left: 9px;
  padding: 0 6px;
  border-radius: 999px;
  color: color-mix(in srgb, var(--area-color) 72%, white 28%);
  background: color-mix(in srgb, var(--area-color) 14%, transparent);
  font-size: 11px;
}
.admin-area-row td em {
  float: right;
  color: color-mix(in srgb, var(--area-color) 70%, white 30%);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  opacity: 0;
  transition: opacity .15s ease;
}
.admin-app-group { transition: filter .15s ease; }
.admin-app-group.drop-target .admin-area-row td {
  background: linear-gradient(90deg, color-mix(in srgb, var(--area-color) 34%, transparent), color-mix(in srgb, var(--area-color) 10%, transparent));
  box-shadow: inset 3px 0 var(--area-color);
}
.admin-app-group.drop-target .admin-area-row td em { opacity: 1; }
.admin-app-group.drop-target .admin-app-row td,
.admin-app-group.drop-target .admin-empty-group-row td { background: color-mix(in srgb, var(--area-color) 7%, transparent); }
.admin-app-row.dragging { opacity: .38; }
.admin-app-row[draggable="true"] { cursor: pointer; }
.admin-app-row:focus-visible { outline: 2px solid var(--orange); outline-offset: -2px; }
.admin-drag-handle {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 30px;
  margin-left: -5px;
  color: #777781;
  cursor: grab;
  touch-action: none;
}
.admin-drag-handle:hover { color: var(--area-color, var(--orange)); }
.admin-drag-handle:active { cursor: grabbing; }
.admin-empty-group-row td {
  height: 48px;
  color: #707079;
  font-size: 12px;
  text-align: center;
  border-bottom: 1px dashed color-mix(in srgb, var(--area-color) 22%, transparent);
}
.group-editor-card { border-color: rgba(255,122,26,.34); background: linear-gradient(145deg, rgba(255,122,26,.07), rgba(255,255,255,.018)); }
.admin-app-identity { display: inline-flex; align-items: center; gap: 9px; min-width: 0; }
.admin-app-favicon {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: none;
}
.admin-app-favicon img { width: 21px; height: 21px; object-fit: contain; opacity: 0; transition: opacity .15s ease; }
.admin-app-favicon img.ready { opacity: 1; }
.admin-app-favicon b { position: absolute; color: var(--app-color); font-size: 12px; }
.admin-app-favicon img.ready + b { display: none; }
.content-count, .technology-count { display: block; white-space: nowrap; }
.technology-count { margin-top: 4px; color: #92929c; font-size: 11px; }
.technology-count i { margin-right: 4px; color: #ff8a3d; }
.admin-icon-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  transition: background-color .15s, border-color .15s, color .15s;
}
.admin-icon-action.edit { color: #ff9d4d; border-color: rgba(255,157,77,.2); background: rgba(255,106,0,.055); }
.admin-icon-action.edit:hover { color: #ffc08a; border-color: rgba(255,157,77,.52); background: rgba(255,106,0,.12); }
.admin-icon-action.delete { color: #ff6258; border-color: rgba(255,98,88,.18); background: rgba(255,70,58,.045); }
.admin-icon-action.delete:hover { color: #ff918a; border-color: rgba(255,98,88,.5); background: rgba(255,70,58,.11); }
.admin-icon-action i { width: 13px; text-align: center; }
.app-releases-cell { min-width: 150px; }
.app-releases-cell > span,
.app-releases-cell > strong,
.app-releases-cell > time { display: block; }
.release-total { color: #e1e1e5; font-size: 12px; font-weight: 800; }
.release-total i { margin-right: 4px; color: #ff8a3d; }
.app-releases-cell > strong { margin-top: 4px; color: #fff; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; }
.app-releases-cell > time { margin-top: 2px; color: #92929c; font-size: 11px; }
.release-missing { color: #ff9b75; font-size: 11px; font-weight: 800; white-space: nowrap; }
.release-missing i { margin-right: 4px; color: #ff6c3f; }
.app-release-viewer {
  margin-top: 18px;
  padding: 20px;
  border: 1px solid rgba(255,122,26,.3);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(17,17,19,.97), rgba(8,8,10,.99));
  box-shadow: 0 18px 50px rgba(0,0,0,.28);
}
.app-release-viewer > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding-bottom: 16px; border-bottom: 1px solid rgba(255,138,61,.14); }
.app-release-viewer > header h3 { margin: 4px 0; font-size: 22px; }
.app-release-viewer > header p { margin: 0; color: #92929c; font-size: 13px; }
.release-protocol-version { color: #ff8a3d; font-size: 10px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.app-release-history { display: grid; gap: 14px; margin-top: 16px; }
.app-release-entry { padding: 16px; border: 1px solid rgba(255,255,255,.075); border-radius: 12px; background: rgba(255,255,255,.025); }
.app-release-heading { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 4px 12px; }
.release-version-label { width: max-content; padding: 4px 8px; border-radius: 6px; color: #111113; background: #ff8a3d; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; font-weight: 900; }
.app-release-heading time { color: #92929c; font-size: 12px; }
.app-release-heading h4 { grid-column: 1 / -1; margin: 5px 0 0; color: #fff; font-size: 17px; }
.app-release-areas { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; margin-top: 14px; }
.app-release-areas section { padding: 12px 14px; border-left: 2px solid #ff7a1a; border-radius: 0 8px 8px 0; background: rgba(255,122,26,.055); }
.app-release-areas h5 { margin: 0 0 8px; color: #ffb477; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.app-release-areas ul { display: grid; gap: 6px; margin: 0; padding-left: 18px; color: #c8c8ce; font-size: 12px; line-height: 1.45; }
.release-empty-state { padding: 34px 20px; text-align: center; }
.release-empty-state > i { color: #ff794f; font-size: 24px; }
.release-empty-state h4 { margin: 10px 0 5px; color: #fff; }
.release-empty-state p { margin: 0; color: #92929c; }

.editor { display: grid; gap: 12px; }
.editor .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.editor .grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.editor label { font-size: 12px; color: var(--muted); display: block; margin-bottom: 5px; }
.editor textarea { width: 100%; min-height: 90px; padding: 11px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel2); color: var(--text); font-family: inherit; font-size: 14px; resize: vertical; }
.editor select { width: 100%; padding: 11px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel2); color: var(--text); font-size: 14px; }
.editor select option { background: var(--panel2); color: var(--text); }
.editor-actions { display: flex; gap: 10px; margin-top: 6px; }
.editor-actions .primary, .editor-actions .ghost { width: auto; margin: 0; }
.swatch { width: 18px; height: 18px; border-radius: 5px; display: inline-block; vertical-align: middle; margin-right: 7px; border: 1px solid rgba(255,255,255,.2); }
.segmented {
  display: inline-grid;
  grid-auto-flow: column;
  width: max-content;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel2);
  gap: 2px;
}
.segmented button {
  border: 0;
  border-radius: 7px;
  padding: 6px 11px;
  min-width: 62px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.segmented button:hover { color: var(--text); }
.btn-sm:disabled,
.segmented button:disabled {
  opacity: .45;
  cursor: not-allowed;
  color: var(--muted);
  border-color: var(--line);
}
.segmented button:disabled:hover { color: var(--muted); }
.segmented button.active {
  background: rgba(255,106,0,.18);
  color: var(--orange-l);
  box-shadow: inset 0 0 0 1px rgba(255,106,0,.35);
}
.role-control { white-space: nowrap; }

.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  padding: 11px 18px; font-size: 14px; z-index: 200; box-shadow: 0 12px 40px rgba(0,0,0,.6);
}
.toast.ok { border-color: rgba(255,138,30,.55); }
.toast.err { border-color: rgba(255,90,77,.55); }

/* ---------- APP TOOLTIP + CONFIRM ---------- */
.app-tooltip {
  position: fixed;
  z-index: 320;
  width: max-content;
  max-width: min(280px, calc(100vw - 20px));
  padding: 7px 10px;
  border: 1px solid rgba(255,138,61,.28);
  border-radius: 8px;
  color: #f8eee5;
  background: rgba(24,18,15,.98);
  box-shadow: 0 12px 32px rgba(0,0,0,.5), inset 0 1px rgba(255,255,255,.04);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
  text-align: center;
  pointer-events: none;
  animation: app-tooltip-in .12s ease-out;
}
.app-tooltip[hidden] { display: none; }

.app-confirm {
  width: min(430px, calc(100vw - 32px));
  margin: auto;
  padding: 24px;
  border: 1px solid rgba(255,106,0,.32);
  border-radius: 16px;
  color: var(--text);
  background:
    radial-gradient(circle at 88% 0%, rgba(255,106,0,.16), transparent 38%),
    rgba(19,15,13,.99);
  box-shadow: 0 28px 90px rgba(0,0,0,.72), inset 0 1px rgba(255,255,255,.05);
  animation: app-confirm-in .18s ease-out;
}
.app-confirm::backdrop {
  background: rgba(0,0,0,.66);
  backdrop-filter: blur(7px);
  animation: app-confirm-backdrop-in .18s ease-out;
}
.app-confirm-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 18px;
  border: 1px solid rgba(255,90,77,.28);
  border-radius: 12px;
  color: #ff746a;
  background: rgba(255,90,77,.1);
}
.app-confirm-copy > span {
  color: var(--orange-l);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.app-confirm-copy h2 { margin: 6px 0 8px; font-size: 21px; letter-spacing: -.02em; }
.app-confirm-copy p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.app-confirm-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 24px; }
.app-confirm-actions .ghost,
.app-confirm-primary {
  width: auto;
  min-height: 38px;
  margin: 0;
  padding: 8px 14px;
  border-radius: 9px;
  font-weight: 800;
}
.app-confirm-primary {
  border: 1px solid rgba(255,90,77,.48);
  color: #fff;
  background: linear-gradient(135deg, #f45e52, #bf3028);
  box-shadow: 0 7px 20px rgba(190,48,40,.24);
}
.app-confirm-primary:hover { filter: brightness(1.08); }
.app-confirm button:focus-visible { outline: 2px solid var(--orange-l); outline-offset: 2px; }

@keyframes app-tooltip-in { from { opacity: 0; transform: translateY(3px) scale(.98); } }
@keyframes app-confirm-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }
@keyframes app-confirm-backdrop-in { from { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .app-tooltip,
  .app-confirm,
  .app-confirm::backdrop { animation: none; }
}

.release-notes {
  position: fixed;
  inset: 0;
  z-index: 180;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0,0,0,.58);
  backdrop-filter: blur(6px);
}
.release-card {
  width: min(620px, 100%);
  max-height: min(720px, calc(100vh - 48px));
  overflow: auto;
  border: 1px solid rgba(255,106,0,.24);
  border-radius: 12px;
  background:
    radial-gradient(circle at 85% 0%, rgba(255,106,0,.18), transparent 34%),
    rgba(18,14,12,.98);
  box-shadow: 0 30px 90px rgba(0,0,0,.64);
}
.release-card header {
  position: sticky;
  top: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px 14px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: rgba(18,14,12,.96);
  backdrop-filter: blur(10px);
}
.release-kicker {
  display: block;
  margin-bottom: 4px;
  color: var(--orange-l);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.release-card h2 {
  margin: 0;
  color: #fff;
  font-size: 25px;
  line-height: 1.08;
}
.icon-close {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 9px;
  background: rgba(255,255,255,.04);
  color: var(--muted);
}
.icon-close:hover {
  border-color: rgba(255,106,0,.55);
  color: #fff;
}
.release-list {
  display: grid;
  padding: 8px 24px 24px;
}
.release-entry {
  display: grid;
  gap: 8px;
  padding: 18px 0;
  border-bottom: 1px solid rgba(255,255,255,.075);
}
.release-entry:last-child { border-bottom: 0; }
.release-version {
  width: max-content;
  padding: 3px 8px;
  border: 1px solid rgba(255,106,0,.26);
  border-radius: 999px;
  background: rgba(255,106,0,.1);
  color: var(--orange-l);
  font: 800 11px ui-monospace, SFMono-Regular, Consolas, monospace;
}
.release-entry h3 {
  margin: 0;
  color: #fff7ef;
  font-size: 17px;
}
.release-entry ul {
  margin: 0;
  padding: 0;
  list-style: none;
  color: #d9cabb;
  line-height: 1.5;
}
.release-entry li {
  position: relative;
  padding-left: 18px;
  margin: 7px 0;
}
.release-entry li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: .72em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--orange-l);
}

@media (max-width: 640px) {
  .hidden-apps-toggle span { display: none; }
  .hidden-apps-toggle { gap: 5px; padding-inline: 8px; }
  .editor .grid2, .editor .grid3 { grid-template-columns: 1fr; }
  #who-name { display: none; }
  .hint-overlay { white-space: normal; width: 90%; text-align: center; }
  .admin-section-head { flex-direction: column; }
  .modal-head { flex-wrap: wrap; }
  .modal-head h2 { order: 1; flex: 1 1 auto; }
  .modal-head .ghost { order: 2; margin-left: auto; }
  .modal-head .tabs { order: 3; width: 100%; overflow-x: auto; scrollbar-width: none; }
  .modal-head .tabs::-webkit-scrollbar { display: none; }
  .user-menu { right: -6px; }
  .release-notes { padding: 12px; }
  .release-card { max-height: calc(100vh - 24px); }
  .release-card header,
  .release-list { padding-left: 18px; padding-right: 18px; }
}

@media (max-width: 900px) {
  .info-panel {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 38%;
    border-left: 0;
    border-top: 2px solid #3a2f26;
    padding: 18px 20px 22px;
  }
  .info-panel .info-accent { width: 100%; height: 3px; }
  .info-panel h2 { font-size: 24px; }
  .info-identity { min-height: 44px; margin-bottom: 12px; }
  .info-icon { flex-basis: 44px; width: 44px; height: 44px; border-radius: 12px; }
  .info-desc { font-size: 14px; line-height: 1.45; }
  .info-section:not(.info-tech-section) { display: none; }
  .info-tech-section { margin-top: 16px; padding-top: 14px; }
  .technology-group { grid-template-columns: 66px minmax(0,1fr); gap: 7px; }
  .info-link { margin-top: 14px; }
  .world-ground { right: 16px; bottom: 42%; min-width: 0; }
  .world-status { bottom: calc(38% + 12px); }
  .info-panel.collapsed {
    height: 58px;
    width: 58px;
    top: auto;
    left: auto;
    bottom: 14px;
    right: 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
  }
  .modal-head { padding: 12px 16px; }
  .modal-head h2 { font-size: 18px; }
  .tab { padding: 18px 16px 28px; }
  .table-shell { border: 0; background: transparent; }
  .tab table, .tab thead, .tab tbody, .tab tr, .tab th, .tab td { display: block; width: 100%; }
  .tab thead { display: none; }
  .tab tr {
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(255,255,255,.025);
    padding: 10px 12px;
    margin-bottom: 10px;
  }
  .tab td {
    display: grid;
    grid-template-columns: minmax(86px, 32%) 1fr;
    gap: 10px;
    align-items: center;
    border: 0;
    padding: 7px 0;
    min-width: 0;
  }
  .tab td::before {
    color: var(--muted);
    content: "";
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .4px;
    text-transform: uppercase;
  }
  #tab-users td:nth-child(1)::before { content: "Nome"; }
  #tab-users td:nth-child(2)::before { content: "Cognome"; }
  #tab-users td:nth-child(3)::before { content: "Email"; }
  #tab-users td:nth-child(4)::before { content: "Ruolo"; }
  #tab-users td:nth-child(5)::before { content: "Stato"; }
  #tab-users td:nth-child(6)::before { content: "Ultimo accesso"; }
  #tab-users td:nth-child(7) { display: flex; justify-content: flex-start; padding-top: 10px; }
  #tab-users td:nth-child(7)::before { display: none; }
  #tab-users .badge,
  #tab-users .role-control {
    justify-self: start;
  }
  #tab-apps td:nth-child(1)::before { content: "App"; }
  #tab-apps td:nth-child(2)::before { content: "Disponibilità"; }
  #tab-apps td:nth-child(3)::before { content: "Slug"; }
  #tab-apps td:nth-child(4)::before { content: "URL"; }
  #tab-apps td:nth-child(5)::before { content: "Rilasci"; }
  #tab-apps td:nth-child(6)::before { content: "Contenuto"; }
  #tab-apps td:nth-child(7) { display: flex; justify-content: flex-start; padding-top: 10px; }
  #tab-apps td:nth-child(7)::before { display: none; }
  .row-actions { justify-content: flex-start; }
}

/* ============ FLIGHT HUD (brand orange, AAA layout) ============ */
.fh-sys, .fh-dest, .fh-ship, .fh-throttle, .fh-keys, .fh-radar { position: absolute; pointer-events: none; }
.fh-dest, .fh-radar, .flight-mode { pointer-events: auto; }
.fh-panel, .fh-sys, .fh-dest, .fh-ship, .fh-radar {
  background: linear-gradient(180deg, rgba(26,12,4,.72), rgba(8,5,3,.66));
  border: 1px solid rgba(255,138,40,.5);
  box-shadow: 0 18px 50px rgba(0,0,0,.5), inset 0 0 26px rgba(255,106,0,.1);
  backdrop-filter: blur(10px);
  border-radius: 14px;
}
/* system header */
.fh-sys { top: 18px; left: 18px; display: flex; gap: 12px; align-items: center; padding: 12px 16px; }
.fh-eye { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; color: #ff6a00; background: rgba(255,106,0,.14); border: 1px solid rgba(255,106,0,.5); }
.fh-sys p { margin: 0; font-size: 10px; letter-spacing: 2px; color: var(--orange-l); }
.fh-sys h4 { margin: 1px 0 0; font-size: 15px; letter-spacing: .5px; }
.fh-sys small { color: var(--muted); font-size: 10px; letter-spacing: 1px; }
/* destination */
.fh-dest { top: 18px; right: 18px; width: min(330px, 36vw); padding: 16px 18px; }
.fh-k { margin: 0 0 6px; font-size: 10px; letter-spacing: 2px; color: var(--orange-l); }
.fh-dest-row { display: flex; align-items: center; gap: 10px; }
.fh-dest-row strong { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; background: rgba(255,106,0,.16); border: 1px solid rgba(255,106,0,.5); overflow: hidden; }
.fh-dest-row strong img { width: 100%; height: 100%; object-fit: cover; }
.fh-dest h3 { margin: 0; font-size: 24px; letter-spacing: .3px; }
.fh-dest [data-host] { display: block; margin: 6px 0 8px; font-size: 12px; color: var(--muted); font-family: ui-monospace, monospace; }
.fh-desc { font-size: 13px; line-height: 1.5; color: #e9d8c8; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.fh-dest ul { list-style: none; margin: 10px 0 0; padding: 0; }
.fh-dest li { position: relative; padding-left: 18px; margin-bottom: 5px; font-size: 12.5px; color: #e9d8c8; }
.fh-dest li::before { content: "▸"; position: absolute; left: 0; color: var(--orange); font-weight: 900; }
.fh-dest a { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 14px; padding: 11px; border-radius: 11px; text-decoration: none; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--orange-l), var(--orange-d)); box-shadow: 0 8px 22px rgba(255,106,0,.32); }
.fh-dest a.disabled { opacity: .4; pointer-events: none; filter: grayscale(.5); }
/* ship status (bottom-left) */
.fh-ship { left: 18px; bottom: 20px; width: 220px; padding: 14px 16px; display: grid; gap: 9px; }
.fh-bar { display: grid; grid-template-columns: 48px 1fr 38px; align-items: center; gap: 8px; font-size: 10px; letter-spacing: 1px; color: var(--muted); }
.fh-bar span { height: 7px; border-radius: 4px; background: rgba(255,255,255,.1); overflow: hidden; }
.fh-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--orange), var(--orange-l)); border-radius: 4px; }
.fh-bar.warn i { background: linear-gradient(90deg, #ffb347, #ff6a00); }
.fh-bar b { text-align: right; color: #fff; font-size: 11px; font-family: ui-monospace, monospace; }
/* throttle dial (bottom-center) */
.fh-throttle { left: 50%; bottom: 18px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 4px; }
.fh-dial { position: relative; width: 132px; height: 132px; }
.fh-dial svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.fh-dial .trk { fill: none; stroke: rgba(255,255,255,.12); stroke-width: 8; }
.fh-dial .arc { fill: none; stroke: url(#fhg); stroke: var(--orange); stroke-width: 8; stroke-linecap: round; transition: stroke-dashoffset .1s linear; filter: drop-shadow(0 0 6px rgba(255,106,0,.6)); }
.fh-dial-c { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.fh-dial-c p { margin: 0; font-size: 9px; letter-spacing: 2px; color: var(--orange-l); }
.fh-dial-c strong { font-size: 26px; font-family: ui-monospace, monospace; }
.fh-vel { text-align: center; }
.fh-vel span { font-size: 22px; font-weight: 800; font-family: ui-monospace, monospace; color: #fff; }
.fh-vel small { display: block; font-size: 9px; letter-spacing: 2px; color: var(--muted); }
/* control hints */
.fh-keys { left: 50%; top: 78px; transform: translateX(-50%); display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; max-width: 56vw; font-size: 11px; color: var(--muted); background: rgba(10,6,3,.55); border: 1px solid rgba(255,138,40,.32); border-radius: 999px; padding: 7px 16px; backdrop-filter: blur(8px); }
.fh-keys span { display: inline-flex; align-items: center; gap: 5px; }
.fh-keys kbd { font-family: ui-monospace, monospace; font-size: 10px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,138,40,.45); border-radius: 5px; padding: 2px 6px; color: #fff; }
/* radar (bottom-right) */
.fh-radar { right: 18px; bottom: 20px; padding: 12px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.fh-radar canvas { width: 150px; height: 150px; }
.flight-mode { position: static; display: flex; gap: 6px; background: none; border: none; box-shadow: none; backdrop-filter: none; }
.flight-mode button { background: rgba(255,106,0,.12); color: var(--orange-l); border: 1px solid rgba(255,106,0,.45); border-radius: 8px; padding: 5px 12px; font-weight: 700; font-size: 12px; }
.flight-mode button.active { background: linear-gradient(135deg, var(--orange-l), var(--orange-d)); color: #fff; }
@media (max-width: 760px) {
  .fh-sys { padding: 8px 10px; } .fh-sys h4 { font-size: 13px; } .fh-sys small { display: none; }
  .fh-dest { top: auto; bottom: 188px; left: 12px; right: 12px; width: auto; max-height: 34vh; overflow: auto; padding: 12px; }
  .fh-dest ul { display: none; } .fh-dest h3 { font-size: 20px; }
  .fh-ship { display: none; }
  .fh-keys { display: none; }
  .fh-throttle { bottom: 12px; left: 14px; transform: none; }
  .fh-dial { width: 104px; height: 104px; } .fh-dial-c strong { font-size: 21px; }
  .fh-radar { right: 12px; bottom: 12px; padding: 8px; } .fh-radar canvas { width: 110px; height: 110px; }
}
