.cfg-mobile-success-foot { display: none; }

@media (max-width: 760px) {
  .cfg-backdrop {
    top: var(--cfg-viewport-top, 0px);
    bottom: auto;
    height: var(--cfg-viewport-height, 100dvh);
    padding: 0;
    align-items: flex-end;
    overscroll-behavior: none;
  }
  .cfg-modal,
  .cfg-modal.cfg-modal-sm {
    width: 100% !important;
    max-width: none;
    height: min(90dvh, calc(var(--cfg-viewport-height, 100dvh) - 24px));
    max-height: none;
    margin: 0;
    border: 0;
    border-radius: 26px 26px 0 0;
    box-shadow: 0 -6px 28px #0003;
    animation: cfg-sheet-enter 280ms cubic-bezier(.2,.8,.2,1) both;
  }
  .cfg-head {
    position: relative;
    flex: none;
    gap: 12px;
    padding: 30px 20px 16px;
  }
  .cfg-head::before {
    content: "";
    position: absolute;
    top: 10px;
    left: calc(50% - 18px);
    width: 36px;
    height: 5px;
    border-radius: 99px;
    background: #ffffff55;
  }
  .cfg-head img { width: 36px; height: 36px; flex: none; }
  .cfg-head .t { min-width: 0; font-size: 16px; line-height: 1.3; }
  .cfg-head .t .sub { font-size: 11px; line-height: 1.4; }
  .cfg-head .close { width: 40px; height: 40px; flex: none; font-size: 24px; }
  .cfg-steps { flex: none; padding: 12px 20px; border-bottom: 0; }
  .cfg-body,
  .cfg-modal-sm .cfg-body,
  .cfg-body:has(.cfg-confirmation) {
    min-height: 0;
    padding: 16px 20px 24px;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
    scroll-padding-block: 16px;
  }
  .cfg-body h3 { font-size: 24px; line-height: 1.15; text-align: left; margin: 0 0 10px; }
  .cfg-body .lede { font-size: 15px; line-height: 1.5; margin-bottom: 20px; }
  .cfg-field { margin-bottom: 20px; }
  .cfg-field label { font-size: 13px; line-height: 1.45; }
  .cfg-tiers { gap: 10px; }
  .cfg-tier { grid-template-columns: 20px minmax(0,1fr); gap: 12px; padding: 12px 14px; border-radius: 14px; }
  .cfg-tier::before { content: ""; width: 18px; height: 18px; border: 2px solid var(--sv-ink); border-radius: 50%; align-self: center; }
  .cfg-tier.selected::before { background: var(--sv-teal-700) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m5 10 3 3 7-7' fill='none' stroke='%23fffaf0' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/18px no-repeat; border-color: var(--sv-teal-700); }
  .cfg-tier .name { font-size: 17px; line-height: 1.25; }
  .cfg-tier .tag { font-size: 13px; line-height: 1.4; }
  .cfg-pill { min-height: 44px; max-width: 100%; padding: 10px 14px; align-items: center; line-height: 1.3; text-align: left; }
  .cfg-pill.on { background: var(--sv-teal-700); color: var(--sv-cream-50); border-color: var(--sv-ink); }
  .cfg-field-row { grid-template-columns: 1fr; gap: 0; }
  .cfg-field input, .cfg-field textarea { font-size: 16px; }
  .cfg-field textarea { min-height: 100px; }
  .cfg-foot {
    flex: none;
    padding: 14px 20px calc(16px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid #10131433;
  }
  .cfg-foot .actions { width: 100%; gap: 10px; }
  .cfg-foot button { min-height: 48px; font-size: 15px; line-height: 1.25; }
  .cfg-foot button.next { flex: 1; min-width: 0; padding: 12px 14px; }
  .cfg-foot button.back { flex: 0 0 auto; padding: 12px 18px; }
  .cfg-mobile-success-foot { display: flex; }
  .cfg-mobile-success-foot button.back { width: 100%; }
  .cfg-modal:has(.cfg-mobile-success-foot) .cfg-success-close { display: none; }
  .cfg-confirmation { padding: 12px 0; }
  .cfg-confirmation h3 { text-align: center; font-size: 28px; }
  .cfg-confirmation .check { width: 64px; height: 64px; margin: 8px auto 20px; background: var(--sv-mint-200); border-color: var(--sv-teal-700); }
  .cfg-confirmation .check::after { width: 14px; height: 26px; top: 11px; border-color: var(--sv-teal-700); }
  .cfg-confirmation .cfg-success-recap { font-size: 16px; line-height: 1.5; }
  .cfg-confirmation-trial .cfg-discord-cta { background: var(--sv-gold-500); color: var(--sv-ink); font-size: 16px; line-height: 1.4; padding: 14px 18px; }
  .cfg-confirmation .cfg-next { text-align: left; }
  .cfg-confirmation .cfg-next p { font-size: 15px; line-height: 1.5; }
}

@keyframes cfg-sheet-enter { from { transform: translateY(100%); } to { transform: translateY(0); } }
@media (max-width: 760px) and (prefers-reduced-motion: reduce) {
  .cfg-backdrop, .cfg-modal { animation: none; }
}
