:root {
  color: #08080a;
  background: transparent;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
  font-synthesis: none;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  --panel: #efedef;
  --card: #ffffff;
  --ink: #08080a;
  --muted: #959398;
  --line: rgba(60, 60, 67, 0.2);
  --blue: #007aff;
  --green: #248a3d;
  --red: #d70015;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-width: 280px;
  height: 100%;
  min-height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  background: transparent;
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
  touch-action: manipulation;
}

button:focus-visible {
  outline: 3px solid rgba(0, 122, 255, 0.38);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

.checkout-shell {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 100%;
  height: 100vh;
  min-height: -webkit-fill-available;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.68);
}

@supports (height: 100svh) {
  .checkout-shell {
    height: 100svh;
  }
}

.checkout-sheet {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  border-radius: 11px 11px 0 0;
  background: var(--panel);
  box-shadow: 0 -10px 46px rgba(0, 0, 0, 0.2);
  -webkit-overflow-scrolling: touch;
}

.checkout-header {
  display: flex;
  height: 60px;
  align-items: center;
  justify-content: space-between;
  padding: 5px 15px 0;
}

.checkout-header h1 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  font-weight: 620;
  letter-spacing: -0.025em;
  line-height: 1;
}

.header-action {
  display: grid;
  width: 44px;
  height: 44px;
  margin-right: -7px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--blue);
  cursor: pointer;
  place-items: center;
}

.header-action:disabled {
  cursor: default;
  opacity: 0.45;
}

.cancel-label {
  display: none;
  font-size: 17px;
}

.close-icon {
  position: relative;
  display: block;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: #dfdee1;
}

.close-icon::before,
.close-icon::after {
  position: absolute;
  top: 12.5px;
  left: 6px;
  width: 15px;
  height: 2px;
  border-radius: 2px;
  background: #77767a;
  content: "";
}

.close-icon::before {
  transform: rotate(45deg);
}

.close-icon::after {
  transform: rotate(-45deg);
}

.screen {
  animation: screen-in 210ms ease-out both;
}

#checkout-main {
  position: relative;
}

.purchase-card {
  margin: 2px 15px 0;
  overflow: hidden;
  border-radius: 11px;
  background: var(--card);
}

