/* ==========================================================================
   pooja.online — design system
   "Dawn at the temple": warm, quiet, unhurried. Parchment over white, one
   confident accent, typography carrying the hierarchy.
   ========================================================================== */

/* ------------------------------------------------------------------ tokens */

:root {
    /* surfaces — warm, never pure white */
    --bg:            #FAF7F2;
    --surface:       #FFFDFA;
    --surface-sunk:  #F4EFE7;
    --line:          #E9E1D6;
    --line-strong:   #DBD0C0;

    /* ink */
    --ink:           #1F1B17;
    --ink-2:         #57504A;
    --ink-3:         #8B8178;

    /* accent — burnt saffron, not neon orange */
    --accent:        #B4531B;
    --accent-hover:  #97430F;
    --accent-tint:   #F6EADD;
    --accent-line:   #E3CDB4;
    --on-accent:     #FFFFFF;

    /* semantic */
    --done:          #4A7C59;
    --done-tint:     #E9F1EA;
    --warn:          #9B2C42;
    --warn-tint:     #F9E9EB;

    /* type */
    --font-display: 'Tiro Devanagari Marathi', 'Noto Serif Devanagari', Georgia, serif;
    --font-body:    'Noto Sans Devanagari', 'Segoe UI', system-ui, sans-serif;
    --font-num:     'Tiro Devanagari Marathi', Georgia, serif;

    /* rhythm */
    --measure:      41rem;      /* comfortable reading column */
    --gutter:       clamp(1.15rem, 4.5vw, 2rem);
    --radius:       14px;
    --radius-lg:    20px;

    /* elevation — barely there */
    --shadow-sm:  0 1px 2px rgba(31, 27, 23, .04),  0 1px 1px rgba(31, 27, 23, .03);
    --shadow-md:  0 4px 16px rgba(31, 27, 23, .06), 0 1px 3px rgba(31, 27, 23, .04);
    --shadow-lg:  0 12px 40px rgba(31, 27, 23, .10);

    --ease:      cubic-bezier(.22, .61, .36, 1);
    --dur:       .28s;
}

body.theme-lakshmi {
    --accent:       #9B2C42;
    --accent-hover: #822034;
    --accent-tint:  #F8E8EB;
    --accent-line:  #E8C9CF;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg:           #14110F;
        --surface:      #1D1916;
        --surface-sunk: #241F1B;
        --line:         #2E2823;
        --line-strong:  #3D352E;

        --ink:          #F2EDE6;
        --ink-2:        #B5ABA1;
        --ink-3:        #857B72;

        --accent:       #E08B4C;
        --accent-hover: #EE9E63;
        --accent-tint:  #2A211A;
        --accent-line:  #4A3928;
        /* The accent lightens at night, so white text on it drops to about
           2.6:1. Ink on the accent is 6.5:1 here and 6.6:1 on the lakshmi
           pink, so one value covers both themes. */
        --on-accent:    #1F1B17;

        --done:         #7FB08D;
        --done-tint:    #1C2A20;
        --warn:         #E08196;
        --warn-tint:    #2C1B1F;

        --shadow-sm: 0 1px 2px rgba(0,0,0,.30);
        --shadow-md: 0 4px 16px rgba(0,0,0,.36);
        --shadow-lg: 0 12px 40px rgba(0,0,0,.48);
    }
    body.theme-lakshmi {
        --accent:       #E5859A;
        --accent-hover: #F09BAD;
        --accent-tint:  #2B1B1F;
        --accent-line:  #4C2E36;
    }
    /* photographs are lit for daylight; take the edge off at night */
    .pj-hero-media img { filter: brightness(.86) saturate(.94); }
}

/* -------------------------------------------------------------------- base */

*, *::before, *::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: clamp(1rem, .96rem + .22vw, 1.075rem);
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-wrap: break-word;
}

h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 400;
    line-height: 1.25;
    letter-spacing: -.01em;
    margin: 0;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--accent); text-underline-offset: .18em; text-decoration-thickness: 1px; }

img { max-width: 100%; height: auto; display: block; }

button { font: inherit; color: inherit; }

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 4px;
}

