/* Standalone presentation uses the installed package; this file owns placement. */
@media screen {
:root { --ui-scale: 1; }
.ghostly-standalone-document { margin: 0; min-height: calc(100dvh / var(--ui-scale)); font-family: var(--font-sans); background: var(--color-page-background); color: var(--color-ink); }
#ghostly-relay-signin, #ghostly-relay-signin .relay-signin-page { min-height: calc(100dvh / var(--ui-scale)); height: auto; overflow: visible; }
#auth-overlay { background: var(--color-page-background); color: var(--color-ink); }
#splash, #ghostly-closing-overlay { background: color-mix(in srgb, var(--color-scrim) 80%, transparent); color: var(--color-ink); backdrop-filter: blur(4px); }
#auth-overlay { padding: 24px !important; }
#auth-overlay #auth-form { width: 100%; max-width: 440px; }
#auth-overlay label { margin-block: 12px 6px; }
#auth-overlay #auth-error { min-height: 18px; margin-block-start: 12px; }
#auth-overlay #auth-recovery-key { font-family: var(--font-mono); }
#splash .splash-divider { background: var(--color-hairline); }
#splash .splash-box { max-width: min(640px, calc(100vw / var(--ui-scale) - 32px)); }
#ghostly-closing-overlay { padding: 16px; }
#ghostly-closing-overlay > form { width: 100%; max-width: 440px; }
#auth-overlay [hidden], #splash [hidden], #ghostly-closing-overlay [hidden] { display: none !important; }
}

@media screen {
html[data-text-size="115"] { zoom: 1.15; --ui-scale: 1.15; }
html[data-text-size="125"] { zoom: 1.25; --ui-scale: 1.25; }
html[data-text-size="150"] { zoom: 1.5; --ui-scale: 1.5; }
}
@media screen and (max-width: 480px) { #ghostly-relay-signin .relay-signin-page { padding-inline: 8px; } }

@media screen and (max-width: 600px) { #auth-overlay .auth-field-row { grid-template-columns: 1fr !important; } }

/* Server forms retain HTTP/session ownership. Only product layout lives here. */
@media screen {
.ghostly-server-page { padding: 32px 16px; display: flex; justify-content: center; min-height: calc(100dvh / var(--ui-scale)); }
#ghostly-standalone .portal-card, #ghostly-standalone .pay-card { width: 100%; max-width: 720px; height: fit-content; padding: 0; overflow: hidden; }
#ghostly-standalone .pay-card { max-width: 520px; }
#ghostly-standalone .portal-header, #ghostly-standalone .pay-header { padding: 24px; height: auto; }
#ghostly-standalone .portal-brand { flex: 1; min-width: 0; }
#ghostly-standalone .company-logo { max-height: 56px; max-width: 140px; object-fit: contain; background: white; padding: 6px; }
#ghostly-standalone .portal-nav { display: flex; flex-wrap: wrap; gap: 4px; padding: 8px; border-block: 1px solid var(--color-hairline); }
#ghostly-standalone .portal-body, #ghostly-standalone .pay-body { padding: 24px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
#ghostly-standalone .portal-footer, #ghostly-standalone .pay-footer { padding: 16px; border-top: 1px solid var(--color-hairline); text-align: center; }
#ghostly-standalone .field { display: flex; flex-direction: column; gap: 8px; margin-block: 16px; min-width: 0; }
#ghostly-standalone .field-row { display: flex; gap: 16px; }
#ghostly-standalone .field-row .field { flex: 1; }
#ghostly-standalone .checkbox label { display: flex; align-items: center; gap: 8px; }
#ghostly-standalone .checkbox input { width: auto; }
#ghostly-standalone .pay-btn { width: 100%; white-space: normal; height: auto; min-height: 32px; }
#ghostly-standalone .table-container { max-width: 100%; overflow-x: auto; }
#ghostly-standalone table { width: 100%; }
#ghostly-standalone .balance-row { font-weight: 600; }
#ghostly-standalone .inline-form { display: inline; margin: 0; }
#ghostly-standalone .visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
#ghostly-standalone [hidden] { display: none !important; }
}
@media screen and (max-width: 600px) {
.ghostly-server-page { padding: 8px; }
#ghostly-standalone .portal-body, #ghostly-standalone .pay-body, #ghostly-standalone .portal-header, #ghostly-standalone .pay-header { padding: 16px; }
#ghostly-standalone .field-row { flex-direction: column; gap: 0; }
}
