@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,500;0,600;1,400&display=swap');

:root {
  --ink: #161616;
  --muted: #767673;
  --line: #d7d7d2;
  --paper: #f4f4f0;
  --card: #ecece7;
  --accent: #b8f04d;
  --mono: 'DM Mono', monospace;
  --serif: 'Playfair Display', 'Times New Roman', Georgia, serif;

  --sky-top: #3a60d6;
  --sky-mid: #8a8ce6;
  --sky-low: #c495d2;
  --sky-bottom: #e3a3b6;
  --sky-text-shadow: 0 1px 14px rgba(36, 28, 78, .45);
  --on-sky: #fff;
  --on-sky-soft: rgba(255, 255, 255, .78);
  --on-sky-faint: rgba(255, 255, 255, .58);
  --glass: rgba(255, 255, 255, .16);
  --glass-line: rgba(255, 255, 255, .32);
  --sheet: rgba(255, 255, 255, .9);
  --sheet-line: rgba(255, 255, 255, .72);
  --card-ink: #23243d;
  --card-muted: #6d6f8c;
  --copy: #3d3f5a;
  --violet: #5566d8;
  --sheet-shadow: 0 40px 80px -34px rgba(26, 32, 92, .55);
  --html-bg: #6f7ce4;
  --sky-stop-2: #4f6ddd;
  --sky-stop-4: #a98adb;
  --input-bg: rgba(255, 255, 255, .72);
  --row-line: rgba(35, 36, 61, .1);
  --row-hover: rgba(85, 102, 216, .08);
}

html[data-theme="night"] {
  --sky-top: #070b1c;
  --sky-mid: #151a40;
  --sky-low: #2c1c4a;
  --sky-bottom: #4a2658;
  --sky-text-shadow: 0 1px 16px rgba(0, 0, 0, .55);
  --on-sky: #fff;
  --on-sky-soft: rgba(236, 238, 255, .82);
  --on-sky-faint: rgba(220, 224, 255, .58);
  --glass: rgba(255, 255, 255, .08);
  --glass-line: rgba(255, 255, 255, .16);
  --sheet: rgba(16, 18, 40, .88);
  --sheet-line: rgba(255, 255, 255, .14);
  --card-ink: #f3f4ff;
  --card-muted: #c4c8e4;
  --copy: #e4e7f6;
  --violet: #8d96ff;
  --sheet-shadow: 0 40px 80px -30px rgba(0, 0, 0, .72);
  --html-bg: #0c1024;
  --sky-stop-2: #10163a;
  --sky-stop-4: #24184a;
  --input-bg: rgba(255, 255, 255, .08);
  --row-line: rgba(255, 255, 255, .1);
  --row-hover: rgba(141, 150, 255, .12);
}

/* Smooth Synchronous Theme Transitions matching Sky Wheel Rotation */
html.sky-is-snapping,
html.sky-is-snapping *,
html.sky-is-snapping *::before,
html.sky-is-snapping *::after {
  transition: none !important;
}

html:not(.sky-is-snapping) {
  transition: background-color 1.5s cubic-bezier(.37, .02, .2, 1);
}

html:not(.sky-is-snapping) body,
html:not(.sky-is-snapping) .site-frame,
html:not(.sky-is-snapping) .site-header,
html:not(.sky-is-snapping) .header-link,
html:not(.sky-is-snapping) .tools-menu,
html:not(.sky-is-snapping) .tools-menu a,
html:not(.sky-is-snapping) .language-menu,
html:not(.sky-is-snapping) .language-menu button,
html:not(.sky-is-snapping) .panel,
html:not(.sky-is-snapping) .inbox-widget,
html:not(.sky-is-snapping) .widget-heading,
html:not(.sky-is-snapping) .inbox-log,
html:not(.sky-is-snapping) .generated-address,
html:not(.sky-is-snapping) .mail-item,
html:not(.sky-is-snapping) .vpn-container,
html:not(.sky-is-snapping) .vpn-stat-card,
html:not(.sky-is-snapping) .vpn-servers-card,
html:not(.sky-is-snapping) .servers-card-header,
html:not(.sky-is-snapping) .server-item-row,
html:not(.sky-is-snapping) .server-name,
html:not(.sky-is-snapping) .badge-speed,
html:not(.sky-is-snapping) .server-ping-badge,
html:not(.sky-is-snapping) .server-status-tag,
html:not(.sky-is-snapping) .vpn-bottom-cta,
html:not(.sky-is-snapping) .portfolio-card,
html:not(.sky-is-snapping) .account-layout,
html:not(.sky-is-snapping) .account-box,
html:not(.sky-is-snapping) .admin-view,
html:not(.sky-is-snapping) .admin-dashboard-layout,
html:not(.sky-is-snapping) .admin-sidebar,
html:not(.sky-is-snapping) .admin-sidebar-tag,
html:not(.sky-is-snapping) .admin-sidebar-title,
html:not(.sky-is-snapping) .admin-sidebar-link,
html:not(.sky-is-snapping) .admin-sidebar-link .nav-indicator,
html:not(.sky-is-snapping) .admin-nav-badge,
html:not(.sky-is-snapping) .admin-sidebar-footer,
html:not(.sky-is-snapping) .admin-sync,
html:not(.sky-is-snapping) .admin-system-badge,
html:not(.sky-is-snapping) .admin-main-area,
html:not(.sky-is-snapping) .admin-content,
html:not(.sky-is-snapping) .stat-card,
html:not(.sky-is-snapping) .stat-card *,
html:not(.sky-is-snapping) .admin-table,
html:not(.sky-is-snapping) .admin-table *,
html:not(.sky-is-snapping) .bot-admin-form,
html:not(.sky-is-snapping) .bot-admin-form *,
html:not(.sky-is-snapping) table,
html:not(.sky-is-snapping) thead,
html:not(.sky-is-snapping) tbody,
html:not(.sky-is-snapping) tr,
html:not(.sky-is-snapping) th,
html:not(.sky-is-snapping) td,
html:not(.sky-is-snapping) input,
html:not(.sky-is-snapping) select,
html:not(.sky-is-snapping) textarea,
html:not(.sky-is-snapping) button,
html:not(.sky-is-snapping) .hero-tag,
html:not(.sky-is-snapping) .tagline,
html:not(.sky-is-snapping) .orb-weather-card,
html:not(.sky-is-snapping) .sms-workspace-layout,
html:not(.sky-is-snapping) .sms-workspace-layout .sms-card,
html:not(.sky-is-snapping) .sms-workspace-layout .sms-chip,
html:not(.sky-is-snapping) .sms-workspace-layout .sms-mode,
html:not(.sky-is-snapping) .sms-workspace-layout .sms-help-btn,
html:not(.sky-is-snapping) .sms-workspace-layout .sms-active-card,
html:not(.sky-is-snapping) .sms-workspace-layout .sms-history-card,
html:not(.sky-is-snapping) .sms-workspace-layout .sms-empty-activations-card,
html:not(.sky-is-snapping) .sms-workspace-layout .sms-search-wrap,
html:not(.sky-is-snapping) .sms-workspace-layout .sms-active-phone-row,
html:not(.sky-is-snapping) .sms-guest-card,
html:not(.sky-is-snapping) .sms-card,
html:not(.sky-is-snapping) .sms-chip,
html:not(.sky-is-snapping) .sms-mode,
html:not(.sky-is-snapping) .sms-help-btn,
html:not(.sky-is-snapping) .sms-search-wrap,
html:not(.sky-is-snapping) .sms-active-phone-row,
html:not(.sky-is-snapping) .sms-history-item,
html:not(.sky-is-snapping) .sms-buy-card,
html:not(.sky-is-snapping) .account-topup,
html:not(.sky-is-snapping) .account-topup-page,
html:not(.sky-is-snapping) .account-topup-method,
html:not(.sky-is-snapping) .account-topup-preset,
html:not(.sky-is-snapping) .account-topup-amount,
html:not(.sky-is-snapping) .account-topup-hint,
html:not(.sky-is-snapping) .account-topup-status {
  transition: background-color 1.5s cubic-bezier(.37, .02, .2, 1),
              background 1.5s cubic-bezier(.37, .02, .2, 1),
              color 1.5s cubic-bezier(.37, .02, .2, 1),
              border-color 1.5s cubic-bezier(.37, .02, .2, 1),
              box-shadow 1.5s cubic-bezier(.37, .02, .2, 1),
              backdrop-filter 1.5s cubic-bezier(.37, .02, .2, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--html-bg);
}

body {
  margin: 0;
  min-width: 0;
  overflow-x: hidden;
  background: transparent;
  color: var(--on-sky);
  font: 12px Manrope, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body:not(.is-admin-view) {
  font-size: 14px;
}

body::before,
html::before {
  display: none;
}

html.is-booting, body.is-booting {
  overflow: hidden !important;
  height: 100vh !important;
  touch-action: none !important;
}

.site-frame {
  max-width: 1180px;
  min-height: 100vh;
  margin: auto;
  padding: 0 40px;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 3;
  overflow: visible;
  background: transparent;
  transition: max-width .2s ease, padding .2s ease;
}

body.is-admin-view {
  color: var(--on-sky);
}

body::after {
  display: none;
}

body.is-admin-view .site-frame {
  max-width: 100%;
  padding: 0 28px;
  background: transparent;
}

body.is-admin-view .header-vpn,
body.is-admin-view .header-sms,
body.is-admin-view .header-dot,
body.is-admin-view .site-footer,
body.is-admin-view .sky-orbs {
  display: none !important;
}

body.is-admin-view .site-header {
  height: auto;
  min-height: 72px;
  border-bottom: 1px solid rgba(255, 255, 255, .16);
}

.site-frame > * { position: relative; z-index: 1; }

/* ---------------------------------------------------- */
/* Clean Unified Site Header                            */
/* ---------------------------------------------------- */

.site-header {
  position: relative;
  z-index: 100;
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  overflow: visible;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 34px;
}

.site-socials {
  position: fixed;
  left: max(10px, env(safe-area-inset-left));
  top: max(14px, env(safe-area-inset-top));
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

body.is-admin-view .site-socials,
body.is-booting .site-socials {
  display: none;
}

.site-social {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  display: block;
  line-height: 0;
  text-decoration: none;
  box-shadow: 0 6px 14px rgba(10, 18, 40, .22);
  transition: transform .15s ease;
}

.site-social img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.08);
  display: block;
}

.site-social:hover {
  transform: translateY(-1px) scale(1.05);
}

.header-brand,
.header-vpn {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0;
  margin: 0;
  line-height: 1;
  text-decoration: none;
  font-size: 13px;
}

.header-brand {
  gap: 9px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 21px;
  letter-spacing: .005em;
  color: #fff;
  transition: opacity .15s ease;
}

.header-brand:hover {
  opacity: .85;
}

.header-wordmark {
  display: block;
  line-height: 1;
}

.brand-mark {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  display: block;
  position: relative;
  top: 0;
  border-radius: 10px;
  background: #fff;
  color: var(--violet);
  box-shadow: 0 8px 20px -8px rgba(24, 30, 90, .6);
  perspective: 60px;
  perspective-origin: 50% 50%;
}


.brand-mark-spin {
  position: absolute;
  inset: 7px;
  transform-style: preserve-3d;
  transform-origin: 50% 50%;
  transform: rotateY(-12deg);
  transition: transform 2.2s cubic-bezier(.37, 0, .2, 1);
}

.header-brand:hover .brand-mark-spin {
  transform: rotateY(-372deg);
}

.brand-mark-spin i {
  position: absolute;
  inset: 0;
  background: currentColor;
  filter: brightness(calc(1 - (var(--i) * .11)));
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='4 3 24 26'%3E%3Cpath fill='%23000' d='M5 28V4h7.1l7.8 16.4V4H27v24h-7.1L12.1 11.6V28H5z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='4 3 24 26'%3E%3Cpath fill='%23000' d='M5 28V4h7.1l7.8 16.4V4H27v24h-7.1L12.1 11.6V28H5z'/%3E%3C/svg%3E") center / contain no-repeat;
  transform: translateZ(calc((3 - var(--i)) * 0.7px));
}

@media (prefers-reduced-motion: reduce) {
  .brand-mark-spin {
    transition: none;
    transform: rotateY(-12deg);
  }

  .header-brand:hover .brand-mark-spin {
    transform: rotateY(-12deg);
  }
}

.header-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  display: block;
  flex: none;
  opacity: .72;
}

.header-vpn {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 21px;
  letter-spacing: .005em;
  color: #fff;
  padding: 0;
  border-radius: 0;
  transition: opacity .15s ease;
}

.header-vpn:hover {
  opacity: .85;
}

.header-vpn.is-current {
  opacity: 1;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
  z-index: 101;
  overflow: visible;
}

.header-link {
  font: 500 11px/1 Manrope, Arial, sans-serif;
  letter-spacing: .14em;
  color: var(--on-sky-soft);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 14px;
  border: 0;
  background: transparent;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: color .15s ease, background .15s ease;
}

.header-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, .18);
}

.header-link.header-control {
  background: rgba(255, 255, 255, .18);
  color: #fff;
}

.header-link.header-control:hover,
.header-link.header-account:hover {
  background: rgba(255, 255, 255, .28);
  color: #fff;
}

.header-link.header-logout {
  color: rgba(255, 214, 214, .9);
}

.header-link.header-logout:hover {
  color: #fff;
  background: rgba(216, 96, 96, .38);
}

.header-link[hidden] {
  display: none !important;
}

.header-link.header-balance {
  cursor: default;
  pointer-events: none;
  background: rgba(255, 255, 255, .16);
  color: #fff;
  font-variant-numeric: tabular-nums;
  letter-spacing: .08em;
}

.header-divider {
  display: block;
  width: 1px;
  height: 14px;
  background: rgba(255, 255, 255, .28);
  margin: 0 4px;
}

.tools-picker,
.language-picker {
  position: relative;
  z-index: 102;
}

.tools-menu {
  display: none;
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  z-index: 1000;
  min-width: 220px;
  background: var(--sheet);
  border: 1px solid var(--sheet-line);
  border-radius: 16px;
  padding: 6px;
  box-shadow: var(--sheet-shadow);
  backdrop-filter: blur(18px);
}

.tools-menu.open {
  display: grid;
}

.tools-menu a {
  display: block;
  border: 0;
  background: transparent;
  color: var(--card-ink);
  text-align: left;
  text-decoration: none;
  padding: 9px 12px;
  font: 500 13px Manrope, Arial, sans-serif;
  border-radius: 10px;
  transition: background .12s, color .12s;
}

.tools-menu a:hover,
.tools-menu a.is-active {
  background: rgba(85, 102, 216, .1);
  color: var(--violet);
}

.language-toggle {
  font: 500 11px/1 Manrope, Arial, sans-serif;
  letter-spacing: .14em;
  color: var(--on-sky-soft);
  cursor: pointer;
}

.language-menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 1000;
  min-width: 158px;
  background: var(--sheet);
  border: 1px solid var(--sheet-line);
  border-radius: 16px;
  padding: 6px;
  box-shadow: var(--sheet-shadow);
  backdrop-filter: blur(18px);
}

.language-menu.open {
  display: grid;
}

.language-menu button {
  width: 100%;
  display: block;
  border: 0;
  background: transparent;
  color: var(--card-ink);
  text-align: left;
  padding: 9px 12px;
  font: 500 13px Manrope, Arial, sans-serif;
  cursor: pointer;
  pointer-events: auto;
  user-select: none;
  border-radius: 10px;
  transition: background .12s, color .12s;
}

.language-menu button:hover {
  background: rgba(85, 102, 216, .1);
  color: var(--violet);
}

.language-menu button.active {
  color: #fff;
  background: var(--violet);
  font-weight: 600;
}

.theme-toggle {
  width: 36px;
  padding: 0;
  overflow: visible;
  z-index: 140;
}

.theme-lamp {
  position: relative;
  width: 16px;
  height: 16px;
  display: block;
}

.theme-toggle-icon {
  position: relative;
  width: 16px;
  height: 16px;
  display: block;
}

.theme-sun,
.theme-moon {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  transition: opacity .15s ease, transform .15s ease;
}

.theme-sun {
  background: #fff;
}

