/* ============================================================
   hhhh.fun — design system
   Palette: near-white bg, indigo #5b5bd6 accent, near-black text
   ============================================================ */
:root {
  /* surface */
  --bg:          #f8f8fc;
  --bg-card:     #ffffff;
  --bg-subtle:   #f4f4f8;
  --bg-overlay:  rgba(255,255,255,.82);

  /* text */
  --fg:          #0f1115;
  --fg-2:        #3c3f4d;
  --fg-3:        #6b6e80;
  --fg-4:        #a0a3b5;

  /* accent — indigo */
  --accent:      #5b5bd6;
  --accent-dark: #4848b8;
  --accent-soft: #eeeeff;
  --accent-ring: rgba(91,91,214,.35);

  /* borders — crisp hairlines, shadcn-style */
  --border:      rgba(15,17,21,.08);
  --border-2:    rgba(15,17,21,.12);

  /* semantic */
  --ok:    #16a34a;
  --warn:  #d97706;
  --danger:#dc2626;

  /* bubble pastels */
  --bubble-green:  #d1fae5;
  --bubble-blue:   #dbeafe;
  --bubble-amber:  #fef3c7;
  --bubble-violet: #ede9fe;
  --bubble-rose:   #ffe4e6;
  --bubble-green-fg:  #065f46;
  --bubble-blue-fg:   #1e40af;
  --bubble-amber-fg:  #92400e;
  --bubble-violet-fg: #5b21b6;
  --bubble-rose-fg:   #9f1239;

  /* radius — consistent scale */
  --r:    8px;
  --r-lg: 14px;
  --r-xl: 20px;
  --r-sm: 6px;
  --r-pill: 999px;

  /* shadow — layered-subtle, shadcn style */
  --shadow-sm: 0 1px 2px rgba(15,17,21,.04), 0 1px 3px rgba(15,17,21,.06);
  --shadow:    0 1px 3px rgba(15,17,21,.04), 0 4px 12px -2px rgba(15,17,21,.08), 0 16px 40px -8px rgba(15,17,21,.10);
  --shadow-lg: 0 2px 4px rgba(15,17,21,.04), 0 8px 20px -4px rgba(15,17,21,.10), 0 28px 64px -12px rgba(15,17,21,.16);
  /* hero card gets a slightly stronger lift to read over the photo */
  --shadow-card: 0 1px 3px rgba(15,17,21,.06), 0 8px 28px -4px rgba(15,17,21,.13), 0 32px 80px -16px rgba(15,17,21,.20), 0 0 0 1px rgba(255,255,255,.85);

  /* motion */
  --ease: cubic-bezier(.16,1,.3,1);
  --ease-in: cubic-bezier(.4,0,1,1);

  /* focus ring */
  --ring: 0 0 0 3px rgba(91,91,214,.35);

  /* font stacks — no external CDN */
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "MiSans",
          "HarmonyOS Sans SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  --mono: "SF Mono", ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace;

  /* spacing */
  --space: clamp(1rem, .5rem + 2.5vw, 2rem);
}

/* ── reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 45% at 50% -5%, rgba(91,91,214,.09), transparent 68%);
  background-repeat: no-repeat;
  color: var(--fg-2);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 {
  color: var(--fg);
  font-weight: 660;
  letter-spacing: -.02em;
  line-height: 1.2;
}
h1 { letter-spacing: -.025em; }
h2 { letter-spacing: -.018em; }
a { color: var(--fg); text-decoration: none; }
a:hover { color: var(--accent); }
p { color: var(--fg-3); }

/* ── utilities ── */
.hidden  { display: none !important; }
.muted   { color: var(--fg-3); }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
code {
  font-family: var(--mono);
  font-size: .875em;
  background: var(--bg-subtle);
  border: 1px solid var(--border-2);
  padding: .1em .38em;
  border-radius: 5px;
  color: var(--fg);
}

/* ── top nav ── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: 60px;
  padding: 0 var(--space);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: rgba(255,255,255,.88);
  backdrop-filter: saturate(200%) blur(16px);
  -webkit-backdrop-filter: saturate(200%) blur(16px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(15,17,21,.04);
}

/* brand */
.brand {
  display: flex;
  align-items: center;
  gap: .55rem;
  text-decoration: none;
  flex-shrink: 0;
}
.brand:hover .brand-domain { filter: brightness(1.15); }
.brand-mark {
  display: grid;
  place-items: center;
  width: 30px; height: 30px;
  border-radius: 9px;
  background: linear-gradient(145deg, #7c7cf2, #5b5bd6 55%, #4545bf);
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(91,91,214,.34), inset 0 1px 0 rgba(255,255,255,.22);
  transition: transform .18s var(--ease);
}
.brand:hover .brand-mark { transform: translateY(-1px) rotate(-8deg); }
.brand-mark svg { width: 17px; height: 17px; }
.brand-text {
  font-weight: 800;
  font-size: 1.18rem;
  letter-spacing: -.04em;
  line-height: 1;
  color: var(--fg);
}
.brand-text .brand-domain {
  background: linear-gradient(135deg, var(--accent) 0%, #7c7cf2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 900;
  transition: filter .18s;
}
.brand-tag {
  font-style: italic;
  font-weight: 400;
  font-size: .72rem;
  color: var(--fg-4);
  white-space: nowrap;
}
@media (max-width: 820px) { .brand-tag { display: none; } }

/* nav links */
.nav {
  display: flex;
  align-items: center;
  gap: .25rem;
}
.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: .4rem .75rem;
  font-size: .875rem;
  font-weight: 500;
  color: var(--fg-3);
  border-radius: var(--r-sm);
  transition: color .15s, background .15s;
  white-space: nowrap;
}
.nav-link:hover { color: var(--fg); background: rgba(0,0,0,.04); }
.nav-link.active {
  color: var(--accent);
  background: var(--accent-soft);
  font-weight: 600;
}
.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -1px; /* sit on the topbar bottom border */
  left: 50%;
  transform: translateX(-50%);
  width: 18px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}
