:root {
  --bg: #000000;
  --card: #0f1113;
  --card-hi: #191c1f;
  --ink: #f4f6f5;
  --soft: rgba(244, 246, 245, 0.5);
  --line: rgba(255, 255, 255, 0.09);
  --accent: #5ef0b4;
  --on: 0; /* 0 off, 1 protected: the script moves it */
  --mx: 50%;
  --my: 0%;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Mona Sans Variable", "Mona Sans", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.stage {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  padding: 12px 16px;
}

.vp {
  position: relative;
  width: min(312px, 100%);
  padding: 16px 16px 14px;
  border-radius: 30px;
  background: linear-gradient(180deg, var(--card-hi), var(--card));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    0 0 0 1px var(--line),
    0 40px 80px -36px color-mix(in srgb, var(--accent) calc(var(--on) * 46%), transparent),
    0 30px 60px -30px rgba(0, 0, 0, 0.9);
  overflow: hidden;
  isolation: isolate;
}
/* a soft light that follows the pointer across the card */
.vp__sheen {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(220px circle at var(--mx) var(--my), rgba(255, 255, 255, 0.07), transparent 70%);
  pointer-events: none;
}

.vp__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.vp__brand { font-size: 14px; font-weight: 660; font-stretch: 108%; letter-spacing: -0.005em; }
.vp__status {
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  overflow: hidden;
  font-size: 11.500px;
  line-height: 24px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: color-mix(in srgb, var(--accent) calc(var(--on) * 100%), var(--soft));
  background: color-mix(in srgb, var(--accent) calc(var(--on) * 14%), rgba(255, 255, 255, 0.06));
}
.vp__status span { display: block; white-space: nowrap; }

.vp__dial {
  position: relative;
  width: min(176px, 40vh);
  aspect-ratio: 1;
  margin: 12px auto 8px;
  display: grid;
  place-items: center;
}
.vp__halo {
  position: absolute;
  inset: -14%;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 42%, transparent) 0%, color-mix(in srgb, var(--accent) 12%, transparent) 42%, transparent 68%);
  opacity: 0;
  pointer-events: none;
}
.vp__ring { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.vp__track { fill: none; stroke: rgba(255, 255, 255, 0.07); stroke-width: 5; }
.vp__ticks line { stroke: rgba(255, 255, 255, 0.16); stroke-width: 1; stroke-linecap: round; }
.vp__ticks line.is-lit { stroke: var(--accent); }
.vp__arc { fill: none; stroke: var(--accent); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; opacity: 0; }
.vp__arc--glow { stroke-width: 7; }
.vp__comet { fill: none; stroke: #ffffff; stroke-width: 5; stroke-linecap: round; stroke-dasharray: 0.07 0.93; opacity: 0; }
.vp__comet--glow { stroke: var(--accent); stroke-width: 9; }

.vp__key {
  position: relative;
  width: 66%;
  aspect-ratio: 1;
  border: 0;
  border-radius: 50%;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.vp__key-face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(120% 120% at 32% 18%, rgba(255, 255, 255, 0.16), transparent 46%),
    linear-gradient(180deg, color-mix(in srgb, var(--accent) calc(var(--on) * 22%), #2a2e32), color-mix(in srgb, var(--accent) calc(var(--on) * 9%), #15181a));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 -10px 18px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.07),
    0 14px 26px -10px rgba(0, 0, 0, 0.9),
    0 0 34px -4px color-mix(in srgb, var(--accent) calc(var(--on) * 55%), transparent);
}
.vp__key-face svg { width: 34%; height: 34%; overflow: visible; }
.vp__power-arc, .vp__power-bar {
  fill: none;
  stroke: color-mix(in srgb, var(--accent) calc(var(--on) * 100%), rgba(244, 246, 245, 0.72));
  stroke-width: 2.600;
  stroke-linecap: round;
}
.vp__key:focus-visible .vp__key-face { box-shadow: 0 0 0 2px #000, 0 0 0 4px #ffffff; }

.vp__clock {
  height: 34px;
  overflow: hidden;
  font-size: 28px;
  line-height: 34px;
  font-weight: 560;
  font-stretch: 96%;
  letter-spacing: -0.01em;
  text-align: center;
  color: color-mix(in srgb, var(--ink) calc(38% + var(--on) * 62%), transparent);
}
.vp__clock span[data-clock] { display: inline-flex; }
.vp__clock i { display: inline-block; width: 0.62em; font-style: normal; text-align: center; }
.vp__clock i.is-sep { width: 0.34em; opacity: 0.5; }

.vp__server {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  height: 46px;
  margin-top: 10px;
  padding: 0 12px 0 13px;
  border: 0;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.25s ease;
}
.vp__server:focus-visible { box-shadow: inset 0 0 0 2px #ffffff; }
.vp__globe { flex: none; width: 18px; height: 18px; fill: none; stroke: var(--soft); stroke-width: 1.300; }
.vp__place { flex: 1; min-width: 0; height: 20px; overflow: hidden; font-size: 14px; line-height: 20px; font-weight: 600; }
.vp__place span { display: block; white-space: nowrap; }
.vp__ping { flex: none; font-size: 12.500px; font-weight: 480; color: var(--soft); opacity: var(--on); }
.vp__ping b { display: inline-block; min-width: 1.300em; text-align: right; font-weight: 640; color: color-mix(in srgb, var(--accent) calc(var(--on) * 100%), var(--ink)); }
.vp__chev { flex: none; width: 12px; height: 12px; fill: none; stroke: var(--soft); stroke-width: 1.500; stroke-linecap: round; stroke-linejoin: round; }

.ghost {
  position: fixed;
  left: 0;
  top: 0;
  width: 22px;
  height: 22px;
  pointer-events: none;
  fill: #ffffff;
  stroke: #14151a;
  stroke-width: 1.4;
  stroke-linejoin: round;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.6));
  opacity: 0;
  visibility: hidden;
  z-index: 5;
}

@media (hover: hover) {
  .vp__server:hover { background: rgba(255, 255, 255, 0.085); }
  .vp__key:hover .vp__power-arc, .vp__key:hover .vp__power-bar { stroke: color-mix(in srgb, var(--accent) calc(var(--on) * 100%), #ffffff); }
}