.pj-sr {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ------------------------------------------------------------------ layout */

.pj-wrap {
    max-width: var(--measure);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

/* -------------------------------------------------------------------- hero */

.pj-hero { position: relative; }

/* Heroes are pre-cropped to the deity (see tools/) because the original
   photographs have the pooja name lettered into their left third. */
.pj-hero-media {
    position: relative;
    aspect-ratio: 1 / 1;
    max-height: 62vh;
    overflow: hidden;
    background: var(--surface-sunk);
}
.pj-hero-media img {
    width: 100%; height: 100%;
    object-fit: cover;
    object-position: center 38%;
}
/* melt the photograph into the page instead of cutting it off */
.pj-hero-media::after {
    content: '';
    position: absolute; inset-inline: 0; bottom: -1px;
    height: 38%;
    background: linear-gradient(to bottom, transparent, var(--bg) 94%);
    pointer-events: none;
}

.pj-hero-body {
    position: relative;
    margin-top: -1rem;
    text-align: center;
    padding-bottom: .25rem;
}

.pj-eyebrow {
    font-size: .9rem;
    letter-spacing: .01em;
    color: var(--accent);
    margin: 0 0 .45rem;
    font-weight: 600;
}

.pj-title {
    font-size: clamp(1.8rem, 1.3rem + 2.3vw, 2.7rem);
    color: var(--ink);
    margin: 0;
}

.pj-ornament {
    display: block;
    margin: 1.1rem auto .25rem;
    width: 74px; height: 12px;
    color: var(--accent-line);
}

/* On a wide screen a full-bleed photo dwarfs the reading column, so it is
   contained and given a frame instead. */
/* No wide crop can clear the lettering, so on desktop the photograph becomes a
   framed square — an altar image above the title rather than a banner. */
@media (min-width: 46rem) {
    .pj-hero-media {
        max-width: 20rem;
        max-height: none;
        margin: 2.75rem auto 0;
        border-radius: var(--radius-lg);
        border: 1px solid var(--line);
        box-shadow: var(--shadow-md);
    }
    .pj-hero-media::after { display: none; }
    .pj-hero-body { margin-top: 1.6rem; }
}

/* ---------------------------------------------------------------- top rail */

.pj-rail {
    position: sticky;
    top: 0;
    z-index: 50;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    -webkit-backdrop-filter: saturate(1.4) blur(12px);
    backdrop-filter: saturate(1.4) blur(12px);
    border-bottom: 1px solid transparent;
    transition: border-color var(--dur) var(--ease);
}
.pj-rail.is-stuck { border-bottom-color: var(--line); }

/* the hairline progress meter sits flush at the very top of the viewport */
.pj-rail-progress {
    height: 2px;
    background: transparent;
}
.pj-rail-progress i {
    display: block; height: 100%;
    width: 0;
    background: var(--accent);
    transition: width .45s var(--ease);
}

.pj-rail-inner {
    max-width: var(--measure);
    margin-inline: auto;
    padding: .55rem var(--gutter);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.pj-rail-home {
    display: inline-flex;
    align-items: center;
    gap: .42rem;
    font-size: .875rem;
    color: var(--ink-2);
    text-decoration: none;
    padding: .3rem .1rem;
    transition: color var(--dur) var(--ease);
}
.pj-rail-home:hover { color: var(--accent); }
.pj-rail-home svg { width: 17px; height: 17px; flex: none; }

.pj-rail-count {
    font-size: .82rem;
    color: var(--ink-3);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* -------------------------------------------------------------------- main */

.pj-main { padding-block: 1.5rem 4rem; }

/* ------------------------------------------------------------------ notice */

.pj-notice {
    background: var(--accent-tint);
    border: 1px solid var(--accent-line);
    border-radius: var(--radius);
    padding: 1rem 1.15rem;
    margin-bottom: 2rem;
    font-size: .945rem;
    line-height: 1.7;
    color: var(--ink-2);
}
.pj-notice p { margin: 0; }

/* ----------------------------------------------------------------- section */

.pj-section {
    margin: 3rem 0 1.5rem;
    text-align: center;
}
.pj-section-line {
    display: flex; align-items: center; gap: 1rem;
    color: var(--line-strong);
}
.pj-section-line::before,
.pj-section-line::after {
    content: ''; flex: 1; height: 1px; background: currentColor;
}
.pj-section h2 {
    font-size: 1.16rem;
    color: var(--accent);
    line-height: 1.5;
}
.pj-section p { margin: 0; }

/* ------------------------------------------------------------------- steps */

.pj-step {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.3rem 1.35rem 1.35rem;
    margin-bottom: .85rem;
    box-shadow: var(--shadow-sm);
    scroll-margin-top: 84px;
    transition: box-shadow var(--dur) var(--ease),
                border-color var(--dur) var(--ease),
                transform var(--dur) var(--ease);
}

/* the numeral hangs like a manuscript folio mark */
.pj-step-num {
    font-family: var(--font-num);
    font-size: .95rem;
    color: var(--ink-3);
    font-variant-numeric: tabular-nums;
    display: block;
    margin-bottom: .4rem;
    transition: color var(--dur) var(--ease);
}
.pj-step.is-seen .pj-step-num { color: var(--accent); }

.pj-prose { font-size: 1.045rem; line-height: 1.78; }
.pj-prose b, .pj-prose strong { font-weight: 600; color: var(--ink); }
.pj-prose > p:last-child { margin-bottom: 0; }

.pj-figure { margin: 1rem 0 0; }
.pj-figure img { border-radius: 10px; border: 1px solid var(--line); }

@media (min-width: 34rem) {
    .pj-step { padding: 1.5rem 1.7rem 1.6rem 3.9rem; }
    .pj-step-num {
        position: absolute;
        left: 1.35rem; top: 1.55rem;
        margin: 0;
        font-size: 1rem;
    }
}

/* first-view reveal — calm, never bouncy */
@media (prefers-reduced-motion: no-preference) {
    .pj-step { opacity: 0; transform: translateY(10px); }
    .pj-step.is-revealed { opacity: 1; transform: none;
        transition: opacity .5s var(--ease), transform .5s var(--ease); }
}

/* ------------------------------------------------------------ audio player */

.pj-audio {
    display: flex;
    align-items: center;
    gap: .85rem;
    margin-top: 1.05rem;
    padding: .4rem .9rem .4rem .4rem;
    background: var(--surface-sunk);
    border-radius: 999px;
    transition: background var(--dur) var(--ease);
}
.pj-audio.is-playing { background: var(--accent-tint); }

.pj-audio-btn {
    flex: none;
    width: 42px; height: 42px;
    border-radius: 50%;
    border: none;
    background: var(--accent);
    color: var(--on-accent);
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: background var(--dur) var(--ease), transform .12s var(--ease);
}
.pj-audio-btn:hover  { background: var(--accent-hover); }
.pj-audio-btn:active { transform: scale(.94); }
.pj-audio-btn svg { width: 17px; height: 17px; }
.pj-audio-btn .pj-ico-pause { display: none; }
.pj-audio.is-playing .pj-ico-play  { display: none; }
.pj-audio.is-playing .pj-ico-pause { display: block; }

.pj-audio-track {
    flex: 1;
    height: 3px;
    background: var(--line-strong);
    border-radius: 999px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
}
.pj-audio-track i {
    display: block; height: 100%; width: 0;
    background: var(--accent);
    border-radius: 999px;
}
.pj-audio-time {
    flex: none;
    font-size: .78rem;
    color: var(--ink-3);
    font-variant-numeric: tabular-nums;
    min-width: 2.6em;
    text-align: right;
}
.pj-audio.is-loading .pj-audio-time { opacity: .5; }

/* --------------------------------------------------------------- callouts */

.pj-panel {
    display: none;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1rem 1.15rem;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow-sm);
}
.pj-panel.is-shown { display: block; }
.pj-panel-row {
    display: flex; align-items: center; gap: .9rem; flex-wrap: wrap;
}
.pj-panel-icon {
    flex: none; width: 38px; height: 38px;
    display: grid; place-items: center;
    border-radius: 10px;
    background: var(--accent-tint);
    color: var(--accent);
}
.pj-panel-icon svg { width: 19px; height: 19px; }
.pj-panel-text { flex: 1 1 13rem; min-width: 0; }
.pj-panel-title { font-weight: 600; font-size: .96rem; margin: 0 0 .12rem; }
.pj-panel-note  { font-size: .855rem; color: var(--ink-2); margin: 0; line-height: 1.6; }

.pj-offline.is-done   .pj-panel-icon { background: var(--done-tint); color: var(--done); }
.pj-offline.is-offline .pj-panel-icon { background: var(--warn-tint); color: var(--warn); }

/* ----------------------------------------------------------------- buttons */

.pj-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: .62rem 1.25rem;
    font-size: .92rem;
    font-weight: 600;
    line-height: 1.4;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: background var(--dur) var(--ease),
                border-color var(--dur) var(--ease),
                color var(--dur) var(--ease),
                transform .12s var(--ease);
}
.pj-btn:active { transform: scale(.98); }
.pj-btn svg { width: 16px; height: 16px; flex: none; }

.pj-btn-primary { background: var(--accent); color: var(--on-accent); }
.pj-btn-primary:hover { background: var(--accent-hover); }

.pj-btn-ghost {
    background: transparent;
    color: var(--ink-2);
    border-color: var(--line-strong);
}
.pj-btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.pj-btn-quiet {
    background: transparent;
    color: var(--ink-3);
    padding-inline: .5rem;
    font-weight: 500;
}
.pj-btn-quiet:hover { color: var(--accent); }

.pj-btn:disabled { opacity: .6; cursor: default; transform: none; }

.pj-btn-block { width: 100%; }

/* ------------------------------------------------------------------- modal */

.pj-modal {
    display: none;
    position: fixed; inset: 0;
    z-index: 200;
    background: rgba(20, 17, 15, .55);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    padding: var(--gutter);
}
.pj-modal.is-open { display: grid; place-items: center; }
.pj-modal-inner {
    background: var(--surface);
    width: min(46rem, 100%);
    max-height: 88vh;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
}
.pj-modal-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 1rem;
    padding: .8rem .8rem .8rem 1.25rem;
    border-bottom: 1px solid var(--line);
}
.pj-modal-head h2 { font-size: 1.05rem; }
.pj-modal-close {
    width: 34px; height: 34px;
    border: none; border-radius: 50%;
    background: var(--surface-sunk);
    color: var(--ink-2);
    cursor: pointer;
    display: grid; place-items: center;
}
.pj-modal-close:hover { background: var(--accent-tint); color: var(--accent); }
.pj-modal-close svg { width: 16px; height: 16px; }
.pj-modal iframe { width: 100%; flex: 1; min-height: 60vh; border: 0; background: var(--surface); }

/* ------------------------------------------------------------------ footer */

.pj-foot {
    border-top: 1px solid var(--line);
    padding-block: 2.5rem 3rem;
    margin-top: 1rem;
}
.pj-support {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 1.6rem 1.5rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
}
.pj-support h2 { font-size: 1.3rem; margin-bottom: .6rem; }
.pj-support p { color: var(--ink-2); font-size: .96rem; margin-bottom: 1.2rem; }

.pj-foot-links {
    display: flex; flex-wrap: wrap; gap: .5rem 1.4rem;
    justify-content: center;
    margin-top: 2rem;
    font-size: .83rem;
}
.pj-foot-links a { color: var(--ink-3); text-decoration: none; }
.pj-foot-links a:hover { color: var(--accent); }
.pj-colophon {
    text-align: center;
    color: var(--ink-3);
    font-size: .78rem;
    margin-top: 1rem;
}

/* ------------------------------------------------------------------ states */

.pj-state { padding: 5rem var(--gutter); text-align: center; color: var(--ink-2); }
.pj-spinner {
    width: 26px; height: 26px;
    margin: 0 auto 1rem;
    border: 2px solid var(--line-strong);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: pj-spin .8s linear infinite;
}
@keyframes pj-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
    .pj-spinner { animation-duration: 2s; }
    html { scroll-behavior: auto; }
}