.theme-sun::before {
  content: '';
  position: absolute;
  inset: -4px;
  background:
    radial-gradient(circle at 50% 0, #fff 1px, transparent 1.4px),
    radial-gradient(circle at 50% 100%, #fff 1px, transparent 1.4px),
    radial-gradient(circle at 0 50%, #fff 1px, transparent 1.4px),
    radial-gradient(circle at 100% 50%, #fff 1px, transparent 1.4px);
}

.theme-moon {
  background: transparent;
  box-shadow: inset -3px -2px 0 1px #fff;
  opacity: 0;
  transform: rotate(-30deg) scale(.7);
}

html[data-theme="night"] .theme-sun {
  opacity: 0;
  transform: rotate(40deg) scale(.6);
}

html[data-theme="night"] .theme-moon {
  opacity: 1;
  transform: rotate(0) scale(1);
}

.theme-lamp-hang {
  position: absolute;
  left: 50%;
  top: 16px;
  width: 16px;
  height: 0;
  margin-left: -8px;
  transform-origin: top center;
  pointer-events: none;
}

.theme-lamp-cord,
.theme-lamp-knob {
  position: absolute;
  left: 50%;
  top: 0;
  pointer-events: none;
}

.theme-lamp-cord {
  width: 2px;
  height: 22px;
  margin-left: -1px;
  background: linear-gradient(#fff, rgba(255, 255, 255, .75));
  border-radius: 2px;
  transform-origin: top center;
  transition: height .2s ease-out;
}

.theme-lamp-knob {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(20, 24, 60, .32);
  transform: translate(-50%, 22px) scale(1);
  opacity: 1;
  transition: transform .2s ease-out;
}

.theme-toggle:hover .theme-lamp-cord,
.theme-toggle:focus-visible .theme-lamp-cord {
  height: 28px;
}

.theme-toggle:hover .theme-lamp-knob,
.theme-toggle:focus-visible .theme-lamp-knob {
  transform: translate(-50%, 28px) scale(1.12);
}

.theme-toggle.is-pulling .theme-lamp-cord {
  height: 44px;
  transition-duration: .1s;
}

.theme-toggle.is-pulling .theme-lamp-knob {
  transform: translate(-50%, 44px) scale(1.18);
  transition-duration: .1s;
}

.theme-toggle.is-swinging .theme-lamp-cord {
  height: 22px;
}

.theme-toggle.is-swinging .theme-lamp-knob {
  transform: translate(-50%, 22px) scale(1);
}

.theme-toggle.is-swinging .theme-lamp-hang {
  animation: cord-swing 1.2s cubic-bezier(.2, .7, .2, 1);
}

html[data-theme="night"] .theme-lamp-knob {
  background: #f2f4ff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .45);
}

html[data-theme="night"] .theme-lamp-cord {
  background: linear-gradient(#f2f4ff, rgba(242, 244, 255, .68));
}

.sky-clock {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.sky-clock-wheel {
  position: absolute;
  left: 50%;
  top: 100%;
  width: 240vmax;
  height: 240vmax;
  margin: -120vmax 0 0 -120vmax;
  border-radius: 0;
  background: linear-gradient(
    to bottom,
    #4f6ddd 0%,
    #6a7ee4 10%,
    #8a8ce6 20%,
    #b492d0 30%,
    #e3a3b6 38%,
    #c49ab0 45%,
    #8a6a90 50%,
    #5a3a68 55%,
    #3a2458 62%,
    #2c1c4a 72%,
    #151a40 84%,
    #070b1c 100%
  );
  transform: rotate(var(--sky-turn, 0deg));
  transition: transform 1.6s cubic-bezier(.37, .02, .2, 1);
}

html.sky-is-snapping .sky-clock-wheel {
  transition: none;
}

.sky-orbs {
  position: fixed;
  inset: 0;
  z-index: 3;
  overflow: hidden;
  pointer-events: none;
}

.sky-orbs-wheel {
  background: none;
}

.sky-face {
  display: none;
}

.sky-nebula {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(ellipse 65% 45% at 50% 82%, rgba(120, 60, 220, 0.16), transparent 70%),
    radial-gradient(ellipse 45% 35% at 28% 70%, rgba(30, 140, 255, 0.12), transparent 65%),
    radial-gradient(ellipse 50% 40% at 75% 75%, rgba(200, 50, 180, 0.11), transparent 70%);
  pointer-events: none;
}

.sky-stars {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, transparent 36%, #000 64%, #000 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, transparent 36%, #000 64%, #000 100%);
  pointer-events: none;
}

.sky-stars-1 {
  background-image:
    radial-gradient(1px 1px at 12% 62%, rgba(255,255,255,.9), transparent 60%),
    radial-gradient(0.9px 0.9px at 18% 58%, rgba(255,255,255,.8), transparent 60%),
    radial-gradient(1.2px 1.2px at 22% 76%, rgba(255,255,255,.85), transparent 60%),
    radial-gradient(0.8px 0.8px at 28% 68%, rgba(255,255,255,.7), transparent 60%),
    radial-gradient(1px 1px at 34% 54%, rgba(255,255,255,.9), transparent 60%),
    radial-gradient(1.1px 1.1px at 42% 78%, rgba(255,255,255,.8), transparent 60%),
    radial-gradient(0.8px 0.8px at 46% 64%, rgba(255,255,255,.75), transparent 60%),
    radial-gradient(1.2px 1.2px at 52% 82%, rgba(255,255,255,.85), transparent 60%),
    radial-gradient(0.9px 0.9px at 58% 60%, rgba(255,255,255,.7), transparent 60%),
    radial-gradient(1.1px 1.1px at 64% 72%, rgba(255,255,255,.9), transparent 60%),
    radial-gradient(0.8px 0.8px at 70% 56%, rgba(255,255,255,.75), transparent 60%),
    radial-gradient(1px 1px at 76% 80%, rgba(255,255,255,.85), transparent 60%),
    radial-gradient(1.2px 1.2px at 82% 66%, rgba(255,255,255,.8), transparent 60%),
    radial-gradient(0.9px 0.9px at 88% 74%, rgba(255,255,255,.9), transparent 60%),
    radial-gradient(1px 1px at 92% 58%, rgba(255,255,255,.75), transparent 60%);
  animation: stars-shimmer 7s ease-in-out infinite alternate;
}

.sky-stars-2 {
  background-image:
    radial-gradient(2px 2px at 15% 72%, #fff, transparent 60%),
    radial-gradient(1.8px 1.8px at 25% 60%, rgba(200, 230, 255, .95), transparent 60%),
    radial-gradient(2.2px 2.2px at 38% 82%, #fff, transparent 60%),
    radial-gradient(1.7px 1.7px at 48% 66%, rgba(255, 230, 180, .9), transparent 60%),
    radial-gradient(2.4px 2.4px at 62% 78%, #fff, transparent 60%),
    radial-gradient(1.9px 1.9px at 74% 62%, rgba(190, 220, 255, .95), transparent 60%),
    radial-gradient(2.1px 2.1px at 85% 80%, #fff, transparent 60%);
  animation: stars-twinkle 4s ease-in-out infinite alternate;
}

.sky-stars-3 {
  background-image:
    radial-gradient(3px 3px at 30% 74%, #fff, rgba(255,255,255,.6) 40%, transparent 70%),
    radial-gradient(2.8px 2.8px at 56% 70%, #fff, rgba(220,240,255,.6) 40%, transparent 70%),
    radial-gradient(3.2px 3.2px at 78% 84%, #fff, rgba(255,240,200,.6) 40%, transparent 70%);
  animation: stars-glint 5.5s ease-in-out infinite alternate;
}

@keyframes stars-shimmer {
  0% { opacity: 0.65; }
  100% { opacity: 1; }
}

@keyframes stars-twinkle {
  0% { opacity: 0.45; transform: scale(0.96); }
  50% { opacity: 1; transform: scale(1.04); }
  100% { opacity: 0.55; transform: scale(0.98); }
}

@keyframes stars-glint {
  0% { opacity: 0.5; filter: drop-shadow(0 0 2px rgba(255,255,255,0.4)); }
  50% { opacity: 1; filter: drop-shadow(0 0 6px rgba(255,255,255,0.9)); }
  100% { opacity: 0.6; filter: drop-shadow(0 0 3px rgba(255,255,255,0.5)); }
}

/* ---------------------------------------------------- */
/* Aurora Borealis (Северное сияние)                   */
/* ---------------------------------------------------- */
.sky-aurora {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 2.5s ease-in-out;
}

.sky-aurora.is-active {
  opacity: 0.88;
}

.aurora-beam {
  position: absolute;
  left: 20%;
  right: 20%;
  bottom: 6%;
  height: 48%;
  border-radius: 50% 50% 0 0;
  filter: blur(28px);
  mix-blend-mode: screen;
  pointer-events: none;
}

.aurora-beam-1 {
  background: linear-gradient(0deg, transparent 0%, rgba(0, 255, 170, 0.45) 45%, rgba(60, 180, 255, 0.25) 75%, transparent 100%);
  animation: aurora-wave-1 9s ease-in-out infinite alternate;
}

.aurora-beam-2 {
  left: 10%;
  right: 30%;
  background: linear-gradient(0deg, transparent 0%, rgba(80, 250, 200, 0.35) 40%, rgba(180, 70, 255, 0.3) 80%, transparent 100%);
  animation: aurora-wave-2 13s ease-in-out infinite alternate;
}

.aurora-beam-3 {
  left: 30%;
  right: 10%;
  background: linear-gradient(0deg, transparent 0%, rgba(0, 230, 255, 0.3) 35%, rgba(140, 40, 240, 0.28) 75%, transparent 100%);
  animation: aurora-wave-1 11s ease-in-out infinite alternate-reverse;
}

@keyframes aurora-wave-1 {
  0% { transform: translateY(0) scaleY(1) skewX(-4deg); opacity: 0.7; }
  50% { transform: translateY(-3%) scaleY(1.15) skewX(5deg); opacity: 1; }
  100% { transform: translateY(2%) scaleY(0.95) skewX(-2deg); opacity: 0.8; }
}

@keyframes aurora-wave-2 {
  0% { transform: translateY(2%) scaleY(0.9) skewX(6deg); opacity: 0.65; }
  50% { transform: translateY(-4%) scaleY(1.2) skewX(-5deg); opacity: 0.95; }
  100% { transform: translateY(0%) scaleY(1.05) skewX(3deg); opacity: 0.75; }
}


.sky-orb {
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: 50%;
  pointer-events: none;
}

.sky-sun {
  --orb-az: 32deg;
  --orb-from-top: -4.5rem;
  width: clamp(58px, 7vw, 88px);
  height: clamp(58px, 7vw, 88px);
  margin: calc(clamp(58px, 7vw, 88px) / -2) 0 0 calc(clamp(58px, 7vw, 88px) / -2);
  background: radial-gradient(circle at 34% 32%, #fff 0%, #ffe56a 38%, #ffb02e 68%, #f08a1a 100%);
  box-shadow:
    0 0 28px 8px rgba(255, 196, 80, .42),
    0 0 72px 22px rgba(255, 168, 50, .28);
  transform: rotate(calc(-1 * var(--orb-az))) translateY(calc(-100vh + var(--orb-from-top))) rotate(calc(var(--orb-az) - var(--sky-turn, 0deg)));
}

.sky-sun::before {
  content: '';
  position: absolute;
  inset: -36%;
  border-radius: 50%;
  background: repeating-conic-gradient(
    from 8deg,
    rgba(255, 220, 120, 0) 0 11deg,
    rgba(255, 232, 160, .55) 11deg 13deg
  );
  z-index: -1;
  animation: sun-spin 28s linear infinite;
}

.sky-moon {
  --orb-az: 148deg;
  --orb-from-top: -4.5rem;
  width: clamp(50px, 6.4vw, 76px);
  height: clamp(50px, 6.4vw, 76px);
  margin: calc(clamp(50px, 6.4vw, 76px) / -2) 0 0 calc(clamp(50px, 6.4vw, 76px) / -2);
  background:
    radial-gradient(circle at 28% 30%, #fff 0 2px, transparent 2.4px),
    radial-gradient(circle at 62% 48%, rgba(180, 176, 168, .55) 0 5px, transparent 6px),
    radial-gradient(circle at 40% 68%, rgba(170, 166, 158, .4) 0 3.5px, transparent 4.2px),
    radial-gradient(circle at 36% 34%, #f7f3e8 0%, #d9d3c4 72%);
  box-shadow:
    inset -10px -8px 0 0 rgba(196, 190, 176, .35),
    0 0 28px 8px rgba(230, 232, 255, .22);
  transform: rotate(var(--orb-az)) translateY(calc(-100vh + var(--orb-from-top))) rotate(calc(-1 * var(--orb-az) - var(--sky-turn, 0deg)));
}

@media (min-width: 960px) {
  .sky-sun {
    --orb-az: 46deg;
    --orb-from-top: -6.5rem;
  }
  .sky-moon {
    --orb-az: 134deg;
    --orb-from-top: -6.5rem;
  }
}

/* ---------------------------------------------------- */
/* Atmospheric Weather Integrated next to Sun/Moon     */
/* ---------------------------------------------------- */

.orb-weather-card {
  position: absolute;
  left: calc(100% + 22px);
  top: 50%;
  transform: translateY(-50%) scale(1);
  width: max-content;
  max-width: min(340px, 48vw);
  padding: 10px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.38);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow:
    0 8px 32px -4px rgba(20, 26, 75, 0.3),
    inset 0 1px 1px rgba(255, 255, 255, 0.4);
  color: #fff;
  pointer-events: auto;
  user-select: none;
  z-index: 10;
  transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1),
              transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1),
              filter 0.8s ease;
  opacity: 1;
  filter: blur(0);
}

.sky-moon .orb-weather-card {
  background: rgba(16, 20, 48, 0.62);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow:
    0 8px 32px -4px rgba(0, 0, 0, 0.5),
    inset 0 1px 1px rgba(255, 255, 255, 0.15);
}

.orb-weather-card.is-evaporating {
  opacity: 0 !important;
  transform: translateY(-50%) translateX(20px) scale(0.88) !important;
  filter: blur(14px) !important;
  pointer-events: none !important;
}

.orb-weather-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.orb-weather-icon {
  font-size: 17px;
  line-height: 1;
  filter: drop-shadow(0 1px 6px rgba(255, 200, 50, 0.5));
}

.sky-moon .orb-weather-icon {
  filter: drop-shadow(0 1px 6px rgba(180, 200, 255, 0.6));
}

.orb-weather-temp {
  font: 700 15px/1 var(--mono);
  color: #fff;
  letter-spacing: -0.01em;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.35);
}

.orb-weather-city {
  font: 600 11px var(--mono);
  color: rgba(255, 255, 255, 0.85);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.3);
}

.orb-weather-phrase {
  font: 500 12px/1.38 Manrope, Arial, sans-serif;
  color: rgba(255, 255, 255, 0.96);
  letter-spacing: 0.01em;
  text-shadow: 0 1px 12px rgba(20, 24, 60, 0.4);
  overflow-wrap: break-word;
}

@media (max-width: 900px) {
  .orb-weather-card {
    max-width: 220px;
    padding: 8px 12px;
    border-radius: 14px;
  }
  .orb-weather-phrase {
    font-size: 11px;
    line-height: 1.3;
  }
}

@media (max-width: 600px) {
  .orb-weather-card {
    display: none;
  }
}

.sky-land {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: min(32vh, 280px);
  z-index: 2;
  pointer-events: none;
  transform-origin: 50% 100%;
  animation: hills-breathe 9s ease-in-out infinite;
}

.sky-land-day,
.sky-land-night {
  position: absolute;
  inset: 0;
}

.sky-land-day {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 280' preserveAspectRatio='none'%3E%3Cpath fill='%231f5c58' d='M0 168c80-28 200-64 320-58 140 8 210 62 360 70s280-40 400-52c90-10 220 8 360 36v116H0z'/%3E%3Cpath fill='%23164745' d='M0 210c110-24 240-52 390-40 170 14 250 58 420 52 150-6 250-48 390-44 90 2 170 22 240 40v62H0z'/%3E%3Cpath fill='%23113332' d='M0 246c160-18 310-40 500-22 170 16 260 36 430 22 140-12 250-38 510-18v52H0z'/%3E%3C/svg%3E")
    center bottom / 100% 100% no-repeat;
}

.sky-land-night {
  opacity: 0;
  transition: opacity 1.1s ease;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 280' preserveAspectRatio='none'%3E%3Cpath fill='%230b2430' d='M0 168c80-28 200-64 320-58 140 8 210 62 360 70s280-40 400-52c90-10 220 8 360 36v116H0z'/%3E%3Cpath fill='%23081b26' d='M0 210c110-24 240-52 390-40 170 14 250 58 420 52 150-6 250-48 390-44 90 2 170 22 240 40v62H0z'/%3E%3Cpath fill='%23051118' d='M0 246c160-18 310-40 500-22 170 16 260 36 430 22 140-12 250-38 510-18v52H0z'/%3E%3C/svg%3E")
    center bottom / 100% 100% no-repeat;
}

html[data-theme="night"] .sky-land-night {
  opacity: 1;
}

@keyframes sun-spin {
  to { transform: rotate(360deg); }
}

@keyframes sky-twinkle {
  0%, 100% { opacity: .7; }
  50% { opacity: 1; }
}

@keyframes hills-breathe {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(0, 5px, 0) scale(1.018); }
}

@keyframes cord-swing {
  0% { transform: rotate(14deg); }
  16% { transform: rotate(-11deg); }
  32% { transform: rotate(8deg); }
  48% { transform: rotate(-5deg); }
  64% { transform: rotate(3deg); }
  80% { transform: rotate(-1.4deg); }
  100% { transform: rotate(0deg); }
}

@keyframes mail-arrive {
  from {
    opacity: 0;
    transform: translateY(-14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes mail-avatar-pulse {
  0%, 100% { transform: scale(1); }
  35% { transform: scale(1.16); box-shadow: 0 0 0 7px rgba(85, 102, 216, .22); }
  70% { transform: scale(.96); }
}

@media (prefers-reduced-motion: reduce) {
  html::before,
  body::before,
  body::after,
  .sky-clock-wheel,
  .sky-land,
  .sky-land-night,
  .sky-sun::before,
  .theme-toggle.is-swinging .theme-lamp-hang,
  .mail-item.is-new,
  .corporate-mail-row.is-new,
  .mail-item.is-new .mail-avatar,
  .corporate-mail-row.is-new .mail-avatar-sender {
    animation: none !important;
    transition: none !important;
  }
}

/* ---------------------------------------------------- */
/* Views Layout                                         */
/* ---------------------------------------------------- */

main {
  flex: 1;
  min-width: 0;
}

img,
video,
iframe {
  max-width: 100%;
  height: auto;
}

.view {
  display: none;
}

.active-view {
  display: block;
}

.hero-section {
  padding-top: 76px;
  text-align: center;
}

.hero-tag, .secondary-title > span {
  display: inline-block;
  font: 500 10px var(--mono);
  color: var(--on-sky-faint);
  letter-spacing: .22em;
  text-transform: uppercase;
  text-shadow: var(--sky-text-shadow);
}

.hero-section h1 {
  font-family: var(--serif);
  font-size: clamp(46px, 7.4vw, 96px);
  font-weight: 400;
  letter-spacing: -.005em;
  line-height: 1.04;
  margin: 22px 0 20px;
  color: #fff;
  text-shadow: 0 6px 40px rgba(24, 32, 100, .28);
}

.tagline {
  font-size: 16px;
  font-weight: 300;
  line-height: 1.7;
  color: rgba(255, 255, 255, .84);
  max-width: 580px;
  margin: 0 auto 78px;
  text-shadow: var(--sky-text-shadow);
}

.hero-actions {
  margin: 30px 0 78px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.pill-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 30px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .94);
  color: #2b2d4a;
  font: 600 14px Manrope, Arial, sans-serif;
  letter-spacing: .01em;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 18px 40px -18px rgba(24, 30, 90, .75);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.pill-button:hover {
  background: #fff;
  transform: translateY(-2px);
  box-shadow: 0 24px 48px -18px rgba(24, 30, 90, .85);
}

.pill-button-ghost {
  background: rgba(255, 255, 255, .16);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .32);
  box-shadow: none;
}

.pill-button-ghost:hover {
  background: rgba(255, 255, 255, .28);
  color: #fff;
}

/* ---------------------------------------------------- */
/* Temporary Inbox Widget                               */
/* ---------------------------------------------------- */

.inbox-widget {
  text-align: left;
  background: var(--sheet);
  border: 1px solid var(--sheet-line);
  border-radius: 26px;
  padding: 4px 26px 20px;
  color: var(--card-ink);
  box-shadow: var(--sheet-shadow);
  backdrop-filter: blur(18px);
}

.widget-heading {
  height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(35, 36, 61, .1);
}

.widget-heading h2 {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 500;
  letter-spacing: 0;
  margin: 0;
  color: var(--card-ink);
}

.section-heading h2 {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .02em;
  margin: 0;
  color: #f1f1ed;
}

.mail-symbol {
  font: 500 11px var(--mono);
  color: var(--card-muted);
  margin-right: 9px;
  vertical-align: middle;
}

.new-address, .load-more {
  border: 1px solid rgba(35, 36, 61, .16);
  background: rgba(255, 255, 255, .6);
  color: var(--card-ink);
  font: 600 12px Manrope, Arial, sans-serif;
  border-radius: 999px;
  padding: 10px 18px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, color .15s, border-color .15s;
}

.new-address:hover, .load-more:hover {
  background: var(--violet);
  border-color: var(--violet);
  color: #fff;
}

.load-more {
  border-color: rgba(255, 255, 255, .5);
  background: rgba(255, 255, 255, .16);
  color: #fff;
}

.load-more:hover {
  background: #fff;
  border-color: #fff;
  color: var(--card-ink);
}

.load-more:disabled {
  opacity: .45;
  cursor: default;
}

.load-more:disabled:hover {
  background: rgba(255, 255, 255, .16);
  border-color: rgba(255, 255, 255, .5);
  color: #fff;
}

.generated-address {
  min-height: 78px;
  background: rgba(85, 102, 216, .07);
  border: 1px solid rgba(85, 102, 216, .16);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 22px;
  margin-top: 18px;
  font: 14px var(--mono);
  color: var(--card-ink);
  overflow-wrap: anywhere;
}

.copy-button {
  border: 0;
  background: rgba(255, 255, 255, .8);
  border-radius: 999px;
  padding: 8px 14px;
  font: 600 11px Manrope, Arial, sans-serif;
  letter-spacing: .04em;
  color: var(--violet);
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, color .15s;
}

.copy-button:hover {
  background: var(--violet);
  color: #fff;
}

.inbox-log {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  color: var(--card-muted);
  font: 10px var(--mono);
  letter-spacing: .04em;
  border-bottom: 1px solid rgba(35, 36, 61, .08);
}

.log-label {
  color: var(--card-ink);
}

.log-line {
  height: 1px;
  background: rgba(35, 36, 61, .16);
  width: 38px;
}

.log-message {
  flex: 1;
}

.log-time {
  color: var(--violet);
}

.timer-hidden {
  display: none;
}

.session-expired {
  color: #d94a4a !important;
}

.refresh-inbox {
  border: 0;
  background: transparent;
  color: var(--card-muted);
  font: 9px var(--mono);
  cursor: pointer;
  padding: 4px 0;
}

.refresh-inbox:hover {
  color: var(--violet);
}

.mail-list:empty {
  display: none;
}

.mail-item {
  display: grid;
  grid-template-columns: 34px 150px 1fr 80px;
  gap: 15px;
  align-items: center;
  border-top: 1px solid rgba(35, 36, 61, .08);
  padding: 16px 12px;
  margin: 0 -12px;
  border-radius: 14px;
}

.message-row {
  cursor: pointer;
  transition: background .15s ease;
}

.message-row:hover {
  background: rgba(85, 102, 216, .08);
}

.mail-item.is-new,
.corporate-mail-row.is-new {
  animation: mail-arrive .42s cubic-bezier(.22, .8, .2, 1) both;
}

.mail-item.is-new .mail-avatar,
.corporate-mail-row.is-new .mail-avatar-sender {
  animation: mail-avatar-pulse .7s ease;
}

.mail-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(150deg, #6c7ce6, #b98fdc);
  color: #fff;
  display: grid;
  place-items: center;
  font: 600 11px Manrope, Arial, sans-serif;
}

.mail-meta strong, .mail-meta small, .mail-subject strong, .mail-subject small {
  display: block;
}

.mail-meta strong, .mail-subject strong {
  font: 600 13px Manrope, Arial, sans-serif;
  color: var(--card-ink);
}

.mail-meta small, .mail-subject small, .mail-time {
  font: 11px Manrope, Arial, sans-serif;
  color: var(--card-muted);
  margin-top: 4px;
}

.mail-time {
  text-align: right;
}

/* ---------------------------------------------------- */
/* Portfolio Work Section & CMS Cards                   */
/* ---------------------------------------------------- */

.work-section {
  padding: 104px 0 90px;
  text-align: left;
}

.section-heading {
  min-height: 54px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  border-top: 1px solid rgba(255, 255, 255, .22);
  padding-top: 16px;
  margin-bottom: 20px;
}

.section-heading h2 {
  font: 500 11px var(--mono);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: var(--sky-text-shadow);
}

.section-heading span {
  font: 10px var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .68);
  text-shadow: var(--sky-text-shadow);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.portfolio-grid-home {
  display: none;
}

.portfolio-card {
  min-height: 290px;
  background: rgba(255, 255, 255, .88);
  color: var(--card-ink);
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 22px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 30px 60px -34px rgba(26, 32, 92, .6);
  transition: transform .2s ease, box-shadow .2s ease;
}

.portfolio-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 38px 70px -30px rgba(26, 32, 92, .7);
}

.portfolio-card.has-image {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-color: rgba(255, 255, 255, .4);
}

.portfolio-card.has-image::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(24, 26, 62, .22) 0%, rgba(20, 22, 54, .82) 100%);
  z-index: 0;
  transition: background .25s ease;
}

.portfolio-card.has-image:hover::before {
  background: linear-gradient(180deg, rgba(24, 26, 62, .1) 0%, rgba(20, 22, 54, .72) 100%);
}

.portfolio-card .card-top, .portfolio-card .card-bottom {
  position: relative;
  z-index: 1;
}

.card-top {
  display: flex;
  justify-content: space-between;
  font: 9px var(--mono);
  letter-spacing: .12em;
  color: var(--card-muted);
}

.portfolio-card h3 {
  font: 400 28px/1.15 var(--serif);
  margin: 0 0 10px;
  letter-spacing: -.005em;
  color: var(--card-ink);
  text-shadow: none;
}

.card-bottom span {
  font: 12px Manrope, Arial, sans-serif;
  color: var(--card-muted);
  text-shadow: none;
}

.portfolio-card.has-image h3 {
  color: #fff;
  text-shadow: 0 2px 14px rgba(10, 12, 40, .6);
}

.portfolio-card.has-image .card-top,
.portfolio-card.has-image .card-bottom span {
  color: rgba(255, 255, 255, .82);
  text-shadow: 0 1px 8px rgba(10, 12, 40, .6);
}

.work-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 26px;
}

.pagination {
  display: flex;
  gap: 6px;
  font: 10px var(--mono);
  color: rgba(255, 255, 255, .72);
  text-shadow: var(--sky-text-shadow);
}

.pagination span {
  cursor: pointer;
  transition: color .15s, background .15s;
  padding: 6px 10px;
  border-radius: 999px;
}

.pagination span:hover {
  color: #fff;
  background: rgba(255, 255, 255, .14);
}

.pagination span.current {
  color: var(--card-ink);
  background: rgba(255, 255, 255, .92);
  border-bottom: 0;
  text-shadow: none;
}

.empty-posts-box {
  grid-column: 1 / -1;
  border: 1px solid rgba(255, 255, 255, .38);
  background: rgba(255, 255, 255, .14);
  border-radius: 22px;
  padding: 44px 20px;
  text-align: center;
  color: #fff;
  font: 12px Manrope, Arial, sans-serif;
  letter-spacing: .02em;
  backdrop-filter: blur(10px);
  text-shadow: var(--sky-text-shadow);
}

/* ---------------------------------------------------- */
/* Secondary Views (Portfolio, Account, Admin)          */
/* ---------------------------------------------------- */

.secondary-view {
  padding: 74px 0 100px;
}

.secondary-view:not(.admin-view) .secondary-title {
  text-align: center;
}

.secondary-title h1 {
  font-family: var(--serif);
  font-size: clamp(38px, 6vw, 76px);
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
  font-weight: 400;
  letter-spacing: -.005em;
  line-height: 1.06;
  margin: 20px 0 54px;
  color: #fff;
  text-shadow: 0 6px 40px rgba(24, 32, 100, .28);
}

.secondary-view .portfolio-grid {
  margin-bottom: 50px;
}

.vpn-view {
  padding-top: 28px;
  padding-bottom: 48px;
}

.vpn-view.active-view {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.vpn-landing {
  width: min(100%, 720px);
  text-align: left;
  padding: 36px 40px 40px;
  background: rgba(246, 247, 249, .96);
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 28px;
  box-shadow: 0 18px 50px rgba(20, 32, 70, .16);
  backdrop-filter: blur(18px);
}

.vpn-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

.vpn-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #3b82f6;
  background: #eaf2ff;
}

.vpn-mark svg {
  width: 22px;
  height: 22px;
}

.vpn-brand small {
  display: block;
  font: 10px var(--mono);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #8b93a3;
}

.vpn-brand strong {
  display: block;
  margin-top: 2px;
  font: 700 18px Manrope, Arial, sans-serif;
  color: #111;
  letter-spacing: -.02em;
}

.vpn-landing h1 {
  margin: 0 0 14px;
  max-width: 16ch;
  font: 700 clamp(32px, 5.4vw, 52px)/1.08 Manrope, Arial, sans-serif;
  letter-spacing: -.045em;
  color: #111;
  text-shadow: none;
}

.vpn-lead {
  margin: 0 0 22px;
  max-width: 40ch;
  font: 16px/1.5 Manrope, Arial, sans-serif;
  color: #8b93a3;
  text-shadow: none;
}

.vpn-facts {
  list-style: none;
  margin: 0 0 26px;
  padding: 0;
  max-width: 560px;
}

.vpn-facts li {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 52px;
  padding: 12px;
  margin: 0 -12px;
  border-top: 1px solid #e6e8ee;
  font: 500 16px/1.35 Manrope, Arial, sans-serif;
  color: #111;
  border-radius: 10px;
}

.vpn-facts li > span:last-child {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 2px;
}

.vpn-facts small {
  font: 400 13px/1.5 Manrope, Arial, sans-serif;
  color: #8b93a3;
}

.vpn-facts li:first-child {
  background: #eaf2ff;
  border-top-color: transparent;
}

.vpn-facts li:last-child {
  border-bottom: 1px solid #e6e8ee;
}

.vpn-fact-icon {
  width: 28px;
  height: 28px;
  flex: none;
  color: #3b82f6;
}

.vpn-fact-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.vpn-connect {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 28px;
  border-radius: 14px;
  background: #3b82f6;
  color: #fff;
  text-decoration: none;
  font: 700 15px Manrope, Arial, sans-serif;
  box-shadow: 0 10px 24px rgba(37, 99, 235, .28);
  transition: transform .15s ease, background .15s ease;
}

.vpn-connect:hover {
  background: #2563eb;
  transform: translateY(-1px);
}

html[data-theme="night"] .vpn-landing {
  background: rgba(18, 22, 32, .88);
  border-color: rgba(255, 255, 255, .08);
}

html[data-theme="night"] .vpn-brand strong,
html[data-theme="night"] .vpn-landing h1,
html[data-theme="night"] .vpn-facts li {
  color: #f4f6fb;
}

html[data-theme="night"] .vpn-brand small,
html[data-theme="night"] .vpn-lead,
html[data-theme="night"] .vpn-facts small {
  color: #9aa3b5;
}

html[data-theme="night"] .vpn-facts li,
html[data-theme="night"] .vpn-facts li:last-child {
  border-color: rgba(255, 255, 255, .1);
}

html[data-theme="night"] .vpn-facts li:first-child {
  background: rgba(96, 165, 250, .14);
  border-top-color: transparent;
}

html[data-theme="night"] .vpn-mark {
  background: rgba(96, 165, 250, .16);
  color: #93c5fd;
}

html[data-theme="night"] .vpn-fact-icon {
  color: #93c5fd;
}

.compress-widget {
  width: min(100%, 1040px);
  margin: 0 auto;
  padding: 22px 26px 24px;
  background: var(--sheet);
  border: 1px solid var(--sheet-line);
  border-radius: 26px;
  box-shadow: var(--sheet-shadow);
  backdrop-filter: blur(18px);
  color: var(--card-ink);
}

.compress-lead {
  margin: 0 0 16px;
  color: var(--card-muted);
  font: 14px/1.5 Manrope, Arial, sans-serif;
}

.compress-lead.is-error {
  color: #c45a5a;
}

.compress-drop {
  display: grid;
  gap: 6px;
  place-items: center;
  min-height: 140px;
  padding: 22px;
  border: 1px dashed var(--row-line);
  border-radius: 20px;
  background: var(--input-bg);
  cursor: pointer;
  text-align: center;
}

.compress-drop.is-ready {
  min-height: 0;
  padding: 12px 16px;
}

.compress-drop strong {
  font: 600 15px Manrope, Arial, sans-serif;
}

.compress-drop span,
.compress-drop em {
  color: var(--card-muted);
  font: 12px Manrope, Arial, sans-serif;
  font-style: normal;
}

.compress-drop.is-over {
  border-color: var(--violet);
  background: var(--row-hover);
}

.compress-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.compress-controls label {
  display: grid;
  gap: 6px;
  font: 10px var(--mono);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--card-muted);
}

.compress-controls select,
.compress-controls input[type="range"] {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--row-line);
  border-radius: 12px;
  background: var(--input-bg);
  color: var(--card-ink);
  font: 13px Manrope, Arial, sans-serif;
  padding: 0 10px;
}

.compress-quality-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.compress-preview-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  border-radius: 18px;
  background: transparent;
}

.compress-preview-wrap[hidden] {
  display: none;
}

.compress-preview-wrap img[src] {
  display: block;
  max-width: 100%;
  max-height: 360px;
  object-fit: contain;
}

.compress-preview-wrap img:not([src]),
.compress-preview-wrap img[src=""] {
  display: none;
}

.compress-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.compress-stats > div {
  padding: 12px;
  border-radius: 16px;
  background: var(--input-bg);
}

.compress-stats span {
  display: block;
  color: var(--card-muted);
  font: 10px var(--mono);
  letter-spacing: .06em;
  text-transform: uppercase;
}

.compress-stats strong {
  display: block;
  margin-top: 6px;
  color: var(--card-ink);
  font: 600 15px Manrope, Arial, sans-serif;
}

.compress-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.compress-widget .pill-button-ghost {
  background: var(--input-bg);
  color: var(--card-ink);
  border: 1px solid var(--row-line);
}

.compress-widget .pill-button-ghost:hover {
  background: var(--row-hover);
  color: var(--card-ink);
}

.image-studio-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 16px;
}

.image-studio-tabs a {
  text-decoration: none;
  color: var(--card-muted);
  background: var(--input-bg);
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 8px 14px;
  font: 600 12px Manrope, Arial, sans-serif;
}

.image-studio-tabs a.is-active {
  color: var(--violet);
  border-color: rgba(85, 102, 216, .28);
  background: rgba(85, 102, 216, .1);
}

.image-studio-body {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, .85fr);
  gap: 18px;
  margin-top: 16px;
}

.image-preview-col,
.image-options-col {
  min-width: 0;
}

.image-stage-frame {
  position: relative;
  display: inline-block;
  max-width: 100%;
  line-height: 0;
  overflow: hidden;
  touch-action: none;
  border-radius: 14px;
  background: rgba(35, 36, 61, .04);
}

.image-stage-frame.is-transparent,
.compress-preview-wrap:has(.image-stage-frame.is-transparent) {
  background:
    linear-gradient(45deg, rgba(35, 36, 61, .08) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(35, 36, 61, .08) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(35, 36, 61, .08) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(35, 36, 61, .08) 75%);
  background-size: 18px 18px;
  background-position: 0 0, 0 9px, 9px -9px, -9px 0;
}

.image-text-layer {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-weight: 600;
  line-height: 1.15;
  max-width: 96%;
  paint-order: stroke fill;
}

.image-rulers,
.image-guides {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.image-ruler {
  position: absolute;
  background: rgba(20, 22, 40, .38);
}

.image-ruler-x {
  left: 0;
  right: 0;
  top: 0;
  height: 14px;
}

.image-ruler-y {
  left: 0;
  top: 0;
  bottom: 0;
  width: 14px;
}

.image-ruler i {
  position: absolute;
  background: rgba(255, 255, 255, .72);
}

.image-ruler-x i {
  top: 8px;
  width: 1px;
  height: 6px;
}

.image-ruler-x i.is-major {
  top: 2px;
  height: 12px;
  background: #fff;
}

.image-ruler-y i {
  left: 8px;
  height: 1px;
  width: 6px;
}

.image-ruler-y i.is-major {
  left: 2px;
  width: 12px;
  background: #fff;
}

.guide-line {
  position: absolute;
  background: #7b8cff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .35);
}

.guide-v {
  top: 0;
  bottom: 0;
  width: 1px;
  left: 50%;
}

.guide-h {
  left: 0;
  right: 0;
  height: 1px;
  top: 50%;
}

.guide-tag {
  position: absolute;
  z-index: 3;
  padding: 2px 6px;
  border-radius: 6px;
  background: #5566d8;
  color: #fff;
  font: 700 10px/1 Manrope, Arial, sans-serif;
  letter-spacing: .02em;
  font-style: normal;
  white-space: nowrap;
}

.guide-tag-x {
  top: 18px;
  transform: translateX(-50%);
}

.guide-tag-y {
  left: 18px;
  transform: translateY(-50%);
}

.crop-box {
  position: absolute;
  border: 2px solid #fff;
  box-shadow: 0 0 0 9999px rgba(20, 22, 40, .42);
  cursor: move;
}

.crop-box i {
  position: absolute;
  width: 10px;
  height: 10px;
  background: #fff;
  border: 1px solid var(--violet);
  border-radius: 2px;
}

.crop-box i[data-handle="nw"] { left: -5px; top: -5px; cursor: nwse-resize; }
.crop-box i[data-handle="ne"] { right: -5px; top: -5px; cursor: nesw-resize; }
.crop-box i[data-handle="sw"] { left: -5px; bottom: -5px; cursor: nesw-resize; }
.crop-box i[data-handle="se"] { right: -5px; bottom: -5px; cursor: nwse-resize; }
.crop-box i[data-handle="n"] { left: calc(50% - 5px); top: -5px; cursor: ns-resize; }
.crop-box i[data-handle="s"] { left: calc(50% - 5px); bottom: -5px; cursor: ns-resize; }
.crop-box i[data-handle="w"] { left: -5px; top: calc(50% - 5px); cursor: ew-resize; }
.crop-box i[data-handle="e"] { right: -5px; top: calc(50% - 5px); cursor: ew-resize; }

.image-panel {
  display: grid;
  gap: 8px;
}

.image-panel[hidden] {
  display: none;
}

.image-panel > label,
.image-extra label {
  display: grid;
  gap: 6px;
  font: 11px Manrope, Arial, sans-serif;
  color: var(--card-muted);
}

.image-panel textarea,
.image-panel select,
.image-extra select,
.mode-inline input[type="number"],
.mode-inline select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--row-line);
  border-radius: 12px;
  background: var(--input-bg);
  color: var(--card-ink);
  font: 13px Manrope, Arial, sans-serif;
  padding: 8px 10px;
}

.image-panel textarea {
  resize: vertical;
  min-height: 84px;
}

.image-panel input[type="range"] {
  width: 100%;
  accent-color: var(--violet);
}

.image-panel input[type="color"] {
  width: 56px;
  height: 36px;
  padding: 2px;
  border: 1px solid var(--row-line);
  border-radius: 10px;
  background: var(--input-bg);
}

.mode-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--row-line);
  border-radius: 16px;
  background: var(--input-bg);
  cursor: pointer;
}

.mode-card input[type="radio"] {
  accent-color: var(--violet);
}

.mode-card span {
  display: grid;
  gap: 4px;
  color: var(--card-ink);
}

.mode-card strong {
  font: 600 14px Manrope, Arial, sans-serif;
}

.mode-card small,
.mode-card em {
  font: 12px Manrope, Arial, sans-serif;
  font-style: normal;
  color: var(--card-muted);
}

.mode-card.is-featured em,
.mode-card em[data-i18n="compress_badge_best"] {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(85, 102, 216, .12);
  color: var(--violet);
  font: 700 9px/1 Manrope, Arial, sans-serif;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.mode-card.is-active {
  border-color: rgba(85, 102, 216, .45);
  background: rgba(85, 102, 216, .1);
  box-shadow: inset 0 0 0 1px rgba(85, 102, 216, .16);
}

.mode-inline {
  display: flex;
  gap: 8px;
  align-items: center;
}

.mode-inline input[type="number"] {
  max-width: 96px;
}

.image-extra {
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px solid var(--row-line);
  display: grid;
  gap: 10px;
}

.image-extra > p {
  margin: 0;
  font: 700 11px Manrope, Arial, sans-serif;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--card-muted);
}

.check-row {
  display: flex !important;
  align-items: center;
  gap: 8px;
  grid-template-columns: none;
}

.check-row input {
  accent-color: var(--violet);
}

.crop-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.crop-actions button {
  border: 1px solid var(--row-line);
  background: var(--input-bg);
  color: var(--card-ink);
  border-radius: 999px;
  padding: 8px 12px;
  font: 600 12px Manrope, Arial, sans-serif;
  cursor: pointer;
}

.crop-actions button:hover {
  border-color: var(--violet);
  color: var(--violet);
}

@media (max-width: 720px) {
  .compress-controls,
  .compress-stats {
    grid-template-columns: 1fr;
  }

  .image-studio-body {
    grid-template-columns: 1fr;
  }

  .vpn-landing {
    padding: 28px 22px 32px;
    border-radius: 22px;
  }

  .vpn-landing h1 {
    max-width: none;
  }
}

.legal-view.active-view {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.legal-view .secondary-title {
  width: 100%;
  text-align: center;
}

.legal-view .secondary-title h1 {
  font-size: clamp(30px, 4.6vw, 58px);
  letter-spacing: -.005em;
  line-height: 1.12;
  margin: 18px 0 30px;
}

.legal-copy {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 42px 46px 46px;
  background: var(--sheet);
  border: 1px solid var(--sheet-line);
  border-radius: 26px;
  box-shadow: var(--sheet-shadow);
  backdrop-filter: blur(18px);
  font: 14px/1.75 Manrope, Arial, sans-serif;
  color: var(--copy);
  text-align: left;
}

.legal-copy .legal-updated {
  color: var(--card-muted);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 28px;
  text-align: center;
}

.legal-copy h2 {
  margin: 30px 0 10px;
  font: 500 20px/1.3 var(--serif);
  letter-spacing: 0;
  color: var(--card-ink);
}

.legal-copy p {
  margin: 0 0 12px;
}

.legal-copy .legal-contacts {
  margin-top: 14px;
  padding: 18px 20px;
  border: 1px solid rgba(85, 102, 216, .18);
  border-radius: 18px;
  background: rgba(85, 102, 216, .07);
  color: var(--card-ink);
  line-height: 1.9;
}

.legal-copy .legal-contacts a {
  color: var(--violet);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-copy .legal-contacts a:hover {
  color: var(--card-ink);
}

/* Account Layout */
.account-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  min-width: 0;
  max-width: 100%;
  text-align: left;
}

.panel {
  background: var(--sheet);
  border: 1px solid var(--sheet-line);
  border-radius: 24px;
  padding: 28px;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  color: var(--card-ink);
  box-shadow: var(--sheet-shadow);
  backdrop-filter: blur(18px);
}

.account-layout:has(> .panel:only-child) {
  grid-template-columns: minmax(0, 520px);
  justify-content: center;
}

.panel-label {
  font: 10px var(--mono);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--card-muted);
}

.profile {
  display: flex;
  gap: 15px;
  align-items: center;
  margin: 30px 0 20px;
}

.profile-avatar {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  background: linear-gradient(150deg, #6c7ce6, #b98fdc);
  color: #fff;
  border-radius: 50%;
  font: 600 19px Manrope, Arial, sans-serif;
}

.profile h3 {
  font: 500 22px var(--serif);
  margin: 0;
  color: var(--card-ink);
}

.profile p {
  font: 12px Manrope, Arial, sans-serif;
  color: var(--card-muted);
  margin: 4px 0 0;
}

.corporate-mail {
  border-top: 1px solid #30302e;
  margin-top: 22px;
  padding-top: 17px;
}

body:not(.is-admin-view) .corporate-mail {
  border-top-color: rgba(35, 36, 61, .1);
}

.corporate-mail small {
  font: 9px var(--mono);
  color: #858582;
}

body:not(.is-admin-view) .corporate-mail small {
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--card-muted);
}

.corporate-mail strong {
  font: 11px var(--mono);
  margin-top: 8px;
  color: #fff;
  display: block;
}

body:not(.is-admin-view) .corporate-mail strong {
  font-size: 13px;
  color: var(--card-ink);
}

.subscription-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  border-top: 1px solid rgba(35, 36, 61, .1);
  padding: 15px 0;
  font: 12px Manrope, Arial, sans-serif;
  color: var(--card-ink);
}

