/* Lightweight shell UX — student POC entry pages */
:root {
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

.shell-body {
    /* Mobile / A2HS: match app canvas so no grey strip under the nav */
    background: #fff;
}
.shell-body .app-container {
    background: #fff;
}

@media (min-width: 481px) {
    .shell-body {
        background: #dfe3ea !important;
    }
}

/*
 * iOS Home Screen:
 * Do NOT set position:fixed on body — that makes child position:fixed
 * (the tab bar) stick to the body box and float above the real bottom.
 */
html.is-standalone,
html.is-standalone body.shell-body {
    height: 100%;
    width: 100%;
    background: #fff !important;
}
html.is-standalone body.shell-body {
    align-items: stretch !important;
    overflow: hidden;
    min-height: 100%;
    min-height: -webkit-fill-available;
}
html.is-standalone .app-container {
    height: 100%;
    min-height: 100%;
    min-height: -webkit-fill-available;
    width: 100%;
    max-width: 480px;
}
/* iOS home-screen blurs whatever sits under the clock. A solid strip at the
   top makes that band the same red as the header, with no frost. */
html.is-standalone .shell-home::before,
html.is-standalone .shell-progress::before,
html.is-standalone .shell-songs::before,
html.is-standalone .shell-profile::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 12px;
    background: #e52d27;
    z-index: 80;
    pointer-events: none;
}

