/* Commerce extends the approved Ringlish tokens in styles.css. */
@font-face {
  font-family: "Ringlish Commerce UI";
  src: url("/assets/fonts/ringlish-pretendard-20261029-v1.woff2?v=20261106-v1") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
body[data-page] { font-family: "Ringlish Commerce UI", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; }
[hidden] { display: none !important; }
.commerce-main { min-height: 60vh; padding-bottom: 96px; }
.review-banner { padding: 10px 20px; background: var(--rl-blush); border-bottom: 1px solid #f5d9d0; color: var(--rl-ink); text-align: center; font-size: 13px; }
.back-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-block: 26px; color: var(--rl-muted); font-size: 14px; text-decoration: none; }
.back-link::before { content: "←"; }
.back-link:hover { text-decoration: underline; }
.commerce-main h1 { font-size: clamp(36px,4.4vw,58px); line-height: 1.25; }
.commerce-main h2 { font-size: 26px; line-height: 1.4; }
.commerce-main h3 { font-size: 18px; }
.commerce-description { margin-top: 24px; color: var(--rl-muted); font-size: 18px; line-height: 1.85; word-break: keep-all; }
.plans-layout { padding-top: 20px; }
.plans-intro { display: grid; grid-template-columns: 1.2fr .8fr; grid-template-areas: "label art" "title art" "description art" "note art"; column-gap: 64px; }
.plans-intro .section-label { grid-area: label; }
.plans-intro h1 { grid-area: title; }
.plans-intro .commerce-description { grid-area: description; }
.plans-intro .fine-print { grid-area: note; }
.plans-intro .section-label { margin-bottom: 18px; }
.plans-art { grid-area: art; width: 100%; max-width: 360px; height: auto; border-radius: 24px; justify-self: end; align-self: center; }
.fine-print { margin-top: 18px; color: var(--rl-muted); font-size: 13px; line-height: 1.85; overflow-wrap: anywhere; }
.plan-options { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 24px; margin-top: 48px; }
.plan-card { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--rl-line); border-radius: 24px; padding: 28px; background: var(--rl-paper); }
.plan-card .section-label { margin-bottom: 14px; }
.plan-card > .call-cta { margin-top: auto; }
.plan-card .detail-list { margin-block: 24px; }
.plan-card .detail-list > div { grid-template-columns: 72px minmax(0,1fr); gap: 10px; font-size: 13px; }
.plan-card h2 { font-size: 25px; }
.plan-amount { margin-top: 24px; font-size: 39px; font-weight: 600; letter-spacing: -.045em; line-height: 1.25; }
.plan-amount span { margin-left: 5px; font-size: 16px; letter-spacing: 0; white-space: nowrap; }
.price-caption { color: var(--rl-muted); font-size: 13px; margin-top: 8px; }
.detail-list { margin: 28px 0; border-top: 1px solid var(--rl-line); }
.detail-list > div { display: grid; grid-template-columns: 102px minmax(0,1fr); gap: 20px; padding: 17px 0; border-bottom: 1px solid var(--rl-line); font-size: 14px; line-height: 1.75; }
.detail-list dt { color: var(--rl-muted); }
.detail-list dd { margin: 0; text-align: right; word-break: keep-all; overflow-wrap: anywhere; }
.full-width { width: 100%; }
.empty-plan { background: var(--rl-sky); border-color: var(--rl-sky); padding: 48px 36px 36px; }
.empty-plan > p:not(.fine-print) { margin: 18px 0 32px; color: var(--rl-muted); line-height: 1.85; word-break: keep-all; }
.empty-plan h2 { font-size: 26px; }
.empty-plan .fine-print { text-align: center; }
.phone-symbol { width: 56px; height: 56px; display: grid; place-items: center; margin-bottom: 30px; border-radius: 16px; background: var(--rl-paper); color: var(--rl-action); font-size: 30px; line-height: 1; }
.purchase-help { margin-top: 80px; padding-top: 38px; border-top: 1px solid var(--rl-line); }
.purchase-help > p { margin-top: 20px; color: var(--rl-muted); }
.usage-explainer { margin-top: 48px; padding: 28px 32px; border-radius: 20px; background: var(--rl-sky); }
.usage-explainer h2 { font-size: 22px; }
.usage-explainer p { margin-top: 16px; color: var(--rl-muted); font-size: 14px; line-height: 1.9; word-break: keep-all; overflow-wrap: anywhere; }
.help-columns { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 48px; margin-top: 32px; }
.help-columns p { margin-top: 12px; color: var(--rl-muted); font-size: 14px; line-height: 1.9; word-break: keep-all; }
.page-heading { padding-top: 60px; padding-bottom: 44px; }
.back-link + .page-heading { padding-top: 6px; }
.page-heading > p { margin-top: 16px; color: var(--rl-muted); }
.checkout-layout { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(0,.9fr); gap: 70px; align-items: start; }
.commerce-section { margin-bottom: 36px; }
.commerce-section h2 { font-size: 22px; }
.order-name { margin-top: 22px; font-size: 20px; font-weight: 500; }
.commerce-section > p:not(.order-name) { margin-block: 20px; color: var(--rl-muted); font-size: 15px; }
.commerce-section .detail-list { margin-top: 18px; }
.secondary-button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 11px 18px; border: 1px solid var(--rl-line); border-radius: var(--rl-radius-action); background: var(--rl-paper); color: var(--rl-ink); font-size: 14px; font-weight: 500; text-decoration: none; cursor: pointer; }
.secondary-button:hover { background: var(--rl-sky); }
button.call-cta { border: 0; cursor: pointer; }
button:disabled, input:disabled { cursor: not-allowed; }
button.call-cta:disabled { background: #dce5eb; color: #526774; }
.secondary-button:disabled { color: #526774; background: #f5f7f8; }
.order-summary { position: sticky; top: 124px; padding: 30px; border: 1px solid var(--rl-line); border-radius: 20px; }
.order-summary h2 { font-size: 22px; }
.order-summary .detail-list { margin: 22px 0; }
.order-summary .detail-list > div { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
.total-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-top: 4px; }
.total-row > span { font-size: 15px; font-weight: 500; }
.total-row strong { font-size: 29px; font-weight: 600; line-height: 1.4; letter-spacing: -.035em; }
.summary-renewal { margin-top: 14px; font-size: 13px; color: var(--rl-muted); word-break: keep-all; }
.payment-notice { margin-block: 24px; padding: 16px; background: var(--rl-sky); border-radius: 12px; color: var(--rl-muted); font-size: 13px; line-height: 1.8; }
.consent-group { margin: 22px 0 0; padding: 0; border: 0; display: grid; gap: 16px; min-width: 0; }
.checkbox-row { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; font-size: 14px; line-height: 1.9; word-break: keep-all; }
.checkbox-row input { width: 20px; height: 20px; flex: none; margin: 4px 0; accent-color: var(--rl-action); }
.auth-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 100px; padding-block: 38px 30px; align-items: start; max-width: 1040px; margin-inline: auto; }
.auth-intro { padding-top: 16px; }
.support-note { margin-top: 64px; font-size: 14px; color: var(--rl-muted); line-height: 1.9; }
.auth-panel { border: 1px solid var(--rl-line); border-radius: 24px; padding: 36px; }
.auth-panel h2 { font-size: 24px; }
.auth-caption { margin-top: 12px; font-size: 14px; color: var(--rl-muted); }
.field-label { display: block; font-size: 14px; font-weight: 500; margin: 28px 0 10px; }
.input-action { display: flex; gap: 10px; }
.auth-panel input:not([type="checkbox"]) { width: 100%; min-width: 0; min-height: 52px; padding: 12px 14px; border: 1px solid #bdcbd4; border-radius: 10px; background: var(--rl-paper); color: var(--rl-ink); font-size: 16px; }
.auth-panel input:disabled { background: #f5f7f8; }
.input-action .secondary-button { flex: none; padding-inline: 14px; }
.auth-secondary { margin-top: 12px; }
#code-form .call-cta { margin-top: 24px; }
.form-message { margin-top: 20px; color: var(--rl-action); font-size: 14px; line-height: 1.8; overflow-wrap: anywhere; }
.account-panel { background: var(--rl-sky); border-radius: 24px; padding: 44px; }
.account-panel p { margin-block: 18px 28px; color: var(--rl-muted); }
.account-panel .detail-list { max-width: 680px; }
.account-panel > section { padding-block: 28px; border-top: 1px solid var(--rl-line); }
.account-panel > section p { max-width: 600px; }
.account-panel > button { margin-top: 28px; }
.account-empty .call-cta { margin-bottom: 4px; }
.account-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.subscription-status { font-size: 14px; font-weight: 500; }
.account-history-title { margin-top: 36px; margin-bottom: 20px; }
.refund-preview { max-width: 680px; margin-top: 24px; padding: 24px; background: var(--rl-paper); border: 1px solid var(--rl-line); border-radius: 16px; }
.refund-preview > button { margin-top: 24px; margin-right: 12px; }
.refund-preview .detail-list { max-width: 100%; }
.result-container { max-width: 900px; padding-top: 70px; }
.result-panel { text-align: center; padding: 48px 30px; }
.commerce-main .result-panel h1 { font-size: clamp(28px,3.5vw,40px); }
.result-panel > p { max-width: 540px; margin: 24px auto 0; color: var(--rl-muted); word-break: keep-all; }
.result-symbol { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 32px; background: var(--rl-sky); color: var(--rl-action); border-radius: 50%; font-size: 32px; }
.result-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.legal-container { max-width: 960px; }
.legal-document { max-width: 760px; margin-inline: auto; padding-top: 12px; }
.commerce-main .legal-document h1 { font-size: clamp(30px,3.8vw,44px); }
.legal-date { margin-top: 20px; padding-bottom: 28px; border-bottom: 1px solid var(--rl-line); color: var(--rl-muted); font-size: 14px; }
.legal-document section { margin-top: 36px; }
.legal-document h2 { font-size: 22px; }
.legal-document section > p { margin-top: 16px; line-height: 1.95; color: var(--rl-muted); font-size: 15px; word-break: keep-all; overflow-wrap: anywhere; white-space: pre-line; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 20px 0; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; color: var(--rl-muted); }
@media (max-width: 1000px) { .auth-layout { gap: 48px; } .checkout-layout { gap: 32px; } .auth-panel { padding: 28px; } .plan-card { padding: 24px 20px; } .plan-amount { font-size: 35px; } .plan-options { gap: 16px; } .order-summary { padding: 24px; } }
@media (max-width: 900px) { .plan-options { grid-template-columns: minmax(0,1fr); max-width: 600px; margin-inline: auto; } }
@media (max-width: 760px) {
  .commerce-main { padding-bottom: 64px; }
  .review-banner { font-size: 12px; padding: 10px 20px; }
  .commerce-main .header-inner { gap: 14px; }
  body[data-page] .primary-nav { display: flex; gap: 18px; }
  body[data-page] .primary-nav a { font-size: 13px; }
  body[data-page] .primary-nav a:first-child { display: none; }
  body[data-page] .header-cta { display: none; }
  body.policy-page .header-inner { flex-wrap: wrap; justify-content: flex-start; gap: 0 18px; padding-block: 12px; }
  body.policy-page .primary-nav { width: 100%; flex-wrap: wrap; gap: 0 18px; }
  body.policy-page .primary-nav a:not(:first-child) { display: inline-flex; }
  .checkout-layout, .auth-layout { grid-template-columns: minmax(0,1fr); gap: 36px; }
  .plans-layout { padding-top: 0; }
  .plans-intro { display: block; }
  .plans-intro h1 { font-size: 42px; }
  .plan-options { margin-top: 32px; }
  .plan-card .detail-list > div { grid-template-columns: 82px minmax(0,1fr); font-size: 14px; }
  .plans-art { display: none; }
  .plans-intro .fine-print { margin-top: 20px; }
  .commerce-description { font-size: 16px; margin-top: 18px; }
  .plan-card, .auth-panel { padding: 28px 24px; }
  .empty-plan { padding-top: 32px; }
  .purchase-help { margin-top: 48px; padding-top: 30px; }
  .usage-explainer { padding: 24px; }
  .help-columns { grid-template-columns: minmax(0,1fr); gap: 28px; margin-top: 28px; }
  .page-heading { padding-top: 36px; padding-bottom: 32px; }
  .page-heading h1 { font-size: 36px; }
  .order-summary { position: static; }
  .commerce-section { margin-bottom: 32px; }
  .auth-layout { padding-top: 0; }
  .support-note { margin-top: 24px; }
  .account-panel { padding: 28px 24px; }
  .result-container { padding-top: 40px; }
  .result-panel { padding: 24px 0; }
  .result-actions { flex-direction: column; }
  .legal-document { padding-top: 0; }
  .legal-document h2 { font-size: 20px; }
}
@media (max-width: 380px) {
  .input-action { flex-direction: column; }
  .input-action .secondary-button { width: 100%; }
  .detail-list > div { grid-template-columns: 82px minmax(0,1fr); gap: 12px; }
  .plans-intro h1 { font-size: 38px; }
  .order-summary { padding: 24px 20px; }
  .plan-card { padding-inline: 20px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto; transition: none; } }

.phone-consent { margin: 20px 0 16px; }
