:root {
  --bg: #070b12;
  --bg-2: #0b111c;
  --panel: rgba(14, 22, 36, 0.86);
  --panel-solid: #111927;
  --line: rgba(143, 181, 224, 0.18);
  --line-strong: rgba(63, 207, 255, 0.38);
  --text: #edf6ff;
  --muted: #98a8bd;
  --cyan: #28c7ff;
  --green: #35e895;
  --violet: #8b7cff;
  --download-start: #9bf7ff;
  --download-end: #5874ff;
  --download-shadow: #263a96;
  --download-hover-start: #c2fbff;
  --download-hover-end: #7890ff;
  --download-ink: #07101a;
  --download-border: rgba(255, 255, 255, 0.24);
  --download-glow: rgba(88, 116, 255, 0.28);
  --download-glow-hover: rgba(88, 116, 255, 0.42);
  --red: #ff6b6b;
  --amber: #ffd166;
  --blue: #4d7cff;
  --download-width: 132px;
  --shadow: 0 20px 70px rgba(0, 0, 0, 0.38);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  --ether-x: 50%;
  --ether-y: 35%;
  margin: 0;
  color: var(--text);
  background: #05070d;
  font-family: Inter, "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  line-height: 1.6;
  letter-spacing: 0;
  min-height: 100vh;
  position: relative;
}

.liquid-ether-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(circle at var(--ether-x) var(--ether-y), rgba(255, 159, 252, 0.20), transparent 20%),
    radial-gradient(circle at 22% 22%, rgba(82, 39, 255, 0.34), transparent 29%),
    radial-gradient(circle at 78% 18%, rgba(40, 199, 255, 0.22), transparent 26%),
    radial-gradient(circle at 68% 78%, rgba(180, 151, 207, 0.24), transparent 32%),
    linear-gradient(180deg, #05070d 0%, #07111c 45%, #05070d 100%);
}

.liquid-ether-backdrop::before,
.liquid-ether-backdrop::after {
  content: "";
  position: absolute;
  inset: -18%;
  filter: blur(34px);
  opacity: 0.72;
  transform: translate3d(0, 0, 0);
  animation: ether-drift 18s ease-in-out infinite alternate;
}

.liquid-ether-backdrop::before {
  background:
    radial-gradient(ellipse at 20% 30%, rgba(82, 39, 255, 0.48), transparent 34%),
    radial-gradient(ellipse at 48% 52%, rgba(255, 159, 252, 0.30), transparent 31%),
    radial-gradient(ellipse at 80% 42%, rgba(56, 189, 248, 0.30), transparent 35%);
  mix-blend-mode: screen;
}

.liquid-ether-backdrop::after {
  background:
    conic-gradient(from 110deg at var(--ether-x) var(--ether-y), rgba(82, 39, 255, 0.0), rgba(255, 159, 252, 0.28), rgba(56, 189, 248, 0.24), rgba(180, 151, 207, 0.28), rgba(82, 39, 255, 0.0));
  opacity: 0.58;
  animation-duration: 24s;
  animation-direction: alternate-reverse;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(116, 144, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(116, 144, 255, 0.035) 1px, transparent 1px),
    radial-gradient(circle at 50% 0%, transparent, rgba(5, 7, 13, 0.76) 68%);
  background-size: 54px 54px, 54px 54px, auto;
}

.site-header,
main,
.footer,
.admin-shell {
  position: relative;
  z-index: 1;
}

@keyframes ether-drift {
  0% {
    transform: translate3d(-2%, -1%, 0) scale(1);
  }
  50% {
    transform: translate3d(3%, 2%, 0) scale(1.08) rotate(3deg);
  }
  100% {
    transform: translate3d(-1%, 4%, 0) scale(1.04) rotate(-2deg);
  }
}

body.menu-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(82, 39, 255, 0.10), rgba(5, 9, 16, 0.78) 40%, rgba(40, 199, 255, 0.10)),
    rgba(7, 11, 18, 0.88);
  backdrop-filter: blur(18px);
}

.site-header::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(40, 199, 255, 0.52), transparent);
  pointer-events: none;
}

.header-dot-grid {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.62;
}

.topbar {
  position: relative;
  z-index: 1;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  font-weight: 900;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(40, 199, 255, 0.45);
  border-radius: var(--radius);
  color: var(--cyan);
  background: linear-gradient(135deg, rgba(40, 199, 255, 0.16), rgba(139, 124, 255, 0.16));
  box-shadow: 0 0 28px rgba(40, 199, 255, 0.18);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.visitor-widget {
  width: 238px;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 9px;
  margin-left: auto;
  padding: 6px 9px;
  overflow: hidden;
  border: 1px solid rgba(40, 199, 255, 0.26);
  border-radius: 11px;
  color: var(--text);
  background: linear-gradient(135deg, rgba(22, 49, 73, 0.72), rgba(13, 20, 36, 0.86));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 0 18px rgba(40, 199, 255, 0.08);
  transition: border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.visitor-widget.is-ready {
  border-color: rgba(40, 199, 255, 0.42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10), 0 0 22px rgba(40, 199, 255, 0.12);
}

.visitor-widget.is-error {
  border-color: rgba(145, 162, 183, 0.28);
  background: rgba(13, 20, 32, 0.78);
}

.visitor-weather-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: var(--cyan);
  border: 1px solid rgba(40, 199, 255, 0.24);
  border-radius: 9px;
  background: rgba(40, 199, 255, 0.08);
}

.visitor-weather-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.55;
}

