/**
 * ASM Hub — Luxury UI system (vanilla CSS “components”)
 * Maps to: .luxury-card, .gold-button, .premium-table, .glow-input
 * Motion: CSS transitions / keyframes (Framer Motion–style easing, no extra deps)
 */

:root {
  --lux-bg-primary: #050505;
  --lux-bg-secondary: #0f0f0f;
  --lux-bg-tertiary: #111111;
  --lux-bg-elevated: #141414;
  --lux-gold: #fbbf24;
  --lux-gold-accent: #f59e0b;
  --lux-gold-soft: rgba(251, 191, 36, 0.15);
  --lux-gold-glow: rgba(251, 191, 36, 0.35);
  --lux-text: #ffffff;
  --lux-text-muted: #a3a3a3;
  --lux-border: rgba(255, 255, 255, 0.08);
  --lux-border-gold: rgba(251, 191, 36, 0.35);
  --lux-glass: rgba(15, 15, 15, 0.72);
  --lux-ease: cubic-bezier(0.4, 0, 0.2, 1);
  --lux-ease-in-out: cubic-bezier(0.45, 0, 0.55, 1);
  --lux-radius-sm: 12px;
  --lux-radius-md: 16px;
  --lux-radius-lg: 20px;
  --lux-topbar-h: 64px;
  --focus-ring: 0 0 0 2px var(--lux-bg-primary), 0 0 0 4px rgba(251, 191, 36, 0.45);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  padding-top: env(safe-area-inset-top, 0px);
  display: flex;
  flex-direction: column;
  font-family: "Chakra Petch", sans-serif;
  font-weight: 400;
  color: var(--lux-text);
  background-color: var(--lux-bg-primary);
  line-height: 1.5;
}

a {
  color: var(--lux-gold);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* —— Ambient background (gold particles / gradients) —— */
.shell-bg {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  background-color: var(--lux-bg-primary);
  background-image:
    radial-gradient(ellipse 120% 80% at 50% -30%, rgba(251, 191, 36, 0.14), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 20%, rgba(245, 158, 11, 0.06), transparent 50%),
    radial-gradient(ellipse 50% 35% at 0% 80%, rgba(251, 191, 36, 0.05), transparent 45%),
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 100% 100%, 48px 48px, 48px 48px;
  background-position: center, center, center, center, center;
}

/* —— Top bar (single-page layout) —— */
.app-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  flex-shrink: 0;
  min-height: var(--lux-topbar-h);
  padding: 0.75rem max(1.25rem, env(safe-area-inset-right)) 0.75rem max(1.25rem, env(safe-area-inset-left));
  background: linear-gradient(180deg, rgba(5, 5, 5, 0.88) 0%, rgba(5, 5, 5, 0.55) 100%);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid var(--lux-border);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.25rem;
  flex-wrap: wrap;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.topbar-logo {
  display: block;
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 10px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.03);
  box-shadow: 0 0 20px var(--lux-gold-soft);
  flex-shrink: 0;
}

.topbar-tag {
  margin: 0;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--lux-text-muted);
  line-height: 1.35;
}

.app-main {
  position: relative;
  z-index: 1;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: max(1.25rem, env(safe-area-inset-left, 0px));
  padding-right: max(1.25rem, env(safe-area-inset-right, 0px));
  padding-bottom: max(4rem, env(safe-area-inset-bottom, 0px));
}

/* —— Page transition (main stage) —— */
#main-stage {
  animation: luxPageIn 0.45s var(--lux-ease-in-out) both;
}
@keyframes luxPageIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Lao font overrides */
html[lang="lo"] body {
  font-family: "Noto Sans Lao", "Chakra Petch", sans-serif;
}
html[lang="lo"] .topbar-tag,
html[lang="lo"] .eyebrow,
html[lang="lo"] .hero-desc,
html[lang="lo"] .link-card .desc,
html[lang="lo"] .link-card .tag-badge,
html[lang="lo"] .section-tag,
html[lang="lo"] .admin-section,
html[lang="lo"] .add-form label,
html[lang="lo"] .edit-form label,
html[lang="lo"] .modal-box h4 {
  font-family: "Noto Sans Lao", sans-serif;
}
html[lang="lo"] .hero h2,
html[lang="lo"] .section-head h3,
html[lang="lo"] .admin-section h3,
html[lang="lo"] .link-card h4 {
  font-family: "Noto Sans Lao", "Cormorant Garamond", serif;
  font-weight: 600;
}