.subscription-row small {
  grid-column: 1 / -1;
  color: var(--card-muted);
  font-size: 11px;
}

.online {
  color: #9bd545;
}

.offline {
  color: #858582;
}

body:not(.is-admin-view) .online {
  color: #2f9e5f;
}

body:not(.is-admin-view) .offline {
  color: var(--card-muted);
}

.no-subscription {
  border-top: 1px solid rgba(35, 36, 61, .1);
  margin-top: 20px;
  padding-top: 20px;
}

.no-subscription strong {
  font: 600 14px Manrope, Arial, sans-serif;
  color: var(--card-ink);
}

.no-subscription p {
  font: 13px/1.7 Manrope, Arial, sans-serif;
  color: var(--card-muted);
  max-width: 380px;
}

/* ---------------------------------------------------- */
/* Admin Panel (Full-Width Dashboard & Sidebar)        */
/* ---------------------------------------------------- */

.admin-view {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.admin-dashboard-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
  padding: 20px 0 32px;
  min-height: calc(100vh - 56px);
}

.admin-sidebar {
  display: flex;
  flex-direction: column;
  padding: 18px 16px;
  background: var(--sheet);
  border: 1px solid var(--sheet-line);
  border-radius: 24px;
  box-shadow: var(--sheet-shadow);
  backdrop-filter: blur(18px);
}

.admin-sidebar-header {
  margin-bottom: 18px;
}

.admin-sidebar-tag {
  font: 9px var(--mono);
  color: var(--card-muted);
  letter-spacing: .16em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 6px;
}

.admin-sidebar-title {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0;
  margin: 0;
  color: var(--card-ink);
}

.admin-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.admin-sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  font: 600 12px Manrope, Arial, sans-serif;
  color: var(--card-muted);
  text-decoration: none;
  border-radius: 999px;
  background: transparent;
  border: 1px solid transparent;
  transition: all .15s ease;
  user-select: none;
}

.admin-sidebar-link .nav-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--card-muted);
  transition: background .15s ease, transform .15s ease, box-shadow .15s ease;
  flex-shrink: 0;
}

.admin-sidebar-link:hover {
  color: var(--card-ink);
  background: var(--row-hover);
  border-color: var(--sheet-line);
}

.admin-sidebar-link:hover .nav-indicator {
  background: var(--violet);
}

.admin-sidebar-link.active {
  color: #fff;
  background: var(--violet);
  border-color: var(--violet);
  font-weight: 600;
}

.admin-sidebar-link.active .nav-indicator {
  background: #fff;
  transform: scale(1.2);
  box-shadow: 0 0 8px rgba(255, 255, 255, .45);
}

.admin-nav-badge {
  margin-left: auto;
  min-width: 16px;
  height: 16px;
  padding: 0 5px;
  border-radius: 8px;
  background: #fff;
  color: var(--violet);
  font: 700 9px/16px var(--mono);
  text-align: center;
}

.admin-sidebar-link.active .admin-nav-badge {
  background: #fff;
  color: var(--violet);
}

.admin-nav-badge[hidden] {
  display: none !important;
}

.admin-sidebar-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--row-line);
}

.admin-sync {
  margin-top: 8px;
  font: 9px var(--mono);
  color: var(--card-muted);
  letter-spacing: .04em;
}

.admin-system-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font: 9px var(--mono);
  color: var(--card-muted);
  letter-spacing: .06em;
}

.admin-system-badge .badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #5e9e26;
  box-shadow: 0 0 6px rgba(94, 158, 38, 0.6);
}

.admin-main-area {
  min-width: 0;
  flex: 1;
  color: var(--card-ink);
}

.admin-content {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  margin-top: 0;
}

.stat-card, .admin-table {
  border: 1px solid var(--sheet-line);
  background: var(--sheet);
  border-radius: 22px;
  padding: 18px 20px;
  box-shadow: var(--sheet-shadow);
  backdrop-filter: blur(18px);
  color: var(--card-ink);
}

.stat-card small {
  font: 9px var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--card-muted);
}

.stat-card strong {
  display: block;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 500;
  margin: 10px 0 4px;
  color: var(--card-ink);
}

.stat-card p, .admin-copy {
  font: 12px/1.6 Manrope, Arial, sans-serif;
  color: var(--card-muted);
}

.admin-table {
  grid-column: 1 / -1;
}

.site-stats-panel {
  padding-bottom: 16px;
}

.site-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.site-stats-card small {
  font: 9px var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--card-muted);
}

.site-stats-card strong {
  display: block;
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 500;
  margin: 8px 0 4px;
  color: var(--card-ink);
}

.site-stats-card p {
  font: 12px/1.5 Manrope, Arial, sans-serif;
  color: var(--card-muted);
  margin: 0 0 12px;
}

.site-stats-bars {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 48px;
}

.spark-col {
  flex: 1;
  height: 100%;
  display: flex;
  align-items: flex-end;
}

.spark-col i {
  display: block;
  width: 100%;
  min-height: 2px;
  border-radius: 4px 4px 0 0;
  background: color-mix(in srgb, var(--card-ink) 55%, transparent);
}

.mailbox-list-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  border-right: 1px solid var(--row-line);
}

.mail-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-top: 1px solid var(--row-line);
  flex-shrink: 0;
}

.mail-pager[hidden] {
  display: none;
}

.mail-page-status {
  font: 11px var(--mono);
  color: var(--card-muted);
  letter-spacing: .04em;
}

.mail-pager .small-action:disabled {
  opacity: .4;
  pointer-events: none;
}

.admin-table h3 {
  font: 500 20px var(--serif);
  margin: 0 0 20px;
  color: var(--card-ink);
}

.table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 14px;
  gap: 12px;
}

.vps-search-input {
  background: var(--input-bg);
  border: 1px solid var(--sheet-line);
  color: var(--card-ink);
  font: 12px Manrope, Arial, sans-serif;
  padding: 8px 12px;
  border-radius: 999px;
  width: 220px;
  max-width: 100%;
}

.table-header h3 {
  margin: 0;
}

.table-row, .post-row {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: center;
  border-top: 1px solid var(--row-line);
  padding: 12px 0;
  font: 12px Manrope, Arial, sans-serif;
  color: var(--card-ink);
}

.table-row small, .post-row small {
  color: var(--card-muted);
  font-size: 11px;
}

.diagnostic-row {
  display: grid;
  grid-template-columns: 110px max-content minmax(0, 1fr);
  gap: 10px 14px;
  align-items: center;
  border-top: 1px solid var(--row-line);
  padding: 9px 0;
  min-height: 36px;
}

.diagnostic-row strong {
  font: 600 12px/1.2 Manrope, Arial, sans-serif;
  letter-spacing: .02em;
  color: var(--card-ink);
}

.diagnostic-row .status-pill {
  justify-self: start;
  line-height: 1;
  padding: 3px 8px;
}

.diagnostic-row small {
  justify-self: end;
  min-width: 0;
  font: 10px/1.2 var(--mono);
  color: #777;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.small-action,
.accent-action,
.danger-action,
.warn-action {
  font: 600 12px Manrope, Arial, sans-serif;
  border-radius: 999px;
  padding: 9px 16px;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}

.small-action {
  border: 1px solid var(--sheet-line);
  background: var(--input-bg);
  color: var(--card-ink);
}

.small-action:hover {
  background: var(--violet);
  border-color: var(--violet);
  color: #fff;
}

.accent-action {
  border: 1px solid var(--violet);
  background: var(--violet);
  color: #fff;
}

.accent-action:hover {
  filter: brightness(1.08);
}

.warn-action {
  border: 1px solid rgba(224, 176, 74, .4);
  background: transparent;
  color: #c4922a;
}

.danger-action {
  border: 1px solid rgba(217, 106, 106, .35);
  background: transparent;
  color: #d96a6a;
}

.danger-action:hover {
  background: #b52b2b;
  color: #fff;
  border-color: #b52b2b;
}

.empty, .error {
  font: 13px Manrope, Arial, sans-serif;
  color: var(--card-muted);
}

.account-layout .empty {
  font-size: 15px;
  line-height: 1.6;
  color: var(--card-ink);
  margin: 0 0 18px;
}

.error {
  color: #c0392b;
}

.status-pill {
  font: 9px var(--mono);
  padding: 4px 7px;
  border: 1px solid currentColor;
}

.status-pill.online {
  color: #5e9e26;
}

.status-pill.error {
  color: #b52b2b;
}

.status-pill.not_configured {
  color: var(--card-muted);
}

.status-pill {
  border-radius: 999px;
  padding: 4px 9px;
}

.healthy {
  color: #2f9e5f;
}

.muted {
  color: var(--card-muted);
}

/* ---------------------------------------------------- */
/* Corporate Mailbox Tab Styling                        */
/* ---------------------------------------------------- */

/* ---------------------------------------------------- */
/* Corporate Mailbox Tab Styling (Professional Webmail) */
/* ---------------------------------------------------- */

.corporate-mailbox {
  width: 100%;
  position: relative;
}

.mailbox-split {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(300px, 1.15fr);
  min-height: calc(100vh - 280px);
  flex: 1;
}

.corporate-mail-list {
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: calc(100vh - 268px);
  overflow: auto;
  border-right: 0;
  background: transparent;
}

.corporate-mail-list .empty {
  margin: 0;
  padding: 16px 14px;
}

.corporate-mail-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid var(--row-line);
  padding: 8px 10px;
  min-height: 52px;
  cursor: pointer;
  background: transparent;
}

.corporate-mail-row .mail-sender-name,
.corporate-mail-row .mail-subject-text {
  color: var(--card-ink);
  font-weight: 500;
}

.corporate-mail-row .mail-sender-addr,
.corporate-mail-row .mail-time {
  color: var(--card-muted);
}

.corporate-mail-row:hover {
  background: var(--row-hover);
}

.corporate-mail-row.selected {
  background: var(--row-hover);
  box-shadow: inset 2px 0 0 var(--violet);
}

.corporate-mail-row.is-unread {
  background: var(--input-bg);
}

.corporate-mail-row.is-unread .mail-sender-name,
.corporate-mail-row.is-unread .mail-subject-text {
  color: var(--card-ink);
  font-weight: 700;
}

.corporate-mail-row.is-unread .mail-sender-addr,
.corporate-mail-row.is-unread .mail-time {
  color: var(--card-muted);
}

.corporate-mail-row.is-unread:hover {
  background: var(--row-hover);
}

.corporate-mail-row.selected.is-unread {
  background: var(--row-hover);
}

.mail-row-main {
  min-width: 0;
}

.mail-row-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
}

.mail-preview {
  min-width: 0;
  padding: 16px 18px 20px;
  overflow: auto;
  max-height: calc(100vh - 220px);
}

.mail-preview-empty {
  margin-top: 32px;
}

.mail-preview-subject {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -.04em;
  color: var(--card-ink);
}

.mail-preview-meta {
  font: 10px var(--mono);
  color: var(--card-muted);
  margin-bottom: 12px;
}

.mail-preview-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.mail-preview-body {
  margin: 0;
  min-height: 160px;
}

.mail-html-frame {
  display: block;
  width: 100%;
  min-height: 120px;
  border: 1px solid var(--sheet-line);
  border-radius: 12px;
  background: var(--input-bg);
  overflow: hidden;
}

.mail-plain-body {
  margin: 0;
  color: var(--card-ink);
  font: 13px/1.7 Manrope, Arial, sans-serif;
  white-space: pre-wrap;
  word-break: break-word;
}

.mail-plain-body a {
  color: var(--accent);
}

.mail-plain-body img {
  max-width: min(100%, 420px);
  height: auto;
  display: block;
  margin: 12px 0;
  border-radius: 6px;
}

.mail-hit {
  background: #3a4a18;
  color: #e8f5a8;
  padding: 0 2px;
}

.mail-compose-drawer {
  position: absolute;
  right: 0;
  bottom: 0;
  width: min(520px, 100%);
  background: var(--sheet);
  border: 1px solid var(--sheet-line);
  border-radius: 18px 18px 0 0;
  z-index: 6;
  box-shadow: var(--sheet-shadow);
}

.mail-compose-drawer[hidden] {
  display: none;
}

.compose-drawer-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  border-bottom: 1px solid var(--row-line);
  font: 11px var(--mono);
  color: var(--card-ink);
}

.mail-compose-drawer .mail-compose-card {
  margin: 0;
  border: 0;
  padding: 12px 14px 16px;
}

.corporate-mail-row .mail-time {
  font: 9px var(--mono);
  color: var(--card-muted);
  flex-shrink: 0;
}

.mail-compose-drawer .compose-textarea {
  min-height: 110px;
  margin: 8px 0;
}

.mail-shortcuts-hint {
  font: 9px var(--mono);
  color: #666;
  margin-left: 8px;
}

.mailbox-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--row-line);
  padding-bottom: 12px;
  gap: 16px;
  flex-wrap: wrap;
}

.mailbox-identity {
  display: flex;
  align-items: center;
  gap: 14px;
}

.mail-avatar-lg {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--violet);
  color: #fff;
  border: 0;
  display: grid;
  place-items: center;
  font: 700 15px Manrope, Arial, sans-serif;
  letter-spacing: .05em;
  flex-shrink: 0;
}

.mailbox-identity h3 {
  margin: 4px 0 0;
  font: 600 17px/1.2 Manrope, Arial, sans-serif;
  color: var(--card-ink);
  letter-spacing: -.02em;
}

.mailbox-address-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.mailbox-address-row h3 {
  margin: 4px 0 0;
  min-width: 0;
}