.nav-divider {
  width: 1px;
  height: 18px;
  background: var(--border-2);
  margin: 0 .25rem;
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-left: .25rem;
}
.nav-email {
  font-size: .83rem;
  color: var(--fg-3);
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-decoration: none;
  transition: color .15s;
}
.nav-email:hover { color: var(--accent); text-decoration: underline; }

/* ── buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  border: 1px solid transparent;
  border-radius: var(--r);
  cursor: pointer;
  font: inherit;
  font-weight: 560;
  font-size: .875rem;
  /* consistent height: 36px */
  padding: .53rem 1.1rem;
  line-height: 1;
  white-space: nowrap;
  transition: background .15s var(--ease), border-color .15s var(--ease),
              box-shadow .15s var(--ease), color .15s var(--ease), opacity .15s;
  text-decoration: none;
  user-select: none;
}
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn:active { opacity: .88; }

.btn-primary {
  background: var(--accent);
  color: #fff;
  /* inner top highlight — the shadcn crisp 1px trick */
  box-shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 1px 2px rgba(91,91,214,.22);
}
.btn-primary:hover {
  background: var(--accent-dark);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 2px 8px rgba(91,91,214,.30);
}
.btn-primary:focus-visible {
  box-shadow: var(--ring), inset 0 1px 0 rgba(255,255,255,.15);
}

.btn-ghost {
  background: var(--bg-card);
  color: var(--fg-2);
  border-color: var(--border-2);
  box-shadow: 0 1px 2px rgba(15,17,21,.04);
}
.btn-ghost:hover {
  border-color: rgba(15,17,21,.18);
  color: var(--fg);
  background: var(--bg-subtle);
}

.btn-outline-accent {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}
.btn-outline-accent:hover {
  background: var(--accent-soft);
}

.btn-sm {
  padding: .38rem .75rem;
  font-size: .8rem;
  border-radius: var(--r-sm);
}
.btn-pill { border-radius: var(--r-pill); }

/* icon-only button */
.icon-btn {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border-2);
  background: var(--bg-card);
  cursor: pointer;
  color: var(--fg-3);
  transition: background .15s, border-color .15s, color .15s;
  flex: none;
  box-shadow: 0 1px 2px rgba(15,17,21,.04);
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.icon-btn:focus-visible { outline: none; box-shadow: var(--ring); }
.icon-btn svg {
  width: 15px; height: 15px;
  stroke: currentColor; fill: none;
  stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round;
}

/* ── forms ── */
.input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-2);
  color: var(--fg);
  border-radius: var(--r);
  /* same height as .btn: 36px */
  padding: .53rem .9rem;
  font: inherit;
  font-size: .875rem;
  transition: border-color .15s, box-shadow .15s, background .15s;
  box-shadow: 0 1px 2px rgba(15,17,21,.04);
}
.input:hover:not(:focus) { border-color: rgba(15,17,21,.18); }
.input:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring), 0 1px 2px rgba(15,17,21,.04); background: #fff; }
.input::placeholder { color: var(--fg-4); }
.row { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.row .input { flex: 1; min-width: 10rem; }

/* ── layout ── */
/* No global bottom padding: the index hero fills the viewport (extra padding
   would reveal the page background below the bg image on scroll). Content pages
   (console/tunnel/admin) carry their own bottom padding on their wrappers. */

/* ── hero stage (index only) ── */
.hero-stage {
  position: relative;
  /* fill exactly the viewport minus the 60px sticky topbar so the bg image
     reaches the bottom edge (no white strip on scroll); floor at 880px so the
     top-center bubble still clears the centered card on short viewports. */
  min-height: max(calc(100vh - 60px), 880px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem var(--space);
  overflow: hidden; /* clip absolute bubbles */
  /* blue fallback (sampled from the image) shows while the photo loads — no black flash */
  background-color: #3a78bf;
  background-image: url(/bg-home.jpg);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}
/* subtle legibility overlay: light vignette so card + bubbles + nav stay readable */
.hero-stage::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 70% 60% at 50% 50%, rgba(255,255,255,.25) 0%, rgba(255,255,255,.0) 100%),
    linear-gradient(to bottom, rgba(248,248,252,.32) 0%, rgba(248,248,252,.0) 40%, rgba(248,248,252,.0) 60%, rgba(248,248,252,.18) 100%);
  pointer-events: none;
}

/* upload card */
.upload-card {
  position: relative;
  z-index: 2;
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,.6);
  border-radius: 20px;
  box-shadow: var(--shadow-card);
  padding: clamp(1.8rem, 4vw, 2.8rem) clamp(1.6rem, 4vw, 2.6rem);
  width: 100%;
  max-width: 560px;
  text-align: center;
}
.upload-card .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--fg-2);
  background: var(--bg-subtle);
  border: 1px solid var(--border-2);
  padding: .44rem 1.15rem;
  border-radius: var(--r-pill);
  margin-bottom: 1.6rem;
  letter-spacing: .003em;
}
.eyebrow-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  flex-shrink: 0;
}