/* —— LuxuryCard: hub link cards, stat tiles, panels —— */
.luxury-card {
  position: relative;
  border-radius: var(--lux-radius-md);
  background: linear-gradient(145deg, var(--lux-bg-secondary) 0%, var(--lux-bg-tertiary) 100%);
  border: 1px solid var(--lux-border);
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: hidden;
  transition:
    transform 0.35s var(--lux-ease-in-out),
    box-shadow 0.35s var(--lux-ease-in-out),
    border-color 0.35s var(--lux-ease-in-out);
}
.luxury-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.15), transparent 40%, transparent 60%, rgba(245, 158, 11, 0.08));
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.5;
  transition: opacity 0.35s var(--lux-ease-in-out);
}
@media (hover: hover) and (pointer: fine) {
  .luxury-card:hover {
    transform: translateY(-4px);
    border-color: rgba(251, 191, 36, 0.35);
    box-shadow:
      0 16px 48px rgba(0, 0, 0, 0.55),
      0 0 40px var(--lux-gold-soft),
      inset 0 1px 0 rgba(255, 255, 255, 0.06);
  }
  .luxury-card:hover::after {
    opacity: 1;
  }
}
.luxury-card:active {
  transform: translateY(-2px) scale(0.995);
}

/* —— Hero —— */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
  padding: 3rem 0 3.5rem;
  border-bottom: 1px solid var(--lux-border);
}
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
  }
}
.eyebrow {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--lux-gold);
  margin-bottom: 0.75rem;
}
.hero h2 {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 600;
  margin: 0 0 1rem;
  color: var(--lux-text);
  line-height: 1.15;
}
.hero-desc {
  color: var(--lux-text-muted);
  font-size: 1rem;
  max-width: 36ch;
  margin-bottom: 1.75rem;
}
.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}
.stat-box {
  padding: 1rem 1.25rem;
  min-width: 108px;
  border-radius: var(--lux-radius-sm);
}
.stat-box .label {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  color: var(--lux-text-muted);
  text-transform: uppercase;
}
.stat-box .val {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--lux-gold);
}

.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
}
.hex-svg-wrap {
  position: relative;
  width: min(100%, 320px);
  aspect-ratio: 1;
  filter: drop-shadow(0 0 40px var(--lux-gold-soft));
}
.hex-svg-wrap svg {
  width: 100%;
  height: 100%;
}
.hex-svg-wrap svg .ring {
  transform-box: fill-box;
  transform-origin: center;
}
.ring-1 {
  animation: spin-ccw 28s linear infinite;
}
.ring-2 {
  animation: spin-cw 18s linear infinite;
}
.ring-3 {
  animation: spin-ccw 12s linear infinite;
}
@keyframes spin-cw {
  to {
    transform: rotate(360deg);
  }
}
@keyframes spin-ccw {
  to {
    transform: rotate(-360deg);
  }
}

/* —— Section headers —— */
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 1rem;
  margin: 3rem 0 1.5rem;
}
.section-head h3 {
  font-family: "Cormorant Garamond", serif;
  font-size: 2rem;
  font-weight: 600;
  margin: 0;
  color: var(--lux-text);
}
.section-divider {
  flex: 1;
  min-width: 120px;
  height: 1px;
  background: linear-gradient(90deg, rgba(251, 191, 36, 0.45), transparent);
}
.section-tag {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--lux-gold-accent);
}

/* —— Links grid + link cards (LuxuryCard) —— */
.links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}
.links-grid.is-loading .skeleton-card {
  animation: luxShimmer 1.2s ease-in-out infinite;
}
@keyframes luxShimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}
.skeleton-card {
  border-radius: var(--lux-radius-md);
  min-height: 140px;
  background: linear-gradient(
    110deg,
    var(--lux-bg-secondary) 0%,
    rgba(251, 191, 36, 0.06) 45%,
    var(--lux-bg-secondary) 90%
  );
  background-size: 200% 100%;
  border: 1px solid var(--lux-border);
}

.links-grid.is-loaded .link-card {
  animation: luxStaggerIn 0.4s var(--lux-ease-in-out) both;
}
@keyframes luxStaggerIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

