.hero {
  max-width: 900px;
  margin: 0 auto;
  padding: 64px 20px 44px;
  text-align: center;
  animation: fadeUp 0.6s var(--spring) 0.1s both;
}

.hero-eyebrow {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 14px;
}

.hero-title {
  font-size: clamp(28px, 6vw, 46px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin-bottom: 12px;
}

.hero-sub {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 28px;
}

.ip-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 8px 14px 8px 10px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  position: relative;
  transition: box-shadow 0.2s, transform 0.2s var(--spring);
  min-height: 44px;
}

.ip-badge:hover  { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.ip-badge:active { transform: scale(0.97); }

.ip-icon {
  width: 26px;
  height: 26px;
  background: #1d1d1f;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ip-icon svg { width: 13px; height: 13px; fill: #fff; }
.ip-addr     { font-family: 'DM Mono', monospace; font-size: 13px; font-weight: 500; }
.ip-hint     { font-size: 11px; color: var(--text-tertiary); }

.ip-toast {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: #1d1d1f;
  color: #fff;
  font-size: 12px;
  padding: 5px 11px;
  border-radius: 10px;
  pointer-events: none;
  opacity: 0;
  white-space: nowrap;
  transition: opacity 0.15s, transform 0.2s var(--spring);
}

.ip-toast::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #1d1d1f;
}

.ip-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.hero-stats { display: flex; justify-content: center; gap: 32px; margin-top: 24px; }
.stat       { text-align: center; }

.stat-val {
  font-family: 'DM Mono', monospace;
  font-size: 24px;
  font-weight: 500;
  display: block;
}

.stat-lbl { font-size: 12px; color: var(--text-tertiary); margin-top: 2px; }

.skel {
  display: inline-block;
  width: 36px;
  height: 24px;
  border-radius: 4px;
  background: linear-gradient(90deg, #e8e8ea 25%, #f0f0f2 50%, #e8e8ea 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  vertical-align: middle;
}

.products {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px 72px;
}

.sec-label {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 14px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 14px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.25s var(--ease), transform 0.25s var(--spring);
  animation: fadeUp 0.5s var(--spring) both;
  position: relative;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.card:hover  { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.card:active { transform: scale(0.99); }

.card-stripe {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 3px 9px;
  border-radius: 100px;
  margin-bottom: 14px;
}

.card-name  { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 7px; }
.card-desc  { font-size: 14px; color: var(--text-secondary); line-height: 1.5; margin-bottom: 20px; }

.price-range { display: flex; align-items: baseline; gap: 4px; margin-bottom: 14px; }
.price-from  { font-size: 12px; color: var(--text-tertiary); }
.price-num   { font-family: 'DM Mono', monospace; font-size: 22px; font-weight: 500; }
.price-per   { font-size: 12px; color: var(--text-secondary); }

.chips { display: flex; gap: 6px; flex-wrap: wrap; }

.chip {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  color: var(--text-secondary);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 3px 10px;
}

.card-btn {
  width: 100%;
  margin-top: 18px;
  padding: 13px;
  border-radius: var(--r-md);
  border: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.15s var(--spring);
  min-height: 44px;
}

.card-btn:hover  { opacity: 0.88; transform: translateY(-1px); }
.card-btn:active { transform: scale(0.98); opacity: 0.88; }

.overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,0.38);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s var(--ease);
}

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

.modal {
  background: var(--card);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.95) translateY(14px);
  transition: transform 0.3s var(--spring);
}

.overlay.open .modal { transform: scale(1) translateY(0); }

.modal[data-step="1"] { min-height: 500px; }
.modal[data-step="2"] { min-height: 420px; }
.modal[data-step="3"] { min-height: 640px; }

.m-head {
  padding: 22px 22px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.m-title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-align: center;
  flex: 1;
}

.m-close, .btn-back {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-secondary);
  transition: background 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.m-close:hover, .btn-back:hover { background: #e5e5e7; }
.m-close svg, .btn-back svg { width: 18px; height: 18px; }

.m-body {
  padding: 22px 26px 10px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.m-foot {
  padding: 14px 26px 26px;
  flex-shrink: 0;
}

.step-lbl {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 18px;
  text-align: center;
}

.modal-step        { display: none; flex-direction: column; flex: 1; }
.modal-step.active { display: flex; }

.periods {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  flex: 1;
  align-content: center;
}

.p-opt {
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: var(--r-md);
  border: 1.5px solid var(--border);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.15s var(--spring);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  padding: 16px 10px;
  text-align: center;
}

.p-opt:hover:not(.disabled) { border-color: rgba(0,0,0,0.2); transform: translateY(-2px); }
.p-opt.selected {
  border-color: var(--accent);
  background: var(--accent-bg);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}
.p-opt:active:not(.disabled) { transform: scale(0.97); }
.p-opt.disabled {
  opacity: 0.28;
  cursor: not-allowed;
  pointer-events: none;
}

.p-opt-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.p-opt.selected .p-opt-icon { background: var(--accent); }

.p-opt-icon svg {
  width: 20px;
  height: 20px;
  stroke: var(--text-secondary);
  transition: stroke 0.15s;
}

.p-opt.selected .p-opt-icon svg { stroke: #fff; }

.p-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
}

.p-price {
  font-family: 'DM Mono', monospace;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.p-opt.selected .p-name  { color: var(--text-primary); }
.p-opt.selected .p-price { color: var(--accent); }

.nick-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  flex: 1;
  max-height: 100px;
}

.nick-icon-wrap svg {
  width: 72px;
  height: 72px;
  stroke: var(--text-tertiary);
  stroke-width: 1;
}

.inp-grp { margin-bottom: 10px; }

.inp-lbl {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 7px;
}

.inp-lbl small { color: var(--text-tertiary); font-weight: 400; }

.text-inp {
  width: 100%;
  padding: 15px 16px;
  border-radius: var(--r-md);
  border: 1.5px solid var(--border);
  background: var(--bg);
  font-family: 'DM Mono', monospace;
  font-size: 17px;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
  appearance: none;
  min-height: 54px;
  text-align: center;
}

.text-inp:focus { border-color: rgba(0,0,0,0.28); box-shadow: 0 0 0 3px rgba(0,0,0,0.05); background: #fff; }
.text-inp.err   { border-color: #ff3b30; }
.text-inp.ok    { border-color: #34c759; }

.summary { background: var(--bg); border-radius: var(--r-md); padding: 16px; margin-bottom: 16px; }

.sum-row { display: flex; justify-content: space-between; align-items: center; font-size: 14px; }
.sum-row + .sum-row { margin-top: 9px; padding-top: 9px; border-top: 1px solid var(--border); }
.sum-lbl { color: var(--text-secondary); }
.sum-val { font-family: 'DM Mono', monospace; font-weight: 500; }
.sum-total .sum-lbl,
.sum-total .sum-val { font-size: 16px; font-weight: 600; color: var(--text-primary); }

.pay-methods { display: flex; flex-direction: column; gap: 10px; }

.pay-method {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--r-md);
  border: 1.5px solid var(--border);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  min-height: 68px;
}

.pay-method:hover    { border-color: rgba(0,0,0,0.18); }
.pay-method.selected { border-color: var(--accent); background: var(--accent-bg); }

.pay-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--r-sm);
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-primary);
}

.pay-icon svg { width: 22px; height: 22px; }

.pay-method.selected .pay-icon { background: var(--accent-bg); color: var(--accent); }

.pay-info    { flex: 1; }
.pay-name    { font-size: 15px; font-weight: 500; }
.pay-desc    { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }

.divider { height: 1px; background: var(--border); margin: 14px 0; }

.p-radio {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.p-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  opacity: 0;
  transition: opacity 0.15s;
}

.btn {
  width: 100%;
  padding: 16px 20px;
  border-radius: var(--r-md);
  border: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.15s var(--spring), background 0.2s, color 0.2s;
  min-height: 54px;
  -webkit-tap-highlight-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn:active  { transform: scale(0.98); opacity: 0.88; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none !important; }

.btn-next { background: var(--text-tertiary); color: #fff; }
.btn-next.ready    { background: #1d1d1f; }
.btn-next.checking { background: var(--text-tertiary); }
.btn-next.error    { background: #ff3b30; }
.btn-next.ok       { background: #34c759; }
.btn-next:not(:disabled):hover { opacity: 0.88; transform: translateY(-1px); }

.btn-next.ready:not(:disabled),
.btn-next.ok:not(:disabled),
.btn-next.error:not(:disabled) { opacity: 1; }

.spin {
  width: 17px;
  height: 17px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

.err-msg { color: #ff3b30; font-size: 14px; text-align: center; padding: 0 20px 12px; }

.modal-product-info {
  background: var(--bg);
  border-radius: var(--r-md);
  padding: 16px 18px;
  margin-bottom: 18px;
  text-align: center;
  flex-shrink: 0;
  border: 1px solid var(--border);
}

.mpi-name {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 6px;
  font-family: 'DM Mono', monospace;
}

.mpi-price-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 6px;
}

.mpi-price {
  font-family: 'DM Mono', monospace;
  font-size: 28px;
  font-weight: 500;
  color: var(--text-primary);
  transition: color 0.3s;
}

.mpi-price-old {
  font-family: 'DM Mono', monospace;
  font-size: 18px;
  font-weight: 400;
  color: var(--text-tertiary);
  text-decoration: line-through;
  opacity: 0;
  max-width: 0;
  overflow: hidden;
  transition: opacity 0.35s var(--ease), max-width 0.35s var(--ease);
}

.mpi-price-old.mpi-price-old-visible {
  opacity: 1;
  max-width: 100px;
}

@keyframes pricePop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.18); }
  100% { transform: scale(1); }
}

@keyframes priceReveal {
  0%   { opacity: 0; transform: scale(0.78); }
  60%  { opacity: 1; transform: scale(1.1); }
  100% { opacity: 1; transform: scale(1); }
}

.mpi-price-pop {
  animation: pricePop 0.35s var(--spring);
}

.mpi-price-reveal {
  animation: priceReveal 0.38s var(--spring);
}

.btn-price-tag {
  font-family: 'DM Mono', monospace;
  font-size: 13px;
  font-weight: 500;
  background: rgba(255,255,255,0.18);
  border-radius: 100px;
  padding: 2px 9px;
  margin-left: 6px;
  letter-spacing: 0;
}

.mpi-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.45;
}

.mpi-period {
  font-size: 13px;
  color: var(--text-secondary);
}

.sum-val-old {
  font-family: 'DM Mono', monospace;
  font-weight: 400;
  font-size: 14px;
  color: var(--text-tertiary);
  text-decoration: line-through;
}

@media (max-width: 540px) {
  .hero { padding: 44px 16px 32px; }
  .hero-sub br { display: none; }

  .products { padding: 0 16px 56px; }

  .overlay {
    padding: 0;
    align-items: flex-end;
  }

  .modal {
    border-radius: var(--r-lg) var(--r-lg) 0 0;
    max-height: 92vh;
    min-height: 0 !important;
    transform: translateY(100%);
  }

  .overlay.open .modal {
    transform: translateY(0);
  }

  .modal::before {
    content: '';
    display: block;
    width: 36px;
    height: 4px;
    border-radius: 2px;
    background: var(--border);
    margin: 12px auto 0;
  }

  .m-head  { padding: 8px 16px 0; }
  .m-body  { padding: 16px 18px 6px; }
  .m-foot  { padding: 10px 18px calc(env(safe-area-inset-bottom, 0px) + 16px); }

  .ip-hint { display: none; }
  .ip-badge { padding: 10px 14px 10px 10px; }
  .stat-val { font-size: 20px; }
  .hero-stats { gap: 24px; }
}

@media (max-width: 360px) {
  .hero-title { font-size: 26px; }
  .card { padding: 20px 16px; }
  .card-name { font-size: 22px; }
  .periods { gap: 8px; }
}