/* ==========================================================================
   Landing page
   ========================================================================== */

.pj-lede {
    text-align: center;
    color: var(--ink-2);
    font-size: 1.06rem;
    margin: 0 auto 2.25rem;
    max-width: 34rem;
}

/* --- primary action list --- */

.pj-actions {
    display: grid;
    gap: .7rem;
    margin-bottom: 2.5rem;
}

.pj-action {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.05rem 1.15rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow-sm);
    transition: border-color var(--dur) var(--ease),
                box-shadow var(--dur) var(--ease),
                transform var(--dur) var(--ease);
}
.pj-action:hover {
    border-color: var(--accent-line);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}
.pj-action:active { transform: none; }

.pj-action-icon {
    flex: none;
    width: 44px; height: 44px;
    border-radius: 12px;
    display: grid; place-items: center;
    background: var(--accent-tint);
    color: var(--accent);
}
.pj-action-icon svg { width: 21px; height: 21px; }

.pj-action-text { flex: 1; min-width: 0; }
/* these are spans so the whole row can be one <a>; they must still stack */
.pj-action-title, .pj-action-note { display: block; }
.pj-action-title {
    font-family: var(--font-display);
    font-size: 1.16rem;
    line-height: 1.35;
    margin: 0 0 .1rem;
}
.pj-action-note { font-size: .87rem; color: var(--ink-3); margin: 0; line-height: 1.55; }