.visitor-widget.is-loading .visitor-weather-icon {
  animation: visitor-pulse 1.4s ease-in-out infinite;
}

@keyframes visitor-pulse {
  0%, 100% { opacity: 0.55; transform: scale(0.94); }
  50% { opacity: 1; transform: scale(1); }
}

.visitor-widget-body {
  min-width: 0;
  display: grid;
  gap: 2px;
  flex: 1;
}

.visitor-weather-line {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 5px;
}

.visitor-location,
.visitor-weather {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.visitor-location {
  color: #e6f7ff;
  font-size: 12px;
  font-weight: 900;
}

.visitor-weather {
  min-width: 0;
  flex: 1;
  color: var(--muted);
  font-size: 11px;
}

.visitor-source {
  flex: 0 0 auto;
  color: rgba(125, 249, 255, 0.66);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-decoration: none;
}

.visitor-source:hover {
  color: var(--cyan);
}

.visitor-time {
  flex: 0 0 auto;
  color: #f1fbff;
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.nav-links a,
.admin-nav button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--muted);
  background: transparent;
  font-weight: 800;
  font-size: 14px;
}

.nav-links a:hover,
.nav-links a.active,
.admin-nav button:hover,
.admin-nav button.active {
  color: var(--text);
  border-color: var(--line-strong);
  background: rgba(40, 199, 255, 0.10);
}

.icon-button {
  width: 42px;
  height: 42px;
  display: none;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.hero {
  position: relative;
  overflow: visible;
  min-height: auto;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(40, 199, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(40, 199, 255, 0.045) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, black, transparent 86%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 8% -8% auto auto;
  width: 360px;
  height: 360px;
  border: 1px solid rgba(40, 199, 255, 0.14);
  border-radius: 50%;
  box-shadow: inset 0 0 80px rgba(40, 199, 255, 0.08), 0 0 120px rgba(139, 124, 255, 0.12);
}

.hero-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  align-items: center;
  gap: 20px;
  padding: 28px 0 34px;
}

.hero-contact {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 178px;
  overflow: visible;
}

.hero-contact .contact-trigger {
  position: relative;
  display: grid;
  width: min(100%, 304px);
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(99, 210, 255, 0.48);
  border-radius: 6px;
  color: var(--text);
  text-align: left;
  background: #07101b;
  box-shadow: 7px 7px 0 rgba(22, 54, 87, 0.75), 0 0 28px rgba(40, 199, 255, 0.12);
  cursor: pointer;
  outline: none;
  transition: border-color 220ms ease, box-shadow 220ms ease, transform 220ms ease;
}

.hero-contact .contact-trigger:hover,
.hero-contact .contact-trigger:focus-visible {
  border-color: rgba(125, 238, 255, 0.92);
  box-shadow: 7px 7px 0 rgba(22, 54, 87, 0.75), 0 0 34px rgba(40, 199, 255, 0.28);
  transform: translate(-2px, -2px);
}

.hero-contact .contact-trigger:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 5px;
}

.hero-contact .terminal-top {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 9px 11px;
  border-bottom: 1px solid rgba(99, 210, 255, 0.18);
  color: #6d8ca8;
  font: 9px "Fira Code", "Microsoft YaHei", monospace;
}

.hero-contact .terminal-top i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #ec6c9a;
}

.hero-contact .terminal-top i:nth-child(2) { background: #ffcf6e; }
.hero-contact .terminal-top i:nth-child(3) { background: #67e3a4; }

.hero-contact .terminal-top b {
  margin-left: 6px;
  color: #9ac9e8;
  font-weight: 400;
}

.hero-contact .terminal-main {
  display: grid;
  gap: 8px;
  padding: 23px 19px;
  color: #b4efff;
}

.hero-contact .terminal-main strong {
  font: 14px "Fira Code", "Microsoft YaHei", monospace;
}

.hero-contact .terminal-main small {
  color: #5d829b;
  font: 9px "Fira Code", "Microsoft YaHei", monospace;
  letter-spacing: .08em;
}

.hero-contact .terminal-scan {
  position: absolute;
  left: 0;
  right: 0;
  top: 39px;
  height: 1px;
  opacity: .9;
  background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan);
  transform: translateY(0);
  animation: hero-contact-scan 2.6s ease-in-out infinite;
  pointer-events: none;
}

.hero-contact .contact-trigger:hover .terminal-scan,
.hero-contact .contact-trigger:focus-visible .terminal-scan {
  animation-duration: .9s;
}

.hero-contact .qr-popover {
  position: absolute;
  z-index: 5;
  top: 50%;
  right: calc(100% + 14px);
  display: flex;
  align-items: center;
  gap: 12px;
  width: 386px;
  padding: 11px;
  border: 1px solid rgba(132, 219, 255, .48);
  border-radius: 14px;
  background: rgba(5, 12, 22, .97);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .42), 0 0 32px rgba(73, 231, 255, .12);
  opacity: 0;
  pointer-events: none;
  transform: translate(8px, -50%) scale(.96);
  transform-origin: right center;
  transition: opacity 220ms ease, transform 220ms ease;
}