/* dropzone */
.drop {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .8rem;
  text-align: center;
  border: 1.5px dashed var(--border-2);
  border-radius: var(--r-lg);
  padding: 2.4rem 1.2rem;
  background: var(--bg-subtle);
  cursor: pointer;
  transition: border-color .2s var(--ease), background .2s var(--ease), transform .2s var(--ease);
}
.drop:hover, .drop.over {
  border-color: var(--accent);
  background: rgba(238,238,255,.55);
}
.drop.over { transform: scale(1.006); }
.drop-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-2);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-sm);
  transition: transform .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.drop:hover .drop-icon, .drop.over .drop-icon {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(91,91,214,.18);
}
.drop-icon svg {
  width: 22px; height: 22px;
  stroke: var(--accent); fill: none;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.drop-cta {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--r);
  padding: .65rem 1.55rem;
  font: inherit;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, box-shadow .15s, opacity .15s;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 1px 3px rgba(91,91,214,.25);
  letter-spacing: -.01em;
}
.drop-cta:hover {
  background: var(--accent-dark);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 3px 10px rgba(91,91,214,.30);
}
.drop-cta:active { opacity: .88; }
.drop-cta:focus-visible { outline: none; box-shadow: var(--ring), inset 0 1px 0 rgba(255,255,255,.15); }
.drop-primary {
  font-size: 1.05rem;
  font-weight: 660;
  color: var(--fg);
  letter-spacing: -.02em;
  line-height: 1.25;
  margin-top: -.1rem;
}
.drop-helper {
  font-size: .875rem;
  color: var(--fg-3);
  margin-top: -.1rem;
}
.drop-sub {
  font-size: .84rem;
  color: var(--fg-3);
  margin-top: .6rem;
  line-height: 1.6;
  max-width: 38ch;
  margin-left: auto;
  margin-right: auto;
}
.drop-fine {
  font-size: .78rem;
  color: var(--fg-4);
  margin-top: .4rem;
  line-height: 1.55;
}

/* result panel — shadcn success card */
.result {
  margin-top: 1rem;
  border: 1px solid var(--border-2);
  border-radius: var(--r-lg);
  background: var(--bg-card);
  overflow: hidden;
  text-align: left;
  box-shadow: var(--shadow-sm);
}
.result.hidden { display: none !important; }
.result-success {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .8rem 1.1rem;
  background: #f0fdf4;
  border-bottom: 1px solid rgba(22,163,74,.14);
  color: #15803d;
  font-weight: 600;
  font-size: .875rem;
  letter-spacing: -.005em;
}
.result-success svg {
  width: 17px; height: 17px;
  stroke: #15803d; fill: none;
  stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
  flex-shrink: 0;
}
.result-row {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .82rem 1.1rem;
  border-bottom: 1px solid var(--border);
  transition: background .1s;
}
.result-row:last-child { border-bottom: 0; }
.result-row:hover { background: var(--bg-subtle); }
.result-url {
  flex: 1;
  min-width: 0;
  font-family: var(--mono);
  font-size: .82rem;
  color: var(--fg);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.result-note {
  padding: .55rem 1.1rem .8rem;
  color: var(--fg-3);
  font-size: .8rem;
  line-height: 1.6;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem;
  background: var(--bg-subtle);
  border-top: 1px solid var(--border);
}
.result-code-badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  background: var(--accent-soft);
  border: 1px solid rgba(91,91,214,.2);
  border-radius: var(--r-sm);
  padding: .22rem .6rem;
  font-family: var(--mono);
  font-size: .82rem;
  font-weight: 640;
  color: var(--accent);
  letter-spacing: .05em;
}