.mail-copy-addr {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  margin-top: 4px;
  padding: 0;
  border: 1px solid var(--sheet-line);
  border-radius: 8px;
  background: var(--input-bg);
  color: var(--card-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.mail-copy-addr svg {
  width: 12px;
  height: 12px;
  display: block;
}

.mail-copy-addr:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.mailbox-meta-status {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
}

.mail-status {
  font: 10px var(--mono);
  color: #9bd545;
  letter-spacing: .04em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.mailbox-workspace {
  display: grid;
  grid-template-columns: 176px minmax(0, 1fr);
  min-height: calc(100vh - 220px);
  border: 1px solid var(--sheet-line);
  border-radius: 24px;
  overflow: hidden;
  background: var(--sheet);
  box-shadow: var(--sheet-shadow);
  backdrop-filter: blur(18px);
}

.mail-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 10px;
  border-right: 1px solid var(--row-line);
}

.mail-nav-btn {
  border: 1px solid transparent;
  background: transparent;
  color: var(--card-muted);
  padding: 9px 12px;
  font: 600 12px Manrope, Arial, sans-serif;
  cursor: pointer;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  text-align: left;
  transition: all .15s ease;
  user-select: none;
}

.mail-nav-btn:hover {
  background: var(--row-hover);
  color: var(--card-ink);
}

.mail-nav-btn.active {
  background: var(--violet);
  color: #fff;
  border-color: var(--violet);
  font-weight: 600;
}

.mail-nav-btn.active .mail-tab-count {
  background: #fff;
  color: var(--violet);
  font-weight: 700;
}

.mail-nav-compose {
  margin-top: auto;
  border-color: var(--sheet-line);
  background: var(--input-bg);
  color: var(--card-ink);
  justify-content: center;
}

.mail-nav-compose:hover {
  border-color: var(--violet);
  color: #fff;
  background: var(--violet);
}

.mailbox-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.mailbox-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--row-line);
  margin: 0;
  padding: 10px 12px;
  flex-wrap: wrap;
}

.mail-tabs.is-hidden {
  display: none !important;
}

.mail-tabs {
  display: flex;
  gap: 8px;
  align-items: center;
}

.mail-tab {
  border: 1px solid var(--sheet-line);
  background: var(--input-bg);
  color: var(--card-muted);
  padding: 7px 14px;
  font: 600 12px Manrope, Arial, sans-serif;
  cursor: pointer;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all .15s ease;
  user-select: none;
}

.mail-tab:hover {
  background: var(--row-hover);
  color: var(--card-ink);
  border-color: var(--sheet-line);
}

.mail-tab.active {
  background: var(--violet);
  color: #fff;
  border-color: var(--violet);
  font-weight: 600;
}

.mail-tab-count {
  font-size: 9px;
  padding: 1px 6px;
  border-radius: 10px;
  background: var(--row-hover);
  color: var(--card-ink);
}

.mail-tab.active .mail-tab-count {
  background: #fff;
  color: var(--violet);
  font-weight: 700;
}

.mailbox-search-box {
  margin-left: auto;
}

.mail-search-input {
  background: var(--input-bg);
  border: 1px solid var(--sheet-line);
  color: var(--card-ink);
  font: 12px Manrope, Arial, sans-serif;
  padding: 8px 14px;
  border-radius: 999px;
  width: 240px;
  max-width: 100%;
  transition: border-color .15s, background .15s;
}

.mail-search-input:focus {
  outline: none;
  border-color: var(--violet);
  background: var(--sheet);
}

/* Mail List Container & Items */
.mail-avatar-sender {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--violet);
  color: #fff;
  border: 0;
  display: grid;
  place-items: center;
  font: 600 11px var(--mono);
  flex-shrink: 0;
}

.mail-sender-name {
  font: 600 12px Manrope, Arial, sans-serif;
  color: var(--card-ink);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mail-sender-addr {
  font: 9px var(--mono);
  color: var(--card-muted);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.mail-subject-col {
  overflow: hidden;
}

.mail-subject-text {
  font: 500 12px Manrope, sans-serif;
  color: var(--card-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.mail-row-end {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.mail-badge {
  font: 8px var(--mono);
  padding: 2px 6px;
  border-radius: 2px;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.badge-inbox {
  background: rgba(184, 240, 77, 0.1);
  color: var(--accent);
  border: 1px solid rgba(184, 240, 77, 0.25);
}

.badge-sent {
  background: rgba(100, 180, 255, 0.1);
  color: #8ac0ff;
  border: 1px solid rgba(100, 180, 255, 0.25);
}

/* Mail Compose Screen */
.mail-compose-card {
  background: var(--input-bg);
  border: 1px solid var(--sheet-line);
  border-radius: 16px;
  padding: 20px;
  margin-top: 8px;
}

.compose-field-row {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--row-line);
  padding: 8px 0;
  gap: 12px;
}

.compose-field-label {
  font: 500 10px var(--mono);
  color: var(--card-muted);
  width: 60px;
  flex-shrink: 0;
}

.compose-field-input {
  flex: 1;
  background: transparent;
  border: 0;
  color: var(--card-ink);
  font: 13px Manrope, Arial, sans-serif;
  outline: none;
  padding: 4px 0;
}

.compose-field-static {
  flex: 1;
  color: var(--accent);
  font: 500 11px var(--mono);
}

.compose-textarea {
  width: 100%;
  min-height: 180px;
  background: var(--sheet);
  border: 1px solid var(--sheet-line);
  color: var(--card-ink);
  font: 13px/1.7 Manrope, Arial, sans-serif;
  padding: 14px;
  margin: 14px 0;
  border-radius: 14px;
  resize: vertical;
  outline: none;
  box-sizing: border-box;
}

.compose-textarea:focus {
  border-color: #555;
}

.compose-actions-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.reader-actions {
  display: flex;
  gap: 10px;
  margin: 14px 0;
}

.mail-reader-body-container {
  background: var(--input-bg);
  border: 1px solid var(--sheet-line);
  border-radius: 16px;
  padding: 16px 18px;
  margin-top: 12px;
  max-height: 62vh;
  overflow: auto;
}

.mail-reader-body-container pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font: 13px/1.75 Manrope, Arial, sans-serif;
  color: var(--card-ink);
}

.mail-reader-body-container .mail-html-frame {
  min-height: 120px;
  border: 0;
  background: transparent;
}

body:not(.is-admin-view) .mail-reader-body-container {
  background: rgba(85, 102, 216, .06);
  border: 1px solid rgba(85, 102, 216, .14);
  border-radius: 16px;
  padding: 16px 18px;
}

body:not(.is-admin-view) .mail-reader-body-container pre {
  font: 13px/1.75 Manrope, Arial, sans-serif;
  color: var(--copy);
}

body:not(.is-admin-view) .mail-reader-body-container .mail-html-frame {
  background: #fff;
  border-radius: 12px;
}

.mail-reader-body-container pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font: 12px/1.75 'DM Mono', monospace;
  color: #d8d8d2;
}

.compose-form, .post-form {
  display: grid;
  gap: 10px;
  padding: 14px 0 22px;
  border-bottom: 1px solid var(--row-line);
}

.compose-form input, .compose-form textarea, .post-form input, .post-form textarea {
  border: 1px solid var(--sheet-line);
  background: var(--input-bg);
  color: var(--card-ink);
  padding: 11px 14px;
  font: 13px Manrope, Arial, sans-serif;
  border-radius: 14px;
}

.compose-form textarea, .post-form textarea {
  min-height: 85px;
}

/* ---------------------------------------------------- */
/* VPS / VDS Tab Styling                                 */
/* ---------------------------------------------------- */

.vds-section {
  margin-top: 8px;
}

.vds-section + .vds-section {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--row-line);
}

.vds-section-title {
  margin: 0 0 8px;
  font: 600 11px Manrope, Arial, sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--card-muted);
}

.vps-card {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) auto auto;
  gap: 12px 16px;
  align-items: center;
  border-top: 1px solid var(--row-line);
  padding: 10px 0;
  min-height: 56px;
}

.vps-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.vps-head strong {
  font: 600 13px Manrope, Arial, sans-serif;
  color: var(--card-ink);
}

.vps-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--card-muted);
  font: 9px var(--mono);
}

.vps-ip {
  color: var(--card-ink);
  cursor: pointer;
  border: 0;
  background: transparent;
  padding: 0;
  font: 9px var(--mono);
}

.vps-ip:hover {
  color: var(--accent);
}

.vps-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.vps-opt {
  font: 8px var(--mono);
  letter-spacing: .04em;
  color: #aaa;
  border: 1px solid #333;
  padding: 1px 6px;
}

.vps-opt.warn {
  color: #d4b45a;
  border-color: #5a4a22;
}

.vps-details-panel {
  grid-column: 1 / -1;
  border-top: 1px solid #2a2a28;
  padding-top: 10px;
}

.vps-detail-grid {
  display: grid;
  gap: 12px;
}

.vps-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 18px;
  margin: 0;
}

.vps-facts > div {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 8px;
  align-items: baseline;
}

.vps-facts dt {
  font: 9px/1.3 var(--mono);
  color: #777;
  margin: 0;
}

.vps-facts dd {
  font: 11px/1.3 var(--mono);
  color: #eee;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vps-inline-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.vps-inline-form label {
  font: 9px var(--mono);
  color: #777;
  min-width: 72px;
}

.vps-inline-form input {
  flex: 1;
  min-width: 160px;
  background: var(--input-bg);
  border: 1px solid var(--sheet-line);
  color: var(--card-ink);
  font: 12px Manrope, Arial, sans-serif;
  padding: 8px 12px;
  border-radius: 12px;
}

.vps-detail-status {
  font: 10px var(--mono);
  color: #aaa;
  margin: 0;
}

.vps-asset-list {
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
  font: 10px var(--mono);
  color: #ccc;
}

.vps-asset-list li {
  border-top: 1px solid #222;
  padding: 4px 0;
}

.event-row {
  display: grid;
  grid-template-columns: 76px 88px minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
  border-top: 1px solid var(--row-line);
  padding: 8px 0;
  font: 12px Manrope, Arial, sans-serif;
  color: var(--card-ink);
}

.event-row time,
.event-actor {
  color: var(--card-muted);
}

.events-header {
  margin-top: 18px;
}

.vps-status {
  font: 10px var(--mono);
  white-space: nowrap;
}

.vps-status.expired {
  color: #d4b45a;
}

.vps-status.suspended {
  color: #888;
}

.h1-account-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  padding: 6px 0 8px;
  color: var(--card-muted);
  font: 10px var(--mono);
}

.h1-account-bar span:first-child {
  color: var(--card-ink);
}

.cred-json {
  max-height: 260px;
  overflow: auto;
  margin: 10px 0 0;
  padding: 10px;
  background: #141412;
  color: #eee;
  font: 10px/1.4 var(--mono);
  white-space: pre-wrap;
  word-break: break-word;
}

.vps-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.vps-result {
  grid-column: 1 / -1;
  color: #b8f04d;
  font: 9px var(--mono);
  min-height: 0;
}

.server-link {
  color: var(--card-ink);
  font: 10px var(--mono);
  text-decoration: underline;
  margin-right: 12px;
}

.server-link:hover {
  color: var(--accent);
}

.reveal-password {
  border: 0;
  background: transparent;
  color: #858582;
  font: 9px var(--mono);
  cursor: pointer;
}

.hidden-password {
  display: none;
  color: #b8f04d;
  font: 10px var(--mono);
  margin-left: 12px;
}

.vps-result.password-visible .hidden-password {
  display: inline;
}

/* ---------------------------------------------------- */
/* 3x-ui VPN Clients Dashboard                          */
/* ---------------------------------------------------- */

.clients-manager {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.clients-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.client-stat-card {
  background: var(--sheet);
  border: 1px solid var(--sheet-line);
  border-radius: 18px;
  padding: 14px 16px;
  box-shadow: var(--sheet-shadow);
}

.client-stat-label {
  font: 9px var(--mono);
  color: var(--card-muted);
  letter-spacing: .12em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 6px;
}

.client-stat-value {
  font: 500 24px var(--serif);
  color: var(--card-ink);
  letter-spacing: 0;
}

.client-stat-sub {
  font: 9px var(--mono);
  color: #888;
  margin-top: 4px;
}

.clients-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 0;
  border-bottom: 1px solid var(--row-line);
}

.clients-toolbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 260px;
}

.clients-search-box {
  flex: 1;
  max-width: 380px;
}

.clients-search-input {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--sheet-line);
  border-radius: 999px;
  color: var(--card-ink);
  font: 12px Manrope, Arial, sans-serif;
  padding: 8px 12px;
  outline: none;
  transition: border-color .15s;
  box-sizing: border-box;
}

.clients-search-input:focus {
  border-color: #555;
}

.clients-filter-group {
  display: flex;
  gap: 6px;
}

.clients-filter-btn {
  background: var(--input-bg);
  border: 1px solid var(--sheet-line);
  color: var(--card-muted);
  font: 600 12px Manrope, Arial, sans-serif;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: all .15s;
}

.clients-filter-btn:hover {
  color: var(--card-ink);
  border-color: var(--sheet-line);
}

.clients-filter-btn.active {
  background: var(--violet);
  color: #fff;
  border-color: var(--violet);
}

.clients-table {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-height: calc(100vh - 280px);
  overflow: auto;
}

.clients-table-heading {
  display: grid;
  grid-template-columns: minmax(180px, 1.1fr) 1.4fr 0.9fr 168px;
  gap: 12px;
  padding: 6px 12px;
  font: 9px var(--mono);
  color: var(--card-muted);
  letter-spacing: .06em;
  border-bottom: 1px solid var(--row-line);
  position: sticky;
  top: 0;
  background: var(--sheet);
  z-index: 1;
}

.clients-sort {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  padding: 0;
  cursor: pointer;
  text-align: left;
}

.clients-sort:hover,
.clients-sort.active {
  color: var(--card-ink);
}

.client-row-card {
  display: grid;
  grid-template-columns: minmax(180px, 1.1fr) 1.4fr 0.9fr 168px;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid var(--row-line);
  padding: 8px 12px;
  min-height: 56px;
  transition: background .15s;
}

.client-row-card:hover {
  background: var(--row-hover);
}

.client-ident-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.client-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 9px var(--mono);
  letter-spacing: .06em;
}

.client-status-badge.online {
  color: #9bd545;
}

.client-status-badge.offline {
  color: #777;
}

.client-status-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.client-status-badge.online .dot {
  box-shadow: 0 0 6px rgba(155, 213, 69, 0.6);
}

.client-email-title {
  font: 600 13px Manrope, Arial, sans-serif;
  color: var(--card-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.client-meta-sub {
  font: 9px var(--mono);
  color: #858582;
  display: flex;
  align-items: center;
  gap: 6px;
}

.client-traffic-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.traffic-main-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font: 11px var(--mono);
}

.traffic-total-bold {
  font-weight: 600;
  color: var(--card-ink);
}

.traffic-split-details {
  font: 9px var(--mono);
  color: #858582;
}

.traffic-bar-track {
  width: 100%;
  height: 3px;
  background: #222220;
  border-radius: 2px;
  overflow: hidden;
}

.traffic-bar-track.unlimited {
  background: repeating-linear-gradient(
    90deg,
    #222220,
    #222220 4px,
    #2c2c28 4px,
    #2c2c28 8px
  );
}

.traffic-bar-fill {
  height: 100%;
  background: #5e9e26;
  border-radius: 2px;
}

.traffic-bar-fill.warn {
  background: #d49826;
}

.traffic-bar-fill.danger {
  background: #c23b3b;
}

.client-quota-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font: 10px var(--mono);
}

.client-quota-val {
  color: var(--card-ink);
}

.client-expiry-val {
  color: var(--card-muted);
  font-size: 9px;
}

.client-actions-col {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-end;
  position: relative;
}

.action-menu {
  position: relative;
}

.action-menu-list {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  min-width: 160px;
  background: #161614;
  border: 1px solid #333;
  z-index: 5;
  padding: 4px;
}

.action-menu.open .action-menu-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.action-menu-list .danger-action,
.action-menu-list .small-action {
  width: 100%;
  text-align: left;
}

.client-expiry-val.expiring {
  color: #e0b04a;
}

.client-expiry-val.expired {
  color: #d96a6a;
}

/* Modal for client links */
.client-links-box {
  max-width: 680px;
  width: 90vw;
}

.client-link-item {
  background: #0d0d0c;
  border: 1px solid #282826;
  border-radius: 3px;
  padding: 12px 14px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.client-link-text {
  font: 10px/1.5 var(--mono);
  color: #bbb;
  word-break: break-all;
  max-height: 70px;
  overflow-y: auto;
  flex: 1;
}


/* ---------------------------------------------------- */
/* Post Editor Image Uploading in Admin CMS             */
/* ---------------------------------------------------- */

.post-form-image-preview {
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  border: 1px solid #444;
  margin-top: 8px;
  display: none;
}

.post-form-image-preview.visible {
  display: block;
}

.image-upload-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin: 4px 0;
}

.image-file-input {
  display: none;
}

/* ---------------------------------------------------- */
/* Modals (Login, Corporate Mail Reader, Post Reader)   */
/* ---------------------------------------------------- */

.modal {
  position: fixed;
  inset: 0;
  background: rgba(22, 26, 72, .5);
  backdrop-filter: blur(10px);
  display: none;
  place-items: center;
  z-index: 1000;
}

html[data-theme="night"] .modal {
  background: rgba(4, 6, 18, .62);
}

.modal.open {
  display: grid;
}

.captcha-popover {
  display: none;
  position: fixed;
  z-index: 1200;
  width: min(320px, calc(100vw - 16px));
}

.captcha-popover.open {
  display: block;
}

.captcha-box {
  width: 100%;
  padding: 16px 16px 14px;
  border-radius: 18px;
  background: var(--sheet);
  color: var(--card-ink);
  border: 1px solid var(--sheet-line);
  box-shadow: var(--sheet-shadow);
}

.captcha-popover h2 {
  font: 500 18px/1.2 var(--serif);
  letter-spacing: 0;
  margin: 0 22px 6px 0;
  color: var(--card-ink);
}

.captcha-popover p {
  margin: 0;
  font: 12px/1.45 Manrope, Arial, sans-serif;
  color: var(--card-muted);
}

.captcha-challenge {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0 10px;
}

.captcha-image {
  flex: 1;
  min-height: 56px;
  display: grid;
  place-items: center;
  border: 1px solid var(--sheet-line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--sheet) 86%, #000 14%);
  color: var(--card-ink);
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.captcha-image canvas,
.captcha-image svg {
  width: 100%;
  height: 56px;
  display: block;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}

.captcha-form .confirm-actions {
  margin-top: 0;
}

.captcha-form input {
  width: 100%;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid var(--sheet-line);
  border-radius: 10px;
  background: transparent;
  color: var(--card-ink);
  font: 14px var(--mono);
  letter-spacing: .18em;
  text-transform: uppercase;
}

.captcha-form input:focus {
  outline: 1px solid var(--accent);
}

.modal-box {
  width: min(420px, calc(100% - 40px));
  background: var(--sheet);
  color: var(--card-ink);
  border: 1px solid var(--sheet-line);
  border-radius: 26px;
  padding: 32px;
  box-shadow: var(--sheet-shadow);
}

.modal-box h2 {
  font: 500 27px/1.2 var(--serif);
  letter-spacing: 0;
  color: var(--card-ink);
  margin: 12px 0 10px;
}

.modal-box p:not(.eyebrow) {
  font: 13px/1.7 Manrope, Arial, sans-serif;
  color: var(--card-muted);
}

.eyebrow {
  color: var(--violet);
  letter-spacing: .16em;
  text-transform: uppercase;
}

.modal-close {
  float: right;
  border: 0;
  background: none;
  font-size: 22px;
  color: var(--card-muted);
  cursor: pointer;
  transition: color .15s;
}

.modal-close:hover {
  color: var(--card-ink);
}

.confirm-actions,
.cred-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 18px;
}

.cred-field {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border-top: 1px solid #2a2a28;
  padding: 8px 0;
  font: 11px var(--mono);
}

.cred-field code {
  color: #eee;
  font: 11px var(--mono);
}

.cred-password.hidden {
  filter: blur(4px);
  user-select: none;
}

.eyebrow {
  font: 9px var(--mono);
  color: #858582;
}

.login-hint {
  font: 9px var(--mono);
  color: #858582;
}

body:not(.is-admin-view) .login-hint {
  font: 12px Manrope, Arial, sans-serif;
  color: var(--card-muted);
}

.login-bot-btn {
  display: inline-flex;
  margin: 16px 0 12px;
}

.login-waiting {
  color: #b8f04d;
}

body:not(.is-admin-view) .login-waiting {
  color: var(--violet);
}

.account-actions {
  border-top: 1px solid rgba(35, 36, 61, .1);
  margin-top: 18px;
  padding-top: 16px;
}

.account-actions .accent-action {
  display: inline-flex;
  text-decoration: none;
  padding: 10px 18px;
  max-width: 100%;
  white-space: normal;
  text-align: center;
}

.account-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  border-top: 1px solid rgba(35, 36, 61, .1);
  margin-top: 18px;
  padding-top: 16px;
}

.account-facts small {
  display: block;
  font: 10px var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--card-muted);
  overflow-wrap: anywhere;
}

.account-facts strong {
  display: block;
  margin-top: 6px;
  font: 600 13px Manrope, Arial, sans-serif;
  color: var(--card-ink);
  overflow-wrap: anywhere;
}

.account-trial {
  margin: 16px 0 0;
  font: 12px Manrope, Arial, sans-serif;
  color: var(--violet);
}

.account-trial.used {
  color: var(--card-muted);
}

.sub-link-block {
  border-top: 1px solid rgba(35, 36, 61, .1);
  margin-top: 16px;
  padding-top: 14px;
}

.sub-link-block small,
.account-qr-wrap small {
  display: block;
  font: 10px var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--card-muted);
  margin-bottom: 8px;
}

.sub-link-row {
  display: flex;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.sub-link-row code {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  overflow-wrap: anywhere;
  word-break: break-all;
  font: 11px var(--mono);
  color: var(--card-ink);
  background: rgba(85, 102, 216, .08);
  border-radius: 12px;
  padding: 10px 12px;
}

.account-qr-wrap {
  margin-top: 16px;
}

.account-qr {
  display: block;
  width: 168px;
  height: 168px;
  padding: 10px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 12px 30px -18px rgba(26, 32, 92, .6);
}

.account-order-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
  border-top: 1px solid rgba(35, 36, 61, .1);
  padding: 12px 0;
  font: 12px Manrope, Arial, sans-serif;
  color: var(--card-ink);
}

.account-order-row small {
  grid-column: 1 / -1;
  color: var(--card-muted);
  font-size: 11px;
}

.mail-reader {
  width: min(760px, calc(100% - 40px));
  max-height: 82vh;
  overflow: auto;
  background: var(--sheet);
  color: var(--card-ink);
  border: 1px solid var(--sheet-line);
  border-radius: 26px;
  padding: 32px;
  box-shadow: var(--sheet-shadow);
  backdrop-filter: blur(18px);
}

.mail-reader h2 {
  font: 500 27px/1.2 var(--serif);
  letter-spacing: 0;
  margin: 18px 0 14px;
  color: var(--card-ink);
}

.reader-meta {
  border-top: 1px solid var(--row-line);
  border-bottom: 1px solid var(--row-line);
  padding: 12px 0;
  color: var(--card-muted);
  font: 10px var(--mono);
}

.mail-reader pre {
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--card-ink);
  font: 13px/1.75 Manrope, Arial, sans-serif;
  margin: 22px 0 0;
}

.post-reader {
  width: min(820px, calc(100% - 40px));
  max-height: 86vh;
  overflow-y: auto;
  background: var(--sheet);
  color: var(--card-ink);
  border: 1px solid var(--sheet-line);
  border-radius: 26px;
  padding: 34px;
  position: relative;
  box-shadow: var(--sheet-shadow);
}

.post-reader-hero {
  width: 100%;
  height: 300px;
  background-size: cover;
  background-position: center;
  margin: 18px 0 22px;
  border: 0;
  border-radius: 18px;
}

.post-reader-category {
  font: 10px var(--mono);
  color: var(--violet);
  letter-spacing: .16em;
  text-transform: uppercase;
  display: inline-block;
  margin-bottom: 8px;
}

.post-reader h2 {
  font-family: var(--serif);
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.18;
  margin: 0 0 12px;
  color: var(--card-ink);
}

.post-reader-meta {
  color: var(--card-muted);
  font: 10px var(--mono);
  letter-spacing: .08em;
  border-bottom: 1px solid rgba(35, 36, 61, .1);
  padding-bottom: 12px;
  margin-bottom: 20px;
}

.post-reader-body {
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--copy);
  font: 14px/1.8 Manrope, sans-serif;
  letter-spacing: .01em;
}

/* ---------------------------------------------------- */
/* Footer & Toast                                       */
/* ---------------------------------------------------- */

.site-footer {
  margin-top: auto;
  padding: 36px 0 42px;
  border-top: 1px solid rgba(255, 255, 255, .22);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, .7);
  font: 12px Manrope, Arial, sans-serif;
  text-shadow: var(--sky-text-shadow);
}