.hero-contact .qr-popover::before {
  position: absolute;
  top: calc(50% - 6px);
  right: -6px;
  width: 10px;
  height: 10px;
  border-top: 1px solid rgba(132, 219, 255, .48);
  border-right: 1px solid rgba(132, 219, 255, .48);
  background: rgba(5, 12, 22, .97);
  content: "";
  transform: rotate(45deg);
}

.hero-contact:hover .qr-popover,
.hero-contact:focus-within .qr-popover,
.hero-contact .qr-popover.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(0, -50%) scale(1);
}

.hero-contact .qr-image-frame {
  flex: 0 0 auto;
  width: 230px;
  height: 230px;
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
}

.hero-contact .qr-image-frame img {
  display: block;
  width: 340px;
  max-width: none;
  height: auto;
  transform: translate(-55px, -118px);
}

.hero-contact .qr-popover div {
  display: grid;
  gap: 6px;
}

.hero-contact .qr-popover strong { font-size: 12px; }
.hero-contact .qr-popover span { color: #8ca5bb; font-size: 11px; line-height: 1.45; }

@keyframes hero-contact-scan {
  0%, 100% { top: 39px; opacity: .25; }
  50% { top: calc(100% - 10px); opacity: 1; }
}

.hero-copy {
  min-width: 0;
}

.hero-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.hero-copy h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(26px, 3vw, 42px);
  line-height: 1.05;
}

.shiny-title-card {
  width: fit-content;
  max-width: 100%;
  padding: 10px 14px;
  border: 1px solid rgba(125, 249, 255, 0.20);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(4, 8, 14, 0.22);
  box-shadow:
    0 16px 42px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
}

.shiny-title-text {
  position: relative;
  z-index: 1;
  display: inline-block;
  color: transparent;
  background-image: linear-gradient(
    120deg,
    #f5fbff 0%,
    #f5fbff 34%,
    #58daf0 48%,
    #ffffff 52%,
    #f5fbff 66%,
    #f5fbff 100%
  );
  background-size: 220% auto;
  background-position: 150% center;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shiny-title-sweep 2.4s linear infinite;
}

.shiny-title-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(100deg, transparent 0%, rgba(88, 218, 240, 0.16) 45%, transparent 70%);
  transform: translateX(-120%);
  animation: shiny-card-sweep 2.4s linear infinite;
}

@keyframes shiny-title-sweep {
  0% {
    background-position: 150% center;
  }
  100% {
    background-position: -60% center;
  }
}

@keyframes shiny-card-sweep {
  0% {
    transform: translateX(-120%);
  }
  100% {
    transform: translateX(120%);
  }
}

.lead {
  max-width: 720px;
  margin: 7px 0 0;
  min-height: 24px;
  font-size: 15px;
}

.shop-promo {
  width: auto;
  display: flex;
  align-items: center;
  flex-direction: row;
  gap: 8px;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(40, 199, 255, 0.24);
  border-radius: var(--radius);
  color: #d9f5ff;
  background: rgba(4, 8, 14, 0.30);
  box-shadow: 0 12px 34px rgba(40, 199, 255, 0.10);
  backdrop-filter: blur(12px);
}

.shop-promo span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.shop-promo strong {
  color: #ffffff;
  font-size: 14px;
  line-height: 1;
}

.muted-text {
  color: var(--muted);
}

.status-pill,
.tool-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(40, 199, 255, 0.28);
  border-radius: var(--radius);
  color: #bff1ff;
  background: rgba(40, 199, 255, 0.08);
  font-size: 12px;
  font-weight: 900;
}

.status-pill span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 16px var(--green);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.primary-button,
.ghost-button,
.download-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  padding: 0 18px;
  font-weight: 900;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.primary-button {
  color: #031018;
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  box-shadow: 0 14px 34px rgba(40, 199, 255, 0.22);
}

.ghost-button {
  color: var(--text);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.download-link {
  min-height: 38px;
  color: #07101a;
  background: #e9fbff;
}

.primary-button:hover,
.ghost-button:hover,
.download-link:hover {
  transform: translateY(-2px);
  border-color: rgba(40, 199, 255, 0.55);
  box-shadow: 0 18px 42px rgba(40, 199, 255, 0.18);
}

.signal-panel,
.admin-card,
.login-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.signal-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  position: relative;
  isolation: isolate;
  overflow: visible;
}

.electric-panel {
  --electric-panel-color: #7df9ff;
  border-color: rgba(125, 249, 255, 0.22);
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.28),
    0 0 28px rgba(125, 249, 255, 0.10);
}