/* ── floating bubbles ── */
.bubbles-wrap {
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* desktop: absolute positioned circles */
@media (min-width: 1024px) {
  .bubble {
    position: absolute;
    /* smaller: content swaps on hover instead of growing → fixed 84px */
    width: 84px;
    height: 84px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .28rem;
    text-align: center;
    padding: .5rem;
    box-shadow: 0 2px 10px -2px rgba(15,17,21,.12), 0 1px 0 rgba(255,255,255,.9);
    border: 1.5px solid rgba(255,255,255,.8);
    animation: bubble-float 5s ease-in-out infinite;
    pointer-events: auto;
    cursor: default;
    overflow: hidden;
    transition: box-shadow .18s;
  }
  .bubble:focus-within,
  .bubble:hover {
    box-shadow: 0 4px 16px -4px rgba(15,17,21,.20), 0 1px 0 rgba(255,255,255,.95);
    outline: none;
  }
  .bubble:focus-visible { box-shadow: var(--ring), 0 2px 10px -2px rgba(15,17,21,.12); }
  .bubble svg {
    width: 18px; height: 18px;
    fill: none;
    stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
    flex-shrink: 0;
    transition: transform .18s var(--ease);
  }
  .bubble:hover svg, .bubble:focus-within svg { transform: scale(.9); }
  /* label & caption share one slot → they SWAP in place (no size growth) */
  .bubble-text {
    display: grid;
    place-items: center;
  }
  .bubble-text > * { grid-area: 1 / 1; }
  .bubble-label {
    font-weight: 700;
    font-size: .78rem;
    letter-spacing: -.01em;
    line-height: 1.1;
    transition: opacity .18s var(--ease);
  }
  .bubble-caption {
    font-size: .6rem;
    line-height: 1.3;
    opacity: 0;
    transition: opacity .18s var(--ease);
  }
  /* swap: hide label, reveal caption on hover/focus */
  .bubble:hover .bubble-label,
  .bubble:focus-within .bubble-label { opacity: 0; }
  .bubble:hover .bubble-caption,
  .bubble:focus-within .bubble-caption { opacity: .9; }
  @media (prefers-reduced-motion: reduce) {
    .bubble { animation: none; }
    .bubble-label, .bubble-caption, .bubble svg { transition: none; }
  }

  /* positions — top-center + left column (2) + right column (2)
     Part A: push side columns toward screen edges via max() floor at 16px */
  .bubble-tc { top: 9%;     left: 50%; margin-left: -42px; animation-delay: 1.8s; }
  /* top pair sits further out; bottom pair tucks inward + a touch lower → staggered, not column-aligned */
  .bubble-tl { top: 28%;    left:  max(16px, calc(50% - 615px)); animation-delay: 0s; }
  .bubble-tr { top: 31%;    right: max(16px, calc(50% - 615px)); animation-delay: 1.3s; }
  .bubble-bl { bottom: 11%; left:  max(16px, calc(50% - 540px)); animation-delay: 2.1s; }
  .bubble-br { bottom: 9%;  right: max(16px, calc(50% - 540px)); animation-delay: .7s; }

  .bubble-green  { background: rgba(209,250,229,.88);  color: var(--bubble-green-fg);  }
  .bubble-blue   { background: rgba(219,234,254,.88);  color: var(--bubble-blue-fg);   }
  .bubble-amber  { background: rgba(254,243,199,.88);  color: var(--bubble-amber-fg);  }
  .bubble-violet { background: rgba(237,233,254,.88);  color: var(--bubble-violet-fg); }
  .bubble-rose   { background: rgba(255,228,230,.88);  color: var(--bubble-rose-fg);   }

  .bubble-green  svg { stroke: var(--bubble-green-fg);  }
  .bubble-blue   svg { stroke: var(--bubble-blue-fg);   }
  .bubble-amber  svg { stroke: var(--bubble-amber-fg);  }
  .bubble-violet svg { stroke: var(--bubble-violet-fg); }
  .bubble-rose   svg { stroke: var(--bubble-rose-fg);   }
}

/* mobile: compact chip row below card */
@media (max-width: 1023px) {
  /* stack vertically: card full-width, bubbles become a chip row BELOW it */
  .hero-stage {
    flex-direction: column;
    min-height: auto;
    overflow: visible;
    padding: 1.5rem var(--space) 2.5rem;
    background-attachment: scroll;
    background-size: cover;
  }
  .upload-card { max-width: 520px; width: 100%; order: 1; }
  .bubbles-wrap {
    position: static;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .6rem;
    padding: 1.25rem 0 0;
    order: 2;
    pointer-events: auto;
  }
  .bubble {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: .45rem;
    border-radius: 999px;
    padding: .45rem .9rem .45rem .55rem;
    font-size: .8rem;
    border: 1px solid rgba(255,255,255,.5);
    box-shadow: var(--shadow-sm);
    animation: none;
  }
  .bubble svg { width: 15px; height: 15px; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .bubble-label { font-weight: 650; font-size: .8rem; }
  .bubble-caption { display: none; }
  .bubble-tl,.bubble-tr,.bubble-bl,.bubble-br,.bubble-tc { position: static; transform: none !important; }
  .bubble-green  { background: var(--bubble-green);  color: var(--bubble-green-fg);  }
  .bubble-blue   { background: var(--bubble-blue);   color: var(--bubble-blue-fg);   }
  .bubble-amber  { background: var(--bubble-amber);  color: var(--bubble-amber-fg);  }
  .bubble-violet { background: var(--bubble-violet); color: var(--bubble-violet-fg); }
  .bubble-rose   { background: var(--bubble-rose);   color: var(--bubble-rose-fg);   }
  .bubble-green  svg { stroke: var(--bubble-green-fg);  }
  .bubble-blue   svg { stroke: var(--bubble-blue-fg);   }
  .bubble-amber  svg { stroke: var(--bubble-amber-fg);  }
  .bubble-violet svg { stroke: var(--bubble-violet-fg); }
  .bubble-rose   svg { stroke: var(--bubble-rose-fg);   }
}

@keyframes bubble-float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-10px); }
}

/* ── fixed right-edge CS tab ── */
#csBtn {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 50;
  writing-mode: vertical-rl;
  background: var(--accent);
  color: #fff;
  font-size: .76rem;
  font-weight: 580;
  letter-spacing: .04em;
  padding: 1rem .52rem;
  border-radius: 9px 0 0 9px;
  cursor: pointer;
  border: none;
  box-shadow: -1px 0 8px rgba(91,91,214,.20), -2px 0 16px rgba(91,91,214,.10);
  transition: background .15s, box-shadow .15s, transform .15s;
}
#csBtn:hover {
  background: var(--accent-dark);
  box-shadow: -2px 0 14px rgba(91,91,214,.28);
  transform: translateY(-50%) translateX(-2px);
}
#csBtn:focus-visible { outline: none; box-shadow: var(--ring); }

/* 取件码 floating tab (above the CS tab) */
#codeFab {
  position: fixed;
  right: 0;
  top: 30%;
  transform: translateY(-50%);
  z-index: 50;
  writing-mode: vertical-rl;
  background: var(--accent);
  color: #fff;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .10em;
  padding: 1rem .54rem;
  border-radius: 9px 0 0 9px;
  cursor: pointer;
  border: none;
  box-shadow: -1px 0 8px rgba(91,91,214,.20), -2px 0 16px rgba(91,91,214,.10);
  transition: background .15s, box-shadow .15s, transform .15s;
}
#codeFab:hover {
  background: var(--accent-dark);
  box-shadow: -2px 0 14px rgba(91,91,214,.28);
  transform: translateY(-50%) translateX(-2px);
}
#codeFab:focus-visible { outline: none; box-shadow: var(--ring); }