.product-row {
  display: flex;
  min-height: 78px;
  align-items: center;
  margin: 0 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.app-mark,
.skeleton-logo {
  position: relative;
  display: grid;
  width: 49px;
  height: 49px;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 11px;
  background: linear-gradient(145deg, #111217, #343743);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
  font-size: 21px;
  font-weight: 700;
  place-items: center;
}

.app-mark img {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-copy,
.loading-lines {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  flex-direction: column;
  justify-content: center;
  margin-left: 13px;
}

.product-title-line {
  display: flex;
  min-width: 0;
  align-items: baseline;
}

.meal-name {
  overflow: hidden;
  color: var(--ink);
  font-size: 16px;
  font-weight: 590;
  letter-spacing: -0.018em;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.age-rating {
  flex: 0 0 auto;
  margin-left: 7px;
  padding: 0 3px;
  border: 1px solid #b6b5ba;
  border-radius: 3px;
  color: #8e8d92;
  font-size: 9px;
  line-height: 13px;
}

.app-name,
.purchase-kind,
.product-offer-meta {
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: -0.01em;
  line-height: 1.22;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-offer-meta {
  display: flex;
  flex-direction: column;
}

.price-panel {
  position: relative;
  min-height: 55px;
  margin: 0 14px;
  padding: 11px 0 10px;
  font-variant-numeric: tabular-nums;
}

.field-label {
  display: none;
}

.standard-price,
.offer-price-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.standard-price strong,
.offer-price-block strong {
  color: var(--ink);
  font-size: 17px;
  font-weight: 560;
  letter-spacing: -0.022em;
  line-height: 1.15;
}

.standard-price > span,
.offer-price-block > span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.2;
}

.standard-price > span:empty,
.offer-price-block > span:empty {
  display: none;
}

.offer-price-group {
  display: flex;
  flex-direction: column;
}

.offer-price-block + .offer-price-block {
  margin-top: 10px;
}

.recurring-row {
  display: flex;
  margin: 0 14px;
  padding: 12px 0 14px;
  border-top: 1px solid var(--line);
}

.recurring-row p {
  margin: 0;
  color: #29282b;
  font-size: 12px;
  letter-spacing: -0.012em;
  line-height: 1.42;
}

.payment-area {
  padding: 28px 16px max(27px, env(safe-area-inset-bottom, 0px));
}

.wallet-loading,
.loading-payment {
  display: flex;
  min-height: 56px;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  background: #101318;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
}

.wallet-loading .spinner,
.loading-payment .spinner {
  margin-right: 9px;
}

.wallet-container {
  width: 100%;
  min-height: 56px;
}

.wallet-container.is-processing {
  pointer-events: none;
  opacity: 0.58;
}

.apple-pay-native {
  display: flex;
  width: 100%;
  height: 56px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 11px;
  background: #101318;
  color: #fff;
  cursor: pointer;
  font-size: 28px;
  font-weight: 500;
  line-height: 1;
  align-items: center;
  justify-content: center;
  -webkit-appearance: -apple-pay-button;
  -apple-pay-button-type: buy;
  -apple-pay-button-style: black;
}

.apple-pay-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.apple-pay-fallback img {
  width: 29px;
  height: 29px;
  margin: 0 4px 1px;
  object-fit: contain;
}

@supports (-apple-pay-button-type: buy) {
  .apple-pay-native {
    color: transparent;
    font-size: 0;
    line-height: 0;
  }

  .apple-pay-fallback {
    display: none;
  }
}

.google-pay-container {
  overflow: hidden;
  border-radius: 11px;
}

.google-pay-container > div,
.google-pay-container button {
  width: 100% !important;
  min-width: 100% !important;
  height: 56px !important;
  min-height: 56px !important;
}

.loading-card {
  min-height: 133px;
}

.loading-price {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.loading-payment {
  margin: 28px 16px max(27px, env(safe-area-inset-bottom, 0px));
}

.skeleton {
  display: block;
  background: linear-gradient(100deg, #dedde1 24%, #f0eff2 38%, #dedde1 52%);
  background-size: 220% 100%;
  animation: shimmer 1.3s linear infinite;
}

.skeleton-line,
.skeleton-price,
.skeleton-caption {
  border-radius: 5px;
}

.skeleton-line-wide {
  width: 57%;
  height: 13px;
}

.skeleton-line-short {
  width: 39%;
  height: 10px;
  margin-top: 9px;
}

.skeleton-price {
  width: 88px;
  height: 17px;
}

.skeleton-caption {
  width: 70px;
  height: 10px;
  margin-top: 6px;
}

.spinner {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  border: 2px solid rgba(255, 255, 255, 0.28);
  border-top-color: rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

.confirmation-overlay {
  position: absolute;
  z-index: 5;
  display: grid;
  inset: 0;
  background: rgba(239, 237, 239, 0.68);
  cursor: wait;
  place-items: center;
  -webkit-backdrop-filter: blur(1.5px);
  backdrop-filter: blur(1.5px);
}

.confirming-indicator {
  display: grid;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.12);
  place-items: center;
}

.confirming-indicator .spinner {
  width: 28px;
  height: 28px;
  border-width: 3px;
  border-color: rgba(0, 122, 255, 0.2);
  border-top-color: var(--blue);
}

.result-screen {
  display: flex;
  min-height: 355px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 24px max(28px, env(safe-area-inset-bottom, 0px));
  text-align: center;
}

.result-icon {
  display: grid;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(36, 138, 61, 0.11);
  color: var(--green);
  place-items: center;
}

.result-icon svg {
  width: 34px;
  height: 34px;
  fill: currentColor;
}

.result-error-icon {
  display: none;
}

.result-screen.is-error .result-icon {
  background: rgba(215, 0, 21, 0.09);
  color: var(--red);
}

.result-screen.is-error .result-success-icon {
  display: none;
}

.result-screen.is-error .result-error-icon {
  display: block;
}

.result-screen h2 {
  margin: 18px 0 0;
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -0.025em;
}

.result-screen > p:not(.order-number) {
  max-width: 320px;
  margin: 8px 0 0;
  color: #6d6b70;
  font-size: 14px;
  line-height: 1.5;
}

.order-number {
  display: flex;
  width: 100%;
  max-width: 340px;
  align-items: center;
  justify-content: space-between;
  margin: 20px 0 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(17, 17, 20, 0.05);
  color: #757378;
  font-size: 12px;
}

.order-number strong {
  overflow: hidden;
  max-width: 68%;
  color: #4e4d51;
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 12px;
  font-weight: 550;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-actions {
  display: flex;
  width: 100%;
  max-width: 340px;
  flex-direction: column;
  margin-top: 25px;
}

.result-actions > * + * {
  margin-top: 9px;
}

.primary-button,
.secondary-button {
  width: 100%;
  min-height: 50px;
  padding: 0 18px;
  border-radius: 11px;
  font-size: 16px;
  font-weight: 590;
  cursor: pointer;
}

.primary-button {
  border: 1px solid #101318;
  background: #101318;
  color: #fff;
}

.secondary-button {
  border: 1px solid rgba(17, 17, 20, 0.13);
  background: rgba(255, 255, 255, 0.7);
  color: #111114;
}

.primary-button:disabled,
.secondary-button:disabled {
  cursor: default;
  opacity: 0.52;
}

.noscript-message {
  margin: 16px;
  padding: 11px;
  border-radius: 10px;
  background: rgba(215, 0, 21, 0.08);
  color: var(--red);
  font-size: 13px;
  text-align: center;
}

/* iOS 15.x: edge-to-edge sheet, text cancel action, and label/value rows. */
.ios-15 .checkout-sheet {
  border-radius: 0;
  background: #ececef;
}

.ios-15 .checkout-header {
  height: 55px;
  padding: 1px 16px 0;
}

.ios-15 .checkout-header h1 {
  font-size: 19px;
  font-weight: 620;
}

.ios-15 .header-action {
  width: auto;
  min-width: 54px;
  margin-right: -4px;
  justify-items: end;
}

.ios-15 .cancel-label {
  display: block;
}

.ios-15 .close-icon {
  display: none;
}

.ios-15 .purchase-card {
  margin: 0 15px;
  border-radius: 0;
  background: transparent;
}

.ios-15 .product-row {
  min-height: 81px;
  margin: 0;
  padding: 13px 38px;
}

.ios-15 .app-mark,
.ios-15 .skeleton-logo {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  font-size: 17px;
}

.ios-15 .product-copy,
.ios-15 .loading-lines {
  margin-left: 15px;
}

.ios-15 .meal-name {
  font-size: 15px;
}

.ios-15 .app-name,
.ios-15 .purchase-kind,
.ios-15 .product-offer-meta {
  font-size: 12px;
}

.ios-15 .price-panel {
  display: grid;
  min-height: 43px;
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: center;
  margin: 0;
  padding: 7px 38px;
  border-bottom: 1px solid var(--line);
}

.ios-15 .field-label {
  display: block;
  color: #8f8d92;
  font-size: 13px;
}

.ios-15 .standard-price,
.ios-15 .offer-price-group {
  align-items: flex-end;
  text-align: right;
}

.ios-15 .standard-price strong,
.ios-15 .offer-price-block strong {
  font-size: 18px;
}

.ios-15 .standard-price > span {
  display: none;
}

.ios-15 .offer-price-group {
  padding: 4px 0;
}

.ios-15 .offer-price-block {
  align-items: flex-end;
}

.ios-15 .recurring-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  margin: 0;
  padding: 11px 38px 12px;
  border-top: 0;
  border-bottom: 1px solid var(--line);
}

.ios-15 .recurring-row p {
  font-size: 12px;
  line-height: 1.4;
}

.ios-15 .payment-area {
  padding: 30px 16px max(19px, env(safe-area-inset-bottom, 0px));
}

.ios-15 .loading-card {
  min-height: 124px;
}

.ios-15 .loading-price {
  display: flex;
  align-items: flex-end;
}

.ios-15 .loading-payment {
  margin: 30px 16px max(19px, env(safe-area-inset-bottom, 0px));
}

.is-recurring:not(.has-intro-offer) .price-panel {
  min-height: 42px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.is-recurring:not(.has-intro-offer) .recurring-row {
  padding-top: 9px;
  padding-bottom: 11px;
}

.is-recurring:not(.has-intro-offer) .recurring-row p {
  font-size: 11.5px;
}

/* iOS 16–17: first rounded system sheet and compact white purchase card. */
.ios-16 .checkout-sheet {
  border-radius: 10px 10px 0 0;
  background: #f1eff1;
}

/* iOS 18–25: slightly airier card and stronger sheet separation. */
.ios-18 .checkout-sheet {
  border-radius: 11px 11px 0 0;
  background: #efedef;
}

.ios-18 .checkout-header {
  height: 62px;
}

.ios-18 .purchase-card {
  margin-top: 0;
}

.ios-18 .product-offer-meta:not([hidden]) {
  display: flex;
}

.ios-18 .product-offer-meta:not([hidden]) ~ .purchase-kind {
  display: none;
}

/* iOS 26+: floating glass panel with a detached, highly rounded silhouette. */
.ios-26 .checkout-sheet {
  width: calc(100% - 10px);
  margin: 0 5px max(5px, env(safe-area-inset-bottom, 0px));
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 34px;
  background: rgba(223, 221, 221, 0.84);
  box-shadow: 0 18px 70px rgba(0, 0, 0, 0.34);
  -webkit-backdrop-filter: blur(26px) saturate(135%);
  backdrop-filter: blur(26px) saturate(135%);
}

.ios-26 .checkout-header {
  height: 62px;
  padding: 4px 19px 0;
}

.ios-26 .checkout-header h1 {
  font-size: 20px;
}

.ios-26 .header-action {
  margin-right: -5px;
}

.ios-26 .close-icon {
  width: 39px;
  height: 39px;
  background: rgba(180, 178, 178, 0.48);
}

.ios-26 .close-icon::before,
.ios-26 .close-icon::after {
  top: 18px;
  left: 9px;
  width: 21px;
  height: 2px;
  background: #0c0c0d;
}

.ios-26 .purchase-card {
  margin: 0 14px;
  border-radius: 21px;
}

.ios-26 .product-row {
  margin: 0 14px;
}

.ios-26 .app-mark,
.ios-26 .skeleton-logo {
  width: 48px;
  height: 48px;
  border-radius: 13px;
}

.ios-26 .payment-area {
  padding: 28px 19px 30px;
}

.ios-26 .wallet-loading,
.ios-26 .apple-pay-native,
.ios-26 .google-pay-container {
  border-radius: 10px;
}

.ios-26 .loading-card {
  margin: 0 14px;
  border-radius: 21px;
}

.ios-26 .loading-payment {
  margin: 28px 19px 30px;
}

.ios-26 .product-offer-meta {
  display: none !important;
}

.ios-26 .offer-price-block + .offer-price-block {
  margin-top: 10px;
}

@media (min-width: 600px) and (min-height: 620px) {
  .checkout-shell {
    align-items: center;
    padding: 24px;
  }

  .checkout-sheet,
  .ios-15 .checkout-sheet,
  .ios-16 .checkout-sheet,
  .ios-18 .checkout-sheet {
    width: min(480px, calc(100% - 48px));
    margin: 0;
    border: 1px solid rgba(255, 255, 255, 0.38);
    border-radius: 24px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
  }

  .ios-26 .checkout-sheet {
    width: min(480px, calc(100% - 48px));
    margin: 0;
  }
}

@media (max-width: 340px) {
  .ios-15 .product-row,
  .ios-15 .price-panel,
  .ios-15 .recurring-row {
    padding-right: 24px;
    padding-left: 24px;
  }

  .recurring-row p {
    font-size: 11px;
  }
}

@media (max-height: 540px) {
  .checkout-sheet {
    max-height: calc(100% - 8px);
  }

  .checkout-header {
    height: 52px;
  }

  .payment-area {
    padding-top: 18px;
    padding-bottom: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
  }
}

@keyframes shimmer {
  to {
    background-position-x: -220%;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes screen-in {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