.signal-electric-canvas {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  display: block;
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.signal-electric-glow {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  border-radius: inherit;
  background:
    linear-gradient(-30deg, rgba(125, 249, 255, 0.24), transparent 45%, rgba(40, 199, 255, 0.18));
  filter: blur(28px);
  opacity: 0.34;
  transform: scale(1.08);
}

.panel-line {
  position: relative;
  z-index: 3;
  display: grid;
  gap: 4px;
  min-height: 56px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
}

.panel-line strong {
  color: var(--cyan);
  font-size: 24px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.pulse-grid {
  display: none;
}

.pulse-grid span {
  aspect-ratio: 1;
  border-radius: 5px;
  background: rgba(152, 168, 189, 0.16);
  position: relative;
}

.pulse-grid span::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 4px;
  background: var(--green);
  box-shadow: 0 0 16px rgba(53, 232, 149, 0.55);
}

.pulse-grid span:nth-child(4n)::after {
  background: var(--amber);
  box-shadow: 0 0 16px rgba(255, 209, 102, 0.5);
}

.section {
  padding: 82px 0;
}

.tools-section {
  padding-top: 34px;
  min-height: calc(100vh - 260px);
}

.section-head {
  margin-bottom: 28px;
}

.split-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.kicker {
  display: block;
  margin-bottom: 8px;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h2 {
  margin-bottom: 10px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.15;
}

.search-panel {
  width: min(420px, 100%);
}

.search-box {
  min-height: 50px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.05);
}

.search-box svg {
  color: var(--cyan);
  flex: 0 0 auto;
}

.search-box input,
.admin-card input,
.admin-card textarea,
.admin-card select,
.login-card input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background: rgba(4, 8, 14, 0.62);
  outline: none;
}

.search-box input {
  min-height: 46px;
  border: 0;
  background: transparent;
}

.search-box input:focus,
.admin-card input:focus,
.admin-card textarea:focus,
.admin-card select:focus,
.login-card input:focus {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 3px rgba(40, 199, 255, 0.11);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 30px;
}

.filter-button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  font-weight: 800;
}

.filter-button.active {
  color: #04111b;
  border-color: transparent;
  background: linear-gradient(135deg, var(--cyan), var(--violet));
}

.category-stack {
  display: grid;
  gap: 34px;
}

.category-block > h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  font-size: 24px;
}

.category-block > h3::before {
  content: "";
  width: 10px;
  height: 24px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--cyan), var(--violet));
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  overflow: visible;
}

.tool-card {
  --card-radius: 11px;
  --edge-proximity: 0;
  --cursor-angle: 45deg;
  --edge-sensitivity: 26;
  --glow-a: var(--cyan);
  --glow-b: #8b7cff;
  min-height: 182px;
  position: relative;
  display: flex;
  isolation: isolate;
  overflow: visible;
  border-radius: var(--card-radius);
  transform: translateY(0);
  transition: transform 0.22s ease, filter 0.22s ease;
}

.tool-card::before {
  content: "";
  position: absolute;
  inset: 5px 8px -8px 1px;
  z-index: -2;
  border: 1px solid rgba(23, 47, 70, 0.92);
  border-radius: var(--card-radius);
  background: linear-gradient(180deg, #0b121c, #060b12);
  box-shadow: 0 16px 26px rgba(0, 0, 0, 0.38);
}

.tool-card > .edge-light {
  position: absolute;
  inset: 0 7px 0 0;
  z-index: 3;
  pointer-events: none;
  border-radius: var(--card-radius);
  opacity: clamp(0, calc((var(--edge-proximity) - var(--edge-sensitivity)) / (100 - var(--edge-sensitivity))), 1);
  mix-blend-mode: plus-lighter;
  transition: transform 0.26s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.22s ease;
}

.tool-card > .edge-light::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--glow-a) 86%, white),
    inset 0 0 5px var(--glow-a),
    inset 0 0 16px color-mix(in srgb, var(--glow-a) 48%, transparent),
    0 0 5px var(--glow-a),
    0 0 16px color-mix(in srgb, var(--glow-a) 42%, transparent),
    0 0 26px color-mix(in srgb, var(--glow-b) 18%, transparent);
}

.tool-card:not(.is-pointed):not(:focus-within) > .edge-light {
  opacity: 0;
  transition: opacity 0.7s ease-in-out;
}

.tool-card-rail {
  position: absolute;
  top: 24px;
  right: 0;
  bottom: 24px;
  z-index: 0;
  width: 30px;
  border: 1px solid rgba(139, 124, 255, 0.38);
  border-left: 0;
  border-radius: 0 9px 9px 0;
  background: linear-gradient(90deg, rgba(36, 35, 75, 0.96), rgba(13, 16, 34, 0.98));
  box-shadow: 12px 10px 20px rgba(0, 0, 0, 0.30), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  pointer-events: none;
  transition: transform 0.26s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.22s ease;
}

.tool-card-rail::before {
  content: "";
  position: absolute;
  inset: 12px 7px;
  border-left: 1px solid rgba(139, 124, 255, 0.32);
  border-right: 1px solid rgba(40, 199, 255, 0.22);
}