/* ── dialogs ── */
dialog {
  border: 1px solid var(--border-2);
  border-radius: var(--r-xl);
  padding: 0;
  box-shadow: var(--shadow-lg);
  max-width: 92vw;
  margin: auto;
}
dialog::backdrop { background: rgba(15,17,21,.40); backdrop-filter: blur(4px); }
.dlg { position: relative; width: 400px; max-width: 92vw; padding: 1.75rem 2rem 2rem; }
.dlg-close {
  position: absolute;
  top: .7rem; right: .8rem;
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border: none; background: transparent;
  color: var(--fg-4); font-size: 1rem; line-height: 1;
  border-radius: var(--r-sm); cursor: pointer;
  transition: background .15s, color .15s;
}
.dlg-close:hover { background: var(--bg-subtle); color: var(--fg); }
.dlg-close:focus-visible { outline: none; box-shadow: var(--ring); }
.dlg h2 { font-size: 1.15rem; margin-bottom: .3rem; letter-spacing: -.02em; }
.dlg .sub { color: var(--fg-3); font-size: .84rem; margin-bottom: 1.4rem; line-height: 1.6; }
.dlg .field { display: flex; flex-direction: column; gap: .3rem; margin-bottom: .85rem; }
.dlg .field label { font-size: .8rem; font-weight: 560; color: var(--fg-2); }
.dlg-actions { display: flex; gap: .5rem; margin-top: 1.15rem; justify-content: flex-end; }
.cs-contact {
  display: flex; align-items: center; gap: .75rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border-2);
  border-radius: var(--r-lg);
  padding: .85rem 1rem;
  margin-bottom: .85rem;
}
.cs-wechat-icon { width: 36px; height: 36px; border-radius: 9px; background: #09B83E; display: grid; place-items: center; flex-shrink: 0; }
.cs-wechat-icon svg { width: 21px; height: 21px; fill: #fff; }
.cs-id { font-family: var(--mono); font-size: .92rem; font-weight: 640; color: var(--fg); letter-spacing: .04em; }
.cs-note { font-size: .78rem; color: var(--fg-3); margin-top: .35rem; }

/* ── toast ── */
#toasts {
  position: fixed;
  left: 50%; bottom: 1.8rem;
  transform: translateX(-50%);
  z-index: 100;
  display: flex; flex-direction: column;
  gap: .45rem; align-items: center;
  pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: .5rem;
  background: rgba(15,17,21,.92);
  color: #fff;
  font-size: .84rem;
  font-weight: 480;
  padding: .58rem 1rem;
  border-radius: var(--r-pill);
  box-shadow: 0 4px 16px -4px rgba(15,17,21,.36), 0 1px 4px rgba(15,17,21,.22);
  animation: toast-in .22s var(--ease);
  max-width: min(90vw, 360px);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.10);
}
.toast.err { background: rgba(220,38,38,.92); }
.toast svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
@keyframes toast-in { from { opacity: 0; transform: translateY(6px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }

/* ── tunnel page ── */
.page-hero { padding: clamp(2.5rem,5vw,4.5rem) var(--space) 0; max-width: 900px; margin: 0 auto; }
.page-hero h1 { font-size: clamp(1.55rem,.9rem+2.5vw,2.2rem); margin-bottom: .55rem; letter-spacing: -.025em; }
.page-hero p { font-size: clamp(.88rem,.85rem+.22vw,1rem); color: var(--fg-3); max-width: 52ch; line-height: 1.65; }
.page-content { max-width: 900px; margin: 0 auto; padding: 2.5rem var(--space) 5rem; }

.section-head { margin-bottom: 1.1rem; }
.section-head h2 { font-size: 1rem; margin-bottom: .2rem; font-weight: 640; letter-spacing: -.015em; }
.section-head p { font-size: .84rem; color: var(--fg-3); line-height: 1.6; }

/* download grid */
#dlGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: .75rem;
  margin-bottom: 2.5rem;
}
.dl-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .3rem;
  background: var(--bg-card);
  border: 1px solid var(--border-2);
  border-radius: var(--r-lg);
  padding: 1.1rem 1.15rem;
  text-decoration: none;
  color: var(--fg);
  transition: border-color .15s, box-shadow .15s, transform .15s;
  box-shadow: var(--shadow-sm);
}
.dl-item:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(91,91,214,.12), 0 4px 20px rgba(15,17,21,.08);
  transform: translateY(-2px);
  color: var(--fg);
}
.dl-item:focus-visible { outline: none; box-shadow: var(--ring); }
.dl-platform { font-weight: 620; font-size: .88rem; color: var(--fg); }
.dl-size { font-size: .76rem; color: var(--fg-4); font-family: var(--mono); margin-top: .12rem; }
.dl-item svg {
  width: 20px; height: 20px;
  stroke: var(--accent); fill: none;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
  margin-bottom: .25rem;
}
.dl-empty { color: var(--fg-4); font-size: .875rem; background: var(--bg-subtle); border: 1px dashed var(--border-2); border-radius: var(--r-lg); padding: 1.5rem; text-align: center; }

