/* Step two is one viewport, one focal amount and one compact control cluster. */
body[data-step="2"] { height:var(--mobile-height,100dvh); min-height:0; overflow:hidden; overscroll-behavior:none; }
body[data-step="2"] .app-shell { height:var(--mobile-height,100dvh); min-height:0; display:grid; grid-template-rows:auto minmax(0,1fr) auto; }
body[data-step="2"] .site-header { grid-row:1; }
body[data-step="2"] main { grid-row:2; display:block; min-height:0; overflow:hidden; container:amount-stage / size; }
body[data-step="2"] .flow-footer { grid-row:3; }
body[data-step="2"] .step-viewport { height:100%; min-height:0; overflow:clip; }
body[data-step="2"] #universe { opacity:.5; }
.screen-amount { display:grid; place-items:center; width:100%; height:100%; min-height:0; max-width:none; margin:0; padding:0; }
.screen-amount .amount-experience { --amount-font-size:clamp(82px,22cqw,160px); --amount-preset-font:13px; --amount-separation:82px; display:grid; grid-template-rows:auto auto auto; width:100%; max-width:960px; min-width:0; margin:0 auto; padding:0; }
.screen-amount .amount-display { position:relative; display:flex; align-items:center; justify-content:center; gap:0; height:calc(var(--amount-font-size) * 1.06 + 42px); min-width:0; min-height:0; margin:0; top:auto; line-height:1.06; white-space:nowrap; }
.screen-amount .amount-stack { display:flex; flex-direction:column; align-items:center; min-width:0; }
.screen-amount .currency-sign, body[data-step="2"] .amount-flight>.currency-sign { font-size:.36em; }
.screen-amount .amount-period { font-size:clamp(10px,1cqw,14px); }
.screen-amount .amount-caption { position:relative; inset:auto; width:max-content; max-width:100%; transform:none; }
.screen-amount .amount-edit-hint { max-width:calc(100vw - 32px); min-height:18px; white-space:normal; }
.screen-amount .slider-area { position:relative; isolation:isolate; width:calc(100% - 2 * var(--slider-edge-room,16px)); max-width:810px; height:68px; margin:var(--amount-separation) auto 0; padding:0 2px; }
.screen-amount .amount-tools { display:flex; justify-content:center; min-width:0; margin:14px 0 0; padding:0; }
.screen-amount .preset-group { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; width:100%; max-width:560px; }
.screen-amount .preset-group button { min-width:0; min-height:44px; padding:8px 6px; }
@container amount-stage (max-width:340px) {
  .screen-amount .amount-experience { --amount-preset-font:11px; }
}
@container amount-stage (max-height:440px) {
  .screen-amount .amount-experience { --amount-font-size:clamp(64px,20cqw,112px); --amount-separation:78px; }
  .screen-amount .amount-tools { margin-top:10px; }
  .screen-amount .preset-group button { min-height:40px; }
}
/* Limited height, including the on-screen keyboard: retain exact entry and action. */
@container amount-stage (max-height:360px) {
  .screen-amount .amount-experience { --amount-font-size:clamp(40px,14cqw,64px); --amount-separation:20px; }
  .screen-amount .bubble-position { visibility:hidden; }
  .screen-amount .slider-area { height:64px; }
  .screen-amount .amount-tools { margin-top:8px; }
  .screen-amount .preset-group button { min-height:32px; padding-block:5px; }
}
@container amount-stage (max-height:240px) {
  .screen-amount .amount-experience { --amount-font-size:clamp(32px,12cqw,52px); --amount-separation:16px; }
  .screen-amount .amount-edit-hint:not(.is-error) { display:none; }
  .screen-amount .slider-area { height:60px; }
}
@container amount-stage (max-height:215px) {
  .screen-amount .amount-tools { display:none; }
}
@container amount-stage (max-height:180px) {
  .screen-amount .amount-experience { --amount-font-size:32px; --amount-separation:12px; }
  .screen-amount .slider-labels { visibility:hidden; }
  .screen-amount .slider-area { height:48px; }
}
@container amount-stage (max-height:144px) {
  .screen-amount .slider-area { display:none; }
}
@media(max-height:520px) {
  body[data-step="2"] .site-header { height:calc(52px + env(safe-area-inset-top)); }
  body[data-step="2"] .flow-footer { grid-template-columns:1fr auto 1fr; grid-template-rows:32px 48px; align-items:center; gap:4px; padding-top:4px; padding-bottom:max(12px,env(safe-area-inset-bottom)); }
  body[data-step="2"] .footer-center { display:contents; }
  body[data-step="2"] .step-progress { grid-column:2; grid-row:1; align-self:center; }
  body[data-step="2"] .footer-side { grid-column:1; grid-row:1; min-height:0; }
  body[data-step="2"] .footer-right { grid-column:3; }
  body[data-step="2"] .back-button { min-height:32px; padding-block:0; }
  body[data-step="2"] .flow-footer .primary-button { grid-column:1/-1; grid-row:2; width:min(100%,390px); min-height:48px; justify-self:center; }
}
body[data-step="2"].is-amount-keyboard .site-header { display:none; }
body[data-step="2"].is-amount-keyboard .flow-footer { grid-template-rows:32px 48px; gap:4px; padding-top:4px; padding-bottom:max(12px,env(safe-area-inset-bottom)); }
body[data-step="2"].is-amount-keyboard .back-button { min-height:32px; padding-block:0; }
body[data-step="2"].is-amount-keyboard .flow-footer .primary-button { min-height:48px; }
@media(prefers-reduced-motion:reduce) { body[data-step="2"] #universe { transition:none; } }