.tool-card-rail i {
  position: absolute;
  right: 9px;
  width: 7px;
  height: 7px;
  border: 1px solid var(--glow-a);
  border-radius: 50%;
  background: #0d1727;
}

.tool-card-rail i:first-child { top: 26%; }
.tool-card-rail i:last-child { top: 67%; }

.tool-card:hover .tool-card-rail,
.tool-card.is-pointed .tool-card-rail,
.tool-card:focus-within .tool-card-rail {
  border-color: rgba(139, 124, 255, 0.70);
  transform: translateX(6px);
}

.tool-card-surface {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 182px;
  margin-right: 7px;
  padding: 18px;
  overflow: hidden;
  border: 1px solid rgba(115, 166, 205, 0.27);
  border-radius: var(--card-radius);
  background: linear-gradient(145deg, rgba(22, 34, 49, 0.99), rgba(12, 20, 31, 0.99));
  box-shadow: inset 0 -18px 26px rgba(3, 8, 15, 0.28), 0 5px 10px rgba(0, 0, 0, 0.22);
  transition: transform 0.26s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.22s ease, box-shadow 0.22s ease;
}

.tool-card-surface::before {
  content: "";
  position: absolute;
  inset: 1px;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.035);
  border-radius: 10px;
}

.tool-card:hover,
.tool-card.is-pointed {
  z-index: 2;
  transform: translateY(-5px);
}

.tool-card:hover .tool-card-surface,
.tool-card.is-pointed .tool-card-surface {
  border-color: rgba(45, 212, 255, 0.65);
  box-shadow: inset 0 -18px 26px rgba(3, 8, 15, 0.28), 0 20px 34px rgba(0, 0, 0, 0.42);
  transform: translateX(-7px) translateY(-2px);
}

.tool-card:hover > .edge-light,
.tool-card.is-pointed > .edge-light {
  transform: translateX(-7px) translateY(-2px);
}

.tool-card:focus-within {
  z-index: 2;
  transform: translateY(-3px);
}

.tool-card:focus-within .tool-card-surface {
  border-color: rgba(125, 249, 255, 0.75);
  transform: translateX(-4px);
}

.tool-card:focus-within > .edge-light {
  transform: translateX(-4px);
}

.tool-main,
.tool-bottom {
  position: relative;
  z-index: 1;
}

.tool-main {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.tool-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 56px;
}

.tool-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(45, 212, 255, 0.28);
  border-radius: 12px;
  color: var(--cyan);
  background: linear-gradient(145deg, rgba(45, 212, 255, 0.18), rgba(13, 28, 43, 0.98));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.11), 0 6px 14px rgba(0, 0, 0, 0.26);
}

.tool-icon svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.tool-card h3 {
  position: relative;
  z-index: 1;
  margin: 0;
  overflow-wrap: anywhere;
  color: #f5fbff;
  font-size: 18px;
  line-height: 1.25;
}

.tool-bottom {
  display: flex;
  justify-content: center;
  margin-top: auto;
  padding-top: 18px;
}

.download-link {
  width: var(--download-width);
  min-height: 42px;
  margin: 0;
  color: var(--download-ink);
  background: linear-gradient(135deg, var(--download-start), var(--download-end));
  border-color: var(--download-border);
  box-shadow: 0 5px 0 var(--download-shadow), 0 0 22px var(--download-glow);
  touch-action: manipulation;
}

.download-link svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.download-link:hover {
  transform: translateY(3px);
  border-color: rgba(255, 255, 255, 0.48);
  background: linear-gradient(135deg, var(--download-hover-start), var(--download-hover-end));
  box-shadow: 0 2px 0 var(--download-shadow), 0 0 30px var(--download-glow-hover);
}

body[data-download-theme="violet"] {
  --download-start: #b78cff;
  --download-end: #6337d6;
  --download-shadow: #382184;
  --download-hover-start: #d0b6ff;
  --download-hover-end: #8059ee;
  --download-ink: #ffffff;
  --download-border: rgba(235, 222, 255, 0.56);
  --download-glow: rgba(155, 92, 255, 0.30);
  --download-glow-hover: rgba(155, 92, 255, 0.48);
}

body[data-download-theme="amber"] {
  --download-start: #ffd166;
  --download-end: #df8a13;
  --download-shadow: #8e510c;
  --download-hover-start: #ffe39b;
  --download-hover-end: #efa634;
  --download-ink: #261708;
  --download-border: rgba(255, 241, 193, 0.64);
  --download-glow: rgba(255, 209, 102, 0.22);
  --download-glow-hover: rgba(255, 209, 102, 0.38);
}

body[data-download-theme="ice"] {
  --download-start: #f7fdff;
  --download-end: #b8d4df;
  --download-shadow: #6f8998;
  --download-hover-start: #ffffff;
  --download-hover-end: #d8edf4;
  --download-ink: #0b1624;
  --download-border: rgba(255, 255, 255, 0.76);
  --download-glow: rgba(215, 246, 255, 0.20);
  --download-glow-hover: rgba(215, 246, 255, 0.34);
}