/* steps */
.steps { display: flex; flex-direction: column; gap: .65rem; }
.step {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--border-2);
  border-radius: var(--r-lg);
  padding: 1.15rem 1.4rem;
  box-shadow: var(--shadow-sm);
}
.step-num {
  /* crisp numbered badge */
  width: 26px; height: 26px;
  border-radius: var(--r-pill);
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  font-size: .78rem;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  margin-top: .15rem;
  border: 1px solid rgba(91,91,214,.2);
}
.step-body h3 { font-size: .9rem; margin-bottom: .32rem; font-weight: 620; letter-spacing: -.01em; }
.step-body p { font-size: .84rem; color: var(--fg-3); line-height: 1.6; }
.step-note {
  background: #fffbeb;
  border: 1px solid rgba(217,119,6,.18);
  border-radius: var(--r-lg);
  padding: .8rem 1.1rem;
  font-size: .82rem;
  color: var(--fg-2);
  margin-top: .75rem;
  display: flex;
  gap: .55rem;
  align-items: flex-start;
}
.step-note svg { width: 15px; height: 15px; stroke: var(--warn); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; margin-top: .1rem; }

/* ── console page ── */
.console-wrap { max-width: 800px; margin: 0 auto; padding: 2rem var(--space) 5rem; }
.greeting { font-size: clamp(1.35rem, .8rem + 2.2vw, 1.85rem); font-weight: 700; letter-spacing: -.03em; margin-bottom: .3rem; }
.greeting .em { color: var(--accent); }
.sub-line { color: var(--fg-3); margin-bottom: 2rem; font-size: .9rem; }

/* account card */
.acct-card {
  background: var(--bg-card);
  border: 1px solid var(--border-2);
  border-radius: var(--r-lg);
  padding: 1.4rem 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.acct-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.1rem;
  flex-wrap: wrap;
  gap: .5rem;
}
.acct-email { font-weight: 600; font-size: .9rem; color: var(--fg); font-family: var(--mono); }
.usage-row { display: flex; flex-direction: column; gap: .45rem; }
.usage-label { display: flex; justify-content: space-between; font-size: .8rem; color: var(--fg-3); }
/* usage meter — clean track + indigo fill */
.meter {
  height: 5px;
  background: var(--bg-subtle);
  border-radius: var(--r-pill);
  overflow: hidden;
  border: 1px solid var(--border);
}
.meter-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent) 0%, #7c7cf2 100%);
  border-radius: var(--r-pill);
  transition: width .4s var(--ease);
  min-width: 3px;
}

/* shares section */
.section-title {
  display: flex;
  align-items: baseline;
  gap: .5rem;
  margin-bottom: .85rem;
}
.section-title h2 { font-size: 1rem; font-weight: 640; letter-spacing: -.015em; }
.section-title .count { font-size: .78rem; color: var(--fg-4); margin-left: auto; }

.need-login-gate {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 3rem 2rem;
  text-align: center;
  max-width: 460px;
  margin: 3rem auto;
  box-shadow: var(--shadow-sm);
}
.need-login-gate h2 { margin-bottom: .5rem; }
.need-login-gate p { font-size: .9rem; color: var(--fg-3); margin-bottom: 1.2rem; }