.footer-links {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  color: var(--on-sky-soft);
  text-decoration: none;
  transition: color .15s ease;
}

.footer-links a:hover {
  color: #fff;
}

.footer-rights {
  margin: 0;
  color: rgba(255, 255, 255, .5);
  letter-spacing: .04em;
}

.toast {
  position: fixed;
  right: 25px;
  bottom: 25px;
  max-width: min(440px, calc(100vw - 32px));
  background: #fff;
  color: #23243d;
  padding: 14px 18px;
  border-radius: 16px;
  font: 600 13px/1.45 Manrope, Arial, sans-serif;
  letter-spacing: .01em;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  box-shadow: 0 24px 50px -20px rgba(14, 18, 60, .7);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease;
  pointer-events: none;
  z-index: 2000;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* ---------------------------------------------------- */
/* Intro Door Animation & Loader                        */
/* ---------------------------------------------------- */

.entry-screen {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 99999;
  background: linear-gradient(180deg, var(--sky-top) 0%, #5a74e0 22%, var(--sky-mid) 48%, var(--sky-low) 76%, var(--sky-bottom) 100%);
  display: grid;
  place-items: center;
  overflow: hidden;
  touch-action: none;
  pointer-events: all;
  animation: entry-fade .2s ease-out;
}

.entry-door {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(24vw, 300px);
  height: 56vh;
  min-height: 320px;
  margin: 0;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(255, 255, 255, .34);
  border-radius: 26px;
  background: rgba(255, 255, 255, .1);
  backdrop-filter: blur(12px);
  box-shadow: 0 40px 90px -30px rgba(12, 18, 60, .6);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 34px;
  color: rgba(255, 255, 255, .82);
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 4px;
  transform-origin: right center;
  z-index: 2;
  animation: door-swing-right 1.35s cubic-bezier(.22, .72, .24, 1) forwards;
}

.entry-light {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(24vw, 300px);
  height: 56vh;
  min-height: 320px;
  margin: 0;
  transform: translate(-50%, -50%);
  background: #fff;
  border-radius: 26px;
  box-shadow: 0 0 34px 10px rgba(255, 255, 255, .3);
  z-index: 1;
  animation: room-light-static 1.35s ease-out forwards;
}

.entry-door span {
  position: relative;
  z-index: 1;
  opacity: 0;
  animation: label-in .3s .85s forwards;
}

.entry-loader {
  position: absolute;
  bottom: 34px;
  left: 8vw;
  right: 8vw;
  z-index: 2;
}

.loader-track {
  height: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .28);
  overflow: hidden;
}

.loader-track i {
  display: block;
  width: 25%;
  height: 100%;
  border-radius: 999px;
  background: #fff;
  animation: loader-run 1.35s linear infinite;
}

.loader-code {
  color: rgba(255, 255, 255, .74);
  font: 9px var(--mono);
  margin-top: 10px;
  letter-spacing: 2px;
}

.entry-complete {
  opacity: 0;
  transition: opacity .45s ease;
  pointer-events: none;
}

@keyframes door-swing-right {
  0% { transform: translate(-50%, -50%) perspective(1000px) rotateY(0deg); opacity: 1; }
  100% { transform: translate(-50%, -50%) perspective(1000px) rotateY(82deg); opacity: 1; }
}

@keyframes room-light-static {
  0% { opacity: 0; }
  45% { opacity: .35; }
  100% { opacity: 1; }
}

@keyframes label-in {
  to { opacity: 1; }
}

@keyframes loader-run {
  from { transform: translateX(-100%); }
  to { transform: translateX(500%); }
}

@keyframes entry-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ---------------------------------------------------- */
/* Responsive Media Queries                             */
/* ---------------------------------------------------- */

@media (max-width: 700px) {
  .account-layout,
  .account-facts {
    grid-template-columns: 1fr;
  }
  .site-frame {
    padding: 0 22px;
  }
  .site-header {
    height: 64px;
  }
  .hero-section {
    padding-top: 44px;
  }
  .hero-section h1 {
    font-size: clamp(36px, 11vw, 52px);
    letter-spacing: -.005em;
  }
  .tagline {
    font-size: 14px;
  }
  .hero-actions {
    margin: 26px 0 48px;
  }
  .inbox-widget {
    padding: 4px 18px 16px;
    border-radius: 22px;
  }
  .widget-heading {
    height: auto;
    min-height: 60px;
    gap: 14px;
  }
  .generated-address {
    font-size: 11px;
    padding: 14px 16px;
    overflow: hidden;
  }
  .generated-address span {
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .legal-copy {
    padding: 28px 22px 32px;
    border-radius: 22px;
  }
  .panel {
    padding: 22px;
    border-radius: 20px;
  }
  .inbox-log {
    height: auto;
    min-height: 60px;
    gap: 8px;
    flex-wrap: wrap;
  }
  .log-message {
    flex: 1 0 100%;
    order: 5;
    padding-bottom: 14px;
  }
  .log-time {
    margin-left: auto;
  }
  .mail-item {
    grid-template-columns: 30px 1fr;
    gap: 8px;
    margin: 0;
    padding: 14px 0;
  }
  .mail-subject, .mail-time {
    grid-column: 2;
  }
  .mail-time {
    text-align: left;
  }
  .portfolio-grid {
    grid-template-columns: 1fr;
  }
  .portfolio-card {
    min-height: 240px;
  }
  .section-heading {
    gap: 15px;
  }
  .section-heading span {
    white-space: nowrap;
  }
  .admin-content {
    grid-template-columns: 1fr;
  }
  .vps-facts {
    grid-template-columns: 1fr;
  }
  .table-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .table-row small:last-child {
    display: none;
  }
  .secondary-view {
    padding-top: 55px;
  }
  .entry-light, .entry-door {
    width: 43vw;
    height: 52vh;
    min-height: 0;
  }
}

@media (max-width: 960px) {
  body.is-admin-view .site-frame {
    padding: 0 20px;
  }
  .admin-dashboard-layout {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 24px 0 40px;
  }
  .admin-content {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .admin-sidebar {
    border-right: 0;
    border-bottom: 1px solid #242422;
    padding-right: 0;
    padding-bottom: 20px;
  }
  .admin-sidebar-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
  }
  .admin-sidebar-footer {
    display: none;
  }
  .vps-card,
  .clients-table-heading,
  .client-row-card {
    grid-template-columns: 1fr;
  }
  .mailbox-workspace,
  .mailbox-split {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .mailbox-list-col {
    border-right: 0;
  }
  .site-stats-grid {
    grid-template-columns: 1fr;
  }
  .mail-nav {
    flex-direction: row;
    flex-wrap: wrap;
    border-right: 0;
    border-bottom: 1px solid #242422;
  }
  .corporate-mail-list,
  .mail-preview {
    max-height: 50vh;
    border-right: 0;
  }
  .mail-compose-drawer {
    width: 100%;
  }
  .clients-table-heading {
    display: none;
  }
  .client-actions-col,
  .vps-actions {
    justify-content: flex-start;
  }
}

.bot-metrics {
  grid-template-columns: repeat(4, 1fr);
}

.bot-diagnostics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 12px 0 4px;
}

.bot-diag {
  font: 10px var(--mono);
  letter-spacing: .06em;
  color: var(--card-muted);
}

.bot-diag.ok { color: #b8f04d; }
.bot-diag.fail { color: #e36a6a; }

.bot-tabs {
  flex-wrap: wrap;
}

.bot-admin-form {
  margin: 12px 0;
  padding: 14px;
  border: 1px solid var(--sheet-line);
  background: var(--input-bg);
  border-radius: 16px;
}

.bot-form-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.bot-form-head h4 {
  margin: 0;
  font: 600 13px Manrope, Arial, sans-serif;
  letter-spacing: .02em;
  color: var(--card-ink);
}

.bot-inline-form {
  display: grid;
  gap: 10px;
}

.bot-inline-form label {
  display: grid;
  gap: 6px;
  font: 10px var(--mono);
  color: var(--card-muted);
  letter-spacing: .06em;
}

.bot-inline-form input,
.bot-inline-form select,
.bot-inline-form textarea {
  background: var(--input-bg);
  border: 1px solid var(--sheet-line);
  color: var(--card-ink);
  font: 13px Manrope, Arial, sans-serif;
  padding: 8px 12px;
  border-radius: 12px;
}

.broadcast-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(240px, .85fr);
  gap: 16px;
  align-items: start;
}

.broadcast-preview-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  background: var(--sheet);
  border: 1px solid var(--sheet-line);
  border-radius: 22px;
  box-shadow: var(--sheet-shadow);
}

.broadcast-photo-row,
.broadcast-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.broadcast-photo-row span {
  color: var(--card-ink);
  font: 12px Manrope, Arial, sans-serif;
}

.tg-message {
  overflow: hidden;
  border-radius: 16px 16px 16px 6px;
  background: #fff;
  color: #1c1d2e;
  box-shadow: 0 12px 28px -18px rgba(24, 30, 80, .5);
}

html[data-theme="night"] .tg-message {
  background: #1b1d33;
  color: #eef0ff;
}

.tg-message img {
  display: block;
  width: 100%;
  max-height: 280px;
  object-fit: cover;
}

.tg-message p {
  margin: 0;
  padding: 10px 12px 12px;
  white-space: pre-wrap;
  word-break: break-word;
  font: 14px/1.45 Manrope, Arial, sans-serif;
}

.tg-message.is-empty {
  background: transparent;
  box-shadow: none;
}

@media (max-width: 860px) {
  .broadcast-layout {
    grid-template-columns: 1fr;
  }
}

.bot-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bot-row {
  display: grid;
  grid-template-columns: 1.4fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  background: var(--input-bg);
  border: 1px solid var(--sheet-line);
  border-radius: 16px;
}

.bot-row strong {
  display: block;
  font: 600 13px Manrope, Arial, sans-serif;
  color: var(--card-ink);
}

.bot-row small,
.bot-row p {
  display: block;
  margin: 4px 0 0;
  font: 12px Manrope, Arial, sans-serif;
  color: var(--card-muted);
}

.bot-answer {
  color: #b8f04d !important;
}

.bot-row-meta {
  text-align: right;
}

.bot-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.bot-section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  margin: 0 0 12px;
}

.bot-ticket {
  grid-template-columns: 1fr auto;
}

.bot-answered {
  font: 10px var(--mono);
  color: #858582;
}

@media (max-width: 900px) {
  .bot-metrics {
    grid-template-columns: repeat(2, 1fr);
  }
  .bot-row,
  .bot-ticket {
    grid-template-columns: 1fr;
  }
  .bot-row-meta,
  .bot-row-actions {
    text-align: left;
    justify-content: flex-start;
  }
}

/* ---------------------------------------------------- */
/* Tablet                                               */
/* ---------------------------------------------------- */

@media (max-width: 1100px) {
  .site-frame {
    padding: 0 28px;
    box-shadow:
      -18px 0 40px 10px rgba(0, 0, 0, .5),
      18px 0 40px 10px rgba(0, 0, 0, .5);
  }
  body.is-admin-view .site-frame {
    padding: 0 16px;
  }
  .admin-dashboard-layout,
  .admin-main-area,
  .admin-content,
  .admin-table,
  .clients-manager,
  .corporate-mailbox {
    min-width: 0;
    max-width: 100%;
  }
  .admin-dashboard-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    min-height: 0;
    padding: 16px 0 32px;
  }
  .admin-sidebar {
    border-right: 0;
    border-bottom: 1px solid #242422;
    padding-right: 0;
    padding-bottom: 16px;
  }
  .admin-sidebar-nav {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    overflow: visible;
  }
  .admin-sidebar-link {
    padding: 10px 12px;
    white-space: normal;
  }
  .admin-content {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .clients-summary-grid,
  .bot-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .account-layout,
  .account-facts {
    grid-template-columns: 1fr;
  }
  .subscription-row,
  .sub-link-row,
  .account-order-row {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }
  .mailbox-split,
  .vps-card,
  .client-row-card,
  .clients-table-heading,
  .bot-row,
  .bot-ticket,
  .diagnostic-row {
    grid-template-columns: minmax(0, 1fr);
  }
  .clients-table-heading {
    display: none;
  }
  .clients-toolbar-left {
    min-width: 0;
  }
  code, pre {
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-all;
  }
}

/* ---------------------------------------------------- */
/* Phone                                                */
/* ---------------------------------------------------- */

@media (max-width: 760px) {
  body {
    background-attachment: scroll;
  }
  .site-socials {
    left: max(6px, env(safe-area-inset-left));
    top: max(10px, env(safe-area-inset-top));
    gap: 6px;
  }
  .site-social {
    width: 30px;
    height: 30px;
    border-radius: 50%;
  }
  .site-frame {
    padding: 0 16px;
    padding-left: max(48px, calc(env(safe-area-inset-left) + 36px));
    padding-right: max(16px, env(safe-area-inset-right));
    box-shadow: none;
  }
  body.is-admin-view .site-frame {
    padding: 0 12px;
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
  }
  body.is-admin-view .site-header {
    height: auto;
    min-height: 56px;
    overflow: visible;
  }
  .site-frame:before,
  .site-frame:after {
    display: none;
  }
  .site-header {
    height: auto;
    min-height: 56px;
    padding: 8px 0;
    flex-wrap: wrap;
    align-items: center;
  }
  .header-left {
    min-width: 0;
    flex: 1 1 auto;
  }
  .header-nav {
    flex: 1 1 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 4px;
    padding-bottom: 4px;
  }
  .header-link {
    height: 34px;
    padding: 0 11px;
    font-size: 12px;
  }
  .header-divider {
    display: none;
  }
  .language-menu {
    position: fixed;
    right: 16px;
    top: 64px;
  }
  .hero-section {
    padding-top: 36px;
  }
  .hero-section h1 {
    font-size: clamp(34px, 11vw, 48px);
    letter-spacing: -.005em;
    margin: 16px 0 14px;
  }
  .tagline {
    max-width: none;
    margin: 0;
    font-size: 14px;
  }
  .hero-actions {
    margin: 24px 0 42px;
  }
  .pill-button {
    width: 100%;
    max-width: 340px;
  }
  .header-brand {
    font-size: 18px;
  }
  .brand-mark {
    width: 26px;
    height: 26px;
    border-radius: 9px;
  }
  .brand-mark-spin {
    inset: 6px;
  }
  .widget-heading {
    height: auto;
    min-height: 56px;
    padding: 10px 0;
    gap: 10px;
    flex-wrap: wrap;
  }
  .generated-address {
    height: auto;
    min-height: 64px;
    padding: 12px 14px;
    gap: 10px;
    font-size: 12px;
    flex-wrap: wrap;
  }
  .generated-address span {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-all;
  }
  .inbox-log {
    height: auto;
    min-height: 52px;
    padding: 10px 0;
    flex-wrap: wrap;
    gap: 8px;
  }
  .log-message {
    flex: 1 0 100%;
    order: 5;
  }
  .log-time {
    margin-left: auto;
  }
  .mail-item {
    grid-template-columns: 28px 1fr;
    gap: 8px;
    margin: 0;
    padding: 14px 0;
  }
  .mail-subject,
  .mail-time {
    grid-column: 2;
  }
  .mail-time {
    text-align: left;
  }
  .portfolio-grid {
    grid-template-columns: 1fr;
  }
  .portfolio-card {
    min-height: 220px;
  }
  .section-heading {
    flex-wrap: wrap;
    gap: 8px;
  }
  .work-footer {
    flex-wrap: wrap;
    gap: 12px;
  }
  .secondary-view {
    padding-top: 36px;
  }
  .secondary-title h1 {
    font-size: clamp(28px, 9vw, 42px);
    letter-spacing: -.005em;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  .legal-copy {
    text-align: left;
    padding: 24px 18px 28px;
    border-radius: 20px;
  }
  .panel {
    padding: 20px;
    border-radius: 20px;
  }
  .profile {
    margin: 28px 0 16px;
  }
  .account-layout,
  .account-facts,
  .subscription-row,
  .account-order-row {
    grid-template-columns: 1fr;
  }
  .sub-link-row {
    flex-direction: column;
    align-items: stretch;
  }
  .sub-link-row .small-action {
    width: 100%;
  }
  .account-qr {
    width: min(168px, 100%);
    height: auto;
    aspect-ratio: 1;
  }
  .admin-sidebar-header {
    margin-bottom: 12px;
  }
  .admin-sidebar-title {
    font-size: 16px;
  }
  .admin-sidebar-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    flex-wrap: unset;
    overflow: visible;
    gap: 8px;
  }
  .admin-sidebar-link {
    white-space: normal;
    line-height: 1.3;
    min-height: 40px;
  }
  .admin-sidebar-footer {
    display: none;
  }
  .admin-content,
  .clients-summary-grid,
  .bot-metrics {
    grid-template-columns: 1fr;
  }
  .admin-table,
  .stat-card {
    grid-column: 1 / -1;
  }
  .table-header,
  .mailbox-top,
  .mailbox-meta-status,
  .clients-toolbar,
  .clients-toolbar-left {
    flex-direction: column;
    align-items: stretch;
  }
  .vps-search-input,
  .clients-search-box,
  .clients-search-input {
    width: 100%;
    max-width: none;
  }
  .clients-toolbar-left {
    min-width: 0;
  }
  .mail-tabs,
  .bot-tabs {
    flex-wrap: wrap;
  }
  .mailbox-workspace,
  .mailbox-split {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .mailbox-list-col {
    border-right: 0;
  }
  .site-stats-grid {
    grid-template-columns: 1fr;
  }
  .corporate-mail-list,
  .mail-preview {
    max-height: 46vh;
    border-right: 0;
  }
  .mail-compose-drawer {
    width: 100%;
  }
  .diagnostic-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .vps-card,
  .client-row-card,
  .clients-table-heading {
    grid-template-columns: 1fr;
  }
  .clients-table-heading {
    display: none;
  }
  .stat-card strong {
    font-size: 18px;
  }
  .modal-box,
  .mail-reader,
  .post-reader {
    width: calc(100% - 20px);
    max-height: calc(100dvh - 20px);
    padding: 20px 16px;
  }
  .modal-box h2,
  .mail-reader h2,
  .post-reader h2 {
    font-size: 22px;
  }
  .toast {
    right: 12px;
    left: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
  }
  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 16px;
  }
  .site-footer {
    padding-bottom: max(18px, env(safe-area-inset-bottom));
  }
}

@media (max-width: 480px) {
  .admin-content,
  .clients-summary-grid,
  .bot-metrics,
  .account-facts {
    grid-template-columns: 1fr;
  }
  .header-brand {
    letter-spacing: .04em;
  }
}

.mail-back-btn {
  display: none;
}

@media (max-width: 1100px) {
  .clients-toolbar,
  .clients-toolbar-left {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    min-width: 0;
  }

  .clients-search-box,
  .clients-search-input {
    width: 100%;
    max-width: none;
  }

  .clients-filter-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .clients-filter-btn {
    width: 100%;
    text-align: center;
  }

  .clients-table-heading {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    position: static;
    padding: 10px 0;
    background: transparent;
  }

  .clients-heading-actions {
    display: none;
  }

  .clients-sort {
    border: 1px solid #2e2e2b;
    border-radius: 3px;
    padding: 6px 10px;
  }

  .clients-table {
    max-height: none;
    overflow: visible;
    gap: 8px;
  }

  .client-row-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    min-height: 0;
    padding: 14px;
    border: 1px solid #282826;
    background: #161614;
  }

  .client-email-title {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    word-break: break-word;
  }

  .client-meta-sub {
    flex-wrap: wrap;
  }

  .client-actions-col {
    justify-content: flex-start;
    flex-wrap: wrap;
    width: 100%;
  }

  .client-actions-col .small-action,
  .client-actions-col .danger-action {
    flex: 1 1 calc(50% - 6px);
  }

  .client-row-card .action-menu {
    flex: 1 1 100%;
  }

  .client-row-card .client-menu-toggle {
    display: none;
  }

  .client-row-card .action-menu-list {
    display: flex;
    position: static;
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .mailbox-identity,
  .mailbox-identity > div {
    min-width: 0;
  }

  .mailbox-identity h3 {
    overflow-wrap: anywhere;
    word-break: break-all;
    font-size: 13px;
  }

  .mailbox-search-box {
    margin-left: 0;
    width: 100%;
  }

  .mail-search-input {
    width: 100%;
    box-sizing: border-box;
  }

  .mailbox-workspace {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .mail-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
    border-right: 0;
    border-bottom: 1px solid #242422;
    padding: 10px 0;
  }

  .mail-nav-btn {
    flex: 1 1 calc(50% - 4px);
    justify-content: center;
  }

  .mail-nav-compose {
    margin: 0;
    flex: 1 1 100%;
  }

  .corporate-mailbox .mail-tabs {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
  }

  .bot-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .mailbox-split {
    display: block;
    min-height: 0;
    border-top: 0;
  }

  .corporate-mail-list,
  .mail-preview {
    max-height: none;
    overflow: visible;
    border-right: 0;
  }

  .mail-preview {
    display: none;
    padding: 4px 0 28px;
  }

  .corporate-mailbox.is-reading .mailbox-top,
  .corporate-mailbox.is-reading .mail-nav,
  .corporate-mailbox.is-reading .mailbox-toolbar,
  .corporate-mailbox.is-reading .corporate-mail-list,
  .corporate-mailbox.is-reading .mailbox-list-col {
    display: none;
  }

  .corporate-mailbox.is-reading .mail-preview {
    display: block;
  }

  .mail-back-btn {
    display: inline-flex;
    position: sticky;
    top: 0;
    z-index: 2;
    margin-bottom: 12px;
    background: #141414;
  }

  .mail-preview-subject {
    font-size: 16px;
    overflow-wrap: anywhere;
  }

  .mail-preview-meta {
    overflow-wrap: anywhere;
  }

  .mail-compose-drawer {
    position: fixed;
    inset: auto 0 0 0;
    width: 100%;
    max-height: min(90dvh, 760px);
    overflow: auto;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    border-radius: 12px 12px 0 0;
    z-index: 20;
  }

  .mail-compose-drawer .compose-textarea {
    min-height: 160px;
  }

  .compose-field-row {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .compose-field-static,
  .compose-field-input {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .compose-actions-row {
    flex-wrap: wrap;
  }

  .compose-actions-row .accent-action,
  .compose-actions-row .small-action {
    flex: 1 1 auto;
  }
}

/* ==================================================== */
/* VPN Speedtest & Servers List Section                 */
/* ==================================================== */

.vpn-container {
  max-width: 880px;
  margin: 0 auto;
  padding: 10px 16px 80px;
}

/* 1. Top Summary Cards (4 Cards Grid) */
.vpn-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}

.vpn-stat-card {
  background: var(--sheet);
  border: 1px solid var(--sheet-line);
  border-radius: 20px;
  padding: 18px 20px;
  box-shadow: var(--sheet-shadow);
  backdrop-filter: blur(14px);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.vpn-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px -12px rgba(26, 32, 92, 0.35);
}

.vpn-stat-card .stat-num {
  font: 700 30px/1.1 Manrope, Arial, sans-serif;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.vpn-stat-card.card-available .stat-num {
  color: #10b981;
}

.vpn-stat-card.card-unavailable .stat-num {
  color: #ef4444;
}

.vpn-stat-card.card-ping .stat-num {
  color: #3b82f6;
}

html[data-theme="night"] .vpn-stat-card.card-ping .stat-num {
  color: #8d96ff;
}

.vpn-stat-card.card-ping .stat-num small {
  font-size: 16px;
  font-weight: 500;
  color: var(--card-muted);
}

.vpn-stat-card.card-ip .stat-num {
  font-size: 19px;
  font-family: var(--mono);
  color: var(--card-ink);
  overflow-wrap: anywhere;
}

.vpn-stat-card .stat-lbl {
  font: 500 13px Manrope, Arial, sans-serif;
  color: var(--card-muted);
}

/* 2. Speedometer Interactive Card */
.vpn-speedometer-box {
  background: var(--sheet);
  border: 1px solid var(--sheet-line);
  border-radius: 24px;
  padding: 24px 28px;
  box-shadow: var(--sheet-shadow);
  backdrop-filter: blur(16px);
  margin-bottom: 24px;
}

.speedtest-server-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--row-line);
  padding-bottom: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 12px;
}

.server-selected-info {
  display: flex;
  align-items: center;
  gap: 14px;
}

.server-selected-flag {
  display: flex;
  align-items: center;
  justify-content: center;
}

.server-selected-flag .flag-svg {
  width: 38px;
  height: 28px;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.server-selected-info strong {
  display: block;
  font: 600 16px/1.2 Manrope, Arial, sans-serif;
  color: var(--card-ink);
}

.server-selected-info small {
  display: block;
  font: 12px var(--mono);
  color: var(--card-muted);
  margin-top: 2px;
}

.speedtest-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 600 12px var(--mono);
  padding: 6px 14px;
  border-radius: 20px;
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.speedtest-status-pill.is-online {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.25);
}

.speedtest-status-pill.is-offline {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.25);
}

