/* Shared calculator state, mobile-specific composition; desktop stays side by side. */
.credit-mobile-copy, .amount-slider, .mobile-amount-label, .mobile-calculator-note, .mobile-calculator-actions, .mix-disclosure > summary { display: none; }
.credit-controls { grid-column: 1; grid-row: 1; }
.credit-results { grid-column: 2; grid-row: 1; }
@media (max-width: 699px) {
  .credits-page { --credit-ease: cubic-bezier(.32,.72,0,1); }
  .credit-desktop-copy { display: none; }
  .credit-mobile-copy { display: inline; }
  .credits-main { padding-top: 25px; padding-bottom: 44px; }
  .credits-intro { margin-bottom: 22px; }
  .credits-intro h1, html:lang(zh) .credits-intro h1 { display: block; min-block-size: 0; max-inline-size: none; margin: 0; font-size: clamp(25px,7.1vw,30px); line-height: 1.22; letter-spacing: -.025em; white-space: normal; }
  html:lang(zh) .credits-intro h1 { letter-spacing: 0; }
  .credits-intro .intro-description { min-block-size: 0; margin: 10px 0 0; max-width: none; font-size: 13px; line-height: 1.6; }
  .credits-intro .draft-note { display: none; }
  .credits-page .credit-lab { display: grid; grid-template-columns: minmax(0,1fr); grid-template-areas: 'modes' 'results' 'label' 'amount' 'error' 'slider' 'presets' 'notice'; padding: 14px 18px 15px; background: #f3f5f0; border-color: #e0e6db; border-radius: 22px; }
  .credit-controls, .credit-results { display: contents; }
  .credit-controls > :is(h2,.amount-label,.input-help,.amount-steppers,.workspace-link,.workspace-hint) { display: none; }
  .mode-tabs { grid-area: modes; margin: 0; padding: 4px; border-radius: 12px; background: #e5eae0; }
  .mode-tab { flex-direction: row; gap: 5px; min-height: 42px; padding: 7px 3px; font-size: 11px; line-height: 1.3; }
  .mode-tab .ui-icon { width: 15px; height: 15px; }
  .mode-active-labels { inset: 4px; }
  .mode-indicator { border-radius: 8px; }
  .result-stack { grid-area: results; min-height: 135px; margin-top: 17px; flex: none; }
  .result-page { transform: translateY(3px); transition-duration: 140ms,220ms; }
  .delivery-pair { grid-template-columns: minmax(0,1fr) 20px minmax(0,1fr); align-items: start; gap: 3px; }
  .delivery-art { width: 48px; height: 43px; margin: 0 auto 5px; }
  .delivery-art img { width: 52px; height: 52px; max-width: none; }
  .format-badge { display: none; }
  .delivery-total strong { font-size: 32px; line-height: 1.12; }
  .delivery-total span { min-height: 34px; margin-top: 5px; font-size: 12px; line-height: 1.3; }
  .delivery :is(.delivery-rate,.delivery-scope,.delivery-shortfall) { display: none; }
  .result-or { align-self: center; padding-top: 0; margin-top: 22px; font-size: 11px; color: var(--credit-muted); }
  .alternative-note { display: none; }
  .mobile-amount-label { display: block; grid-area: label; margin: 0; text-align: center; color: var(--credit-muted); font-size: 11px; line-height: 16px; }
  .amount-editor { grid-area: amount; justify-content: center; align-items: baseline; min-height: 45px; gap: 6px; border: 0; margin: 0; }
  .amount-editor .credit-token { display: none; }
  .amount-editor input, .amount-editor[data-long='true'] input { flex: 0 1 auto; width: calc(var(--amount-digits,5) * 1ch + 3px); padding: 1px 0 3px; max-width: 210px; font-size: 34px; line-height: 1.15; text-align: center; letter-spacing: -.035em; border-radius: 0; }
  .amount-unit { font-size: 11px; }
  .amount-error { grid-area: error; text-align: center; }
  .amount-error:not(:empty) { padding: 4px 0; margin: 0; }
  .amount-slider { display: block; grid-area: slider; padding-top: 27px; }
  .scrubber-surface { position: relative; height: 48px; margin-inline: -4px; }
  .scrubber-rail { position: absolute; left: 22px; right: 22px; top: 22px; height: 4px; overflow: hidden; background: #dce2d5; border-radius: 4px; }
  .scrubber-fill { display: block; height: 100%; background: linear-gradient(90deg,#e7b359,#d9a54b); transform-origin: left center; transform: scaleX(.1); transition: transform 240ms var(--credit-ease); }
  .scrubber-markers { position: absolute; left: 22px; right: 22px; top: 24px; pointer-events: none; }
  .scrubber-coin { position: absolute; left: -16px; top: -16px; width: 100%; height: 32px; transform: translateX(10%); transition: transform 240ms var(--credit-ease); }
  .scrubber-coin svg { display: block; width: 32px; height: 32px; filter: drop-shadow(0 2px 2px #845d2520); transition: transform 160ms var(--credit-ease); }
  .scrubber-bubble { position: absolute; left: -30px; top: -48px; width: 60px; text-align: center; transform: translateX(24px); }
  .scrubber-bubble span { display: inline-block; min-width: 44px; padding: 4px 7px; border: 1px solid #e5dece; border-radius: 7px; background: #fffcf4; color: #705123; font-size: 10px; line-height: 15px; font-variant-numeric: tabular-nums; opacity: 0; transform: translateY(3px); transition: opacity 100ms ease,transform 160ms var(--credit-ease); }
  #credit-range { position: absolute; inset: 0; width: 100%; height: 48px; margin: 0; padding: 0; border: 0; appearance: none; -webkit-appearance: none; background: transparent; color: transparent; cursor: ew-resize; touch-action: pan-y; outline: none; }
  #credit-range::-webkit-slider-runnable-track { height: 48px; background: transparent; border: 0; }
  #credit-range::-webkit-slider-thumb { width: 44px; height: 48px; border: 0; border-radius: 24px; appearance: none; -webkit-appearance: none; background: transparent; }
  #credit-range::-moz-range-track { height: 4px; background: transparent; border: 0; }
  #credit-range::-moz-range-thumb { width: 44px; height: 44px; border: 0; background: transparent; }
  .amount-slider.is-scrubbing :is(.scrubber-coin,.scrubber-fill) { transition: none; }
  .amount-slider.is-scrubbing .scrubber-coin svg { transform: scale(1.1); }
  .amount-slider.is-scrubbing .scrubber-bubble span { opacity: 1; transform: translateY(0); }
  html[data-focus-input='keyboard'] .amount-slider:has(#credit-range:focus-visible) .scrubber-rail { box-shadow: 0 0 0 1px #727c6a; }
  .scrubber-scale { display: flex; justify-content: space-between; margin: -1px 18px 0; color: var(--credit-muted); font-size: 10px; line-height: 15px; font-variant-numeric: tabular-nums; }
  .credits-page #slider-help, .credits-page .scrubber-extended { margin: 6px 0 0; text-align: center; color: var(--credit-muted); font-size: 10px; line-height: 15px; }
  .credits-page .scrubber-extended[hidden] { display: none; }
  .amount-presets { grid-area: presets; margin-top: 13px; gap: 7px; }
  .amount-preset { min-height: 38px; padding: 8px 3px; border-color: #dce3d5; border-radius: 10px; background: #f9faf6; font-size: 11px; line-height: 20px; }
  .amount-preset[aria-pressed='true'] { border-color: #a5b399; background: #e7eddf; color: #334c31; }
  .mobile-calculator-note { display: block; grid-area: notice; min-block-size: 30px; margin: 12px 0 0 !important; color: var(--credit-muted); text-align: center; font-size: 10px; line-height: 15px; text-wrap: balance; }
  .mobile-calculator-actions { display: flex; flex-direction: column; align-items: center; gap: 11px; margin-top: 14px; }
  .mobile-scope-link { display: inline-flex; align-items: center; min-height: 30px; color: #64705e; font-size: 11px; text-underline-offset: 3px; }
  .mobile-workspace-link { display: inline-flex; align-items: center; gap: 20px; min-height: 44px; padding: 10px 18px; color: #fff; background: #263d2c; border-radius: 12px; font-size: 12px; text-decoration: none; transition: transform 140ms var(--credit-ease),background-color 160ms ease; }
  .mobile-workspace-link:active { transform: scale(.97); }
  .mobile-workspace-link .ui-icon { width: 16px; height: 16px; }
  .mix-section { margin-top: 28px; }
  .mix-disclosure { border-top: 1px solid #dce2d7; border-bottom: 1px solid #dce2d7; }
  .mix-disclosure > summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 74px; padding: 15px 0; list-style: none; cursor: pointer; }
  .mix-disclosure > summary::-webkit-details-marker { display: none; }
  .mix-disclosure > summary strong { display: block; font-size: 14px; font-weight: 500; line-height: 20px; }
  .mix-disclosure > summary small { display: block; margin-top: 4px; color: var(--credit-muted); font-size: 11px; line-height: 16px; }
  .mix-disclosure > summary .ui-icon { transition: transform 180ms var(--credit-ease); }
  .mix-disclosure[open] > summary .ui-icon { transform: rotate(45deg); }
  .mix-disclosure:not([data-ready]) .mix-body { display: none; }
  .mix-body { padding: 12px 0 22px; }
  .credits-usage { border-top: 0; margin-top: 28px; padding-top: 0; }
  .credits-page .usage-heading h2 { min-block-size: 0; font-size: 23px; }
  .credits-page .usage-heading p { min-block-size: 0; font-size: 13px; }
}
@media (max-width: 359px) {
  .credits-page .credit-lab { padding-inline: 13px; }
  .mode-tab { gap: 4px; font-size: 10px; }
  .mode-tab .ui-icon { width: 13px; height: 13px; }
  .result-stack { min-height: 139px; }
  .delivery-total span { font-size: 11px; }
}
@media (max-width: 699px) and (prefers-reduced-motion: reduce) {
  .credits-page :is(.scrubber-coin,.scrubber-fill,.scrubber-coin svg,.scrubber-bubble span,.mobile-workspace-link) { transition: none !important; }
  .amount-slider.is-scrubbing .scrubber-coin svg { transform: none; }
}