a.link-card {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
a.link-card:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}
.link-card--static {
  cursor: default;
}
.link-card {
  position: relative;
  padding: 1.25rem;
}
.link-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--lux-gold), var(--lux-gold-accent));
  transform: scaleY(0);
  transform-origin: center bottom;
  transition: transform 0.35s var(--lux-ease-in-out);
  border-radius: 0 2px 2px 0;
  z-index: 1;
}
@media (hover: hover) and (pointer: fine) {
  .link-card:hover::before {
    transform: scaleY(1);
    transform-origin: center top;
  }
}
@media (hover: none) {
  .link-card:active::before {
    transform: scaleY(1);
    transform-origin: center top;
  }
}

.link-card .tag-badge {
  display: inline-block;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--lux-gold);
  border: 1px solid var(--lux-border);
  padding: 0.25rem 0.55rem;
  border-radius: 8px;
  margin-bottom: 0.6rem;
  background: rgba(255, 255, 255, 0.02);
}
.link-card h4 {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.35rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: var(--lux-gold);
}
.link-card .hostname {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
  color: var(--lux-text-muted);
  word-break: break-all;
  margin-bottom: 0.5rem;
}
.link-card .desc {
  font-size: 0.875rem;
  color: var(--lux-text-muted);
  margin: 0;
}
.status-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.55rem;
  letter-spacing: 0.15em;
  padding: 0.28rem 0.5rem;
  border: 1px solid var(--lux-border);
  border-radius: 8px;
  background: rgba(5, 5, 5, 0.65);
  backdrop-filter: blur(8px);
}
.status-badge.live {
  color: var(--lux-gold);
  border-color: rgba(251, 191, 36, 0.45);
}
.status-badge.dev {
  color: var(--lux-gold-accent);
  border-color: rgba(245, 158, 11, 0.4);
}
.status-badge.coming {
  color: var(--lux-text-muted);
  border-color: var(--lux-border);
}

/* —— GoldButton (+ legacy .btn) —— */
.gold-button,
.btn {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.85rem 1.35rem;
  border-radius: var(--lux-radius-sm);
  border: none;
  cursor: pointer;
  color: #050505;
  font-weight: 600;
  background: linear-gradient(135deg, #fcd34d 0%, var(--lux-gold) 40%, var(--lux-gold-accent) 100%);
  box-shadow:
    0 0 0 1px rgba(251, 191, 36, 0.35),
    0 8px 28px rgba(0, 0, 0, 0.4),
    0 0 28px var(--lux-gold-soft);
  transition:
    transform 0.25s var(--lux-ease-in-out),
    box-shadow 0.25s var(--lux-ease-in-out),
    filter 0.25s var(--lux-ease-in-out);
}
.gold-button:hover:not(:disabled),
.btn:hover:not(:disabled) {
  transform: scale(1.02);
  box-shadow:
    0 0 0 1px rgba(251, 191, 36, 0.55),
    0 12px 36px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(251, 191, 36, 0.25);
  filter: brightness(1.05);
}
.gold-button:active:not(:disabled),
.btn:active:not(:disabled) {
  transform: scale(0.98);
  filter: brightness(0.97);
}
.gold-button:disabled,
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}
.gold-button--secondary,
.btn-secondary {
  background: transparent;
  color: var(--lux-gold);
  border: 1px solid var(--lux-border-gold);
  box-shadow: 0 0 20px transparent;
}
.gold-button--secondary:hover:not(:disabled),
.btn-secondary:hover:not(:disabled) {
  background: var(--lux-gold-soft);
  color: var(--lux-text);
  box-shadow: 0 0 28px var(--lux-gold-soft);
}
.gold-button--ghost {
  background: rgba(255, 255, 255, 0.04);
  color: var(--lux-text);
  border: 1px solid var(--lux-border);
  box-shadow: none;
}
.gold-button--ghost:hover:not(:disabled) {
  border-color: var(--lux-border-gold);
  color: var(--lux-gold);
  box-shadow: 0 0 20px var(--lux-gold-soft);
}
.btn-leave-admin {
  padding: 0.55rem 1rem;
  border-radius: var(--lux-radius-sm);
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: transparent;
  color: var(--lux-gold);
  border: 1px solid var(--lux-border-gold);
  box-shadow: none;
  font-family: "JetBrains Mono", "Noto Sans Lao", monospace;
  font-size: 0.65rem;
  transition:
    transform 0.25s var(--lux-ease-in-out),
    background 0.25s var(--lux-ease),
    box-shadow 0.25s var(--lux-ease),
    color 0.25s var(--lux-ease);
}
.btn-leave-admin:hover:not(:disabled) {
  background: var(--lux-gold-soft);
  color: var(--lux-text);
  box-shadow: 0 0 28px var(--lux-gold-soft);
  transform: scale(1.02);
}
.btn-leave-admin:active:not(:disabled) {
  transform: scale(0.98);
}