.speedtest-status-pill .status-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.speedometer-center-area {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gauge-wrap {
  position: relative;
  width: 360px;
  max-width: 100%;
  height: 210px;
  display: flex;
  justify-content: center;
  margin: 0 auto;
}

.gauge-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.gauge-track {
  stroke: var(--row-line);
  opacity: 0.55;
}

.gauge-progress {
  transition: stroke-dashoffset 0.12s ease-out;
}

.gauge-ticks text {
  fill: var(--card-muted);
  font: 600 12px var(--mono);
  user-select: none;
}

.gauge-needle-group {
  transition: transform 0.16s cubic-bezier(0.2, 0.8, 0.3, 1);
}

.gauge-readout {
  position: absolute;
  bottom: 6px;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.speed-main-value {
  font: 700 48px/1 var(--mono);
  color: var(--card-ink);
  letter-spacing: -0.03em;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.08);
}

.speed-unit-label {
  font: 700 12px var(--mono);
  color: var(--card-muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-top: 4px;
}

.speedtest-stages-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  width: 100%;
  margin: 20px 0 24px;
}

.stage-metric {
  background: var(--input-bg);
  border: 1px solid var(--sheet-line);
  border-radius: 16px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.2s ease;
}

.stage-metric.is-active {
  border-color: #3b82f6;
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.25);
  background: rgba(59, 130, 246, 0.08);
}

.stage-icon {
  font-size: 22px;
  line-height: 1;
}

.stage-title {
  display: block;
  font: 600 11px var(--mono);
  color: var(--card-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 3px;
}

.stage-data strong {
  font: 700 20px/1.2 var(--mono);
  color: var(--card-ink);
}

.stage-data small {
  display: block;
  font-size: 11px;
  color: var(--card-muted);
  margin-top: 2px;
}

.speedtest-actions {
  display: flex;
  justify-content: center;
  width: 100%;
}

.speedtest-start-btn {
  padding: 14px 42px;
  font: 700 14px var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 30px;
  background: #3b82f6;
  color: #fff;
  border: 0;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.35);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.speedtest-start-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(59, 130, 246, 0.5);
  background: #2563eb;
}

.speedtest-start-btn.is-running {
  background: #ef4444;
  box-shadow: 0 8px 24px rgba(239, 68, 68, 0.35);
}

.speedtest-start-btn.is-running:hover {
  background: #dc2626;
  box-shadow: 0 12px 30px rgba(239, 68, 68, 0.5);
}

/* Informational Hosting Notice Banner */
.vpn-notice-banner {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 20px;
  margin-bottom: 20px;
  border-radius: 20px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.28);
  box-shadow: var(--sheet-shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  animation: fadeInNotice 0.3s ease-out;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

#vpn-notice-wrap.is-highlighted .vpn-notice-banner {
  transform: scale(1.02);
  border-color: #f59e0b;
  box-shadow: 0 0 24px rgba(245, 158, 11, 0.35);
}

@keyframes fadeInNotice {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.notice-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.18);
  color: #f59e0b;
  font: 700 10px/1.2 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  flex-shrink: 0;
  margin-top: 1px;
}

.notice-body {
  flex: 1;
}

.notice-title {
  font: 700 14px/1.3 Manrope, Arial, sans-serif;
  color: var(--card-ink);
  margin-bottom: 3px;
}

.notice-desc {
  font: 500 12px/1.55 Manrope, Arial, sans-serif;
  color: var(--card-muted);
}

/* 3. Servers List Card */
.vpn-servers-card {
  background: var(--sheet);
  border: 1px solid var(--sheet-line);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--sheet-shadow);
  backdrop-filter: blur(16px);
}

.servers-card-header {
  padding: 22px 28px 18px;
  border-bottom: 1px solid var(--row-line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.servers-card-header h2 {
  margin: 0;
  font: 600 20px/1.2 Manrope, Arial, sans-serif;
  color: var(--card-ink);
}

.servers-sub {
  margin: 4px 0 0;
  font: 12px Manrope, Arial, sans-serif;
  color: var(--card-muted);
}

.ping-all-btn {
  font: 600 12px var(--mono);
  cursor: pointer;
}

.servers-list {
  display: flex;
  flex-direction: column;
}

.servers-loading {
  padding: 36px;
  text-align: center;
  color: var(--card-muted);
  font: 13px Manrope, Arial, sans-serif;
}

.server-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 28px;
  border-bottom: 1px solid var(--row-line);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.server-item-row:last-child {
  border-bottom: 0;
}

.server-item-row:hover {
  background: var(--row-hover);
}

.server-item-row.is-active {
  background: rgba(59, 130, 246, 0.09);
  border-left: 4px solid #3b82f6;
  padding-left: 24px;
}

.server-col-main {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.server-flag-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 34px;
  height: 26px;
}

.server-flag-wrap .flag-svg {
  width: 32px;
  height: 24px;
  border-radius: 4px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.server-meta {
  min-width: 0;
}

.server-title-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.server-name {
  font: 600 15px/1.3 Manrope, Arial, sans-serif;
  color: var(--card-ink);
}

.badge-premium {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #fff;
  font: 700 9px var(--mono);
  padding: 2px 6px;
  border-radius: 6px;
  letter-spacing: 0.05em;
}

.badge-speed {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
  font: 600 10px var(--mono);
  padding: 2px 6px;
  border-radius: 6px;
}

.badge-provider {
  background: rgba(85, 102, 216, 0.12);
  color: var(--violet);
  border: 1px solid rgba(85, 102, 216, 0.22);
  font: 700 9px var(--mono);
  padding: 2px 6px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.server-host {
  display: block;
  font: 12px var(--mono);
  color: var(--card-muted);
  margin-top: 2px;
}

.server-col-stats {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-shrink: 0;
}

.server-ping-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font: 600 13px var(--mono);
  color: var(--card-ink);
}

.signal-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
}

.signal-bars i {
  width: 3px;
  border-radius: 1px;
  background: currentColor;
}

.signal-bars .bar-1 { height: 5px; }
.signal-bars .bar-2 { height: 9px; }
.signal-bars .bar-3 { height: 14px; }

.server-ping-badge.sig-high { color: #10b981; }
.server-ping-badge.sig-med { color: #f59e0b; }
.server-ping-badge.sig-low { color: #ef4444; }
.server-ping-badge.sig-none { color: var(--card-muted); opacity: 0.6; }

.server-status-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 600 12px Manrope, Arial, sans-serif;
  padding: 5px 12px;
  border-radius: 20px;
}

.server-status-tag.status-online {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
}

.server-status-tag.status-offline {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}

.server-status-tag .status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* 4. Bottom CTA Box */
.vpn-bottom-cta {
  margin-top: 26px;
  background: var(--sheet);
  border: 1px solid var(--sheet-line);
  border-radius: 24px;
  padding: 24px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  box-shadow: var(--sheet-shadow);
  backdrop-filter: blur(14px);
}

.vpn-bottom-cta .cta-text h3 {
  margin: 0 0 4px;
  font: 600 18px/1.2 Manrope, Arial, sans-serif;
  color: var(--card-ink);
}

.vpn-bottom-cta .cta-text p {
  margin: 0;
  font: 13px Manrope, Arial, sans-serif;
  color: var(--card-muted);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .vpn-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  
  .vpn-stat-card {
    padding: 14px 16px;
  }

  .vpn-stat-card .stat-num {
    font-size: 24px;
  }

  .speedtest-stages-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .server-item-row {
    padding: 14px 16px;
  }

  .server-col-stats {
    gap: 12px;
  }

  .server-status-tag {
    font-size: 11px;
    padding: 4px 8px;
  }
}

/* SMS feature toggle (hidden) */
.header-sms,
.header-sms-dot,
.footer-sms,
a[href="/sms"],
a[href^="/sms"],
a[href="/account/sms"],
a[href^="/account/sms"],
[data-dash="sms"],
.sms-view,
#sms-view,
.sms-workspace-layout,
.sms-help-modal-backdrop,
#sms-help-modal {
  display: none !important;
}

body.is-admin-view #account-view.is-dash {
  padding: 0 0 28px;
}

body.is-admin-view #account-view.is-dash .secondary-title {
  display: none;
}

#account-view.is-dash .account-layout {
  display: block;
  max-width: 100%;
}

.account-admin-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.account-vpn-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.account-topup {
  grid-column: 1 / -1;
}

.account-topup-page {
  max-width: 560px;
}

.account-topup-page .account-topup {
  grid-column: auto;
}

.account-topup-header {
  margin: 0 0 18px;
}

.account-topup-header h2 {
  margin: 0;
  font: 700 clamp(28px, 4vw, 42px)/1.1 Manrope, Arial, sans-serif;
  color: #fff;
}

.account-topup-methods,
.account-topup-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.account-topup-methods {
  margin: 4px 0 14px;
}

.account-topup-method,
.account-topup-preset {
  font: 600 12px Manrope, Arial, sans-serif;
  border: 1px solid var(--sheet-line);
  background: var(--input-bg);
  color: var(--card-ink);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}

.account-topup-method:hover,
.account-topup-preset:hover,
.account-topup-method.is-active,
.account-topup-preset.is-active,
.account-topup-preset:focus-visible {
  background: var(--violet);
  border-color: var(--violet);
  color: #fff;
}

.account-topup-field {
  display: block;
}

.account-topup-amount {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--sheet-line);
  background: var(--input-bg);
  color: var(--card-ink);
  border-radius: 14px;
  padding: 12px 14px;
  font: 16px Manrope, Arial, sans-serif;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}

.account-topup-amount:focus {
  border-color: var(--violet);
  box-shadow: 0 0 0 3px rgba(85, 102, 216, .18);
}

.account-topup-amount.is-invalid {
  border-color: #e11d48;
  box-shadow: 0 0 0 3px rgba(225, 29, 72, .18);
}

.account-topup-hint {
  margin: 8px 0 12px;
  font: 12px Manrope, Arial, sans-serif;
  color: var(--card-muted);
}

.account-topup-hint.is-invalid {
  color: #e11d48;
}

.account-topup-presets {
  margin-bottom: 16px;
}

.account-topup-promo {
  margin: 0 0 16px;
}

.account-topup-promo .account-topup-field {
  margin: 0 0 8px;
  font: 600 12px Manrope, Arial, sans-serif;
  letter-spacing: .08em;
  color: var(--card-muted);
}

.account-topup-promo-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.account-topup-promo-row .account-topup-amount {
  flex: 1;
  min-width: 0;
  text-transform: uppercase;
}

.account-topup-promo-apply {
  flex: 0 0 auto;
  white-space: nowrap;
}

.account-topup-submit {
  display: inline-flex;
}

.account-topup-status {
  margin: 12px 0 0;
  font: 12px Manrope, Arial, sans-serif;
  color: var(--card-muted);
}

.account-topup-status.is-ok {
  color: var(--violet);
}

.account-topup-status.is-error {
  color: #e11d48;
}

.account-topup-pay-link {
  color: var(--violet);
  font-weight: 600;
}

.sms-workspace-layout {
  display: grid;
  grid-template-columns: minmax(320px, 370px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  width: 100%;
  position: relative;
  z-index: 10;
  isolation: isolate;
}

/* 100% Solid non-transparent background for SMS - zero bleed from weather orbs */
.sms-workspace-layout .sms-card,
.sms-workspace-layout .sms-chip,
.sms-workspace-layout .sms-mode,
.sms-workspace-layout .sms-help-btn,
.sms-workspace-layout .sms-active-card,
.sms-workspace-layout .sms-history-card,
.sms-workspace-layout .sms-empty-activations-card,
.sms-guest-card,
.sms-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12) !important;
  opacity: 1 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  position: relative;
  z-index: 5;
}

html[data-theme="night"] .sms-workspace-layout .sms-card,
html[data-theme="night"] .sms-workspace-layout .sms-chip,
html[data-theme="night"] .sms-workspace-layout .sms-mode,
html[data-theme="night"] .sms-workspace-layout .sms-help-btn,
html[data-theme="night"] .sms-workspace-layout .sms-active-card,
html[data-theme="night"] .sms-workspace-layout .sms-history-card,
html[data-theme="night"] .sms-workspace-layout .sms-empty-activations-card,
html[data-theme="night"] .sms-guest-card,
html[data-theme="night"] .sms-card {
  background: #14172e !important;
  border-color: #23284a !important;
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.5) !important;
  opacity: 1 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.sms-workspace-layout .sms-empty-activations-card {
  background: #ffffff !important;
  border: 2px dashed #cbd5e1 !important;
}

html[data-theme="night"] .sms-workspace-layout .sms-empty-activations-card {
  background: #14172e !important;
  border: 2px dashed #2a315c !important;
}

.sms-search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  background: #f1f5f9 !important;
  color: var(--card-muted);
  opacity: 1 !important;
}

html[data-theme="night"] .sms-search-wrap {
  background: #1e2244 !important;
}

.sms-active-phone-row {
  background: #f1f5f9 !important;
  opacity: 1 !important;
}

html[data-theme="night"] .sms-active-phone-row {
  background: #1e2244 !important;
}

.sms-shop-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.sms-mode-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.sms-mode {
  flex: 1;
  display: flex;
  align-items: center;
  height: 44px;
  padding: 4px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

html[data-theme="night"] .sms-mode {
  background: #14172e;
  border-color: #23284a;
}

.sms-mode-btn {
  flex: 1;
  height: 100%;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--card-muted);
  font: 600 14px inherit;
  cursor: pointer;
  transition: background .2s, color .2s;
}

.sms-mode-btn.is-active {
  background: #2f6fed;
  color: #fff;
  font-weight: 700;
}

.sms-help-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--sheet);
  border: 1px solid var(--sheet-line);
  color: var(--card-muted);
  font: 700 16px var(--mono);
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: var(--sheet-shadow);
  transition: background .15s, color .15s, transform .15s;
  flex: none;
}

.sms-help-btn:hover {
  background: rgba(47, 111, 237, 0.12);
  color: #2f6fed;
  transform: scale(1.05);
}

.sms-main-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.sms-main-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 0;
}

.sms-main-title {
  font-size: 24px;
  font-weight: 800;
  margin: 0;
  color: var(--card-ink);
  letter-spacing: -0.02em;
}

.sms-block-toggle-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--card-muted);
  font-weight: 500;
}

.sms-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex: none;
}

.sms-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.sms-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(127, 140, 160, 0.28);
  transition: .3s;
  border-radius: 24px;
}

.sms-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}

.sms-switch input:checked + .sms-slider {
  background-color: #2f6fed;
}

.sms-switch input:checked + .sms-slider:before {
  transform: translateX(20px);
}

.sms-tabs-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid var(--sheet-line);
  padding-bottom: 8px;
}

.sms-tab-nav-btn {
  background: none;
  border: 0;
  color: var(--card-muted);
  font: 600 15px inherit;
  padding: 6px 4px;
  cursor: pointer;
  position: relative;
  transition: color .2s;
  display: inline-flex;
  align-items: center;
}

.sms-tab-nav-btn.is-active {
  color: #2f6fed;
  font-weight: 700;
}

.sms-tab-nav-btn.is-active::after {
  content: '';
  position: absolute;
  bottom: -9px;
  left: 0;
  right: 0;
  height: 2px;
  background: #2f6fed;
  border-radius: 2px;
}

.sms-count-badge {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #2f6fed;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  margin-left: 6px;
}

.sms-empty-activations-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 24px;
  border: 2px dashed var(--sheet-line);
  border-radius: 24px;
  background: rgba(127, 140, 160, 0.04);
  min-height: 380px;
  gap: 14px;
}

.sms-empty-icon {
  font-size: 44px;
  margin-bottom: 4px;
  opacity: 0.8;
}

.sms-empty-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--card-ink);
  margin: 0;
}

.sms-empty-desc {
  font-size: 14px;
  color: var(--card-muted);
  max-width: 440px;
  line-height: 1.5;
  margin: 0;
}

.sms-empty-buy-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  background: #2f6fed;
  color: #fff;
  border: 0;
  font: 700 14px inherit;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
}

.sms-empty-buy-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(47, 111, 237, 0.35);
}

.sms-active-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sms-active-card {
  background: var(--sheet);
  border: 1px solid var(--sheet-line);
  border-radius: 22px;
  padding: 20px;
  box-shadow: var(--sheet-shadow);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sms-active-card.is-received {
  border-color: rgba(34, 197, 94, 0.4);
}

.sms-active-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sms-active-service-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sms-active-names {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sms-active-names strong {
  font-size: 15px;
  font-weight: 700;
}

.sms-active-names small {
  color: var(--card-muted);
  font-size: 12px;
}

.sms-active-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sms-timer {
  font-size: 13px;
  font-weight: 600;
  color: var(--card-muted);
  background: rgba(127, 140, 160, 0.12);
  padding: 4px 10px;
  border-radius: 999px;
  font-family: var(--mono);
}

.sms-cancel-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 0;
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  font-weight: 700;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background .15s;
}

.sms-cancel-btn:hover {
  background: rgba(239, 68, 68, 0.22);
}

.sms-active-phone-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(127, 140, 160, 0.08);
}

.sms-phone-display {
  font-size: 18px;
  font-weight: 700;
  font-family: var(--mono);
  letter-spacing: 0.5px;
}

.sms-phone-display.small {
  font-size: 15px;
}

.sms-copy-btn {
  padding: 6px 14px;
  border-radius: 8px;
  border: 0;
  background: #2f6fed;
  color: #fff;
  font: 700 12px inherit;
  cursor: pointer;
}

.sms-waiting-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(245, 158, 11, 0.12);
  color: #d97706;
  font-weight: 600;
  font-size: 14px;
}

.sms-pulse-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #f59e0b;
  animation: pulseSms 1.5s infinite;
  flex: none;
}

@keyframes pulseSms {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.sms-code-banner {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.sms-code-highlight {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sms-code-label {
  font-size: 12px;
  font-weight: 700;
  color: #16a34a;
  letter-spacing: 0.5px;
}

.sms-code-value {
  font-size: 22px;
  font-weight: 800;
  font-family: var(--mono);
  color: #15803d;
  letter-spacing: 2px;
}

.sms-copy-code-btn {
  margin-left: auto;
  padding: 6px 14px;
  border-radius: 8px;
  border: 0;
  background: #16a34a;
  color: #fff;
  font: 700 12px inherit;
  cursor: pointer;
}

.sms-msg-full {
  font-size: 13px;
  color: var(--card-ink);
  margin: 0;
  opacity: 0.9;
}

.sms-card-actions {
  display: flex;
  gap: 8px;
}

.sms-more-btn {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--sheet-line);
  background: var(--sheet);
  color: var(--card-ink);
  font: 600 12px inherit;
  cursor: pointer;
}

.sms-history-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sms-history-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sms-history-card {
  background: var(--sheet);
  border: 1px solid var(--sheet-line);
  border-radius: 18px;
  padding: 16px;
  box-shadow: var(--sheet-shadow);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sms-history-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sms-status-tag {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(127, 140, 160, 0.12);
  color: var(--card-muted);
}

.sms-status-tag.status-received {
  background: rgba(34, 197, 94, 0.15);
  color: #16a34a;
}

.sms-status-tag.status-canceled {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.sms-guest-landing {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 65vh;
  padding: 24px 16px;
  width: 100%;
}

.sms-guest-card {
  width: min(580px, 100%);
  background: var(--sheet);
  border: 1px solid var(--sheet-line);
  border-radius: 28px;
  padding: 36px 32px;
  box-shadow: var(--sheet-shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 18px;
}

.sms-guest-badge {
  font: 700 11px var(--mono);
  color: #2f6fed;
  background: rgba(47, 111, 237, 0.12);
  padding: 5px 12px;
  border-radius: 999px;
  letter-spacing: 1px;
}

.sms-guest-title {
  font-size: 26px;
  font-weight: 800;
  margin: 0;
  color: var(--card-ink);
}

.sms-guest-desc {
  font-size: 15px;
  color: var(--card-muted);
  line-height: 1.6;
  margin: 0;
  max-width: 480px;
}

.sms-guest-features {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.sms-promo-banner {
  display: block;
  width: 100%;
  margin: 0;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px dashed #93c5fd;
  background: rgba(47, 111, 237, 0.1);
  color: var(--card-ink);
  font: 600 13px/1.45 Manrope, Arial, sans-serif;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  box-sizing: border-box;
}

html[data-theme="night"] .sms-promo-banner {
  border-color: #3b4a8a;
  background: rgba(47, 111, 237, 0.16);
}

.sms-workspace-layout .sms-promo-banner {
  margin: 0 0 4px;
}

.sms-guest-feature {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 12px 16px;
  border-radius: 16px;
  background: rgba(127, 140, 160, 0.06);
  border: 1px solid var(--sheet-line);
}

.sms-feature-icon {
  font-size: 22px;
  flex: none;
  margin-top: 2px;
}

.sms-feature-text strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--card-ink);
  margin-bottom: 2px;
}

.sms-feature-text p {
  font-size: 13px;
  color: var(--card-muted);
  margin: 0;
  line-height: 1.4;
}

.sms-guest-login-btn {
  width: 100%;
  height: 50px;
  border-radius: 999px;
  background: #2f6fed;
  color: #fff;
  border: 0;
  font: 700 16px inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform .15s, box-shadow .15s;
}

.sms-guest-login-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(47, 111, 237, 0.4);
}

.sms-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 22px;
  padding: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

html[data-theme="night"] .sms-card {
  background: #14172e;
  border-color: #23284a;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}

.sms-card-title {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 700;
}

.sms-search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  background: #f1f5f9;
  color: var(--card-muted);
}

html[data-theme="night"] .sms-search-wrap {
  background: #1e2242;
}

.sms-search {
  flex: 1;
  height: 100%;
  border: 0;
  background: transparent;
  color: var(--card-ink);
  font: 14px inherit;
  outline: none;
}

.sms-list {
  display: flex;
  flex-direction: column;
  max-height: min(52vh, 420px);
  overflow: auto;
  margin-top: 10px;
}

.sms-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: 16px;
  padding: 10px 8px;
  color: inherit;
  cursor: pointer;
}

.sms-row:hover {
  background: rgba(47, 111, 237, .08);
}

.sms-icon-wrap,
.sms-flag-wrap {
  position: relative;
  width: 36px;
  height: 36px;
  flex: none;
}

.sms-service-icon,
.sms-flag-img,
.sms-avatar {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
}

.sms-avatar[hidden],
.sms-flag[hidden],
.sms-service-icon[hidden],
.sms-flag-img[hidden] {
  display: none !important;
}

.sms-service-icon {
  object-fit: contain;
  border-radius: 10px;
  background: rgba(127, 140, 160, .12);
}

.sms-flag-img {
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .06);
}

.sms-avatar {
  border-radius: 10px;
  font: 700 11px var(--mono);
  color: #fff;
  background: hsl(var(--sms-hue, 220) 62% 48%);
}

.sms-flag {
  font-size: 22px;
  line-height: 36px;
  text-align: center;
}

.sms-row-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.sms-row-copy strong {
  font-size: 14px;
}

.sms-row-copy small {
  color: var(--card-muted);
  font-size: 12px;
}

.sms-row-price {
  margin-left: auto;
  color: #2f6fed;
  font-weight: 700;
  font-size: 14px;
  flex: none;
}

.sms-more {
  display: block;
  width: 100%;
  margin-top: 8px;
  border: 0;
  background: none;
  color: #2f6fed;
  cursor: pointer;
  font: 600 14px inherit;
  text-align: center;
  padding: 8px;
}

.sms-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 10px 14px;
}

.sms-chip-clear {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: rgba(127, 140, 160, .16);
  color: var(--card-muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.sms-chip-check {
  margin-left: auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #2f6fed;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 12px;
}

.sms-buy-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sms-buy-head .sms-card-title {
  margin: 0;
}

.sms-operator {
  color: #2f6fed;
  font-weight: 600;
  font-size: 14px;
}

.sms-buy-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  margin: 14px 0 16px;
}

.sms-buy-summary .sms-flag-wrap {
  margin-left: -14px;
}

.sms-buy-btn {
  width: 100%;
  height: 48px;
  border: 0;
  border-radius: 999px;
  background: rgba(127, 140, 160, .22);
  color: var(--card-muted);
  font: 700 16px inherit;
  cursor: pointer;
}

.sms-buy-btn.is-ready {
  background: #2f6fed;
  color: #fff;
}

.sms-buy-btn:disabled {
  pointer-events: none;
}

.sms-tg {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 16px;
  border-radius: 16px;
  background: #2f6fed;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
}

.sms-tg span:last-child {
  margin-left: auto;
}

.sms-tg-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
}

.sms-history summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

.sms-history summary::-webkit-details-marker {
  display: none;
}

.sms-history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.sms-history-head {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  padding: 6px 0;
}

.sms-history-body {
  padding: 0 4px 8px 46px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sms-message {
  border: 1px solid var(--sheet-line);
  border-radius: 16px;
  padding: 12px 14px;
}

.sms-message header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--card-muted);
}

.sms-message p {
  margin: 0;
  white-space: pre-wrap;
}

.accent-action:disabled {
  opacity: .45;
  pointer-events: none;
}

@media (max-width: 980px) {
  .sms-workspace-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .account-vpn-grid {
    grid-template-columns: 1fr;
  }
}