.pj-action-go { flex: none; color: var(--ink-3); transition: color var(--dur) var(--ease); }
.pj-action-go svg { width: 18px; height: 18px; }
.pj-action:hover .pj-action-go { color: var(--accent); }

/* the one you are meant to press */
.pj-action-lead {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--on-accent);
}
.pj-action-lead .pj-action-icon { background: rgba(255,255,255,.16); color: var(--on-accent); }
.pj-action-lead .pj-action-note { color: rgba(255,255,255,.82); }
.pj-action-lead .pj-action-go   { color: rgba(255,255,255,.72); }
.pj-action-lead:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.pj-action-lead:hover .pj-action-go { color: #fff; }

/* --- seasonal / coming-soon --- */

.pj-upcoming {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.15rem;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius);
    color: var(--ink-3);
}
.pj-upcoming-thumb {
    flex: none;
    width: 54px; height: 54px;
    border-radius: 10px;
    overflow: hidden;
    filter: grayscale(.7);
    opacity: .8;
}
.pj-upcoming-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pj-chip {
    display: inline-block;
    font-size: .74rem;
    font-weight: 600;
    padding: .18rem .6rem;
    border-radius: 999px;
    background: var(--surface-sunk);
    color: var(--ink-2);
    margin-top: .3rem;
}