body[data-download-theme="outline"] {
  --download-start: rgba(26, 70, 129, 0.32);
  --download-end: rgba(25, 43, 86, 0.52);
  --download-shadow: #1a448f;
  --download-hover-start: rgba(54, 126, 222, 0.46);
  --download-hover-end: rgba(52, 74, 156, 0.64);
  --download-ink: #a9d7ff;
  --download-border: #4e9fff;
  --download-glow: rgba(78, 159, 255, 0.18);
  --download-glow-hover: rgba(78, 159, 255, 0.34);
}

body[data-download-theme="glass"] {
  --download-start: rgba(107, 164, 204, 0.40);
  --download-end: rgba(40, 70, 102, 0.48);
  --download-shadow: rgba(19, 36, 57, 0.96);
  --download-hover-start: rgba(145, 198, 231, 0.52);
  --download-hover-end: rgba(58, 96, 134, 0.62);
  --download-ink: #d9efff;
  --download-border: rgba(173, 219, 255, 0.48);
  --download-glow: rgba(98, 168, 255, 0.14);
  --download-glow-hover: rgba(98, 168, 255, 0.28);
}

.theme-setting {
  display: grid;
  grid-template-columns: minmax(210px, 0.8fr) minmax(0, 1.2fr);
  grid-column: 1 / -1;
  gap: 18px;
  align-items: end;
  padding: 16px;
  border: 1px solid rgba(40, 199, 255, 0.18);
  border-radius: var(--radius);
  background: rgba(4, 8, 14, 0.22);
}

.field-help {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
}

.theme-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.theme-preview-button {
  min-height: 74px;
  display: grid;
  place-items: center;
  gap: 6px;
  padding: 9px;
  border: 1px solid rgba(143, 181, 224, 0.18);
  border-radius: 9px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
  font-size: 11px;
  font-weight: 800;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.theme-preview-button:hover,
.theme-preview-button.is-selected {
  transform: translateY(-2px);
  color: var(--text);
  border-color: var(--preview-border);
  box-shadow: 0 0 22px var(--preview-glow);
}

.theme-preview-action {
  min-width: 72px;
  min-height: 28px;
  display: inline-grid;
  place-items: center;
  padding: 0 10px;
  border: 1px solid var(--preview-border);
  border-radius: 7px;
  color: var(--preview-ink);
  background: linear-gradient(135deg, var(--preview-start), var(--preview-end));
  box-shadow: 0 3px 0 var(--preview-shadow), 0 0 12px var(--preview-glow);
}

.theme-preview-cyan { --preview-start: #9bf7ff; --preview-end: #5874ff; --preview-shadow: #263a96; --preview-ink: #07101a; --preview-border: rgba(255, 255, 255, 0.55); --preview-glow: rgba(88, 116, 255, 0.32); }
.theme-preview-violet { --preview-start: #b78cff; --preview-end: #6337d6; --preview-shadow: #382184; --preview-ink: #ffffff; --preview-border: rgba(235, 222, 255, 0.62); --preview-glow: rgba(155, 92, 255, 0.34); }
.theme-preview-amber { --preview-start: #ffd166; --preview-end: #df8a13; --preview-shadow: #8e510c; --preview-ink: #261708; --preview-border: rgba(255, 241, 193, 0.70); --preview-glow: rgba(255, 209, 102, 0.24); }
.theme-preview-ice { --preview-start: #f7fdff; --preview-end: #b8d4df; --preview-shadow: #6f8998; --preview-ink: #0b1624; --preview-border: rgba(255, 255, 255, 0.82); --preview-glow: rgba(215, 246, 255, 0.22); }
.theme-preview-outline { --preview-start: rgba(26, 70, 129, 0.32); --preview-end: rgba(25, 43, 86, 0.52); --preview-shadow: #1a448f; --preview-ink: #a9d7ff; --preview-border: #4e9fff; --preview-glow: rgba(78, 159, 255, 0.22); }
.theme-preview-glass { --preview-start: rgba(107, 164, 204, 0.40); --preview-end: rgba(40, 70, 102, 0.48); --preview-shadow: rgba(19, 36, 57, 0.96); --preview-ink: #d9efff; --preview-border: rgba(173, 219, 255, 0.52); --preview-glow: rgba(98, 168, 255, 0.18); }

.download-link:focus-visible {
  outline: 2px solid #7df9ff;
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .tool-card,
  .tool-card-surface,
  .tool-card-rail,
  .tool-card > .edge-light,
  .download-link {
    transition: none;
  }

  .tool-card:hover,
  .tool-card.is-pointed,
  .tool-card:hover .tool-card-surface,
  .tool-card.is-pointed .tool-card-surface,
  .tool-card:hover .tool-card-rail,
  .tool-card.is-pointed .tool-card-rail,
  .tool-card:hover > .edge-light,
  .tool-card.is-pointed > .edge-light,
  .tool-card:focus-within .tool-card-surface,
  .tool-card:focus-within .tool-card-rail,
  .tool-card:focus-within > .edge-light,
  .download-link:hover {
    transform: none;
  }
}

.tool-tag:empty {
  display: none;
}

.empty-state {
  display: grid;
  gap: 6px;
  place-items: center;
  min-height: 180px;
  border: 1px dashed rgba(143, 181, 224, 0.28);
  border-radius: var(--radius);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
}

.empty-state strong {
  color: var(--text);
  font-size: 18px;
}

.text-block {
  display: grid;
  gap: 12px;
  color: #d5dfeb;
}

.text-block p,
.text-block .content-line {
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
}

.text-placeholder {
  color: var(--muted);
  border-style: dashed !important;
}

.steps-block {
  counter-reset: item;
}

.steps-block .content-line {
  counter-increment: item;
  position: relative;
  padding-left: 58px;
}

.steps-block .content-line::before {
  content: counter(item, decimal-leading-zero);
  position: absolute;
  left: 16px;
  top: 16px;
  color: var(--green);
  font-weight: 900;
}

.contact-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 340px);
  align-items: center;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(40, 199, 255, 0.12), rgba(53, 232, 149, 0.08)),
    rgba(14, 22, 36, 0.9);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(16px);
}

.contact-section {
  padding: 26px 0;
}

.contact-strip h2 {
  margin-bottom: 6px;
  font-size: 20px;
}

.contact-strip .text-block {
  gap: 6px;
}

.contact-strip .text-block p,
.contact-strip .text-block .content-line {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
}

.contact-panel {
  min-height: auto;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(4, 8, 14, 0.36);
}

.contact-panel span {
  color: var(--cyan);
  font-size: 12px;
  font-weight: 900;
}

.contact-panel strong {
  white-space: pre-line;
  font-size: 14px;
}

.contact-panel strong:first-of-type {
  color: #ffffff;
  font-size: 20px;
  line-height: 1.1;
}

.contact-panel #contactInfo:empty {
  display: none;
}

.footer {
  border-top: 1px solid var(--line);
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(82, 39, 255, 0.10), rgba(5, 9, 16, 0.86) 40%, rgba(40, 199, 255, 0.10)),
    rgba(7, 11, 18, 0.94);
}

.footer::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  z-index: 0;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(40, 199, 255, 0.52), transparent);
}

