:root {
  --bg-1: #ffffff;
  --bg-2: #ffffff;
  --ink: #1b1b1b;
  --accent: #1f6f8b;
  --accent-2: #e07a5f;
  --muted: #596164;
  --card: #ffffff;
  --border: #e1ddd2;
  --shadow: 0 14px 40px rgba(27, 27, 27, 0.08);
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: linear-gradient(120deg, var(--bg-1), var(--bg-2));
  color: var(--ink);
  min-height: 100vh;
}

.page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}



.telegram-mini-app-status {
  width: min(1120px, 92%);
  margin: 18px auto 0;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 0.95rem;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
  border: 1px solid transparent;
  box-shadow: var(--shadow);
}

.telegram-mini-app-status span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.telegram-mini-app-status.is-success {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.25);
  color: #166534;
}

.telegram-mini-app-status.is-warning {
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.28);
  color: #92400e;
}

.telegram-mini-app-status.is-muted {
  background: rgba(15, 23, 42, 0.06);
  border-color: rgba(15, 23, 42, 0.08);
  color: var(--muted);
}

.telegram-mini-app-status.is-loading {
  background: rgba(37, 99, 235, 0.1);
  border-color: rgba(37, 99, 235, 0.2);
  color: #1d4ed8;
}

.telegram-mini-app-status.is-loading span:first-child::before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: currentColor;
  display: inline-block;
  opacity: 0.35;
  animation: telegramPulse 1s ease-in-out infinite;
}

@keyframes telegramPulse {

  0%,
  100% {
    opacity: 0.3;
    transform: scale(0.9);
  }

  50% {
    opacity: 1;
    transform: scale(1);
  }
}

/* ---- Template Header Integration ---- */
.site-template-header {
  position: sticky;
  top: 0;
  z-index: 90;
}

.site-template-header .header-middle {
  width: 100%;
  margin: 0;
  padding-left: 0;
  padding-right: 0;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(17, 24, 39, 0.08);
}

.site-template-header .header-middle-inner {
  table-layout: fixed;
}

.site-template-header .header-logo-nav {
  white-space: nowrap;
}

.site-template-logo-link {
  display: inline-flex;
  align-items: center;
}

.site-template-logo {
  width: auto;
  height: 40px;
}

.site-template-header .shop-main-menu {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 0;
}

.site-template-header .shop-main-menu>.menu-item {
  padding: 0;
}

.site-template-header .shop-main-menu>.menu-item>a {
  line-height: 40px;
  padding: 0 6px;
}

.site-template-header .meta-dreaming {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.site-template-header .site-lang-switch form {
  margin: 0;
}

.site-template-header .site-lang-switch select {
  min-width: 84px;
  height: 34px;
  border: 1px solid #d5d7db;
  border-radius: 999px;
  padding: 0 10px;
  background: #fff;
  color: #111827;
}

.site-template-header .block-dreaming .block-link {
  position: relative;
}

.site-template-header .block-minicart .count {
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  line-height: 1;
  right: -8px;
  top: -8px;
}

.site-template-header .block-minicart .widget_shopping_cart {
  min-width: 320px;
}

.site-template-header .block-minicart .product_list_widget li>a {
  white-space: normal;
}

.staff-panel {
  position: fixed;
  top: 80px;
  right: 60px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.staff-panel-toggle {
  width: 50px;
  height: 50px;
  border: 2px solid #2563eb;
  border-radius: 16px;
  background: #0f172a;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.24);
}

.staff-panel-links[hidden] {
  display: none !important;
}

.staff-panel-links {
  position: absolute;
  top: 62px;
  right: 0;
  width: min(320px, calc(100vw - 40px));
  border-radius: 22px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.12);
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.18);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.staff-panel.is-open .staff-panel-links {
  display: flex;
}

.staff-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.1);
}

.staff-panel-title {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #0f172a;
  font-size: 16px;
  font-weight: 700;
}

.staff-panel-title-icon,
.staff-panel-link-icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.staff-panel-title-icon {
  background: #eef4ff;
  color: #2563eb;
}

.staff-panel-header-close {
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 12px;
  background: #f8fafc;
  color: #475569;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.staff-panel-header-close:hover {
  background: #eef2f7;
}

.staff-panel-menu {
  display: flex;
  flex-direction: column;
  padding: 8px;
  gap: 4px;
}

.staff-panel-link {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: #ffffff;
  color: #0f172a;
  text-decoration: none;
  font-weight: 600;
  text-align: left;
  border: 1px solid transparent;
}

.staff-panel-link:hover {
  background: #f8fafc;
  border-color: rgba(37, 99, 235, 0.14);
}

.staff-panel-link-icon {
  background: #f8fafc;
  color: #64748b;
  font-size: 15px;
}

.staff-panel-link--hide {
  border-color: rgba(15, 23, 42, 0.08);
  color: #475569;
}

.staff-panel-link--hide .staff-panel-link-icon {
  background: #f8fafc;
  color: #64748b;
}

.shop-nav-toggle {
  display: none;
}

.shop-nav-toggle-btn {
  display: none;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(17, 24, 39, 0.2);
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
}

.shop-nav-toggle-btn span {
  width: 16px;
  border-bottom: 2px solid #111827;
}

@media (max-width: 1024px) {
  .site-template-header {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .site-template-header .header-wrap-stick,
  .site-template-header .header-middle {
    display: block !important;
  }

  .site-template-header .header-middle-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .site-template-header .header-middle-inner>* {
    display: block;
    width: auto;
  }

  .site-template-header .header-logo-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
  }

  .shop-nav-toggle-btn {
    display: inline-flex;
  }

  .shop-nav-wrap {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 1px);
    background: #fff;
    border-bottom: 1px solid rgba(17, 24, 39, 0.12);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
    display: none;
    padding: 10px 16px;
    z-index: 99;
  }

  .shop-main-menu {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }

  .shop-main-menu>.menu-item {
    width: 100%;
  }

  .shop-main-menu>.menu-item>a {
    width: 100%;
    display: block;
  }

  .shop-nav-toggle:checked~.shop-nav-wrap {
    display: block;
  }

  .site-template-header .header-control {
    margin-left: auto;
  }

  .site-template-header .site-lang-switch {
    display: none;
  }

  .site-template-header .block-minicart .widget_shopping_cart {
    right: -12px;
    left: auto;
    min-width: 290px;
  }

  .staff-panel {
    display: none;
  }
}