/* App mode for guests: the store app's start screen (welcome.php, any width - it only exists inside the app, which
   may also run on a tablet) and the phone layout of the sign-in pages (main/auth.php, up to 675px). Loaded after
   auth.css. */

/* ---- Start screen ---- */
.auth-welcome {overscroll-behavior: none;}
.app-welcome {position: relative; isolation: isolate; display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; padding: var(--app-safe-top) 26px calc(30px + var(--app-safe-bottom)); overflow: hidden; color: #fff;}
.app-welcome-photo,.app-welcome-photo img {position: absolute; inset: 0; z-index: -2; display: block; width: 100%; height: 100%;}
.app-welcome-photo img {object-fit: cover; object-position: 50% 50%; background: var(--app-deep);}
/* Darkened at the top for the status bar and the logo; the copy brings its own shade (below). */
.app-welcome::before {content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg,#0f141c99 0,#0f141c14 calc(var(--app-safe-top) + 190px),#0f141c00 50%);}
.app-welcome-logo {display: block; width: 190px; max-width: 54vw; height: auto; margin: 34px auto 0;}
.app-welcome-language {position: absolute; top: calc(var(--app-safe-top) + 8px); right: 10px; z-index: 2;}
.app-welcome-language summary {display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border-radius: 50%; color: #fff; list-style: none; cursor: pointer; -webkit-tap-highlight-color: transparent;}
.app-welcome-language summary::-webkit-details-marker {display: none;}
.app-welcome-language summary > span {position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;}
.app-welcome-language summary svg {width: 22px; height: 22px; color: #fff; filter: drop-shadow(0 1px 3px #0f141c99);}
.app-welcome-language[open] summary {background: #ffffff26;}
.app-welcome-language ul {right: 4px; margin-top: 2px; box-shadow: 0 16px 40px #0f141c99;}
.app-welcome-copy {position: relative; width: 100%; max-width: 460px; margin: auto auto 0; padding-top: 32px;}
/* Shade grows from transparent above the eyebrow to almost night at the buttons, whatever the screen height. */
.app-welcome-copy::before {content: ""; position: absolute; z-index: -1; left: -100vw; right: -100vw; top: -140px; bottom: calc(-30px - var(--app-safe-bottom)); background: linear-gradient(180deg,#0f141c00 0,#0f141c4d 140px,#0f141c99 270px,#0f141ceb 72%,#0f141cf7 100%); pointer-events: none;}
.app-welcome-eyebrow {margin: 0; font-size: 12px; font-weight: 700; line-height: 1.4; letter-spacing: .14em; text-transform: uppercase; opacity: .9;}
.app-welcome h1 {margin: 10px 0 12px; font-size: clamp(28px,8.8vw,37px); font-weight: 800; line-height: 1.08; letter-spacing: -.025em; text-wrap: balance; text-shadow: 0 1px 18px #0f141c59;}
.app-welcome-promise {margin: 0 0 24px; font-size: 16px; line-height: 1.45; opacity: .92;}
.app-welcome .app-btn {min-height: 56px; border-radius: 28px; font-size: 17px;}
.app-welcome .app-btn + .app-btn {margin-top: 12px;}
.app-welcome .app-btn-glass {background: #ffffff1a; border-color: #ffffff80;}
.app-welcome-legal {display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0 6px; margin: 6px 0 -8px; text-align: center; font-size: 12.5px; line-height: 1.4; color: #ffffffbf;}
.app-welcome-legal a {display: inline-flex; align-items: center; min-height: 44px; color: inherit !important; text-decoration: underline; text-underline-offset: 3px;}
.app-welcome-copy > * {animation: auth-rise .28s var(--app-ease) both;}
@keyframes auth-rise {from {opacity: 0; transform: translateY(10px);}}
@media(min-width:676px) {.app-welcome {padding-inline: 40px;} .app-welcome-language {right: 24px;} .app-welcome-copy {padding-bottom: 24px;}}

/* ---- Sign-in pages on a phone ---- */
@media(max-width:675px) {
 .member-auth:not(.auth-welcome) {position: relative; isolation: isolate;}
 /* A soft, blurred strip of the Aare at the top, fading into the night background. */
 .member-auth:not(.auth-welcome)::before {content: ""; position: absolute; z-index: -1; left: 0; right: 0; top: 0; height: calc(var(--app-safe-top) + 230px); background: linear-gradient(180deg,#0f141c66 0,#0f141cb3 55%,var(--app-night) 100%),url('../img/app/aare-strip.webp') center 40%/cover; pointer-events: none;}
 .auth-header {position: relative; z-index: 3; height: auto; min-height: calc(var(--app-safe-top) + 60px); padding: var(--app-safe-top) 12px 0; border-bottom: 0;}
 .auth-logo {display: none;}
 .auth-back {display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: var(--app-text) !important; background: #0f141c59; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);}
 .auth-back:active {transform: scale(.94);}
 .auth-language {margin-left: auto;}
 .auth-language summary {padding: 0 14px 0 12px; border-radius: 22px; background: #0f141c59; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); font-size: 14px; font-weight: 600;}
 .auth-language summary .auth-globe {color: var(--app-text);}
 .auth-language ul {right: 0; box-shadow: 0 16px 40px #0f141c99;}
 /* The links to the terms sit at the bottom of the screen on short pages. */
 .auth-layout {display: flex; flex-direction: column; min-height: calc(100vh - var(--app-safe-top) - 60px); min-height: calc(100dvh - var(--app-safe-top) - 60px);}
 .auth-panel {display: flex; flex-direction: column; flex: 1 0 auto; max-width: 480px; padding: 10px 24px calc(12px + var(--app-safe-bottom)); animation: auth-rise .26s var(--app-ease) both;}
 .auth-panel > .auth-footer {margin-top: auto;}
 .auth-panel > .auth-switch,.auth-page-reset .auth-form {margin-bottom: 30px;}
 .auth-mark {width: 46px; margin: 4px 0 20px; filter: drop-shadow(0 4px 14px #0f141c80);}
 .auth-heading {margin-bottom: 28px;}
 .auth-heading h1 {font-size: clamp(27px,8.2vw,32px); line-height: 1.1; letter-spacing: -.025em;}
 .auth-heading p {margin-top: 10px;}
 .auth-form {gap: 18px;}
 .auth-form .app-btn {min-height: 56px; border-radius: 28px; font-size: 17px; margin-top: 6px;}
 .auth-switch {margin-top: 22px;}
 .auth-footer {justify-content: center; padding-top: 12px; padding-bottom: 0; gap: 0 18px;}
 .auth-social {flex-direction: column;}
}
@media(max-width:360px) {
 .auth-panel {padding-inline: 18px;}
 .app-welcome {padding-inline: 20px;}
 .app-welcome-legal > span:first-child {flex-basis: 100%;}
 .app-welcome-legal .app-welcome-dot {display: none;}
 .auth-language summary > span {max-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;}
}
@media(prefers-reduced-motion:reduce) {.app-welcome *,.auth-panel {animation: none !important;}}

/* ---- Sign-up by code (register.php, auth.js): the code step, the resend countdown, the password hint ---- */
.auth-hint {margin: 0; color: var(--app-mut); font-size: 13.5px; line-height: 1.4;}
.register-address {color: var(--app-text); font-weight: 600; overflow-wrap: anywhere;}
.auth-text-btn {display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; border: 0; background: none; color: var(--app-teal); font: 700 15px/1.3 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif; cursor: pointer; -webkit-tap-highlight-color: transparent;}
.auth-text-btn[disabled] {color: var(--app-mut); font-weight: 600; cursor: default; font-variant-numeric: tabular-nums;}
.auth-switch.register-resend {margin-top: 18px;}
.auth-switch.register-change {margin-top: 2px;}
.register-enter {animation: auth-rise .24s var(--app-ease) both;}
@media(prefers-reduced-motion:reduce) {.register-enter {animation: none;}}