/* list */
.list-card {
  background: var(--bg-card);
  border: 1px solid var(--border-2);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.list-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .82rem 1.1rem;
  border-bottom: 1px solid var(--border);
  transition: background .1s;
}
.list-item:last-child { border-bottom: 0; }
.list-item:hover { background: var(--bg-subtle); }
.list-item .code {
  font-family: var(--mono);
  font-size: .82rem;
  color: var(--fg);
  font-weight: 580;
  flex-shrink: 0;
}
.list-item .url {
  flex: 1;
  min-width: 0;
  font-size: .82rem;
  color: var(--fg-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.list-item .exp { font-size: .74rem; color: var(--fg-4); white-space: nowrap; flex-shrink: 0; }
.list-item .list-stat { font-size: .74rem; color: var(--fg-3); white-space: nowrap; flex-shrink: 0; font-variant-numeric: tabular-nums; }

/* share thumbnail (live iframe preview for web pages; icon otherwise) */
.share-thumb {
  flex-shrink: 0; width: 116px; height: 70px;
  border-radius: 9px; overflow: hidden; position: relative;
  border: 1px solid var(--border-2); background: var(--bg-subtle);
  cursor: pointer; display: grid; place-items: center;
  transition: border-color .15s, box-shadow .15s;
}
.share-thumb:hover { border-color: var(--accent); box-shadow: 0 2px 10px -2px rgba(91,91,214,.25); }
.share-thumb.is-web { background: #fff; }
.thumb-frame {
  position: absolute; top: 0; left: 0; width: 1160px; height: 700px;
  border: 0; pointer-events: none; transform: scale(.1); transform-origin: 0 0;
}
.share-thumb.is-icon { color: var(--fg-4); }
.share-thumb.is-icon svg { width: 26px; height: 26px; }

/* ── visit trend card ── */
.trend-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-lg); box-shadow: var(--shadow-sm);
  padding: 1.1rem 1.2rem 1rem; margin-bottom: 1.5rem;
}
.trend-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.trend-head h2 { font-size: 1rem; font-weight: 640; letter-spacing: -.02em; }
.trend-controls { display: flex; gap: .5rem; }
.trend-select {
  font: inherit; font-size: .82rem; color: var(--fg-2);
  background: var(--bg-subtle); border: 1px solid var(--border-2);
  border-radius: var(--r-sm); padding: .32rem .6rem; cursor: pointer;
  max-width: 46vw;
}
.trend-summary { font-size: .84rem; color: var(--fg-3); margin: .5rem 0 .7rem; }
.trend-chart { width: 100%; position: relative; }
.trend-chart svg { width: 100%; height: 120px; display: block; }
.trend-axis { display: flex; justify-content: space-between; font-size: .68rem; color: var(--fg-4); margin-top: .25rem; font-variant-numeric: tabular-nums; }
.trend-empty { color: var(--fg-4); font-size: .86rem; text-align: center; padding: 2.2rem 1rem; }
.trend-tip {
  position: absolute; top: 0; display: none; pointer-events: none;
  background: #0f1115; color: #fff; font-size: .74rem; white-space: nowrap;
  padding: .28rem .5rem; border-radius: 6px; box-shadow: 0 2px 8px rgba(0,0,0,.25);
  font-variant-numeric: tabular-nums; z-index: 2;
}

/* ── upload progress ── */
.upload-progress { padding: .5rem .25rem; }
.up-label { display: flex; justify-content: space-between; font-size: .85rem; color: var(--fg-2); margin-bottom: .5rem; font-variant-numeric: tabular-nums; }
.up-bar { height: 8px; border-radius: 999px; background: var(--bg-subtle); overflow: hidden; border: 1px solid var(--border-2); }
.up-fill { height: 100%; width: 0%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), #7c7cf2); transition: width .15s ease; }
.list-actions { display: flex; gap: .3rem; flex-shrink: 0; }

.tag {
  display: inline-flex;
  align-items: center;
  gap: .28rem;
  font-size: .72rem;
  font-weight: 580;
  padding: .18rem .5rem;
  border-radius: var(--r-sm);
  flex-shrink: 0;
  white-space: nowrap;
  border: 1px solid transparent;
}
.tag::before { content: ''; width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; }
.tag.static  { background: #f0fdf4; color: #15803d; border-color: rgba(22,163,74,.15); }
.tag.static::before  { background: var(--ok); }
.tag.file    { background: #eff6ff; color: #1d4ed8; border-color: rgba(59,130,246,.15); }
.tag.file::before    { background: #3b82f6; }
.tag.dynamic { background: var(--accent-soft); color: var(--accent-dark); border-color: rgba(91,91,214,.18); }
.tag.dynamic::before { background: var(--accent); }

.empty { padding: 2.5rem 1rem; text-align: center; color: var(--fg-4); font-size: .88rem; }

/* ── generic card ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-2);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
}
.card + .card { margin-top: .85rem; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; margin-bottom: .2rem; }
.card h2 { font-size: 1rem; letter-spacing: -.018em; font-weight: 640; }
.card .sub { color: var(--fg-3); font-size: .84rem; margin: .12rem 0 1.1rem; line-height: 1.6; }

/* ── footer ── */
footer.site {
  text-align: center;
  color: var(--fg-4);
  font-size: .78rem;
  padding: 2.5rem var(--space) 2rem;
  border-top: 1px solid var(--border);
  margin-top: 3rem;
}
footer.site a { color: var(--fg-3); }
footer.site a:hover { color: var(--accent); }

/* ── reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── responsive nav collapsing ── */
@media (max-width: 600px) {
  /* compact nav so brand + icon-tabs + 登录 all fit one row */
  .nav-link span.nav-label { display: none; }
  .nav-link { padding: .4rem .5rem; }
  .brand-tag { display: none; }
  .brand-text { font-size: 1rem; letter-spacing: -.03em; }
  .brand-mark { width: 26px; height: 26px; border-radius: 8px; }
  .brand-mark svg { width: 15px; height: 15px; }
  .topbar { gap: .3rem; padding: 0 .7rem; height: 56px; }
  .nav { gap: .05rem; }
  .nav-divider { display: none; }
  .nav-actions { gap: .3rem; margin-left: .1rem; }
  /* nav email is redundant on mobile (page greeting shows it + 收发记录 tab
     reaches the console) and is the main cause of nav overflow → hide it. */
  .nav-email { display: none; }
  .btn-sm { padding: .4rem .6rem; }

  /* share list rows: code/tag/exp/actions are all flex-shrink:0, so on a
     narrow screen they overflow. Let rows wrap into a compact card:
       line 1 → code + tag ............ exp
       line 2 → url (full width, truncates)
       line 3 → action icons (right-aligned) */
  .list-item { flex-wrap: wrap; gap: .4rem .5rem; padding: .8rem .9rem; }
  .list-item .share-thumb { order: 0; width: 92px; height: 56px; }
  .list-item .code { order: 1; }
  .list-item .tag { order: 2; }
  .list-item .list-stat { order: 3; }
  .list-item .exp { order: 4; margin-left: auto; }
  .list-item .url { order: 5; flex-basis: 100%; font-size: .78rem; }
  .list-item .list-actions { order: 6; margin-left: auto; }
  /* slimmer right-edge floating tabs so they don't cover the card */
  #codeFab, #csBtn { font-size: .68rem; padding: .75rem .38rem; letter-spacing: .06em; }
  .upload-card { padding: 1.6rem 1.15rem; }
  .upload-card .eyebrow { font-size: .92rem; }
}

/* ============================================================
   admin console (/admin)
   ============================================================ */
.page { max-width: 1000px; margin: 0 auto; padding: 2rem var(--space) 5rem; }
.page-head { margin-bottom: 1.4rem; }
.page-head h1 { font-size: clamp(1.5rem,.9rem+2vw,2rem); font-weight: 760; letter-spacing: -.03em; }
.page-sub { color: var(--fg-3); font-size: .92rem; margin-top: .25rem; }

/* access gate */
.gate { max-width: 420px; margin: 8vh auto 0; text-align: center; }
.gate-icon { width: 60px; height: 60px; margin: 0 auto 1.1rem; border-radius: 16px; background: var(--accent-soft); display: grid; place-items: center; }
.gate-icon svg { width: 28px; height: 28px; stroke: var(--accent); }
.gate h1 { font-size: 1.4rem; font-weight: 740; letter-spacing: -.02em; margin-bottom: .5rem; }
.gate-msg { color: var(--fg-3); font-size: .92rem; line-height: 1.6; margin-bottom: 1.5rem; }

/* summary stat cards */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .9rem; margin-bottom: 1.6rem; }
.stat-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 1.1rem 1.2rem; box-shadow: var(--shadow-sm); }
.stat-num { font-size: 1.65rem; font-weight: 760; letter-spacing: -.03em; color: var(--fg); line-height: 1.1; }
.stat-lbl { font-size: .8rem; color: var(--fg-3); margin-top: .2rem; }

/* tabs */
.admin-tabs { display: inline-flex; gap: .25rem; padding: .25rem; background: var(--bg-subtle); border: 1px solid var(--border-2); border-radius: var(--r-pill); margin-bottom: 1rem; }
.admin-tab { border: none; background: transparent; font: inherit; font-size: .88rem; font-weight: 560; color: var(--fg-3); padding: .42rem 1.05rem; border-radius: var(--r-pill); cursor: pointer; transition: background .15s, color .15s; }
.admin-tab:hover { color: var(--fg); }
.admin-tab.active { background: var(--bg-card); color: var(--accent); box-shadow: var(--shadow-sm); font-weight: 640; }

.admin-card { padding: .4rem .4rem; }
.admin-panel { display: flex; flex-direction: column; }
.adm-empty { color: var(--fg-4); text-align: center; padding: 2.5rem 1rem; font-size: .9rem; }

/* generic admin row (users / shares) */
.adm-row { display: flex; align-items: center; gap: 1rem; padding: .85rem 1rem; border-bottom: 1px solid var(--border); }
.adm-row:last-child { border-bottom: 0; }
.adm-row:hover { background: var(--bg-subtle); }
.adm-main { flex: 1; min-width: 0; }
.adm-email { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; font-weight: 580; color: var(--fg); font-size: .92rem; }
.adm-email .code { font-family: var(--mono); font-size: .85rem; }
.adm-meta { font-size: .78rem; color: var(--fg-4); margin-top: .25rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-actions { display: flex; gap: .35rem; flex-shrink: 0; }
.icon-btn.danger:hover { border-color: #e5484d; color: #e5484d; background: #fff0f0; }
.admin-badge { background: var(--accent-soft); color: var(--accent); border-color: rgba(91,91,214,.2); }
.hidden-badge { background: #fde8e8; color: #c62b30; border-color: rgba(198,43,48,.25); }
.tab-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 16px; height: 16px; padding: 0 4px; margin-left: .2rem;
  border-radius: 999px; background: #e5484d; color: #fff;
  font-size: .66rem; font-weight: 700; line-height: 1;
}
.dot { font-size: .72rem; font-weight: 560; }
.dot.on { color: #16a34a; }
.dot.off { color: var(--fg-4); }

/* audit log rows — dense, monospace-ish */
.adm-log { display: flex; align-items: baseline; gap: .7rem; padding: .5rem 1rem; border-bottom: 1px solid var(--border); font-size: .8rem; flex-wrap: wrap; }
.adm-log:last-child { border-bottom: 0; }
.adm-log:hover { background: var(--bg-subtle); }
.log-time { font-family: var(--mono); font-size: .74rem; color: var(--fg-4); flex-shrink: 0; min-width: 116px; }
.log-action { font-weight: 600; color: var(--fg-2); background: var(--bg-subtle); border: 1px solid var(--border-2); border-radius: var(--r-sm); padding: .1rem .5rem; font-size: .74rem; flex-shrink: 0; }
.log-action.admin { color: var(--accent); background: var(--accent-soft); border-color: rgba(91,91,214,.2); }
.log-action.fail { color: #e5484d; background: #fff0f0; border-color: rgba(229,72,77,.2); }
.log-who { color: var(--fg); font-weight: 540; }
.log-ip { font-family: var(--mono); font-size: .74rem; color: var(--fg-4); }
.log-detail { font-family: var(--mono); font-size: .74rem; color: var(--fg-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }

@media (max-width: 720px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-num { font-size: 1.4rem; }
  .admin-tabs { display: flex; width: 100%; }
  .admin-tab { flex: 1; text-align: center; padding: .42rem .5rem; }
  .adm-meta { white-space: normal; }
  .log-time { min-width: 0; }
}

/* one-line install command (terminal-style box) */
.install-oneliner { margin: 0 0 1.25rem; }
.install-cmd {
  display: flex; align-items: center; gap: .75rem;
  background: #0f1115; border: 1px solid var(--border-2);
  border-radius: var(--r); padding: .65rem .7rem .65rem 1rem;
  font-family: var(--mono); font-size: .88rem;
  box-shadow: var(--shadow-sm);
}
.install-cmd code {
  flex: 1; min-width: 0; color: #e6e8ef; background: none; padding: 0;
  white-space: nowrap; overflow-x: auto;
}
.install-cmd code::before { content: "$ "; color: #8b8bf5; }
.install-cmd .btn {
  flex-shrink: 0; background: rgba(255,255,255,.08);
  color: #e6e8ef; border: 1px solid rgba(255,255,255,.16);
}
.install-cmd .btn:hover { background: rgba(255,255,255,.16); color: #fff; }