/* —— Top bar controls —— */
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lux-gold);
  box-shadow: 0 0 12px var(--lux-gold-glow);
  animation: pulse-dot 2.5s var(--lux-ease-in-out) infinite;
}
@keyframes pulse-dot {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.65;
    transform: scale(1.12);
  }
}
.header-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  font-family: "JetBrains Mono", "Noto Sans Lao", monospace;
  font-size: 0.75rem;
  color: var(--lux-text-muted);
}
.clock-line {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.15rem;
}
.lang-switch {
  display: inline-flex;
  border: 1px solid var(--lux-border);
  border-radius: var(--lux-radius-sm);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
}
.lang-btn {
  margin: 0;
  padding: 0.45rem 0.65rem;
  font-family: "JetBrains Mono", "Noto Sans Lao", monospace;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: none;
  background: transparent;
  color: var(--lux-text-muted);
  cursor: pointer;
  transition:
    color 0.25s var(--lux-ease),
    background 0.25s var(--lux-ease),
    box-shadow 0.25s var(--lux-ease);
}
.lang-btn:hover {
  color: var(--lux-gold);
  box-shadow: inset 0 0 20px var(--lux-gold-soft);
}
.lang-btn.is-active {
  background: var(--lux-gold-soft);
  color: var(--lux-gold);
}

/* —— Admin —— */
.admin-section {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--lux-border);
}
.admin-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.admin-section h3 {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.75rem;
  margin: 0;
  color: var(--lux-text);
}
.admin-gate.hidden,
.admin-panel.hidden {
  display: none;
}

.login-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-top: 0.75rem;
}

.err-msg {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  color: #f87171;
  margin-top: 0.5rem;
}

.admin-panel {
  position: relative;
  margin-top: 1.5rem;
  padding: 1.5rem;
  border-radius: var(--lux-radius-lg);
  background: var(--lux-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--lux-border);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.add-form {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  align-items: end;
}
.add-form label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lux-text-muted);
}
.add-form .form-actions {
  display: flex;
  align-items: flex-end;
}

/* —— GlowInput —— */
.glow-input,
.add-form input,
.add-form select,
.edit-form input,
.edit-form select,
.edit-form textarea,
.login-row input[type="password"] {
  font-family: "Chakra Petch", sans-serif;
  font-size: 0.9rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--lux-radius-sm);
  border: 1px solid var(--lux-border);
  background: rgba(5, 5, 5, 0.65);
  color: var(--lux-text);
  transition:
    border-color 0.3s var(--lux-ease),
    box-shadow 0.3s var(--lux-ease),
    background 0.3s var(--lux-ease);
}
.glow-input::placeholder,
.add-form input::placeholder,
.edit-form input::placeholder,
.edit-form textarea::placeholder,
.login-row input[type="password"]::placeholder {
  color: #737373;
}
.glow-input:focus,
.add-form input:focus,
.add-form select:focus,
.edit-form input:focus,
.edit-form select:focus,
.edit-form textarea:focus,
.login-row input[type="password"]:focus {
  outline: none;
  border-color: rgba(251, 191, 36, 0.55);
  box-shadow: 0 0 0 3px var(--lux-gold-soft), 0 0 24px rgba(251, 191, 36, 0.12);
  background: rgba(17, 17, 17, 0.95);
}
.edit-form textarea {
  min-height: 80px;
  resize: vertical;
}

/* —— Premium table —— */
.premium-table-wrap {
  border-radius: var(--lux-radius-md);
  border: 1px solid var(--lux-border);
  overflow: hidden;
  background: rgba(5, 5, 5, 0.4);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}
