@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Playfair+Display:wght@500;600;700;800&display=swap");

/* Global variables */
@import "./sections/variables-v2.css?v=3";

@import "./sections/rating-v3.css?v=20260608d";

@import "./sections/catalog-v2.css?v=20260612";

@import "./sections/tasks-v2.css?v=4";

@import "./sections/main-v2.css?v=10";

@import "./sections/store-v2.css?v=4";

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-family: var(--font-family);
  background: var(--bg-grey);
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
  width: 100%;
  padding-top: calc(5.625rem + env(safe-area-inset-top, 0rem));
  letter-spacing: 0.005em;
}

.field-bg {
  background-image: url("../assets/images/background.webp");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

/* =========================================
   LAYOUT & UTILITIES
   ========================================= */
.main-content {
  padding: 1.5rem 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  max-width: 32rem;
  margin: 0 auto;
  width: 100%;
}

.center-content {
  align-items: center;
  justify-content: center;
}

.mt-24 {
  margin-top: 24px;
}
.text-normal {
  text-transform: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* =========================================
   HEADER — mobile: 3-col grid back|logo|burger
   ========================================= */
.app-header {
  background-color: var(--bg-dark);
  color: white;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1001;
  /* Mobile grid */
  display: grid;
  grid-template-columns: 2rem 1fr 2rem;
  align-items: center;
  gap: 0.75rem;
  padding: calc(0.75rem + env(safe-area-inset-top, 0rem)) 1rem 0.75rem;
  border-bottom: 1px solid rgba(194, 162, 74, 0.18);
  box-shadow: 0 1px 12px rgba(0, 0, 0, 0.18);
}

/* header-left uses display:contents so its children
   become direct grid items of .app-header */
.header-left {
  display: contents;
}

.back-btn {
  grid-column: 1;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.logo-container {
  grid-column: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-container img {
  height: 2.5rem;
  width: auto;
  object-fit: contain;
}

/* top-nav hidden on mobile */
.top-nav {
  display: none;
}

/* =========================================
   BURGER BUTTON (mobile only)
   ========================================= */
.burger-btn {
  grid-column: 3;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 1.5rem;
  height: 1.125rem; /* 3 lines × 2px + 2 gaps × ~5px */
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}

.burger-btn span {
  display: block;
  width: 100%;
  height: 2px;
  background: white;
  border-radius: 2px;
  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
  transform-origin: center;
}

.burger-btn.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.burger-btn.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.burger-btn.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* =========================================
   BURGER MENU DRAWER (mobile only)
   ========================================= */
.burger-menu {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: auto; /* высота по контенту, не весь экран */
  background: var(--bg-dark);
  z-index: 1000; /* ниже хедера (1001) чтобы хедер был сверху */
  transform: translateY(-100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  padding-top: calc(5.625rem + env(safe-area-inset-top, 0rem)); /* отступ равный высоте хедера */
  border-bottom: 1px solid var(--accent);
  border-left: none; /* убираем боковую границу */
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.burger-menu.open {
  transform: translateY(0);
}

.burger-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999; /* ниже меню и хедера */
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(2px);
}

.burger-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.burger-nav {
  display: flex;
  flex-direction: column;
  padding: 0.5rem 0;
  overflow-y: auto;
}

.burger-nav-item {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.875rem 1.5rem;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: var(--font-weight-semibold);
  font-family: var(--font-family);
  transition:
    background 0.15s,
    color 0.15s;
  border-left: 3px solid transparent;
}

.burger-nav-item:hover,
.burger-nav-item.active {
  background: rgba(201, 168, 76, 0.1);
  color: var(--accent);
  border-left-color: var(--accent);
}

.burger-nav-icon {
  font-size: 1.1rem;
  width: 1.5rem;
  text-align: center;
  flex-shrink: 0;
}

.burger-nav-item--muted {
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.875rem;
  font-weight: var(--font-weight-semibold);
}

.burger-nav-divider {
  height: 1px;
  background: rgba(201, 168, 76, 0.2);
  margin: 0.5rem 1.5rem;
}

/* =========================================
   BUTTONS
   ========================================= */
.btn-primary {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  background-color: var(--bg-dark);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 15px 20px;
  width: 100%;
  font-size: 15px;
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    background-color 0.15s ease;
}

.btn-primary:hover {
  background-color: #28332a;
  box-shadow: var(--shadow-lg);
}

.btn-primary:active {
  transform: translateY(1px);
  box-shadow: var(--shadow-sm);
}

.btn-icon {
  vertical-align: middle;
  margin-left: 8px;
}
.btn-icon-left {
  vertical-align: middle;
  margin-right: 8px;
  width: 18px;
  height: 18px;
}

.resend-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: var(--font-weight-semibold);
  margin-top: 24px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  font-family: var(--font-family);
}

.resend-btn:hover {
  color: var(--primary);
}

/* =========================================
   FORMS & REGISTRATION
   ========================================= */
.verify-bg {
  background-color: #fafafa;
}

/* =========================================
   TYPOGRAPHY UTILITIES
   ========================================= */
.type-h2 {
  font-size: var(--font-size-h2);
  font-weight: var(--font-weight-bold);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--text-heading-color);
  font-family: var(--font-family-heading);
}

.type-h3 {
  font-size: var(--font-size-h3);
  font-weight: var(--font-weight-bold);
  line-height: 1.25;
  color: var(--text-heading-color);
  font-family: var(--font-family-heading);
}

.type-h4 {
  font-size: var(--font-size-h4);
  font-weight: var(--font-weight-bold);
  line-height: 1.3;
  color: var(--text-heading-color);
  font-family: var(--font-family-heading);
}

.type-body1 {
  font-size: var(--font-size-body1);
  font-weight: var(--font-weight-semibold);
  line-height: 1.45;
  color: var(--text-main);
  font-family: var(--font-family);
}

.type-body2 {
  font-size: var(--font-size-body2);
  font-weight: var(--font-weight-semibold);
  line-height: 1.4;
  color: var(--text-main);
  font-family: var(--font-family);
}

.type-item-title {
  font-size: var(--font-size-item-title);
  font-weight: var(--font-weight-semibold);
  line-height: 1.3;
  color: var(--text-main);
  font-family: var(--font-family);
}

.type-item-title-lg {
  font-size: var(--font-size-item-title-lg);
}

.type-item-title-sm {
  font-size: var(--font-size-item-title-sm);
}

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

.type-on-dark {
  color: var(--text-on-dark);
}

.type-bonus-inline {
  display: inline-flex;
  align-items: baseline;
  gap: 0.25rem;
  white-space: nowrap;
  flex-wrap: nowrap;
}

.type-accent-value {
  line-height: 1;
  color: var(--accent);
  letter-spacing: -0.01em;
  font-weight: var(--font-weight-semibold);
}

.type-accent-value-lg {
  font-size: var(--font-size-accent-value-lg);
  font-weight: var(--font-weight-bold);
}

.type-accent-value-sm {
  font-size: var(--font-size-accent-value-sm);
}

.type-bonus-unit {
  font-size: var(--font-size-bonus-unit);
  font-weight: var(--font-weight-semibold);
  color: var(--text-muted);
}

.type-bonus-unit-on-dark {
  color: rgba(255, 255, 255, 0.55);
}

/* For labels like "Ваше место" / "Ваш баланс" */
.type-label-on-dark {
  font-size: var(--font-size-body1);
  font-weight: var(--font-weight-semibold);
  line-height: 1.25;
  letter-spacing: 0.04em;
  color: var(--text-on-dark);
  font-family: var(--font-family-heading);
}

/* =========================================
   UNIFIED PAGE TITLES & SUBTITLES
   ========================================= */
.page-title {
  font-size: var(--font-size-h2);
  font-weight: var(--font-weight-bold);
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin-bottom: clamp(0.5rem, 1vh, 0.75rem);
  color: var(--text-heading-color);
  font-family: var(--font-family-heading);
}

.page-subtitle {
  font-size: var(--font-size-body1);
  color: var(--text-description-color);
  margin-bottom: clamp(1rem, 2vh, 2rem);
  font-weight: var(--font-weight-semibold);
  font-family: var(--font-family);
}

/* =========================================
   UNIFIED HEADING & TEXT STYLES
   ========================================= */
/* Card title — for modals, dialogs, auth cards */
.card-title {
  font-size: var(--font-size-h3);
  font-weight: var(--font-weight-bold);
  margin-bottom: 0.75rem;
  color: var(--text-heading-color);
  font-family: var(--font-family-heading);
}

.card-subtitle {
  font-size: var(--font-size-body1);
  color: var(--text-description-color);
  margin-bottom: 2rem;
  font-weight: var(--font-weight-semibold);
  font-family: var(--font-family);
}

/* Section title — for page sections */
.section-title {
  font-size: var(--font-size-h4);
  font-weight: var(--font-weight-bold);
  color: var(--text-heading-color);
  font-family: var(--font-family-heading);
}

/* =========================================
   AVATAR UPLOAD
   ========================================= */
.avatar-upload {
  display: flex;
  justify-content: center;
  margin-bottom: 32px;
}

.avatar-upload input[type="file"] {
  display: none;
}

.avatar-preview {
  width: 110px;
  height: 110px;
  background-color: var(--bg-grey);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border: 2px solid transparent;
}

.avatar-preview img.user-icon {
  width: 48px;
  height: 48px;
}

.avatar-add-btn {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 32px;
  height: 32px;
  background-color: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  border: 3px solid var(--bg-light);
  cursor: pointer;
  transition: transform 0.2s;
}

.avatar-add-btn:active {
  transform: scale(0.95);
}
.avatar-add-btn svg {
  width: 18px;
  height: 18px;
}

/* =========================================
   FORM ELEMENTS
   ========================================= */
.form-group {
  margin-bottom: 24px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
  color: var(--text-main);
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrapper img.input-icon {
  position: absolute;
  left: 16px;
  width: 22px;
  height: 22px;
}

.form-control {
  width: 100%;
  padding: 16px 16px 16px 52px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 15px;
  font-family: var(--font-family);
  color: var(--text-main);
  background-color: transparent;
  outline: none;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(194, 162, 74, 0.14);
}
.form-control::placeholder {
  color: #bdbdbd;
}

/* =========================================
   AUTH CARD
   ========================================= */
.auth-card {
  background: var(--bg-light);
  border-radius: var(--radius-lg);
  padding: 40px 28px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  text-align: center;
  border: 1px solid var(--border-color);
}

.icon-circle {
  width: 64px;
  height: 64px;
  background-color: #d6e4d6;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px auto;
}

.icon-circle img.lock-icon {
  width: 28px;
  height: 28px;
}

/* =========================================
   OTP INPUTS
   ========================================= */
.otp-inputs {
  display: flex;
  justify-content: center;
  margin-bottom: 32px;
  gap: 12px;
}

.otp-input {
  width: 56px;
  height: 64px;
  text-align: center;
  font-size: 24px;
  font-weight: var(--font-weight-semibold);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-family: var(--font-family);
  background-color: transparent;
  outline: none;
  transition: border-color 0.2s;
  color: var(--text-main);
}

.otp-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(194, 162, 74, 0.14);
}

/* =========================================
   BOTTOM NAVIGATION
   ========================================= */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--bg-light);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0.5rem 0 max(0.5rem, env(safe-area-inset-bottom, 0rem));
  z-index: 100;
  width: 100%;
  border-radius: 0;
  border-top: 1px solid rgba(194, 162, 74, 0.22);
  box-shadow: 0 -2px 16px rgba(28, 31, 27, 0.06);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.5rem 0.125rem;
  color: var(--primary);
  text-decoration: none;
  font-size: 0.625rem;
  font-weight: var(--font-weight-semibold);
  transition: color 0.2s;
  flex: 1;
  text-align: center;
  white-space: nowrap;
}

.nav-item svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}
.nav-item img.nav-icon {
  width: 24px;
  height: 24px;
}