.footer-dot-grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  opacity: 0.50;
  pointer-events: none;
}

.footer-inner {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 14px;
  position: relative;
  z-index: 1;
  text-align: center;
}

.footer-inner span {
  max-width: 820px;
}

.admin-body {
  min-height: 100vh;
}

.admin-shell {
  min-height: 100vh;
}

.login-view {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(440px, 100%);
  display: grid;
  gap: 16px;
  padding: 30px;
}

.login-card h1 {
  margin-bottom: 0;
  font-size: 34px;
}

.login-card label,
.admin-card label {
  display: grid;
  gap: 8px;
  color: #d8e6f4;
  font-size: 14px;
  font-weight: 800;
}

.login-card input,
.admin-card input,
.admin-card textarea,
.admin-card select {
  min-height: 44px;
  padding: 10px 12px;
}

.admin-card textarea {
  resize: vertical;
}

.form-message,
.toast {
  min-height: 24px;
  margin: 0;
  color: var(--red);
  font-weight: 800;
}

.dashboard {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
}

.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px;
  border-right: 1px solid var(--line);
  background: rgba(5, 8, 14, 0.84);
  backdrop-filter: blur(18px);
}

.admin-nav {
  display: grid;
  gap: 8px;
}

.admin-nav button {
  justify-content: flex-start;
}

.admin-sidebar .ghost-button {
  margin-top: auto;
}

.admin-main {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 32px 0 70px;
}

.admin-header,
.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.admin-header {
  margin-bottom: 24px;
}

.admin-header h1,
.panel-title h2 {
  margin-bottom: 0;
}

.admin-panel {
  display: none;
}

.admin-panel.active {
  display: grid;
  gap: 18px;
}

.admin-card {
  padding: 22px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.form-grid .panel-title,
.form-grid label:has(textarea),
.form-grid label:nth-of-type(2),
.form-grid label:nth-of-type(3),
.form-grid label:nth-of-type(6),
.form-grid label:nth-of-type(8),
.form-grid label:nth-of-type(10),
.form-grid label:nth-of-type(12) {
  grid-column: 1 / -1;
}

#toolForm .tool-name-field,
#toolForm .tool-category-field {
  grid-column: auto;
}

#toolForm .tool-download-field,
#toolForm .toggle-grid {
  grid-column: 1 / -1;
}

.panel-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.tool-order-help {
  margin: -6px 0 0;
}

.compact-form {
  display: grid;
  grid-template-columns: 1fr 160px auto auto;
  gap: 16px;
  align-items: end;
}

.compact-form .panel-title {
  grid-column: 1 / -1;
}

.check-row {
  display: inline-flex !important;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px !important;
  min-height: 44px;
}

.check-row input {
  width: 18px;
  height: 18px;
  min-height: auto;
  accent-color: var(--cyan);
}

.toggle-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: end;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

th,
td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-size: 13px;
}

td {
  color: #dce8f5;
}

.row-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.small-button {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  font-weight: 800;
}

.small-button.danger {
  color: #ffd9d9;
  border-color: rgba(255, 107, 107, 0.42);
}