/* ===== Speak-style welcome (Step 1) — Kunkwan red ===== */
.speak-welcome {
    flex: 1;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    padding: calc(20px + var(--safe-top)) 24px calc(28px + var(--safe-bottom));
    background:
        radial-gradient(120% 70% at 100% -10%, rgba(211, 47, 47, 0.22), transparent 52%),
        radial-gradient(80% 50% at 0% 0%, rgba(255, 235, 238, 0.9), transparent 45%),
        #ffffff;
}
.speak-welcome__space {
    flex: 0 0 26vh;
    max-height: 220px;
    min-height: 72px;
}
.speak-welcome__mid {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-bottom: 8px;
}
.speak-welcome__brand {
    display: flex;
    align-items: center;
    margin-bottom: 22px;
}
.speak-welcome__logo {
    display: block;
    height: 44px;
    width: auto;
    max-width: min(220px, 70vw);
    object-fit: contain;
}
.speak-welcome__icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(211, 47, 47, 0.2);
}
.speak-welcome__name {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #111827;
    line-height: 1;
}
.speak-welcome__headline {
    font-size: clamp(26px, 6.5vw, 32px);
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.25;
    color: #111827;
    max-width: 16em;
    margin: 0 0 28px;
}
.speak-welcome__dots {
    display: flex;
    gap: 6px;
    align-items: center;
}
.speak-welcome__dots i {
    display: block;
    width: 18px;
    height: 3px;
    border-radius: 99px;
    background: #d1d5db;
}
.speak-welcome__dots i.is-on {
    background: #111827;
}
.speak-welcome__actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: auto;
    padding-top: 24px;
}
.speak-welcome__cta {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 54px;
    border-radius: 999px;
    background: #d32f2f;
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(211, 47, 47, 0.28);
    transition: background 0.15s ease, transform 0.1s ease;
}
.speak-welcome__cta:hover { background: #b71c1c; }
.speak-welcome__cta:active { transform: scale(0.985); }
.speak-welcome__login {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 54px;
    border-radius: 999px;
    background: #eef0f3;
    color: #111827;
    font-size: 16px;
    font-weight: 800;
    text-decoration: none;
    transition: background 0.15s ease, transform 0.1s ease;
}
.speak-welcome__login:hover { background: #e5e7eb; }
.speak-welcome__login:active { transform: scale(0.985); }

/* Legacy landing (kept for other pages) */
.shell-landing {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
    padding: calc(28px + var(--safe-top)) 24px calc(24px + var(--safe-bottom));
    background:
        radial-gradient(110% 70% at 50% -15%, rgba(211, 47, 47, 0.14), transparent 55%),
        linear-gradient(180deg, #fff8f7 0%, #ffffff 42%);
}
.shell-landing__brand {
    display: flex;
    justify-content: center;
    margin: 28px 0 36px;
}
.shell-landing__brand img {
    height: 44px;
    width: auto;
    display: block;
}
.shell-landing__hero {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    padding-bottom: 24px;
}
.shell-landing__hero h1 {
    font-size: clamp(28px, 7vw, 36px);
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1.15;
    color: #111827;
    margin-bottom: 14px;
}
.shell-landing__hero p {
    color: #6b7280;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
    max-width: 30ch;
    margin: 0 auto 28px;
}
.shell-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: auto;
}
.shell-actions .btn-primary {
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}
.shell-btn-ghost {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    border-radius: 100px;
    border: 1.5px solid #e5e7eb;
    background: #fff;
    color: #111827;
    font-weight: 800;
    font-size: 15px;
    text-decoration: none;
}
.shell-btn-ghost:active { transform: scale(0.98); }
.shell-fine {
    text-align: center;
    margin-top: 14px;
    font-size: 12px;
    font-weight: 600;
    color: #9ca3af;
}

/* Login / forgot / reset / create-account entry */
.shell-login {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: calc(24px + var(--safe-top)) 24px calc(24px + var(--safe-bottom));
    background: #fff;
    min-height: 100dvh;
}
.shell-login__top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
}
.shell-back {
    width: 40px; height: 40px; border: 0; border-radius: 50%;
    background: #f3f4f6; color: #374151; font-size: 18px;
    display: grid; place-items: center; text-decoration: none;
}
.shell-login h1 {
    font-size: 28px; font-weight: 900; letter-spacing: -0.02em; margin-bottom: 8px;
}
.shell-login .lead {
    color: #6b7280; font-weight: 600; font-size: 14px; margin-bottom: 28px; line-height: 1.45;
}
.shell-field { margin-bottom: 14px; }
.shell-field label {
    display: block; font-size: 12px; font-weight: 800; color: #6b7280;
    text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 8px;
}
.shell-field input {
    width: 100%; padding: 16px 16px; border-radius: 16px;
    border: 2px solid #e5e7eb; font-size: 16px; font-weight: 600;
    outline: none; background: #fafafa;
}
.shell-field input:focus { border-color: #d32f2f; background: #fff; }
.shell-status {
    display: none; font-size: 14px; font-weight: 700; margin: 0 0 12px; color: #d32f2f;
}
.shell-login .btn-primary { margin-top: 8px; }
.shell-login__links {
    margin-top: 18px; text-align: center; font-size: 14px; font-weight: 600; color: #6b7280;
}
.shell-login__links a { color: #d32f2f; font-weight: 800; text-decoration: none; }

/* Home hub polish */
.shell-home .hub-card {
    transition: transform 0.12s ease, border-color 0.12s ease;
}
.shell-home .hub-card:active { transform: scale(0.98); }
.shell-greeting-sub { opacity: 0.92; }

/* Tab pages share one canvas + type rhythm */
.shell-page .shell-hero__title { font-family: inherit; }
.shell-page .btn-primary {
    border-radius: 999px;
    font-weight: 800;
}

/* Shared footer nav — true viewport fixed (native tab bar) */
.app-container .bottom-nav-container.shell-nav,
.bottom-nav-container.shell-nav {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    max-width: 480px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    transform: none !important; /* transform breaks fixed containing-block on some iOS */
    z-index: 100;
    /* paint under home indicator so no gap shows below the bar */
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: #fff;
    box-sizing: border-box;
}
.app-container .shell-nav .bottom-nav {
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    background: #fff;
    /* safe-area is on the container — keep inner pad small */
    padding-bottom: 10px !important;
}

@media (min-width: 481px) {
    /*
     * Desktop phone frame: keep the tab bar inside .app-container.
     * position:fixed sticks to the browser window, so the red Play
     * button and labels float in the empty page below the cards.
     */
    html:not(.is-standalone) .app-container .bottom-nav-container.shell-nav,
    html:not(.is-standalone) .bottom-nav-container.shell-nav {
        position: absolute !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding-bottom: 0;
    }
    html:not(.is-standalone) .app-container .shell-nav .bottom-nav {
        border-bottom-left-radius: 28px !important;
        border-bottom-right-radius: 28px !important;
        padding-bottom: 12px !important;
    }
}
.shell-nav .nav-item { text-decoration: none; }
.shell-nav-ico { display: grid; place-items: center; height: 24px; }
.shell-icon-play {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
}
.shell-icon-play svg { margin-left: 2px; }

.shell-reward.reward-overlay,
.app-container .reward-overlay {
    position: absolute;
    inset: 0;
    z-index: 160;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px 20px;
    background: rgba(17, 24, 39, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-sizing: border-box;
}
.shell-reward.reward-overlay.is-open,
.app-container .reward-overlay.is-open {
    display: flex !important;
}
.reward-overlay .reward-card {
    width: 100%;
    max-width: 340px;
    background: #fff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 24px 48px rgba(17, 24, 39, 0.28);
    animation: rewardPop 0.28s ease;
}
.reward-overlay .reward-header {
    background: linear-gradient(135deg, #F59E0B, #D97706);
    padding: 36px 20px 20px;
    color: #fff;
    text-align: center;
}
.reward-overlay .reward-emoji {
    font-size: 40px;
    margin-bottom: 8px;
    line-height: 1;
}
.reward-overlay .reward-header h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 900;
    color: #fff;
}
.reward-overlay .reward-header p {
    margin: 6px 0 0;
    font-size: 14px;
    opacity: 0.92;
    font-weight: 600;
    color: #fff;
}
.reward-overlay .reward-body {
    padding: 28px 24px;
    text-align: center;
}
.reward-overlay .reward-streak {
    color: #6b7280;
    font-size: 15px;
    margin: 0 0 18px;
    font-weight: 600;
}
.reward-overlay .reward-streak span {
    color: #F59E0B;
    font-weight: 800;
}
.reward-overlay .reward-tickets {
    background: #FFFBEB;
    border: 2px dashed #FCD34D;
    border-radius: 16px;
    padding: 18px;
    font-size: 28px;
    font-weight: 900;
    color: #D97706;
    margin-bottom: 24px;
}
.reward-overlay .reward-claim {
    background: #F59E0B !important;
    width: 100%;
    border-radius: 999px;
}
@keyframes rewardPop {
    from { opacity: 0; transform: translateY(12px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* =========================================================
   Shared tab-page kit — Home / Songs / Progress / Profile
   One chrome: red hero → overlap stack → white surfaces
   ========================================================= */
:root {
    --shell-red: #d32f2f;
    --shell-red-deep: #b31217;
    --shell-ink: #111827;
    --shell-muted: #6b7280;
    --shell-line: #e5e7eb;
    --shell-canvas: #f8f9fa;
    --shell-card: #ffffff;
    --shell-radius: 20px;
    --shell-shadow: 0 4px 14px rgba(17, 24, 39, 0.06);
    --shell-nav-pad: calc(78px + env(safe-area-inset-bottom, 0px));
}

.app-container.shell-page {
    background: var(--shell-canvas) !important;
    overflow: hidden;
}

.shell-page__scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: var(--shell-nav-pad);
}

/* Hero */
.shell-hero {
    background: linear-gradient(135deg, #e52d27 0%, var(--shell-red-deep) 100%);
    color: #fff;
    padding: calc(28px + env(safe-area-inset-top, 0px)) 24px 72px;
    position: relative;
    flex-shrink: 0;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
}
.shell-hero--center {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-top: calc(48px + env(safe-area-inset-top, 0px));
}
.shell-hero__copy { flex: 1; min-width: 0; text-align: left; }
.shell-hero--center .shell-hero__copy { text-align: center; }
.shell-hero__eyebrow {
    margin: 0 0 6px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.78);
}
.shell-hero__title {
    margin: 0 0 6px;
    font-size: clamp(24px, 6vw, 30px);
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1.15;
    color: #fff;
}
.shell-hero__greet {
    margin: 0 0 4px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
    color: rgba(255, 255, 255, 0.9);
}
.shell-hero__name {
    margin: 0 0 6px;
    font-size: clamp(17px, 4.4vw, 21px);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.25;
    color: #fff;
    word-break: break-word;
    overflow-wrap: anywhere;
    max-width: 100%;
}
.shell-hero--center .shell-hero__name {
    font-size: clamp(18px, 4.6vw, 22px);
    max-width: 18ch;
    margin-left: auto;
    margin-right: auto;
}
.shell-hero__sub {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.88);
}
.shell-hero__media {
    flex-shrink: 0;
    width: 72px;
    height: 72px;
    object-fit: contain;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.16);
    padding: 8px;
}
.shell-hero__media--round {
    border-radius: 50%;
    background: #fff;
    padding: 4px;
}
.shell-hero__actions {
    position: absolute;
    top: calc(18px + env(safe-area-inset-top, 0px));
    left: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    z-index: 5;
}
.shell-hero__link {
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 800;
    background: none;
    border: 0;
    cursor: pointer;
    padding: 6px 0;
}
.shell-hero__icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 0;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    display: grid;
    place-items: center;
    text-decoration: none;
    font-size: 16px;
}

/* Overlap body */
.shell-stack {
    margin-top: -44px;
    padding: 0 20px 8px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: relative;
    z-index: 2;
}

/* Surfaces */
.shell-surface {
    background: var(--shell-card);
    border-radius: var(--shell-radius);
    box-shadow: var(--shell-shadow);
    border: 1px solid rgba(229, 231, 235, 0.7);
    padding: 18px;
}
.shell-surface--flush { padding: 12px; }
.shell-surface__title {
    margin: 0 0 12px;
    font-size: 13px;
    font-weight: 800;
    color: var(--shell-ink);
}
.shell-surface__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

/* Hub list (Home) — stack content tightly; no flex spacer (that looked like bottom white space) */
.shell-home .shell-hub {
    gap: 12px;
}
.shell-home .shell-hub .hub-card {
    padding: 16px;
}
.shell-home .home-goal-card {
    margin-top: 4px;
}
.shell-home .home-goal-card .shell-surface__title {
    margin-bottom: 10px;
}
.shell-home .home-goal-meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 13px;
    font-weight: 700;
    color: var(--shell-muted);
    margin-bottom: 8px;
}
.shell-home .home-goal-meta strong {
    color: var(--shell-ink);
    font-size: 16px;
}
.shell-hub {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.shell-hub .hub-card {
    background: var(--shell-card);
    border: 1px solid var(--shell-line);
    border-radius: var(--shell-radius);
    box-shadow: var(--shell-shadow);
    padding: 16px;
}
.shell-hub .hub-primary {
    border-color: rgba(211, 47, 47, 0.22);
    background: linear-gradient(135deg, #fff8f7, #ffffff);
}
.shell-hub .hub-primary h3 { color: var(--shell-red); }

/* Stats */
.shell-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.shell-stat {
    background: var(--shell-card);
    border-radius: var(--shell-radius);
    box-shadow: var(--shell-shadow);
    border: 1px solid rgba(229, 231, 235, 0.7);
    padding: 14px 8px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.shell-stat i { font-size: 20px; margin-bottom: 10px; color: var(--shell-red); }
.shell-stat i.is-amber { color: #f59e0b; }
.shell-stat strong {
    font-size: 18px;
    font-weight: 900;
    color: var(--shell-ink);
    line-height: 1.1;
    margin-bottom: 2px;
}
.shell-stat span {
    font-size: 11px;
    font-weight: 700;
    color: var(--shell-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Forms */
.shell-label {
    display: block;
    font-size: 11px;
    font-weight: 800;
    color: var(--shell-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}
.shell-select,
.shell-input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 14px;
    border: 2px solid var(--shell-line);
    background: #fafafa;
    font-size: 15px;
    font-weight: 700;
    color: var(--shell-ink);
    outline: none;
    margin-bottom: 14px;
}
.shell-select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236B7280' d='M1.4 0 6 4.6 10.6 0 12 1.4 6 7.4 0 1.4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}
.shell-select:focus,
.shell-input:focus {
    border-color: var(--shell-red);
    background-color: #fff;
}
.shell-select--pill {
    width: auto;
    margin: 0;
    border-radius: 999px;
    border-width: 0;
    background-color: #f3f4f6;
    color: var(--shell-red);
    padding: 8px 32px 8px 14px;
    font-size: 13px;
}

/* Progress bar */
.shell-meter {
    height: 10px;
    border-radius: 999px;
    background: #f3f4f6;
    overflow: hidden;
}
.shell-meter > i {
    display: block;
    height: 100%;
    width: 0%;
    border-radius: 999px;
    background: linear-gradient(90deg, #d32f2f, #ff4b4b);
    transition: width 0.55s ease;
}

/* Songs — shared hero + media list */
.shell-page.shell-songs > .shell-hero.library-header {
    display: block;
    padding: calc(52px + env(safe-area-inset-top, 0px)) 24px 64px;
    align-items: unset;
}
.shell-page.shell-songs .song-listview {
    background: transparent;
}
.shell-page.shell-songs .song-row {
    border-radius: var(--shell-radius);
    box-shadow: var(--shell-shadow);
}

/* Progress — station / achievement density on shell surfaces */
.shell-page.shell-progress .stations-card,
.shell-page.shell-progress .achievements-card {
    margin: 0;
}
.shell-page.shell-progress .achievements-grid {
    margin-top: 0;
}

/* Profile — compact settings density (not onboarding CTAs) */
.shell-page.shell-profile #prefs-status {
    display: none;
    font-size: 12px;
    font-weight: 700;
    margin: 0 0 10px;
}
.shell-page.shell-profile .profile-boot {
    text-align: center;
    padding: 28px 20px;
    color: var(--shell-muted);
    font-weight: 700;
    font-size: 14px;
}
.shell-page.shell-profile .profile-boot i {
    display: block;
    font-size: 28px;
    color: var(--shell-red);
    margin-bottom: 12px;
}
.shell-page.shell-profile.is-hydrating #view-account .shell-select {
    opacity: 0.45;
    pointer-events: none;
}
.shell-page.shell-profile.prefs-ready #view-account .shell-select {
    opacity: 1;
    pointer-events: auto;
    transition: opacity 0.15s ease;
}
.shell-page.shell-profile .shell-surface {
    padding: 14px 16px;
}
.shell-page.shell-profile .shell-surface__title {
    margin: 0 0 10px;
    font-size: 12px;
    letter-spacing: 0.02em;
}
.shell-page.shell-profile .shell-label {
    font-size: 10px;
    margin-bottom: 6px;
    letter-spacing: 0.06em;
}
.shell-page.shell-profile .shell-select,
.shell-page.shell-profile .shell-input {
    padding: 9px 12px;
    border-radius: 10px;
    border-width: 1px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 10px;
    min-height: 40px;
    box-sizing: border-box;
}
.shell-page.shell-profile .shell-select {
    background-position: right 12px center;
    background-size: 10px 7px;
    padding-right: 32px;
}
.shell-page.shell-profile .btn-primary,
.shell-page.shell-profile .btn-outline {
    padding: 11px 16px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    min-height: 42px;
    border-radius: 999px;
}
.shell-page.shell-profile .btn-outline {
    padding: 10px 16px;
    font-size: 13px;
    border-width: 1px;
}
.shell-page.shell-profile .profile-email-row {
    color: var(--shell-ink);
    font-weight: 600;
    font-size: 13px;
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    word-break: break-word;
}
.shell-page.shell-profile .profile-email-row i {
    color: var(--shell-muted);
    font-size: 12px;
}
.shell-page.shell-profile .profile-access-copy {
    color: var(--shell-ink);
    font-weight: 500;
    font-size: 13px;
    line-height: 1.45;
    margin: 0;
}
.shell-page.shell-profile .status-badge {
    font-size: 12px;
    padding: 8px 12px;
    margin-bottom: 10px;
}
.shell-page.shell-profile .profile-logout {
    margin-top: 2px;
    border: none;
    color: var(--shell-muted);
    min-height: 40px;
    font-weight: 600;
}
.shell-page.shell-profile .profile-logout:active {
    color: var(--shell-red);
}

/* Onboarding smoothness */
.shell-onboard .footer-action {
    padding: 16px 24px calc(32px + env(safe-area-inset-bottom, 0px));
}
.shell-onboard .screen {
    animation: shellFade 0.28s ease;
}
@keyframes shellFade {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.shell-onboard .logo-mark {
    width: 72px; height: 72px; margin: 0 auto 28px;
    border-radius: 20px; overflow: hidden;
    display: grid; place-items: center;
    background: #fff;
    box-shadow: 0 10px 28px rgba(211, 47, 47, 0.18);
}
.shell-onboard .logo-mark img { width: 100%; height: 100%; object-fit: contain; padding: 10px; }

/* Add to Home Screen */
.a2hs-bar {
    position: fixed;
    left: 50%;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    z-index: 80;
    width: min(100%, 480px);
    padding: 0 12px;
    transform: translateX(-50%);
    pointer-events: none;
}
.a2hs-bar--over-nav {
    bottom: calc(76px + env(safe-area-inset-bottom, 0px));
}
.a2hs-bar[hidden] {
    display: none !important;
}
.a2hs-bar__card {
    pointer-events: auto;
    display: grid;
    grid-template-columns: 40px 1fr auto;
    grid-template-areas:
        "icon text close"
        "cta cta cta";
    gap: 8px 12px;
    align-items: start;
    padding: 12px 14px 14px;
    background: #111827;
    color: #fff;
    border-radius: 18px;
    box-shadow: 0 12px 32px rgba(17, 24, 39, 0.28);
}
.a2hs-bar__icon {
    grid-area: icon;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    object-fit: cover;
    background: #fff;
}
.a2hs-bar__text {
    grid-area: text;
    min-width: 0;
}
.a2hs-bar__title {
    margin: 0 0 4px;
    font-size: 14px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.02em;
}
.a2hs-bar__body p,
.a2hs-lead {
    margin: 0;
    font-size: 12px;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.78);
}
.a2hs-steps {
    margin: 0;
    padding-left: 18px;
    font-size: 12px;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.78);
}
.a2hs-steps strong {
    color: #fff;
}
.a2hs-bar__close {
    grid-area: close;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}
.a2hs-bar__cta {
    grid-area: cta;
    height: 40px;
    border: 0;
    border-radius: 12px;
    background: #d32f2f;
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
}
.a2hs-bar__cta[hidden] {
    display: none !important;
}
#a2hs-profile-btn {
    margin-bottom: 10px;
}
@media (min-width: 481px) {
    .a2hs-bar {
        display: none !important;
    }
}
@media (display-mode: standalone), (display-mode: fullscreen) {
    .a2hs-bar,
    #a2hs-profile-btn {
        display: none !important;
    }
}