/* SMS Help Modal Styles */
.sms-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(8, 10, 24, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: smsFadeIn 0.22s ease-out;
}

.sms-modal-backdrop.is-closing {
  animation: smsFadeOut 0.2s ease-in forwards;
}

@keyframes smsFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes smsFadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

.sms-modal-box {
  width: min(560px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 28px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  animation: smsZoomIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

html[data-theme="night"] .sms-modal-box {
  background: #14172e;
  border-color: #23284a;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7);
}

@keyframes smsZoomIn {
  from { transform: scale(0.94) translateY(10px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

.sms-modal-head {
  padding: 24px 28px 16px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(127, 140, 160, 0.14);
}

.sms-modal-title-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sms-modal-badge {
  font: 700 11px var(--mono);
  color: #2f6fed;
  letter-spacing: 1px;
}

.sms-modal-title {
  font-size: 20px;
  font-weight: 800;
  margin: 0;
  color: var(--card-ink);
}

.sms-modal-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 0;
  background: rgba(127, 140, 160, 0.12);
  color: var(--card-muted);
  font: 700 16px inherit;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.15s, color 0.15s, transform 0.15s;
  flex: none;
}

.sms-modal-close:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  transform: scale(1.08);
}

.sms-modal-body {
  padding: 20px 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sms-help-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sms-help-steps li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #2f6fed;
  color: #ffffff;
  font: 700 13px/28px var(--mono);
  text-align: center;
  flex: none;
  margin-top: 2px;
}

.step-content strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--card-ink);
  margin-bottom: 3px;
}

.step-content p {
  font-size: 13px;
  color: var(--card-muted);
  margin: 0;
  line-height: 1.45;
}

.sms-help-warning {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.28);
}

.warning-icon {
  font-size: 22px;
  flex: none;
  margin-top: 1px;
}

.warning-text strong {
  display: block;
  font-size: 14px;
  font-weight: 800;
  color: #ef4444;
  margin-bottom: 4px;
}

.warning-text p {
  font-size: 12.5px;
  color: var(--card-ink);
  margin: 0;
  line-height: 1.45;
  opacity: 0.92;
}

.sms-modal-foot {
  padding: 16px 28px 24px;
  border-top: 1px solid rgba(127, 140, 160, 0.14);
  display: flex;
  justify-content: flex-end;
}

.sms-modal-primary-btn {
  padding: 12px 28px;
  border-radius: 999px;
  border: 0;
  background: #2f6fed;
  color: #fff;
  font: 700 14px inherit;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.sms-modal-primary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(47, 111, 237, 0.4);
}

/* Theme turn: SMS / top-up use hardcoded day/night colors and later
   short hover transitions, so they must win after those rules. */
html:not(.sky-is-snapping) .sms-workspace-layout .sms-card,
html:not(.sky-is-snapping) .sms-workspace-layout .sms-chip,
html:not(.sky-is-snapping) .sms-workspace-layout .sms-mode,
html:not(.sky-is-snapping) .sms-workspace-layout .sms-help-btn,
html:not(.sky-is-snapping) .sms-workspace-layout .sms-active-card,
html:not(.sky-is-snapping) .sms-workspace-layout .sms-history-card,
html:not(.sky-is-snapping) .sms-workspace-layout .sms-empty-activations-card,
html:not(.sky-is-snapping) .sms-workspace-layout .sms-search-wrap,
html:not(.sky-is-snapping) .sms-workspace-layout .sms-active-phone-row,
html:not(.sky-is-snapping) .sms-guest-card,
html:not(.sky-is-snapping) .sms-card,
html:not(.sky-is-snapping) .sms-chip,
html:not(.sky-is-snapping) .sms-mode,
html:not(.sky-is-snapping) .sms-help-btn,
html:not(.sky-is-snapping) .sms-search-wrap,
html:not(.sky-is-snapping) .sms-active-phone-row,
html:not(.sky-is-snapping) .sms-history-item,
html:not(.sky-is-snapping) .account-topup,
html:not(.sky-is-snapping) .account-topup-method,
html:not(.sky-is-snapping) .account-topup-preset,
html:not(.sky-is-snapping) .account-topup-amount,
html:not(.sky-is-snapping) .account-topup-hint,
html:not(.sky-is-snapping) .account-topup-status {
  transition: background-color 1.5s cubic-bezier(.37, .02, .2, 1),
              background 1.5s cubic-bezier(.37, .02, .2, 1),
              color 1.5s cubic-bezier(.37, .02, .2, 1),
              border-color 1.5s cubic-bezier(.37, .02, .2, 1),
              box-shadow 1.5s cubic-bezier(.37, .02, .2, 1);
}


/* ==========================================================
   LIFE LAYER — scroll reveals, micro-interactions, ambience
   ========================================================== */

html {
  scrollbar-color: var(--violet) transparent;
  scrollbar-width: thin;
}

::selection {
  background: var(--accent);
  color: #16180c;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--violet), transparent 140%);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

/* --- Scroll reveal --- */
.reveal-pending {
  opacity: 0;
  transform: translateY(26px);
}

.reveal-pending,
.is-revealed {
  transition: opacity .8s cubic-bezier(.22, .61, .2, 1) var(--reveal-delay, 0ms),
              transform .8s cubic-bezier(.22, .61, .2, 1) var(--reveal-delay, 0ms);
}

/* --- Hero title: slow iridescent shimmer --- */
.hero-section h1 {
  background: linear-gradient(
    100deg,
    var(--on-sky) 20%,
    var(--accent) 38%,
    #9ee8ff 50%,
    var(--on-sky) 62%
  );
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
  filter: drop-shadow(0 6px 40px rgba(24, 32, 100, .28));
  animation: hero-shimmer 7s ease-in-out infinite;
}

@keyframes hero-shimmer {
  0%, 100% { background-position: 130% 0; }
  50% { background-position: -30% 0; }
}

/* --- Buttons: breathing accent + press feedback --- */
.new-address,
.accent-action {
  position: relative;
  overflow: hidden;
  animation: accent-breathe 3.6s ease-in-out infinite;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.new-address:hover,
.accent-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px -8px rgba(184, 240, 77, .55);
  filter: saturate(1.15);
}

.new-address:active,
.accent-action:active {
  transform: translateY(0) scale(.97);
}

.new-address::after,
.accent-action::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .5) 50%, transparent 70%);
  transform: translateX(-120%);
  animation: btn-sheen 4.5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes accent-breathe {
  0%, 100% { box-shadow: 0 0 0 0 rgba(184, 240, 77, 0); }
  50% { box-shadow: 0 6px 22px -6px rgba(184, 240, 77, .45); }
}

@keyframes btn-sheen {
  0%, 55% { transform: translateX(-120%); }
  80%, 100% { transform: translateX(120%); }
}

/* --- Header links: animated underline --- */
.header-link {
  position: relative;
}

.header-link::after {
  content: '';
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: -4px;
  height: 1.5px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s cubic-bezier(.22, .61, .2, 1);
  opacity: .7;
}

.header-link:hover::after {
  transform: scaleX(1);
}

/* --- Portfolio cards: lift, glow border, pointer sheen --- */
.portfolio-card {
  position: relative;
  overflow: hidden;
  transition: transform .35s cubic-bezier(.22, .61, .2, 1),
              box-shadow .35s ease,
              filter .35s ease;
}

.portfolio-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(320px circle at var(--sheen-x, 50%) var(--sheen-y, 50%),
    rgba(255, 255, 255, .18), transparent 65%);
  opacity: 0;
  transition: opacity .35s ease;
  pointer-events: none;
}

.portfolio-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 48px -18px rgba(10, 12, 40, .5);
}

.portfolio-card:hover::before {
  opacity: 1;
}

.portfolio-card:hover .card-top span:last-child {
  transform: translate(4px, -4px);
}

.card-top span:last-child {
  display: inline-block;
  transition: transform .3s cubic-bezier(.22, .61, .2, 1);
}

/* --- Mail rows: slide-in + hover nudge --- */
.mail-item {
  transition: transform .25s cubic-bezier(.22, .61, .2, 1),
              background-color .25s ease,
              box-shadow .25s ease;
}

.mail-item:hover {
  transform: translateX(4px);
}

.mail-item.is-new {
  animation: mail-pop .7s cubic-bezier(.22, .61, .2, 1);
}

@keyframes mail-pop {
  0% { opacity: 0; transform: translateX(-14px); }
  60% { transform: translateX(3px); }
  100% { opacity: 1; transform: translateX(0); }
}

/* --- Panels: pointer sheen --- */
.panel {
  position: relative;
  overflow: hidden;
}

.panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(420px circle at var(--sheen-x, 50%) var(--sheen-y, 50%),
    var(--row-hover, rgba(85, 102, 216, .08)), transparent 60%);
  opacity: 0;
  transition: opacity .4s ease;
  pointer-events: none;
}

.panel:hover::before {
  opacity: 1;
}

/* --- Sky parallax wrappers --- */
.sky-orbs,
.sky-land {
  will-change: transform;
}

/* --- Night fireflies --- */
.fireflies {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.6s ease;
}

html[data-theme="night"] .fireflies {
  opacity: 1;
}

.fireflies i {
  position: absolute;
  left: var(--fx);
  top: var(--fy);
  width: var(--fs);
  height: var(--fs);
  border-radius: 50%;
  background: #d9f28e;
  box-shadow: 0 0 10px 3px rgba(196, 240, 120, .5);
  opacity: 0;
  animation: firefly-drift var(--fd) ease-in-out infinite,
             firefly-glow var(--fo) ease-in-out infinite;
}

@keyframes firefly-drift {
  0% { transform: translate(0, 0); }
  25% { transform: translate(3vw, -4vh); }
  50% { transform: translate(-2vw, -8vh); }
  75% { transform: translate(4vw, -3vh); }
  100% { transform: translate(0, 0); }
}

@keyframes firefly-glow {
  0%, 100% { opacity: 0; }
  40% { opacity: .85; }
  70% { opacity: .25; }
}

/* --- Reduced motion: everything off --- */
@media (prefers-reduced-motion: reduce) {
  .reveal-pending {
    opacity: 1;
    transform: none;
  }

  .hero-section h1,
  .new-address,
  .accent-action,
  .new-address::after,
  .accent-action::after,
  .fireflies i {
    animation: none !important;
    -webkit-text-fill-color: currentColor;
  }

  html[data-theme="night"] .fireflies {
    display: none;
  }
}

/* ==========================================================
   OPENING LAYER — richer intro sequence
   ========================================================== */

/* Soft concentric ripples behind the door */
.entry-screen::before,
.entry-screen::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(24vw, 300px);
  height: min(24vw, 300px);
  margin: calc(min(24vw, 300px) / -2) 0 0 calc(min(24vw, 300px) / -2);
  border: 1px solid rgba(255, 255, 255, .32);
  border-radius: 50%;
  z-index: 0;
  animation: entry-ripple 2.8s cubic-bezier(.2, .6, .3, 1) infinite;
}

.entry-screen::after {
  animation-delay: 1.4s;
}

@keyframes entry-ripple {
  0% { transform: scale(.55); opacity: 0; }
  18% { opacity: .55; }
  100% { transform: scale(2.7); opacity: 0; }
}

/* Shooting star crossing the intro sky */
.entry-meteor {
  position: absolute;
  top: 17%;
  right: 10%;
  width: 150px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(270deg, rgba(255, 255, 255, .95), rgba(255, 255, 255, 0));
  opacity: 0;
  z-index: 0;
  animation: entry-meteor 1.35s ease-in .12s both;
}

@keyframes entry-meteor {
  0% { opacity: 0; transform: translate3d(6vw, -2vh, 0) rotate(-30deg); }
  12% { opacity: .9; }
  55% { opacity: 0; transform: translate3d(-34vw, 15vh, 0) rotate(-30deg); }
  100% { opacity: 0; transform: translate3d(-34vw, 15vh, 0) rotate(-30deg); }
}

/* Luminous crack that blooms along the door before it swings */
.door-slit {
  position: absolute;
  left: -1px;
  top: 7%;
  bottom: 7%;
  width: 2px;
  border-radius: 999px;
  background: linear-gradient(180deg, transparent, #fff 16%, #fff 84%, transparent);
  box-shadow: 0 0 20px 5px rgba(255, 255, 255, .85);
  opacity: 0;
  animation: slit-bloom 1.35s ease-out forwards;
}

@keyframes slit-bloom {
  0% { opacity: 0; transform: scaleY(.35); }
  28% { opacity: 1; transform: scaleY(1); }
  70% { opacity: .85; }
  100% { opacity: 0; }
}

/* The light behind the door now floods outward instead of just fading in */
.entry-light {
  animation: room-light-bloom 1.35s cubic-bezier(.33, .5, .25, 1) forwards;
}

@keyframes room-light-bloom {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.94); filter: blur(8px); }
  40% { opacity: .4; }
  100% { opacity: .85; transform: translate(-50%, -50%) scale(1.12); filter: blur(3px); box-shadow: 0 0 60px 24px rgba(255, 255, 255, .35); }
}

/* Loader: percent readout + glowing tip */
.loader-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 10px;
}

.loader-code {
  margin-top: 0;
}

.loader-percent {
  font: 9px var(--mono);
  letter-spacing: 2px;
  color: var(--accent);
  text-shadow: 0 0 12px rgba(184, 240, 77, .55);
}

.loader-track i {
  box-shadow: 0 0 12px 2px rgba(255, 255, 255, .7);
}

/* Page hands over from the intro: rise gently as the screen fades */
body:not(.sky-is-snapping) .site-frame {
  transition: background-color 1.5s cubic-bezier(.37, .02, .2, 1),
              max-width .2s ease, padding .2s ease,
              opacity .95s cubic-bezier(.22, .61, .2, 1) .06s,
              transform .95s cubic-bezier(.22, .61, .2, 1) .06s;
}

body.is-booting .site-frame {
  opacity: 0;
  transform: translateY(22px) scale(.995);
}

body.is-booting .site-socials {
  opacity: 0;
}

.site-socials {
  transition: opacity .9s ease .25s;
}

/* ==========================================================
   SCENE LAYER — living landscape
   ========================================================== */

/* Hills breathe on the layers so the parent stays free for cursor parallax */
.sky-land {
  animation: none;
}

.sky-land-day,
.sky-land-night {
  animation: hills-breathe 9s ease-in-out infinite;
}

/* --- Day clouds drifting across the sky --- */
.sky-clouds {
  position: absolute;
  inset: 0;
  overflow: hidden;
  opacity: 0;
  transition: opacity 1.8s ease;
  pointer-events: none;
}

html[data-theme="day"] .sky-clouds {
  opacity: 1;
}

.sky-clouds i {
  position: absolute;
  width: 36vw;
  height: 11vw;
  max-height: 150px;
  border-radius: 50%;
  filter: blur(22px);
  background: radial-gradient(closest-side, rgba(255, 255, 255, .85), rgba(255, 255, 255, 0));
  animation: cloud-drift 90s linear infinite;
}

.sky-clouds i:nth-child(1) { top: 7%; opacity: .5; }
.sky-clouds i:nth-child(2) { top: 17%; width: 26vw; opacity: .42; animation-duration: 68s; animation-delay: -28s; }
.sky-clouds i:nth-child(3) { top: 3%; width: 46vw; opacity: .34; animation-duration: 118s; animation-delay: -58s; }

@keyframes cloud-drift {
  from { transform: translate3d(-48vw, 0, 0); }
  to { transform: translate3d(126vw, 0, 0); }
}

/* --- Night meteors --- */
.sky-meteors {
  position: absolute;
  inset: 0;
  overflow: hidden;
  opacity: 0;
  transition: opacity 1.2s ease;
  pointer-events: none;
}

html[data-theme="night"] .sky-meteors {
  opacity: 1;
}

.sky-meteors i {
  position: absolute;
  top: 14%;
  left: 72%;
  width: 130px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(270deg, rgba(255, 255, 255, .95), rgba(255, 255, 255, 0));
  opacity: 0;
  animation: meteor-fall 9s linear infinite;
}

.sky-meteors i:nth-child(2) {
  top: 8%;
  left: 38%;
  width: 92px;
  animation-duration: 13s;
  animation-delay: 4.5s;
}

@keyframes meteor-fall {
  0% { opacity: 0; transform: translate3d(0, 0, 0) rotate(-32deg); }
  3% { opacity: .9; }
  10% { opacity: 0; transform: translate3d(-40vw, 27vh, 0) rotate(-32deg); }
  100% { opacity: 0; transform: translate3d(-40vw, 27vh, 0) rotate(-32deg); }
}

/* --- Birds crossing the horizon by day --- */
.sky-birds {
  position: absolute;
  left: 0;
  right: 0;
  top: 2%;
  height: 44%;
  opacity: 0;
  transition: opacity 1.4s ease;
  pointer-events: none;
}

html[data-theme="day"] .sky-birds {
  opacity: 1;
}

.sky-birds i {
  position: absolute;
  left: -8vw;
  width: 18px;
  height: 8px;
  animation: bird-cross 30s linear infinite;
}

.sky-birds i:nth-child(1) { top: 26%; --bird-scale: scale(1); }
.sky-birds i:nth-child(2) { top: 52%; --bird-scale: scale(.8); animation-duration: 24s; animation-delay: -11s; }
.sky-birds i:nth-child(3) { top: 38%; --bird-scale: scale(.65); animation-duration: 36s; animation-delay: -21s; }

.sky-birds i::before,
.sky-birds i::after {
  content: '';
  position: absolute;
  top: 2px;
  width: 9px;
  height: 2px;
  border-radius: 2px;
  background: rgba(21, 46, 52, .82);
}

.sky-birds i::before {
  left: 0;
  transform-origin: right center;
  animation: bird-wing-left .8s ease-in-out infinite;
}

.sky-birds i::after {
  right: 0;
  transform-origin: left center;
  animation: bird-wing-right .8s ease-in-out infinite;
}

@keyframes bird-cross {
  from { transform: translate3d(-8vw, 0, 0) var(--bird-scale, scale(1)); }
  to { transform: translate3d(114vw, -7vh, 0) var(--bird-scale, scale(1)); }
}

@keyframes bird-wing-left {
  0%, 100% { transform: rotate(16deg); }
  50% { transform: rotate(-24deg); }
}

@keyframes bird-wing-right {
  0%, 100% { transform: rotate(-16deg); }
  50% { transform: rotate(24deg); }
}

/* --- Ground mist drifting over the hills --- */
.sky-mist {
  position: absolute;
  left: -12%;
  right: -12%;
  bottom: -6%;
  height: 55%;
  opacity: .5;
  transition: opacity 1.4s ease;
  pointer-events: none;
}

html[data-theme="night"] .sky-mist {
  opacity: .85;
}

.sky-mist i {
  position: absolute;
  left: 0;
  right: 0;
  top: 12%;
  height: 46%;
  border-radius: 50%;
  filter: blur(24px);
  background: linear-gradient(90deg, transparent, rgba(216, 227, 255, .16) 30%, rgba(255, 255, 255, .2) 50%, rgba(216, 227, 255, .13) 70%, transparent);
  animation: mist-drift 26s ease-in-out infinite alternate;
}

.sky-mist i:nth-child(2) {
  top: 46%;
  height: 38%;
  opacity: .8;
  animation-duration: 34s;
  animation-delay: -9s;
}

@keyframes mist-drift {
  from { transform: translateX(-4%); }
  to { transform: translateX(5%); }
}

/* --- Warm window lights flickering on the hills at night --- */
.sky-lanterns {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.4s ease;
  pointer-events: none;
}

html[data-theme="night"] .sky-lanterns {
  opacity: 1;
}