.small-button:disabled {
  cursor: not-allowed;
  opacity: 0.38;
}

.small-button:focus-visible,
.ghost-button:focus-visible,
.primary-button:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.order-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 64px;
}

.drag-handle {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  min-height: 28px;
  padding: 0 5px;
  border: 1px solid rgba(40, 199, 255, 0.28);
  border-radius: 6px;
  color: var(--cyan);
  background: rgba(40, 199, 255, 0.08);
  cursor: grab;
  font-size: 18px;
  letter-spacing: -5px;
  line-height: 1;
  user-select: none;
}

.is-reorderable {
  cursor: grab;
}

.is-reorderable:active {
  cursor: grabbing;
}

.is-reorderable.is-dragging {
  opacity: 0.42;
}

.is-reorderable.is-drag-over td {
  border-top: 2px solid var(--cyan);
  background: rgba(40, 199, 255, 0.07);
}

.order-move {
  min-height: 36px;
}

.toast {
  position: sticky;
  top: 12px;
  z-index: 5;
  padding: 12px 14px;
  border: 1px solid rgba(53, 232, 149, 0.36);
  border-radius: var(--radius);
  color: #dfffee;
  background: rgba(11, 32, 24, 0.94);
}

@media (max-width: 980px) {
  .nav-links {
    position: fixed;
    inset: 72px 0 auto 0;
    display: none;
    padding: 14px 20px 22px;
    border-bottom: 1px solid var(--line);
    background: rgba(7, 11, 18, 0.96);
  }

  body.menu-open .nav-links {
    display: grid;
  }

  .icon-button {
    display: grid;
  }

  .hero-layout {
    grid-template-columns: 1fr;
  }

  .hero-contact {
    justify-content: flex-start;
    min-height: 164px;
  }

  .contact-strip {
    grid-template-columns: 1fr;
  }

  .signal-panel {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: 520px;
  }

  .shop-promo {
    width: auto;
  }

  .tool-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dashboard {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: static;
    height: auto;
  }

  .admin-main {
    width: min(100% - 28px, 1180px);
  }
}

@media (max-width: 820px) {
  .tool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .shell {
    width: min(100% - 28px, 1180px);
  }

  .topbar {
    min-height: 64px;
  }

  .visitor-widget {
    width: min(218px, calc(100vw - 150px));
  }

  .nav-links {
    inset: 64px 0 auto 0;
  }

  .hero {
    min-height: auto;
  }

  .hero-layout {
    grid-template-columns: 1fr;
    padding: 22px 0;
    gap: 16px;
  }

  .hero-contact {
    justify-content: center;
    min-height: 172px;
  }

  .hero-contact .qr-popover {
    display: grid;
    justify-items: center;
    width: min(292px, calc(100vw - 28px));
    top: calc(100% - 4px);
    right: 50%;
    transform: translate(50%, -7px) scale(.96);
    transform-origin: top center;
  }

  .hero-contact:hover .qr-popover,
  .hero-contact:focus-within .qr-popover,
  .hero-contact .qr-popover.is-open {
    transform: translate(50%, 0) scale(1);
  }

  .hero-contact .qr-popover::before {
    top: -6px;
    right: auto;
    left: calc(50% - 6px);
    border-top: 1px solid rgba(132, 219, 255, .48);
    border-right: 0;
    border-left: 1px solid rgba(132, 219, 255, .48);
  }

  .hero-contact .qr-popover div:last-child {
    text-align: center;
  }

  .hero-copy h1 {
    font-size: 34px;
  }

  .lead {
    font-size: 14px;
  }

  .shop-promo {
    width: auto;
  }

  .signal-panel {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 8px;
  }

  .panel-line {
    min-height: 48px;
    padding: 7px;
    font-size: 12px;
  }

  .panel-line strong {
    font-size: 20px;
  }

  .split-head,
  .admin-header,
  .panel-title,
  .footer-inner {
    flex-direction: column;
  }

  .admin-header,
  .panel-title {
    align-items: flex-start;
  }

  .footer-inner {
    align-items: center;
  }

  .section {
    padding: 58px 0;
  }

  .tool-grid,
  .form-grid,
  .compact-form,
  .toggle-grid,
  .theme-setting {
    grid-template-columns: 1fr;
  }

  .theme-preview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .form-grid .panel-title,
  .form-grid label,
  .compact-form .panel-title {
    grid-column: auto;
  }

  .login-card,
  .admin-card,
  .contact-strip {
    padding: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-contact .terminal-scan {
    animation: none;
  }

  .hero-contact .contact-trigger,
  .hero-contact .qr-popover {
    transition-duration: .001ms;
  }
}

@media (max-width: 440px) {
  .visitor-widget {
    width: min(172px, calc(100vw - 140px));
    gap: 6px;
    padding: 5px 7px;
  }

  .visitor-weather-icon {
    width: 27px;
    height: 27px;
  }

  .visitor-weather {
    display: none;
  }

  .visitor-weather-line {
    display: none;
  }

  .visitor-location {
    font-size: 11px;
  }

  .visitor-time {
    font-size: 13px;
  }
}