/* --- prose block --- */

.pj-about {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.35rem 1.4rem;
    color: var(--ink-2);
    font-size: .97rem;
    margin-bottom: 1.25rem;
}
.pj-about h2 {
    font-size: 1.2rem;
    color: var(--ink);
    margin-bottom: .6rem;
}

/* --- share row --- */

.pj-share { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin-bottom: 2rem; }

/* ==========================================================================
   Checklist (saahitya)
   ========================================================================== */

.pj-check-head {
    position: sticky;
    top: 0;
    z-index: 40;
    background: color-mix(in srgb, var(--bg) 90%, transparent);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    padding: .75rem 0 .8rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--line);
}
.pj-check-row { display: flex; align-items: center; gap: .85rem; }
.pj-check-count { font-size: .85rem; color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.pj-check-track { flex: 1; height: 5px; background: var(--surface-sunk); border-radius: 999px; overflow: hidden; }
.pj-check-fill  { height: 100%; width: 0; background: var(--accent); border-radius: 999px; transition: width .35s var(--ease); }

.pj-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }

.pj-item {
    display: flex;
    align-items: flex-start;
    gap: .85rem;
    padding: .8rem 1rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    cursor: pointer;
    user-select: none;
    transition: background var(--dur) var(--ease),
                border-color var(--dur) var(--ease),
                opacity var(--dur) var(--ease);
}
.pj-item:hover { border-color: var(--accent-line); }

.pj-box {
    flex: none;
    width: 24px; height: 24px;
    margin-top: .1rem;
    border: 1.7px solid var(--line-strong);
    border-radius: 7px;
    display: grid; place-items: center;
    color: transparent;
    transition: background var(--dur) var(--ease),
                border-color var(--dur) var(--ease),
                color var(--dur) var(--ease);
}
.pj-box svg { width: 14px; height: 14px; }

.pj-item.is-checked { background: var(--done-tint); border-color: transparent; }
.pj-item.is-checked .pj-box { background: var(--done); border-color: var(--done); color: #fff; }
.pj-item.is-checked .pj-item-label { color: var(--ink-3); text-decoration: line-through; text-decoration-thickness: 1px; }

.pj-item-label { line-height: 1.6; }
.pj-item-note  { display: block; font-size: .84rem; color: var(--ink-3); margin-top: .1rem; }

.pj-group { margin: 1.9rem 0 .7rem; font-size: 1.05rem; color: var(--accent); }
.pj-group:first-of-type { margin-top: .5rem; }

/* ============================================================ update bar
   Shown only when a new version arrived while someone was mid-ritual, so it
   has to be genuinely ignorable: it sits above the thumb, not over the text,
   and it never steals focus. Everyone else is reloaded silently and never
   sees this at all. */

.pj-update {
    position: fixed;
    left: 50%;
    bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
    transform: translate(-50%, 140%);
    z-index: 300;

    display: flex;
    align-items: center;
    gap: .85rem;

    max-width: calc(100vw - 1.6rem);
    padding: .55rem .55rem .55rem 1.05rem;
    white-space: nowrap;

    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 999px;
    box-shadow: var(--shadow-lg);

    font-size: .92rem;
    color: var(--ink-2);

    transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
    opacity: 0;
}

.pj-update.is-in { transform: translate(-50%, 0); opacity: 1; }

/* on a very narrow phone the label gives way before the button does */
.pj-update > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

.pj-update-btn {
    flex: none;
    border: 0;
    border-radius: 999px;
    padding: .42rem 1rem;
    background: var(--accent);
    color: var(--on-accent);
    font: inherit;
    font-size: .9rem;
    cursor: pointer;
    transition: background var(--dur) var(--ease);
}

.pj-update-btn:hover { background: var(--accent-hover); }

@media (prefers-reduced-motion: reduce) {
    .pj-update { transition: opacity var(--dur) var(--ease); transform: translate(-50%, 0); }
}