.nav-icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  padding: 0.625rem;
  border: 2px solid transparent;
  background:
    linear-gradient(var(--bg-dark), var(--bg-dark)) padding-box,
    var(--gradient-gold) border-box;
  box-shadow: var(--shadow-sm);
}

.nav-item.active {
  color: var(--accent);
}

/* =========================================
   MODAL
   ========================================= */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.modal[hidden] {
  display: none;
}

.modal-content {
  background: var(--bg-light);
  padding: 40px 24px;
  border-radius: 12px;
  max-width: 90%;
  width: 400px;
  box-shadow: var(--plain-shadow);
  border: 1px solid #f0f0f0;
  animation: slideUp 0.3s ease-out;
}

.modal-icon {
  width: 10rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px auto;
}

.modal-success-icon {
  width: 100%;
  max-width: 160px;
  object-fit: contain;
  margin: 0 auto;
}

.modal-title {
  font-size: var(--font-size-h3);
  font-weight: var(--font-weight-bold);
  margin-bottom: 12px;
  color: var(--text-heading-color);
  font-family: var(--font-family-heading);
}

.modal-subtitle {
  font-size: var(--font-size-body1);
  color: var(--text-description-color);
  margin-bottom: 24px;
  line-height: 1.5;
}

.modal .btn-primary {
  margin-top: 0;
}