.premium-table-scroll {
  max-height: min(60vh, 520px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.premium-table__head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.85rem 1rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--lux-text-muted);
  background: rgba(15, 15, 15, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--lux-border);
  position: sticky;
  top: 0;
  z-index: 2;
}
.premium-table {
  list-style: none;
  margin: 0;
  padding: 0;
}
.premium-table li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  align-items: center;
  padding: 1rem 1rem;
  border-bottom: 1px solid var(--lux-border);
  font-size: 0.9rem;
  transition:
    background 0.25s var(--lux-ease),
    box-shadow 0.25s var(--lux-ease);
}
.premium-table.is-loaded li {
  animation: luxStaggerIn 0.38s var(--lux-ease-in-out) both;
}
.premium-table li:last-child {
  border-bottom: none;
}
@media (hover: hover) and (pointer: fine) {
  .premium-table li:hover {
    background: linear-gradient(90deg, var(--lux-gold-soft), transparent);
    box-shadow: inset 0 0 0 1px rgba(251, 191, 36, 0.08);
  }
}
.premium-table li strong {
  color: var(--lux-text);
  font-weight: 600;
}
.premium-table .meta {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.65rem;
  color: var(--lux-text-muted);
  margin-top: 0.2rem;
}
.premium-table .actions {
  display: flex;
  gap: 0.5rem;
}
.premium-table .actions button {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.5rem 0.85rem;
  min-height: 40px;
  border-radius: 10px;
  border: 1px solid var(--lux-border);
  background: rgba(17, 17, 17, 0.9);
  color: var(--lux-text-muted);
  cursor: pointer;
  transition:
    border-color 0.25s var(--lux-ease),
    color 0.25s var(--lux-ease),
    box-shadow 0.25s var(--lux-ease),
    transform 0.2s var(--lux-ease);
}
.premium-table .actions button:hover {
  border-color: var(--lux-border-gold);
  color: var(--lux-gold);
  box-shadow: 0 0 18px var(--lux-gold-soft);
}
.premium-table .actions button:active {
  transform: scale(0.98);
}

/* —— Modal —— */
.modal-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  background: rgba(5, 5, 5, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: luxModalBackdrop 0.35s var(--lux-ease-in-out) both;
}
.modal-overlay.hidden {
  display: none;
  animation: none;
}
@keyframes luxModalBackdrop {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.modal-box {
  width: 100%;
  max-width: 440px;
  border-radius: var(--lux-radius-lg);
  background: linear-gradient(165deg, var(--lux-bg-tertiary), var(--lux-bg-primary));
  border: 1px solid var(--lux-border-gold);
  padding: 1.5rem;
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.6),
    0 0 48px var(--lux-gold-soft);
  animation: luxModalBox 0.38s var(--lux-ease-in-out) both;
}
@keyframes luxModalBox {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}
.modal-box h4 {
  font-family: "Cormorant Garamond", serif;
  margin: 0 0 1rem;
  font-size: 1.35rem;
  color: var(--lux-text);
}
.edit-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.edit-form label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.65rem;
  color: var(--lux-text-muted);
}
.modal-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
  justify-content: flex-end;
}

