.plans-modal {
  align-items: stretch;
  max-height: 92vh;
  padding-bottom: 0;
}

.plans-head {
  padding: 0 24px;
  margin-top: 2px;
}

.plans-title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.4px;
  color: var(--white);
}

.plans-subtitle {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--grey);
}

.current-pill {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 14px 24px 2px;
  padding: 11px 14px;
  border: 1px solid rgba(12, 139, 226, 0.28);
  border-radius: 16px;
  background: var(--blue-dark);
  font-size: 13px;
  font-weight: 500;
  color: var(--blue-light);
}

.current-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3acb6a;
  box-shadow: 0 0 10px rgba(58, 203, 106, 0.7);
  flex-shrink: 0;
}

.plans-scroll {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  padding: 12px 24px 8px;
  -webkit-overflow-scrolling: touch;
}

.plans-scroll::-webkit-scrollbar {
  width: 0;
}

.plan-tiers {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tier-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px;
  border: 2px solid transparent;
  border-radius: 22px;
  background: var(--panel-2);
  color: inherit;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: all var(--transition);
}

.tier-card:hover {
  background: #2a2a2a;
}

.tier-card.selected {
  border-color: var(--blue);
  background: rgba(12, 139, 226, 0.1);
}

.tier-card:active {
  transform: scale(0.99);
}

.tier-main {
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex: 1;
  min-width: 0;
}

.tier-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.2px;
  color: var(--white);
}

.tier-card.custom .tier-name {
  color: var(--blue);
}

.tier-card.custom .tier-name svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.tier-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.spec {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--grey);
}

.spec svg {
  width: 14px;
  height: 14px;
  fill: var(--blue);
}

.spec.muted {
  color: var(--grey-2);
}

.tier-aside {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex-shrink: 0;
}

.tier-price {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.3px;
  white-space: nowrap;
  color: var(--white);
}

.tier-price span {
  margin-left: 2px;
  font-size: 12px;
  font-weight: 500;
  color: var(--grey);
}

.tier-badge {
  position: absolute;
  top: -9px;
  left: 16px;
  padding: 3px 9px;
  border-radius: 8px;
  background: var(--blue);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.custom-builder {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--stroke);
  border-radius: 22px;
  background: var(--panel-2);
  animation: wizardFade 0.25s ease;
}

.custom-builder.hidden {
  display: none !important;
}

.custom-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.custom-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.custom-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--grey);
}

.custom-value {
  font-size: 15px;
  font-weight: 700;
  color: var(--white);
}

.custom-scale {
  display: flex;
  justify-content: space-between;
  margin-top: -2px;
  font-size: 11px;
  color: var(--grey-2);
}

.range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.1);
  outline: none;
  cursor: pointer;
}

.range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border: 3px solid #0b0b0b;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 4px rgba(12, 139, 226, 0.18);
  cursor: pointer;
}

.range::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border: 3px solid #0b0b0b;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 4px rgba(12, 139, 226, 0.18);
  cursor: pointer;
}

.range::-moz-range-track {
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.1);
}

.plans-label-row {
  margin: 6px 2px 0;
}

.plans-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--grey);
}

.period-chips {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.period-chip {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 12px 4px;
  border: 2px solid transparent;
  border-radius: 16px;
  background: var(--panel-2);
  color: inherit;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition);
}

.period-chip:hover {
  background: #2a2a2a;
}

.period-chip.active {
  border-color: var(--blue);
  background: rgba(12, 139, 226, 0.12);
}

.period-chip b {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.2px;
  color: var(--white);
}

.period-chip span {
  font-size: 11px;
  color: var(--grey);
}

.period-chip .off {
  position: absolute;
  top: -8px;
  right: 6px;
  padding: 2px 6px;
  border-radius: 7px;
  background: #3acb6a;
  color: #06210f;
  font-size: 10px;
  font-weight: 700;
}

.pay-methods {
  display: flex;
  gap: 8px;
  padding: 4px;
  border-radius: 18px;
  background: var(--panel-2);
}

.pay-method {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 1;
  padding: 12px 6px;
  border: none;
  border-radius: 14px;
  background: transparent;
  color: var(--grey);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}

.pay-method-icon {
  display: inline-flex;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.pay-method-icon img,
.pay-method-icon svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.pay-method.active {
  background: var(--blue);
  color: #fff;
}

.plans-footer {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 24px calc(20px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--stroke);
  background: var(--panel);
}

.plans-total {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex-shrink: 0;
}

.plans-total-label {
  font-size: 12px;
  color: var(--grey);
}

.plans-total-value {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.4px;
  white-space: nowrap;
  color: var(--white);
}

.plans-total-note {
  min-height: 13px;
  font-size: 11px;
  font-weight: 600;
  color: #3acb6a;
}

.ui-button.plans-pay {
  flex: 1;
  width: auto;
  margin: 0;
  padding: 16px;
}