.sky-lanterns i {
  position: absolute;
  left: var(--lx, 50%);
  top: var(--ly, 80%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #ffd98a;
  box-shadow: 0 0 8px 3px rgba(255, 196, 110, .45), 0 0 22px 8px rgba(255, 176, 80, .18);
  animation: lantern-flicker 4.2s ease-in-out infinite;
}

.sky-lanterns i:nth-child(1) { --lx: 14%; --ly: 80%; animation-delay: .3s; }
.sky-lanterns i:nth-child(2) { --lx: 33%; --ly: 86%; animation-delay: 1.7s; animation-duration: 5.1s; }
.sky-lanterns i:nth-child(3) { --lx: 55%; --ly: 79%; animation-delay: 2.6s; }
.sky-lanterns i:nth-child(4) { --lx: 74%; --ly: 85%; animation-delay: .9s; animation-duration: 4.8s; }
.sky-lanterns i:nth-child(5) { --lx: 88%; --ly: 78%; animation-delay: 3.4s; }

@keyframes lantern-flicker {
  0%, 100% { opacity: .95; }
  22% { opacity: .55; }
  45% { opacity: 1; }
  63% { opacity: .4; }
  80% { opacity: .9; }
}

/* --- Sun breathes, moon wears a halo --- */
.sky-sun {
  animation: sun-glow 6s ease-in-out infinite;
}

@keyframes sun-glow {
  0%, 100% { box-shadow: 0 0 28px 8px rgba(255, 196, 80, .42), 0 0 72px 22px rgba(255, 168, 50, .28); }
  50% { box-shadow: 0 0 36px 12px rgba(255, 200, 92, .55), 0 0 96px 30px rgba(255, 170, 54, .36); }
}

/* --- Reduced motion: calm everything --- */
@media (prefers-reduced-motion: reduce) {
  .entry-screen::before,
  .entry-screen::after,
  .entry-meteor,
  .door-slit,
  .sky-clouds i,
  .sky-meteors i,
  .sky-birds i,
  .sky-birds i::before,
  .sky-birds i::after,
  .sky-mist i,
  .sky-lanterns i,
  .sky-sun,
  .sky-land-day,
  .sky-land-night {
    animation: none !important;
  }

  .entry-meteor,
  .sky-meteors,
  .sky-birds {
    display: none;
  }

  .entry-screen::before,
  .entry-screen::after {
    opacity: 0;
  }

  body.is-booting .site-frame {
    transition: none;
    opacity: 1;
    transform: none;
  }
}

/* ==========================================================
   SCENE LAYER V2 — volumetric layered landscape
   ========================================================== */

.hill {
  position: absolute;
  inset: 0;
  will-change: transform;
}

.hill-day,
.hill-night {
  position: absolute;
  inset: 0;
  transform-origin: 50% 100%;
  background: center bottom / 100% 100% no-repeat;
}

.hill-back-day    { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 280' preserveAspectRatio='none'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset=%220%22 stop-color=%22%234b9198%22/%3E%3Cstop offset=%22.22%22 stop-color=%22%232e7076%22/%3E%3Cstop offset=%221%22 stop-color=%22%23275f68%22/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath fill='url(%23g)' d='M0 150 C120 118 260 96 420 108 C580 120 700 152 860 144 C1020 136 1160 104 1300 118 C1360 124 1400 132 1440 140 V280 H0 Z'/%3E%3Cpath fill=%22none%22 stroke=%22rgba(255,255,255,.14)%22 stroke-width=%222%22 d=%22M0 150 C120 118 260 96 420 108 C580 120 700 152 860 144 C1020 136 1160 104 1300 118 C1360 124 1400 132 1440 140 V280 H0 Z%22/%3E%3C/svg%3E"); }
.hill-back-night  { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 280' preserveAspectRatio='none'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset=%220%22 stop-color=%22%2333507a%22/%3E%3Cstop offset=%22.22%22 stop-color=%22%231e3a5c%22/%3E%3Cstop offset=%221%22 stop-color=%22%2317324b%22/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath fill='url(%23g)' d='M0 150 C120 118 260 96 420 108 C580 120 700 152 860 144 C1020 136 1160 104 1300 118 C1360 124 1400 132 1440 140 V280 H0 Z'/%3E%3Cpath fill=%22none%22 stroke=%22rgba(190,205,255,.10)%22 stroke-width=%222%22 d=%22M0 150 C120 118 260 96 420 108 C580 120 700 152 860 144 C1020 136 1160 104 1300 118 C1360 124 1400 132 1440 140 V280 H0 Z%22/%3E%3C/svg%3E"); }
.hill-mid-day     { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 280' preserveAspectRatio='none'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset=%220%22 stop-color=%22%232f7a76%22/%3E%3Cstop offset=%22.25%22 stop-color=%22%231f5c58%22/%3E%3Cstop offset=%221%22 stop-color=%22%23194b4d%22/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath fill='url(%23g)' d='M0 190 C140 160 300 140 460 152 C640 166 760 196 940 186 C1100 178 1240 150 1440 168 V280 H0 Z'/%3E%3Cpath fill=%22%2316413f%22 d=%22M232 160 l6 -17 l6 17 z M268 154 l7 -19 l7 19 z M306 156 l6 -16 l6 16 z M348 160 l7 -18 l7 18 z%22/%3E%3Cpath fill=%22none%22 stroke=%22rgba(255,255,255,.10)%22 stroke-width=%222%22 d=%22M0 190 C140 160 300 140 460 152 C640 166 760 196 940 186 C1100 178 1240 150 1440 168 V280 H0 Z%22/%3E%3C/svg%3E"); }
.hill-mid-night   { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 280' preserveAspectRatio='none'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset=%220%22 stop-color=%22%2322405f%22/%3E%3Cstop offset=%22.25%22 stop-color=%22%23122a42%22/%3E%3Cstop offset=%221%22 stop-color=%22%230d2336%22/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath fill='url(%23g)' d='M0 190 C140 160 300 140 460 152 C640 166 760 196 940 186 C1100 178 1240 150 1440 168 V280 H0 Z'/%3E%3Cpath fill=%22%230a1c2c%22 d=%22M232 160 l6 -17 l6 17 z M268 154 l7 -19 l7 19 z M306 156 l6 -16 l6 16 z M348 160 l7 -18 l7 18 z%22/%3E%3Cpath fill=%22none%22 stroke=%22rgba(180,200,255,.08)%22 stroke-width=%222%22 d=%22M0 190 C140 160 300 140 460 152 C640 166 760 196 940 186 C1100 178 1240 150 1440 168 V280 H0 Z%22/%3E%3C/svg%3E"); }
.hill-front-day   { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 280' preserveAspectRatio='none'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset=%220%22 stop-color=%22%23235f58%22/%3E%3Cstop offset=%22.2%22 stop-color=%22%23174747%22/%3E%3Cstop offset=%221%22 stop-color=%22%230f3437%22/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath fill='url(%23g)' d='M0 226 C160 204 300 188 470 198 C620 206 720 230 880 224 C1000 220 1060 202 1120 198 C1180 194 1250 212 1340 224 C1380 229 1410 233 1440 237 V280 H0 Z'/%3E%3Cpath fill=%22%230d3134%22 d=%22M336 195 l7 -19 l7 19 z M372 192 l6 -16 l6 16 z M404 196 l7 -21 l7 21 z M1204 199 l6 -17 l6 17 z M1236 203 l7 -19 l7 19 z%22/%3E%3Cpath fill=%22none%22 stroke=%22rgba(255,255,255,.12)%22 stroke-width=%222%22 d=%22M0 226 C160 204 300 188 470 198 C620 206 720 230 880 224 C1000 220 1060 202 1120 198 C1180 194 1250 212 1340 224 C1380 229 1410 233 1440 237 V280 H0 Z%22/%3E%3C/svg%3E"); }
.hill-front-night { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 280' preserveAspectRatio='none'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset=%220%22 stop-color=%22%2316324a%22/%3E%3Cstop offset=%22.2%22 stop-color=%22%230b2233%22/%3E%3Cstop offset=%221%22 stop-color=%22%23061623%22/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath fill='url(%23g)' d='M0 226 C160 204 300 188 470 198 C620 206 720 230 880 224 C1000 220 1060 202 1120 198 C1180 194 1250 212 1340 224 C1380 229 1410 233 1440 237 V280 H0 Z'/%3E%3Cpath fill=%22%2304121c%22 d=%22M336 195 l7 -19 l7 19 z M372 192 l6 -16 l6 16 z M404 196 l7 -21 l7 21 z M1204 199 l6 -17 l6 17 z M1236 203 l7 -19 l7 19 z%22/%3E%3Cpath fill=%22none%22 stroke=%22rgba(170,195,255,.10)%22 stroke-width=%222%22 d=%22M0 226 C160 204 300 188 470 198 C620 206 720 230 880 224 C1000 220 1060 202 1120 198 C1180 194 1250 212 1340 224 C1380 229 1410 233 1440 237 V280 H0 Z%22/%3E%3C/svg%3E"); }

/* crossfade between day and night fills */
.hill-night {
  opacity: 0;
  transition: opacity 1.1s ease;
}

html[data-theme="night"] .hill-night {
  opacity: 1;
}

/* each ridge breathes on its own rhythm */
.hill-back-day, .hill-back-night       { animation: hills-breathe 12s ease-in-out infinite; }
.hill-mid-day, .hill-mid-night         { animation: hills-breathe 9.5s ease-in-out infinite; }
.hill-front-day, .hill-front-night     { animation: hills-breathe 8s ease-in-out infinite -1.5s; }
.sky-house                             { animation: hills-breathe 8s ease-in-out infinite -1.5s; }

/* depth haze between distant and near ridges */
.hill-haze {
  position: absolute;
  left: 0;
  right: 0;
  top: -34%;
  bottom: 0;
  pointer-events: none;
}

.hill-haze-day,
.hill-haze-night {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.1s ease;
}

.hill-haze-day {
  background: linear-gradient(180deg, transparent, rgba(242, 216, 224, .16) 22%, rgba(242, 216, 224, .07) 45%, transparent 72%);
}

.hill-haze-night {
  background: linear-gradient(180deg, transparent, rgba(126, 138, 205, .10) 24%, rgba(126, 138, 205, .04) 48%, transparent 74%);
}

html[data-theme="day"] .hill-haze-day,
html[data-theme="night"] .hill-haze-night {
  opacity: 1;
}

/* --- little cabin on the front ridge --- */
.sky-house {
  position: absolute;
  left: calc(76.4% - 27px);
  bottom: 28.6%;
  width: 54px;
  height: 46px;
  transform-origin: 50% 100%;
  --house-ink: #0f3437;
}

html[data-theme="night"] .sky-house {
  --house-ink: #061623;
}

.sky-house svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.sky-house .hh-body,
.sky-house .hh-roof,
.sky-house .hh-chimney {
  fill: var(--house-ink);
}

.sky-house .hh-window {
  fill: #ffd98a;
  opacity: 0;
  transition: opacity .9s ease;
}

html[data-theme="night"] .sky-house .hh-window {
  opacity: 1;
  animation: lantern-flicker 4.2s ease-in-out infinite .8s;
}

.hh-smoke {
  position: absolute;
  left: 34px;
  top: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(208, 213, 224, .55);
  filter: blur(2px);
  opacity: 0;
  animation: smoke-rise 4.5s ease-in infinite;
}

html[data-theme="night"] .hh-smoke {
  background: rgba(160, 168, 190, .4);
}

.hh-smoke-2 { animation-delay: 1.5s; }
.hh-smoke-3 { animation-delay: 3s; }

@keyframes smoke-rise {
  0% { opacity: 0; transform: translate(0, 0) scale(.7); }
  25% { opacity: .55; }
  100% { opacity: 0; transform: translate(11px, -32px) scale(2.1); }
}

/* --- lanterns repositioned onto the new ridges --- */
.sky-lanterns i:nth-child(1) { --lx: 12%; --ly: 64%; }
.sky-lanterns i:nth-child(2) { --lx: 30%; --ly: 72%; }
.sky-lanterns i:nth-child(3) { --lx: 52%; --ly: 71%; }
.sky-lanterns i:nth-child(4) { --lx: 72%; --ly: 76%; }
.sky-lanterns i:nth-child(5) { --lx: 88%; --ly: 68%; }

/* --- spark burst on land click --- */
.sky-sparks {
  position: fixed;
  z-index: 6;
  width: 0;
  height: 0;
  pointer-events: none;
}

.sky-sparks i {
  position: absolute;
  left: -3px;
  top: -3px;
  width: var(--ss, 3px);
  height: var(--ss, 3px);
  border-radius: 50%;
  background: #ffe08a;
  box-shadow: 0 0 10px 3px rgba(255, 210, 120, .5);
  opacity: 0;
  animation: spark-fly var(--sd, 1.2s) ease-out forwards;
}

@keyframes spark-fly {
  0% { opacity: 0; transform: translate(0, 0); }
  12% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx, 0), var(--dy, -40px)); }
}

@media (prefers-reduced-motion: reduce) {
  .hill-day,
  .hill-night,
  .sky-house,
  .hh-smoke,
  .sky-sparks i {
    animation: none !important;
  }

  .hh-smoke,
  .sky-sparks {
    display: none;
  }
}

/* ==========================================================
   TRANSITIONS LAYER — content entrance on view switch
   ========================================================== */

.view.active-view > * {
  animation: view-enter .75s cubic-bezier(.22, .61, .2, 1) both;
}

.view.active-view > *:nth-child(1) { animation-delay: .02s; }
.view.active-view > *:nth-child(2) { animation-delay: .09s; }
.view.active-view > *:nth-child(3) { animation-delay: .16s; }
.view.active-view > *:nth-child(4) { animation-delay: .23s; }
.view.active-view > *:nth-child(5) { animation-delay: .30s; }
.view.active-view > *:nth-child(6) { animation-delay: .37s; }

@keyframes view-enter {
  from { opacity: 0; transform: translateY(24px) scale(.988); filter: blur(5px); }
  to { opacity: 1; transform: none; filter: blur(0); }
}

/* hero h1 keeps its shimmer while also entering */
.view.active-view > h1 {
  animation: hero-shimmer 7s ease-in-out infinite,
             view-enter .8s cubic-bezier(.22, .61, .2, 1) .08s both;
}

/* portfolio cards cascade when (re)rendered inside an active view */
.active-view .portfolio-card {
  animation: card-enter .65s cubic-bezier(.22, .61, .2, 1) both;
}

.active-view .portfolio-card:nth-child(1) { animation-delay: .05s; }
.active-view .portfolio-card:nth-child(2) { animation-delay: .13s; }
.active-view .portfolio-card:nth-child(3) { animation-delay: .21s; }
.active-view .portfolio-card:nth-child(4) { animation-delay: .29s; }
.active-view .portfolio-card:nth-child(n+5) { animation-delay: .37s; }

@keyframes card-enter {
  from { opacity: 0; transform: translateY(22px) scale(.97); }
  to { opacity: 1; transform: none; }
}

/* ==========================================================
   SUN & MOON V2
   ========================================================== */

.sky-sun {
  background: radial-gradient(circle at 36% 32%,
    #fffef2 0%, #fff3b8 20%, #ffd45e 46%, #ffb32e 70%, #f28a12 100%);
}

/* long soft rays, slow clockwise */
.sky-sun::before {
  inset: -90%;
  background: repeating-conic-gradient(
    from 0deg,
    rgba(255, 214, 110, 0) 0deg 6deg,
    rgba(255, 214, 110, .38) 8deg 11deg,
    rgba(255, 214, 110, 0) 13deg 20deg
  );
  filter: blur(7px);
  -webkit-mask-image: radial-gradient(circle, #000 26%, transparent 70%);
  mask-image: radial-gradient(circle, #000 26%, transparent 70%);
  animation: sun-spin 64s linear infinite;
}

/* short bright rays, counter-rotating, with a hole over the core */
.sky-sun::after {
  content: '';
  position: absolute;
  inset: -48%;
  border-radius: 50%;
  background: repeating-conic-gradient(
    from 4deg,
    rgba(255, 244, 200, 0) 0deg 13deg,
    rgba(255, 246, 205, .55) 15deg 17deg,
    rgba(255, 244, 200, 0) 19deg 30deg
  );
  filter: blur(1.5px);
  -webkit-mask-image: radial-gradient(circle, transparent 30%, #000 40%, #000 52%, transparent 68%);
  mask-image: radial-gradient(circle, transparent 30%, #000 40%, #000 52%, transparent 68%);
  animation: sun-spin 40s linear infinite reverse;
  pointer-events: none;
}

@keyframes sun-glow-v2 {
  0%, 100% { box-shadow: 0 0 26px 8px rgba(255, 196, 80, .40), 0 0 68px 22px rgba(255, 168, 50, .26), 0 0 130px 46px rgba(255, 150, 30, .12); }
  50% { box-shadow: 0 0 36px 12px rgba(255, 202, 94, .55), 0 0 92px 30px rgba(255, 172, 56, .34), 0 0 160px 60px rgba(255, 152, 34, .17); }
}

.sky-sun {
  animation: sun-glow-v2 6s ease-in-out infinite;
}

.sky-sun.sun-wink,
.sky-moon.moon-wink {
  animation: orb-wink .85s ease;
}

@keyframes orb-wink {
  0% { filter: brightness(1); }
  30% { filter: brightness(1.5) saturate(1.25); }
  100% { filter: brightness(1); }
}

/* --- Moon: cratered, softly lit from the upper left --- */
.sky-moon {
  background:
    radial-gradient(circle at 26% 24%, rgba(150, 143, 126, .45) 0 5.5%, transparent 6.5%),
    radial-gradient(circle at 28.5% 26.5%, rgba(255, 252, 240, .5) 0 2.2%, transparent 3.2%),
    radial-gradient(circle at 62% 40%, rgba(150, 143, 126, .42) 0 8.5%, transparent 9.5%),
    radial-gradient(circle at 64.5% 37.5%, rgba(255, 252, 240, .42) 0 3%, transparent 4%),
    radial-gradient(circle at 42% 64%, rgba(150, 143, 126, .38) 0 5%, transparent 6%),
    radial-gradient(circle at 44% 62%, rgba(255, 252, 240, .4) 0 2%, transparent 3%),
    radial-gradient(circle at 72% 68%, rgba(150, 143, 126, .34) 0 4%, transparent 5%),
    radial-gradient(circle at 38% 18%, rgba(150, 143, 126, .3) 0 3%, transparent 4%),
    radial-gradient(circle at 16% 52%, rgba(150, 143, 126, .3) 0 3.4%, transparent 4.4%),
    radial-gradient(circle at 32% 30%, #fdf9ee 0%, #efe8d6 38%, #d9d1bd 72%, #beb39c 100%);
  box-shadow:
    inset -12px -10px 0 0 rgba(160, 152, 134, .30),
    inset -3px -3px 6px 0 rgba(120, 112, 96, .18),
    0 0 26px 8px rgba(228, 232, 255, .20);
}

/* glassy sheen from the light side */
.sky-moon::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(128deg, rgba(255, 255, 255, .5) 4%, rgba(255, 255, 255, .12) 30%, transparent 52%);
  pointer-events: none;
}

.sky-orb {
  cursor: pointer;
}

/* ==========================================================
   LANDSCAPE DETAILS V3
   ========================================================== */

/* --- windmill on the mid ridge --- */
.sky-windmill {
  position: absolute;
  left: 56.2%;
  bottom: 42.4%;
  width: 46px;
  height: 66px;
  --wm-ink: #1a4d4e;
}

html[data-theme="night"] .sky-windmill {
  --wm-ink: #0d2336;
}

.sky-windmill svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.sky-windmill .wm-tower,
.sky-windmill .wm-cap,
.sky-windmill .wm-blade {
  fill: var(--wm-ink);
}

.sky-windmill .wm-door {
  fill: rgba(255, 220, 150, 0);
  transition: fill .9s ease;
}

html[data-theme="night"] .sky-windmill .wm-door {
  fill: rgba(255, 220, 150, .85);
  animation: lantern-flicker 5s ease-in-out infinite 1.2s;
}

.sky-windmill .wm-hub {
  fill: var(--wm-ink);
}

.wm-blades {
  transform-box: view-box;
  transform-origin: 30px 20px;
  animation: wm-spin 17s linear infinite;
}

@keyframes wm-spin {
  to { transform: rotate(360deg); }
}

/* --- grass tufts swaying near the cabin --- */
.sky-grass .sg {
  position: absolute;
  width: 19px;
  height: 15px;
  fill: var(--house-ink, #0f3437);
  transform-origin: 50% 100%;
  animation: grass-sway 3.4s ease-in-out infinite alternate;
}

.sky-grass .sg-1 { left: 69%; bottom: 27.4%; animation-duration: 3.1s; }
.sky-grass .sg-2 { left: 72.5%; bottom: 27.9%; width: 15px; animation-duration: 3.8s; animation-delay: -1.2s; }
.sky-grass .sg-3 { left: 78.6%; bottom: 27.1%; width: 17px; animation-duration: 3.5s; animation-delay: -2.1s; }

@keyframes grass-sway {
  from { transform: rotate(-4deg); }
  to { transform: rotate(5deg); }
}

/* --- drifting cloud shadow over the front hill (day) --- */
.hill-cloudshadow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(44% 40% at 50% 74%, rgba(6, 22, 24, .16), transparent 70%);
  mix-blend-mode: multiply;
  animation: cloudshadow-drift 96s ease-in-out infinite alternate;
}

html[data-theme="night"] .hill-cloudshadow {
  opacity: 0;
}

@keyframes cloudshadow-drift {
  from { transform: translateX(-24%); }
  to { transform: translateX(24%); }
}

/* --- hot-air balloon crossing the day sky --- */
.sky-balloon {
  position: absolute;
  top: 11%;
  left: 0;
  opacity: 0;
  transition: opacity 2s ease;
  animation: balloon-cross 140s linear infinite;
  animation-delay: -34s;
}

html[data-theme="day"] .sky-balloon {
  opacity: 1;
}

.balloon-inner {
  animation: balloon-bob 7s ease-in-out infinite alternate;
}

.sky-balloon svg {
  display: block;
  width: 34px;
  height: 56px;
}

.bb-stripe { fill: #e8907a; }
.bb-panel { fill: #f2ddb8; }
.bb-rope { stroke: #8a6a4e; fill: none; }
.bb-basket { fill: #9a7452; }
@keyframes balloon-cross {
  from { transform: translateX(-16vw); }
  to { transform: translateX(116vw); }
}

@keyframes balloon-bob {
  from { transform: translateY(0) rotate(-2deg); }
  to { transform: translateY(10px) rotate(2deg); }
}

/* --- "Q" constellation at night --- */
.sky-constellation {
  position: absolute;
  top: 9%;
  right: 12%;
  width: clamp(70px, 8vw, 110px);
  opacity: 0;
  transition: opacity 2.2s ease;
}

html[data-theme="night"] .sky-constellation {
  opacity: 1;
  animation: const-glow 6s ease-in-out infinite alternate;
}

.const-line {
  fill: none;
  stroke: rgba(190, 205, 255, .28);
  stroke-width: 1;
  stroke-dasharray: 240;
  stroke-dashoffset: 240;
  transition: stroke-dashoffset 3.5s ease .6s;
}

html[data-theme="night"] .const-line {
  stroke-dashoffset: 0;
}

.const-star {
  fill: #e8edff;
  animation: const-twinkle 3.2s ease-in-out infinite alternate;
}

.const-star:nth-child(odd) { animation-delay: -1.6s; }

@keyframes const-twinkle {
  from { opacity: .55; }
  to { opacity: 1; }
}

@keyframes const-glow {
  from { opacity: .75; }
  to { opacity: 1; }
}

/* --- weather-driven precipitation --- */
.sky-precip {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}

.sky-precip i {
  position: absolute;
  top: -6vh;
}

.sky-precip.is-rain i {
  width: 1.5px;
  height: 16px;
  border-radius: 999px;
  background: linear-gradient(180deg, transparent, rgba(205, 222, 255, .55));
  transform: rotate(9deg);
  animation: rain-fall var(--pd, .9s) linear infinite;
  animation-delay: var(--pdel, 0s);
}

@keyframes rain-fall {
  to { transform: translateY(116vh) rotate(9deg); }
}

.sky-precip.is-snow i {
  width: var(--ps, 4px);
  height: var(--ps, 4px);
  border-radius: 50%;
  background: rgba(255, 255, 255, .85);
  filter: blur(.4px);
  box-shadow: 0 0 6px 1px rgba(255, 255, 255, .25);
  animation: snow-fall var(--pd, 10s) linear infinite;
  animation-delay: var(--pdel, 0s);
}

@keyframes snow-fall {
  0% { transform: translate3d(0, -4vh, 0); }
  100% { transform: translate3d(var(--sx, 4vw), 108vh, 0); }
}

.sky-flash {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: rgba(220, 228, 255, .55);
  opacity: 0;
  animation: sky-flash 9s ease-in infinite;
}

@keyframes sky-flash {
  0%, 92%, 100% { opacity: 0; }
  93% { opacity: .5; }
  94% { opacity: .08; }
  95% { opacity: .4; }
  97% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .view.active-view > *,
  .view.active-view > h1,
  .active-view .portfolio-card {
    animation: none !important;
  }

  .wm-blades,
  .sky-grass .sg,
  .hill-cloudshadow,
  .balloon-inner,
  .sky-balloon,
  .const-star,
  .sky-precip i,
  .sky-flash {
    animation: none !important;
  fill: var(--house-ink, #0f3437);
  transform-origin: 50% 100%;
  animation: grass-sway 3.4s ease-in-out infinite alternate;
}

.sky-grass .sg-1 { left: 69%; bottom: 27.4%; animation-duration: 3.1s; }
.sky-grass .sg-2 { left: 72.5%; bottom: 27.9%; width: 15px; animation-duration: 3.8s; animation-delay: -1.2s; }
.sky-grass .sg-3 { left: 78.6%; bottom: 27.1%; width: 17px; animation-duration: 3.5s; animation-delay: -2.1s; }

@keyframes grass-sway {
  from { transform: rotate(-4deg); }
  to { transform: rotate(5deg); }
}

/* --- drifting cloud shadow over the front hill (day) --- */
.hill-cloudshadow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(44% 40% at 50% 74%, rgba(6, 22, 24, .16), transparent 70%);
  mix-blend-mode: multiply;
  animation: cloudshadow-drift 96s ease-in-out infinite alternate;
}

html[data-theme="night"] .hill-cloudshadow {
  opacity: 0;
}

@keyframes cloudshadow-drift {
  from { transform: translateX(-24%); }
  to { transform: translateX(24%); }
}

/* --- hot-air balloon crossing the day sky --- */
.sky-balloon {
  position: absolute;
  top: 11%;
  left: 0;
  opacity: 0;
  transition: opacity 2s ease;
  animation: balloon-cross 140s linear infinite;
  animation-delay: -34s;
}

html[data-theme="day"] .sky-balloon {
  opacity: 1;
}

.balloon-inner {
  animation: balloon-bob 7s ease-in-out infinite alternate;
}

.sky-balloon svg {
  display: block;
  width: 34px;
  height: 56px;
}

.bb-stripe { fill: #e8907a; }
.bb-panel { fill: #f2ddb8; }
.bb-rope { stroke: #8a6a4e; fill: none; }
.bb-basket { fill: #9a7452; }
@keyframes balloon-cross {
  from { transform: translateX(-16vw); }
  to { transform: translateX(116vw); }
}

@keyframes balloon-bob {
  from { transform: translateY(0) rotate(-2deg); }
  to { transform: translateY(10px) rotate(2deg); }
}

/* --- "Q" constellation at night --- */
.sky-constellation {
  position: absolute;
  top: 9%;
  right: 12%;
  width: clamp(70px, 8vw, 110px);
  opacity: 0;
  transition: opacity 2.2s ease;
}

html[data-theme="night"] .sky-constellation {
  opacity: 1;
  animation: const-glow 6s ease-in-out infinite alternate;
}

.const-line {
  fill: none;
  stroke: rgba(190, 205, 255, .28);
  stroke-width: 1;
  stroke-dasharray: 240;
  stroke-dashoffset: 240;
  transition: stroke-dashoffset 3.5s ease .6s;
}

html[data-theme="night"] .const-line {
  stroke-dashoffset: 0;
}

.const-star {
  fill: #e8edff;
  animation: const-twinkle 3.2s ease-in-out infinite alternate;
}

.const-star:nth-child(odd) { animation-delay: -1.6s; }

@keyframes const-twinkle {
  from { opacity: .55; }
  to { opacity: 1; }
}

@keyframes const-glow {
  from { opacity: .75; }
  to { opacity: 1; }
}

/* --- weather-driven precipitation --- */
.sky-precip {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}

.sky-precip i {
  position: absolute;
  top: -6vh;
}

.sky-precip.is-rain i {
  width: 1.5px;
  height: 16px;
  border-radius: 999px;
  background: linear-gradient(180deg, transparent, rgba(205, 222, 255, .55));
  transform: rotate(9deg);
  animation: rain-fall var(--pd, .9s) linear infinite;
  animation-delay: var(--pdel, 0s);
}

@keyframes rain-fall {
  to { transform: translateY(116vh) rotate(9deg); }
}

.sky-precip.is-snow i {
  width: var(--ps, 4px);
  height: var(--ps, 4px);
  border-radius: 50%;
  background: rgba(255, 255, 255, .85);
  filter: blur(.4px);
  box-shadow: 0 0 6px 1px rgba(255, 255, 255, .25);
  animation: snow-fall var(--pd, 10s) linear infinite;
  animation-delay: var(--pdel, 0s);
}

@keyframes snow-fall {
  0% { transform: translate3d(0, -4vh, 0); }
  100% { transform: translate3d(var(--sx, 4vw), 108vh, 0); }
}

.sky-flash {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: rgba(220, 228, 255, .55);
  opacity: 0;
  animation: sky-flash 9s ease-in infinite;
}

@keyframes sky-flash {
  0%, 92%, 100% { opacity: 0; }
  93% { opacity: .5; }
  94% { opacity: .08; }
  95% { opacity: .4; }
  97% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .view.active-view > *,
  .view.active-view > h1,
  .active-view .portfolio-card {
    animation: none !important;
  }

  .wm-blades,
  .sky-grass .sg,
  .hill-cloudshadow,
  .balloon-inner,
  .sky-balloon,
  .const-star,
  .sky-precip i,
  .sky-flash {
    animation: none !important;
  }

  .sky-balloon,
  .sky-precip,
  .sky-flash {
    display: none;
  }
}