/* —— Footer —— */
.site-footer {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--lux-border);
  text-align: center;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--lux-text-muted);
}
.site-footer p {
  margin: 0.35rem 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
.hidden {
  display: none !important;
}

/* —— Touch —— */
button,
.gold-button,
.btn,
.btn-leave-admin,
.lang-btn {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
a.link-card {
  -webkit-tap-highlight-color: rgba(251, 191, 36, 0.12);
}

@media (max-width: 900px) {
  .hero h2 {
    font-size: clamp(1.625rem, 6.5vw, 2.5rem);
  }
  .hero-desc {
    max-width: none;
    font-size: clamp(0.9375rem, 3.2vw, 1.0625rem);
    line-height: 1.6;
    margin-bottom: 1.5rem;
  }
  .section-head h3 {
    font-size: clamp(1.5rem, 5vw, 2rem);
  }
  .links-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
    gap: 1rem;
  }
}

@media (max-width: 720px) {
  .app-topbar {
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
  }
  .topbar-inner {
    flex-direction: column;
    align-items: stretch;
  }
  .header-meta {
    width: 100%;
    justify-content: space-between;
  }
  .hero {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1.75rem 0 2.25rem;
  }
  .hero-visual {
    min-height: 200px;
    order: -1;
  }
  .hex-svg-wrap {
    width: min(92vw, 280px);
  }
  .eyebrow {
    font-size: 0.62rem;
    letter-spacing: 0.18em;
  }
  .stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
  }
  .stat-box {
    min-width: 0;
    padding: 0.75rem 0.5rem;
    text-align: center;
  }
  .stat-box .label {
    font-size: 0.58rem;
    letter-spacing: 0.08em;
  }
  .stat-box .val {
    font-size: clamp(1.15rem, 4.5vw, 1.45rem);
  }
  .section-head {
    margin: 2.25rem 0 1.25rem;
    gap: 0.65rem;
  }
  .section-tag {
    font-size: 0.58rem;
    letter-spacing: 0.14em;
    width: 100%;
  }
  .link-card {
    padding: 1.15rem 1rem 1.2rem;
    min-height: 5.5rem;
  }
  .link-card h4 {
    font-size: clamp(1.15rem, 4vw, 1.3rem);
    padding-right: 3.25rem;
  }
  .status-badge {
    top: 0.85rem;
    right: 0.75rem;
    font-size: 0.5rem;
    padding: 0.28rem 0.4rem;
  }
  .gold-button,
  .btn,
  .btn-leave-admin {
    min-height: 44px;
  }
  .login-row {
    flex-direction: column;
    align-items: stretch;
  }
  .login-row input[type="password"] {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    font-size: 16px;
  }
  .login-row .btn {
    width: 100%;
  }
  .admin-section {
    margin-top: 2.75rem;
    padding-top: 1.5rem;
  }
  .admin-section-head {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
  }
  .btn-leave-admin {
    width: 100%;
  }
  .admin-panel {
    padding: 1rem;
  }
  .add-form {
    grid-template-columns: 1fr;
  }
  .add-form .form-actions {
    width: 100%;
  }
  .add-form .form-actions .btn {
    width: 100%;
  }
  .add-form input,
  .add-form select,
  .edit-form input,
  .edit-form select,
  .edit-form textarea {
    min-height: 44px;
    font-size: 16px;
  }
  .admin-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .admin-toolbar .btn {
    width: 100%;
  }
  .lang-btn {
    min-height: 44px;
    min-width: 48px;
    padding: 0.5rem 0.7rem;
    font-size: 0.7rem;
  }
}

@media (max-width: 640px) {
  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }
  .section-divider {
    display: none;
  }
  .premium-table__head {
    display: none;
  }
  .premium-table li {
    grid-template-columns: 1fr;
    align-items: stretch;
    padding: 1.1rem 1rem;
    border-radius: var(--lux-radius-sm);
    margin: 0.5rem 0.65rem;
    border: 1px solid var(--lux-border);
    background: rgba(15, 15, 15, 0.6);
  }
  .premium-table-scroll {
    max-height: none;
    overflow: visible;
  }
  .premium-table-wrap {
    background: transparent;
    border: none;
    box-shadow: none;
  }
  .premium-table .actions {
    justify-content: stretch;
    gap: 0.5rem;
  }
  .premium-table .actions button {
    flex: 1;
    justify-content: center;
  }
}

@media (max-width: 520px) {
  .stats {
    grid-template-columns: 1fr;
  }
  .stat-box {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    text-align: left;
  }
  .modal-overlay {
    padding: max(0.75rem, env(safe-area-inset-top, 0px)) max(0.65rem, env(safe-area-inset-right, 0px)) max(0.75rem, env(safe-area-inset-bottom, 0px)) max(0.65rem, env(safe-area-inset-left, 0px));
  }
  .modal-box {
    max-height: min(86dvh, 560px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 1.15rem;
  }
  .modal-actions {
    flex-wrap: wrap;
    justify-content: stretch;
  }
  .modal-actions .btn {
    flex: 1;
    min-width: calc(50% - 0.375rem);
  }
}

@media (max-width: 380px) {
  .links-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .ring-1,
  .ring-2,
  .ring-3,
  .status-dot {
    animation: none !important;
  }
  .link-card,
  .gold-button,
  .btn,
  .lang-btn,
  .luxury-card,
  #main-stage,
  .links-grid.is-loaded .link-card,
  .modal-overlay:not(.hidden),
  .modal-box {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
  .links-grid.is-loading .skeleton-card {
    animation: none !important;
  }
  .premium-table.is-loaded li {
    animation: none !important;
  }
}