/* =========================================
   ANIMATIONS
   ========================================= */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Pulsing gold glows removed — replaced with calm, static elevation.
   Keyframes kept (still referenced) but neutralised to a refined shadow. */
@keyframes shadowShine {
  0%,
  100% {
    box-shadow: var(--shadow-md);
  }
}

@keyframes shadowShineText {
  0%,
  100% {
    text-shadow: none;
  }
}

@keyframes shadowShineSmall {
  0%,
  100% {
    box-shadow: none;
  }
}

@keyframes floatingMotion {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

/* =========================================
   WIDE DESKTOP (>= 1024px)
   ========================================= */
@media (min-width: 1024px) {
  .main-content.catalog-content {
    max-width: 1100px;
  }
}

/* =========================================
   SMALL MOBILE (≤ 390px width)
   ========================================= */
@media (max-width: 390px) {
  html {
    font-size: 14px;
  }
}
@media (max-width: 340px) {
  html {
    font-size: 13px;
  }
}

/* =========================================
   MOBILE (< 768px)
   ========================================= */
@media (max-width: 767px) {
  .bottom-nav {
    flex-direction: row;
    padding: 0.5rem 0 max(0.5rem, env(safe-area-inset-bottom, 0rem));
  }
  .nav-item {
    flex: 1;
    width: auto;
    padding: 0.5rem 0.125rem;
  }
  body {
    padding-bottom: calc(6rem + env(safe-area-inset-bottom, 0rem));
  }

  .main-content.tasks-content {
    height: calc(100dvh - 5.625rem - 6rem);
  }
}

/* =========================================
   DESKTOP (≥ 768px)
   ========================================= */
@media (min-width: 768px) {
  /* Switch header from grid back to flex */
  .app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2.5rem;
  }

  /* header-left becomes a real flex row again */
  .header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
  }

  .back-btn {
    /* no longer a grid item */
    grid-column: unset;
  }

  .logo-container {
    grid-column: unset;
    justify-content: flex-start;
  }

  .logo-container img {
    height: 3.125rem;
  }

  /* Hide burger on desktop */
  .burger-btn {
    display: none;
  }
  .burger-menu {
    display: none;
  }
  .burger-overlay {
    display: none;
  }

  /* Show desktop nav */
  .top-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
  }

  .top-nav .nav-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.8125rem;
    font-weight: var(--font-weight-semibold);
    white-space: nowrap;
    width: auto;
    transition: color 0.2s;
  }

  .top-nav .nav-item svg,
  .top-nav .nav-item img.nav-icon {
    width: 1.25rem;
    height: 1.25rem;
  }

  .top-nav .nav-item.active {
    color: var(--accent);
  }
  .top-nav .nav-item:hover {
    color: rgba(255, 255, 255, 0.9);
  }

  .bottom-nav {
    display: none;
  }

  body {
    padding-bottom: 0;
  }

  .main-content {
    padding: 1.5rem;
    max-width: 100%;
    margin: 0;
    width: 100%;
    align-items: center;
    justify-content: center;
  }

  .main-content.tasks-content {
    max-width: 48rem;
    margin: 0 auto;
  }

  /* Constrain auth/form pages on wide screens */
  .main-content.center-content {
    max-width: 28rem;
    margin: 0 auto;
  }

  /* Constrain history page on wide screens */
  .main-content.history-content {
    max-width: 40rem;
    margin: 0 auto;
  }

  /* Constrain rating on wide screens */
  .main-content.rating-content {
    max-width: 52rem;
    margin: 0 auto;
  }

  /* Store page: center and constrain width */
  .main-content.store-content {
    max-width: 56rem;
    margin: 0 auto;
    padding: 1.5rem 1.5rem 4rem;
  }

  /* Store: 3 columns on desktop (gift cards look better wider) */
  .main-content.store-content .store-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
  }

  /* Catalog: center and constrain */
  .main-content.catalog-content {
    max-width: 900px;
    margin: 0 auto;
  }

  /* Cart FAB: larger on desktop */
  .cart-fab {
    width: 4rem;
    height: 4rem;
    bottom: 2.5rem;
    right: 2rem;
  }
  .cart-fab-icon,
  .cart-fab svg {
    width: 1.75rem;
    height: 1.75rem;
  }
  .cart-fab-badge {
    font-size: 0.7rem;
    min-width: 1.35rem;
    height: 1.35rem;
  }

  /* Hide dotted ball trail on desktop: horizontal layout makes it confusing */
  .stages-path-svg {
    display: none;
  }

  .tasks-hero-card {
    padding: 1.5rem;
  }
  .task-card {
    padding: 1rem;
  }
  .stage-description {
    font-size: 14px;
  }

  .stages-container {
    flex-direction: row;
    gap: clamp(3rem, 7vw, 7rem);
    margin-bottom: 0;
    padding-bottom: 2rem;
    align-items: flex-start;
    justify-content: center;
  }

  .stage-row {
    flex-direction: column;
    align-items: center;
    margin-left: 0;
    gap: clamp(0.75rem, 2vh, 1.5rem);
  }

  .stage-card {
    width: 25vw;
    max-width: none;
    flex: none;
    padding: clamp(0.6rem, 1.5vh, 1.25rem) clamp(0.6rem, 1.5vh, 1.25rem)
      clamp(0.6rem, 1.5vh, 1.25rem) clamp(0.9rem, 2vh, 1.75rem);
  }

  .stage-shield {
    transform: scale(1.4);
    transform-origin: top left;
  }

  .stage-header {
    margin-left: 3.5rem;
    margin-bottom: clamp(0.2rem, 0.8vh, 0.5rem);
  }

  .stage-title {
    font-size: clamp(0.85rem, 2vh, 1.3rem);
  }
  .stage-description {
    font-size: clamp(11px, 1.6vh, 14px);
  }
  .stage-details {
    margin-bottom: clamp(0.25rem, 0.8vh, 0.5rem);
  }

  .progress-bar-container {
    margin-bottom: clamp(0.5rem, 1.5vh, 1rem);
  }

  .field-bg {
    background-image: url("../assets/images/desktopBackground.webp");
  }
}

/* =========================================
   SMALL HEIGHT (≤ 667px tall)
   iPhone SE 2/3, iPhone 6/7/8, cheap Androids
   ========================================= */
@media (max-height: 668px) and (max-width: 767px) {
  .stages-container {
    gap: 1.25rem;
  }

  .stage-card {
    padding: 0.15rem 0.15rem 0.15rem 0.35rem;
  }

  .stage-shield {
    width: 2.75rem;
    height: 3.25rem;
  }

  .stage-header {
    margin-left: 1.75rem;
    margin-bottom: 0.1rem;
  }

  .stage-title {
    font-size: 0.8rem;
  }
  .stage-description {
    font-size: 10px;
  }

  .detail-icon-wrapper {
    width: 1.5rem;
    height: 1.5rem;
  }
  .detail-label {
    font-size: 0.45rem;
  }
  .detail-value {
    font-size: 0.55rem;
  }

  .detail-item {
    padding: 0.25rem;
    gap: 0.25rem;
  }

  .stage-details {
    gap: 0.25rem;
    margin-bottom: 0.15rem;
  }
  .progress-bar-container {
    margin-bottom: 0.15rem;
  }
  .stage-button {
    font-size: 0.7rem;
  }

  .points-badge {
    font-size: 0.6rem;
    padding: 0.2rem 0.4rem;
  }

  .stage-countries {
    padding: 0.3rem;
  }

  .countries-flags img,
  .extra-flags {
    width: 0.85rem;
    height: 0.85rem;
  }

  .stage-point {
    width: 0.75rem;
    height: 0.75rem;
  }
}

/* =========================================
   VERY SMALL HEIGHT (≤ 568px tall)
   iPhone 5 / SE 1st gen
   ========================================= */
@media (max-height: 568px) and (max-width: 767px) {
  .stages-container {
    gap: 0.75rem;
  }
  .stage-title {
    font-size: 0.75rem;
  }
  .stage-description {
    display: none;
  }
  .detail-label {
    font-size: 0.4rem;
  }
  .detail-value {
    font-size: 0.5rem;
  }
}
