/*
 * Peekopals web app (app.peekopals.com). Colours follow the phone app's theme
 * (composeApp/.../design/theme/Color.kt): brand red for actions only, yellow for the coin accent.
 * Light and dark follow the device setting.
 */

/* the phone app's font, Noto Sans (composeApp font/notosans_*.ttf, cut down to Latin text, punctuation and ₹).
   Like the phone's typography: weight 500 draws the semibold file, 600 and above the bold file. */
@font-face {
    font-family: 'Noto Sans';
    font-style: normal;
    font-weight: 100 400;
    font-display: swap;
    src: url(/static/fonts/noto-sans-regular.woff) format('woff');
}
@font-face {
    font-family: 'Noto Sans';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url(/static/fonts/noto-sans-semibold.woff) format('woff');
}
@font-face {
    font-family: 'Noto Sans';
    font-style: normal;
    font-weight: 600 900;
    font-display: swap;
    src: url(/static/fonts/noto-sans-bold.woff) format('woff');
}

:root {
    color-scheme: light dark;
    --wa-font: 'Noto Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
    /* every text size and line height is multiplied by this: the phone's sizes on phone-width screens */
    --wa-text-scale: 1;
    /* the nav bar. web-app.js sets this to 0 while the soft keyboard is open, because the keys cover that bar */
    --wa-bottom-inset: env(safe-area-inset-bottom, 0px);
    /* the phone's Material colour roles (design/theme/Color.kt), light */
    --md-background: #FFFFFF;
    --md-on-background: #AAAAAA;
    --md-on-surface: #1B1A1A;
    --md-on-surface-variant: #534342;
    --md-primary: #BD0C23;
    --md-tertiary: #984061;
    --md-on-primary: #FFFFFF;
    --md-primary-container: #9E0418;
    --md-inverse-primary: #FFE8E8;
    --md-inverse-surface: #E4E4E4;
    --md-inverse-on-surface: #E5E5E5;
    --md-outline: #444444;
    --md-outline-variant: #E4CECC;
    --md-surface: #FFE7E7;
    --md-surface-container-lowest: #FFFFFF;
    --md-surface-container-low: #FFF5F5;
    --md-surface-container: #FFEFEF;
    --md-surface-container-high: #FFE7E7;
    --md-surface-container-highest: #FFDEDE;
    --md-tertiary-container: #FFF0F0;
    --md-secondary: #DBC826;
    --md-on-secondary: #0C0C0C;
    --md-secondary-container: #B8A504;
    --md-error: #BA1A1A;
    --md-error-container: #FFDAD6;
    --md-success: #15B119;
    /* the phone's successContainer / onSuccessContainer (Color.kt status colours) */
    --md-success-container: rgba(76, 175, 80, 0.10);
    --md-on-success-container: #005E04;
    /* the phone's InsightsColor (ticked tag boxes, the "All" tag face) and the white drawn on it */
    --md-insights: #07B70E;
    --md-on-insights: #FFFFFF;
    /* the phone's small elevation (2 dp): the send button and the tag panel */
    --wa-shadow-small: 0 1px 2px rgba(0, 0, 0, 0.3), 0 1px 3px 1px rgba(0, 0, 0, 0.15);
    /* the web app's names for them */
    --wa-background: var(--md-background);
    --wa-surface: var(--md-background);
    --wa-surface-sidebar: var(--md-background);
    --wa-surface-raised: var(--md-tertiary-container);
    --wa-surface-hover: var(--md-surface-container-high);
    --wa-thread-background: var(--md-background);
    --wa-border: var(--md-outline-variant);
    --wa-hairline: color-mix(in srgb, var(--md-outline-variant) 40%, transparent);
    --wa-text: var(--md-on-surface);
    --wa-text-muted: var(--md-on-surface-variant);
    --wa-primary: var(--md-primary);
    --wa-on-primary: var(--md-on-primary);
    --wa-primary-soft: var(--md-inverse-primary);
    --wa-link: #A80A1F;
    --wa-secondary: var(--md-secondary);
    --wa-on-secondary: var(--md-on-secondary);
    /* chat bubbles like the phone: yours neutral grey, the pal's soft pink (dark: deep red) */
    --wa-user-bubble: var(--md-inverse-surface);
    --wa-on-user-bubble: var(--md-on-surface);
    --wa-pal-bubble: var(--md-inverse-primary);
    --wa-on-pal-bubble: var(--md-on-surface);
    --wa-shadow: 0 1px 2px rgba(60, 10, 10, 0.08), 0 6px 20px rgba(60, 10, 10, 0.06);
    --wa-radius-small: 10px;
    --wa-radius: 16px;
    --wa-radius-large: 22px;
    --wa-focus-ring: 0 0 0 3px rgba(189, 12, 35, 0.35);
    /* the phone's scrim (black 60% in both themes) and the white it draws text in on top of photos */
    --md-scrim: rgba(0, 0, 0, 0.6);
    --wa-on-photo: #FFFFFF;
    /* the phone's DrawLogo tile: md_theme_dark_background in both themes */
    --wa-logo-tile-background: #1B1A1A;
    /* the invite card the share button draws: the phone's light palette in both themes (ShareCardBrandTheme) */
    --wa-share-card-top: #FFEFEF;
    --wa-share-card-bottom: #FFE7E7;
    --wa-share-card-coupon: #FFFFFF;
    --wa-share-card-outline: #E4CECC;
    --wa-share-card-text: #1B1A1A;
    --wa-share-card-muted-text: #534342;
    --wa-share-card-stripe: #DBC826;
}

/* dark: follows the device, unless the theme picker chose light; or forced by the theme picker */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --md-background: #1B1A1A;
        --md-on-background: #555555;
        --md-on-surface: #FFFFFF;
        --md-on-surface-variant: #D8C2C0;
        --md-primary-container: #E83D53;
        --md-tertiary: #F5E6EB;
        --md-inverse-primary: #311D1D;
        --md-inverse-surface: #383838;
        --md-inverse-on-surface: #2B2A2A;
        --md-outline: #E6E6E6;
        --md-outline-variant: #524947;
        --md-surface: #341010;
        --md-surface-container-lowest: #1B0808;
        --md-surface-container-low: #261010;
        --md-surface-container: #2E1212;
        --md-surface-container-high: #3D1818;
        --md-surface-container-highest: #4A2020;
        --md-tertiary-container: #1E0A0A;
        --md-secondary-container: #F8E544;
        --md-error: #FFB4AB;
        --md-error-container: #280004;
        --md-success-container: rgba(102, 187, 106, 0.10);
        --md-on-success-container: #A5D6A7;
        --wa-pal-bubble: var(--md-surface-container-highest);
        --wa-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35);
        --wa-focus-ring: 0 0 0 3px rgba(255, 138, 149, 0.45);
        --wa-link: #FF8A95;
    }
}
:root[data-theme="dark"] {
    color-scheme: dark;
    --md-background: #1B1A1A;
    --md-on-background: #555555;
    --md-on-surface: #FFFFFF;
    --md-on-surface-variant: #D8C2C0;
    --md-primary-container: #E83D53;
    --md-tertiary: #F5E6EB;
    --md-inverse-primary: #311D1D;
    --md-inverse-surface: #383838;
    --md-inverse-on-surface: #2B2A2A;
    --md-outline: #E6E6E6;
    --md-outline-variant: #524947;
    --md-surface: #341010;
    --md-surface-container-lowest: #1B0808;
    --md-surface-container-low: #261010;
    --md-surface-container: #2E1212;
    --md-surface-container-high: #3D1818;
    --md-surface-container-highest: #4A2020;
    --md-tertiary-container: #1E0A0A;
    --md-secondary-container: #F8E544;
    --md-error: #FFB4AB;
    --md-error-container: #280004;
    --md-success-container: rgba(102, 187, 106, 0.10);
    --md-on-success-container: #A5D6A7;
    --wa-pal-bubble: var(--md-surface-container-highest);
    --wa-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35);
    --wa-focus-ring: 0 0 0 3px rgba(255, 138, 149, 0.45);
    --wa-link: #FF8A95;
}
:root[data-theme="light"] { color-scheme: light; }

/* the theme picker (web-app-theme.js): a chosen theme wins over the device setting */
:root[data-theme="dark"] {
    color-scheme: dark;
    --wa-background: #141212;
    --wa-surface: #1B1A1A;
    --wa-surface-sidebar: #171515;
    --wa-surface-raised: #242121;
    --wa-surface-hover: #2A2424;
    --wa-thread-background: #121010;
    --wa-border: rgba(255, 255, 255, 0.08);
    --wa-text: #F4ECEB;
    --wa-text-muted: #A99797;
    --wa-primary-soft: #341010;
    --wa-link: #FF8A95;
    --wa-pal-bubble: #242121;
    --wa-on-pal-bubble: #F4ECEB;
    --wa-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35);
    --wa-focus-ring: 0 0 0 3px rgba(255, 138, 149, 0.45);
}
:root[data-theme="light"] { color-scheme: light; }

/* the theme picker (web-app-theme.js): a chosen theme wins over the device setting */
:root[data-theme="dark"] {
    color-scheme: dark;
    --wa-background: #141212;
    --wa-surface: #1B1A1A;
    --wa-surface-sidebar: #171515;
    --wa-surface-raised: #242121;
    --wa-surface-hover: #2A2424;
    --wa-thread-background: #121010;
    --wa-border: rgba(255, 255, 255, 0.08);
    --wa-text: #F4ECEB;
    --wa-text-muted: #A99797;
    --wa-primary-soft: #341010;
    --wa-link: #FF8A95;
    --wa-pal-bubble: #242121;
    --wa-on-pal-bubble: #F4ECEB;
    --wa-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35);
    --wa-focus-ring: 0 0 0 3px rgba(255, 138, 149, 0.45);
}
:root[data-theme="light"] { color-scheme: light; }

*, *::before, *::after { box-sizing: border-box; }

html, body { height: 100%; }

body.wa-body {
    margin: 0;
    background: var(--wa-background);
    color: var(--wa-text);
    font-family: var(--wa-font);
    font-size: calc(15px * var(--wa-text-scale, 1));
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
    overflow: hidden;
}

a { color: var(--wa-link); }

button { font: inherit; color: inherit; }

:focus-visible { outline: none; box-shadow: var(--wa-focus-ring); border-radius: var(--wa-radius-small); }

/* the text boxes that sit inside a field which shows the focus itself (the phone's outlined fields
   and cards): the global focus ring above would draw a pink rectangle around the bare box, which
   the phone does not have. The box is borderless; the card around it takes the focus. */
.wa-send-feedback-box:focus-visible,
.wa-comment-form .wa-comment-text:focus-visible,
.wa-thumbs-feedback-text:focus-visible,
.wa-call-feedback-words-text:focus-visible {
    outline: none;
    box-shadow: none;
}

.wa-visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.wa-icon { display: inline-flex; line-height: 0; }

/* "Take a photo" opens the camera on phones; on a computer it would just repeat "Choose a pic" */
@media (hover: hover) and (pointer: fine) {
    .wa-camera-only-on-phones { display: none !important; }
}

/* ==================== layout ==================== */

.wa-brand-link { text-decoration: none; color: inherit; }

.wa-logo-mark { display: inline-flex; align-items: center; gap: 10px; }
.wa-logo-mark-image { border-radius: 10px; display: block; }
.wa-logo-mark-word { font-weight: 700; font-size: calc(18px * var(--wa-text-scale, 1)); letter-spacing: -0.01em; }

.wa-icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: 0;
    background: transparent;
    color: var(--wa-text);
    cursor: pointer;
    text-decoration: none;
    flex: none;
}
.wa-icon-button:hover { background: var(--wa-surface-hover); }

.wa-coin-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--wa-secondary) 22%, transparent);
    color: var(--wa-text);
    font-weight: 700;
    font-size: calc(14px * var(--wa-text-scale, 1));
    font-variant-numeric: tabular-nums;
}
.wa-coin {
    display: inline-block;
    width: 1em;
    height: 1em;
    flex: none;
    border-radius: 999px;
    background: radial-gradient(circle at 35% 30%, #FFF6B8 0%, #F1D23A 45%, #C9A410 100%);
    box-shadow: inset 0 0 0 1.5px rgba(120, 90, 0, 0.35);
    vertical-align: -0.15em;
}
.wa-coin-price { display: inline-flex; align-items: baseline; gap: 4px; }
/* the number sets the price's baseline, so "Unlock {coin} 3" lines up with the words around it */
.wa-coin-price > .wa-coin { align-self: center; }

/* ==================== avatars ==================== */

.wa-avatar {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    border-radius: 999px;
    overflow: hidden;
    background: var(--wa-primary-soft);
    color: var(--wa-primary);
    font-weight: 700;
}
.wa-avatar::before { content: attr(data-initial); }
.wa-avatar-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.wa-avatar--medium { width: 50px; height: 50px; font-size: calc(20px * var(--wa-text-scale, 1)); }
.wa-avatar--small { width: 40px; height: 40px; font-size: calc(16px * var(--wa-text-scale, 1)); }
.wa-avatar--tiny { width: 28px; height: 28px; font-size: calc(12px * var(--wa-text-scale, 1)); }
.wa-avatar--large { width: 112px; height: 112px; font-size: calc(40px * var(--wa-text-scale, 1)); }

/* ==================== chat list ==================== */

/* The list scrolls inside .wa-tab-screen-scroller (the tab screen's scroller), never on its own:
   this element sits in .wa-tab-screen-body, a plain block, so a scroll container here can never
   scroll — and with overscroll-behavior: contain it swallowed the touch drag instead of letting
   it chain up to .wa-tab-screen-scroller, so a phone could not scroll the list down at all. */
.wa-chat-list {
    padding: 6px 8px 16px;
}

.wa-chat-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 10px;
    border-radius: var(--wa-radius);
    color: inherit;
    text-decoration: none;
}
.wa-chat-row:hover { background: var(--wa-surface-hover); }
.wa-chat-row--open { background: var(--wa-primary-soft); }

.wa-chat-row-text { flex: 1; min-width: 0; }
.wa-chat-row-top-line, .wa-chat-row-bottom-line {
    display: flex;
    align-items: baseline;
    gap: 8px;
}
.wa-chat-row-name {
    flex: 1;
    min-width: 0;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.wa-chat-row-time { font-size: calc(12px * var(--wa-text-scale, 1)); color: var(--wa-text-muted); flex: none; }
.wa-chat-row--unread .wa-chat-row-time { color: var(--wa-primary); font-weight: 700; }
.wa-chat-row-preview {
    flex: 1;
    min-width: 0;
    font-size: calc(14px * var(--wa-text-scale, 1));
    color: var(--wa-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.wa-chat-row--unread .wa-chat-row-preview { color: var(--wa-text); font-weight: 600; }
.wa-chat-row-typing { display: none; flex: 1; font-size: calc(14px * var(--wa-text-scale, 1)); color: var(--wa-primary); font-weight: 600; }
.wa-chat-row--typing .wa-chat-row-preview { display: none; }
.wa-chat-row--typing .wa-chat-row-typing { display: block; }

.wa-unread-badge {
    flex: none;
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    border-radius: 999px;
    background: var(--wa-primary);
    color: var(--wa-on-primary);
    font-size: calc(12px * var(--wa-text-scale, 1));
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ==================== empty states, buttons, cards ==================== */

/* centred in whatever holds it (the side margins: a plain column wider than 360 px kept it on the left) */
.wa-empty-state { max-width: 360px; margin-left: auto; margin-right: auto; text-align: center; }
.wa-empty-state-title { font-size: calc(20px * var(--wa-text-scale, 1)); font-weight: 700; margin: 0 0 6px; }
.wa-empty-state-body { margin: 0 0 18px; color: var(--wa-text-muted); }
/* with an icon it is the phone's DrawNoContentAvailable: 16 px around, the 56 px muted icon, TitleMedium,
   then BodyMedium; wide enough for the line to stay whole on wide screens, even lines when it wraps */
.wa-empty-state--with-icon { max-width: 480px; padding: 16px; }
.wa-empty-state-icon { display: flex; justify-content: center; margin-bottom: 16px; color: var(--md-on-surface-variant); }
.wa-empty-state-icon svg { width: 56px; height: 56px; }
.wa-empty-state--with-icon .wa-empty-state-title { margin: 0; color: var(--md-on-surface); font-size: calc(18px * var(--wa-text-scale, 1)); line-height: calc(24px * var(--wa-text-scale, 1)); font-weight: 400; text-wrap: balance; }
.wa-empty-state--with-icon .wa-empty-state-body { margin: 8px 0 18px; color: var(--md-on-surface-variant); font-size: calc(14px * var(--wa-text-scale, 1)); line-height: calc(20px * var(--wa-text-scale, 1)); text-wrap: balance; }
.wa-empty-state--with-icon .wa-empty-state-body:last-child { margin-bottom: 0; }

/* the phone's PrimaryButton / SecondaryButton: 48 tall, 12 px corners (shapes.large, not a pill),
   16 px medium label (labelLarge), 20 px icon 8 px before the words */
.wa-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 10px 18px;
    border-radius: 12px;
    border: 1px solid var(--wa-border);
    background: var(--wa-surface-raised);
    color: var(--wa-text);
    font-weight: 500;
    font-size: calc(16px * var(--wa-text-scale, 1));
    text-decoration: none;
    cursor: pointer;
    transition: filter 120ms ease, background 120ms ease, transform 120ms ease;
}
.wa-button:hover { filter: brightness(0.97); }
.wa-button:active { transform: scale(0.98); }
.wa-button:disabled, .wa-button[disabled] { opacity: 0.55; cursor: default; transform: none; }
.wa-button--primary { background: var(--wa-primary); border-color: var(--wa-primary); color: var(--wa-on-primary); }
.wa-button--primary:hover { filter: brightness(1.07); }
.wa-button--quiet { background: transparent; border-color: transparent; }
/* the phone's SmallSecondaryButton: 36 tall and, like Material's default, a pill */
.wa-button--small { min-height: 36px; padding: 6px 14px; font-size: calc(14px * var(--wa-text-scale, 1)); border-radius: 999px; }
.wa-button--danger { background: transparent; border-color: color-mix(in srgb, var(--wa-primary) 45%, transparent); color: var(--wa-primary); }
.wa-button--provider { width: 100%; min-height: 50px; font-size: calc(16px * var(--wa-text-scale, 1)); }
.wa-button--apple { background: #000; border-color: #000; color: #fff; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .wa-button--apple { background: #fff; border-color: #fff; color: #000; }
}
:root[data-theme="dark"] .wa-button--apple { background: #fff; border-color: #fff; color: #000; }
/* the phone's SmallPrimaryButton filled with the text colour: light on the dark theme, dark on the light one */
.wa-button--on-surface { background: var(--md-on-surface); border-color: var(--md-on-surface); color: var(--md-surface); }

.wa-centered-page {
    min-height: 100dvh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 16px 48px;
    gap: 24px;
    background:
        radial-gradient(1200px 500px at 50% -10%, color-mix(in srgb, var(--wa-primary) 14%, transparent), transparent 70%),
        var(--wa-background);
}
body.wa-body:has(.wa-centered-page) { overflow: auto; }

.wa-card {
    width: 100%;
    max-width: 440px;
    background: var(--wa-surface);
    border: 1px solid var(--wa-border);
    border-radius: var(--wa-radius-large);
    box-shadow: var(--wa-shadow);
    padding: 28px 24px;
}
.wa-card-title { font-size: calc(26px * var(--wa-text-scale, 1)); line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 10px; }
.wa-card-lead { margin: 0 0 22px; color: var(--wa-text-muted); }
.wa-sign-in-buttons { display: grid; gap: 12px; }
.wa-sign-in-status { min-height: 1.4em; margin: 16px 0 0; font-size: calc(14px * var(--wa-text-scale, 1)); color: var(--wa-text-muted); }
.wa-sign-in-status--error { color: var(--wa-primary); }
.wa-fine-print { font-size: calc(13px * var(--wa-text-scale, 1)); color: var(--wa-text-muted); margin: 14px 0 0; }

/* ==================== toasts ==================== */

.wa-toast-stack {
    position: fixed;
    left: 50%;
    bottom: max(24px, var(--wa-bottom-inset));
    transform: translateX(-50%);
    display: grid;
    gap: 8px;
    width: min(92vw, 420px);
    z-index: 50;
    pointer-events: none;
}
.wa-toast {
    margin: 0;
    padding: 12px 16px;
    border-radius: var(--wa-radius);
    background: var(--wa-text);
    color: var(--wa-background);
    box-shadow: var(--wa-shadow);
    font-size: calc(14px * var(--wa-text-scale, 1));
    pointer-events: auto;
    cursor: pointer;
    animation: wa-toast-in 180ms ease-out;
}
@keyframes wa-toast-in { from { opacity: 0; transform: translateY(8px); } }

/* the phone's in-app banner: under the top bar, centred, surface fill, primary-to-tertiary edge.
   Wide screens move it into the content column (the rail stays on the left); see the rail rules. */
.wa-in-app-banner-stack {
    position: fixed;
    z-index: 55;
    top: calc(64px + env(safe-area-inset-top, 0px));
    left: 0;
    right: 0;
    width: min(400px, calc(100% - 32px));
    margin-inline: auto;
    display: grid;
    gap: 8px;
    pointer-events: none;
}
.wa-in-app-banner {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin: 0;
    padding: 12px;
    overflow: hidden;
    border: 1px solid transparent;
    border-radius: 12px;
    color: var(--md-on-surface);
    font-weight: 400;
    text-decoration: none;
    background-color: var(--md-surface);
    background-image:
        linear-gradient(var(--md-surface), var(--md-surface)),
        linear-gradient(90deg, var(--md-primary), var(--md-tertiary));
    background-origin: border-box;
    background-clip: padding-box, border-box;
    pointer-events: auto;
    cursor: pointer;
    animation: wa-in-app-banner-in 300ms ease-out;
}
.wa-in-app-banner::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--md-primary), var(--md-tertiary));
}
.wa-in-app-banner-face {
    width: 32px;
    height: 32px;
    flex: none;
    border-radius: 999px;
    object-fit: cover;
}
.wa-in-app-banner-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.wa-in-app-banner-title {
    font-size: calc(16px * var(--wa-text-scale, 1));
    line-height: calc(20px * var(--wa-text-scale, 1));
    color: var(--md-on-surface);
}
.wa-in-app-banner-body {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    font-size: calc(12px * var(--wa-text-scale, 1));
    line-height: calc(16px * var(--wa-text-scale, 1));
    color: var(--md-on-surface-variant);
}
@keyframes wa-in-app-banner-in { from { opacity: 0; transform: translateY(-100%); } }

/* ==================== one chat ==================== */

.wa-thread-page {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: var(--wa-thread-background);
}

.wa-thread-header {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    padding-top: max(10px, env(safe-area-inset-top));
    background: var(--wa-surface);
    border-bottom: 1px solid var(--wa-border);
}
.wa-thread-header-pal {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    color: inherit;
    text-decoration: none;
    padding: 4px 6px;
    border-radius: var(--wa-radius);
}
.wa-thread-header-pal:hover { background: var(--wa-surface-hover); }
.wa-thread-header-text { display: flex; flex-direction: column; min-width: 0; }
.wa-thread-header-name { font-weight: 700; }
.wa-thread-header-subtitle {
    font-size: calc(13px * var(--wa-text-scale, 1));
    color: var(--wa-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.wa-thread-header-actions { display: flex; gap: 2px; }

.wa-thread-scroller {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    /* a vertical drag scrolls this thread. the page itself does not scroll (body is overflow hidden) */
    touch-action: pan-y;
    padding: 12px 0 8px;
}
.wa-thread {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-width: 820px;
    margin: 0 auto;
    padding: 0 14px;
}
.wa-thread-empty { text-align: center; color: var(--wa-text-muted); margin: 40px 0; }

.wa-load-older { display: flex; justify-content: center; padding: 12px 0; }

.wa-spinner {
    width: 18px;
    height: 18px;
    border-radius: 999px;
    border: 2px solid color-mix(in srgb, var(--wa-primary) 25%, transparent);
    border-top-color: var(--wa-primary);
    animation: wa-spin 800ms linear infinite;
    flex: none;
}
@keyframes wa-spin { to { transform: rotate(360deg); } }

.wa-day-separator { display: flex; justify-content: center; margin: 14px 0 8px; }
.wa-day-separator span {
    font-size: calc(12px * var(--wa-text-scale, 1));
    font-weight: 600;
    color: var(--wa-text-muted);
    background: var(--wa-surface);
    border: 1px solid var(--wa-border);
    padding: 4px 12px;
    border-radius: 999px;
}

.wa-message { display: flex; flex-direction: column; max-width: min(78%, 560px); }
.wa-message--from-user { align-self: flex-end; align-items: flex-end; }
.wa-message--from-pal { align-self: flex-start; align-items: flex-start; }

.wa-bubble {
    position: relative;
    padding: 8px 12px 6px;
    border-radius: 18px;
    background: var(--wa-pal-bubble);
    color: var(--wa-on-pal-bubble);
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
    overflow-wrap: anywhere;
}
.wa-message--from-pal .wa-bubble { border-bottom-left-radius: 6px; border: 1px solid var(--wa-hairline); }
.wa-message--from-user .wa-bubble {
    background: var(--wa-user-bubble);
    color: var(--wa-on-user-bubble);
    border: 1px solid var(--wa-hairline);
    border-bottom-right-radius: 6px;
}
.wa-message--from-user .wa-bubble a { color: inherit; }
.wa-bubble-text { white-space: normal; }
.wa-bubble-meta {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
    font-size: calc(11px * var(--wa-text-scale, 1));
    opacity: 0.7;
}
/* the phone's send checks: one (Check) when sent, two (DoneAll) when read, an invisible one otherwise */
.wa-ticks { display: inline-flex; align-items: center; color: var(--md-on-surface-variant); }
.wa-tick-icon { display: none; }
.wa-ticks--sent .wa-tick-icon--single,
.wa-ticks--read .wa-tick-icon--double { display: block; }
.wa-ticks--sending .wa-tick-icon--single,
.wa-ticks--failed .wa-tick-icon--single { display: block; visibility: hidden; }

.wa-quote {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 2px 0 6px;
    padding: 6px 10px;
    border-left: 3px solid currentColor;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.06);
    font-size: calc(13px * var(--wa-text-scale, 1));
}
.wa-quote-author { font-weight: 700; }
/* the quoted photo or story sits on the right of the words, like the phone's quote */
.wa-quote:has(> .wa-quote-thumbnail) { flex-direction: row; align-items: center; gap: 8px; }
.wa-quote-words { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; text-align: left; }
.wa-quote-thumbnail { flex: none; width: 40px; height: 40px; border-radius: 8px; object-fit: cover; }
.wa-quote-thumbnail--story { width: 48px; height: 80px; }
.wa-quote-text { opacity: 0.85; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.wa-photo-link { display: block; margin: 2px -8px 6px; }
.wa-photo {
    display: block;
    width: 100%;
    max-width: 320px;
    max-height: 420px;
    object-fit: cover;
    border-radius: 14px;
    background: var(--wa-surface-hover);
}
.wa-bubble-gif { display: block; max-width: 240px; border-radius: 12px; margin-bottom: 4px; }
.wa-bubble-hint { margin: 4px 0 0; font-size: calc(13px * var(--wa-text-scale, 1)); opacity: 0.75; font-style: italic; }
.wa-call-entry { display: flex; align-items: center; gap: 8px; margin: 2px 0; font-weight: 600; }
.wa-gift { display: flex; align-items: center; gap: 10px; }
.wa-gift-icon { width: 48px; height: 48px; object-fit: contain; }

.wa-media-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 260px;
    max-width: 100%;
    min-height: 220px;
    margin: 2px -4px 6px;
    padding: 18px;
    border-radius: 14px;
    text-align: center;
    background:
        radial-gradient(circle at 30% 20%, color-mix(in srgb, var(--wa-primary) 35%, transparent), transparent 60%),
        radial-gradient(circle at 75% 80%, color-mix(in srgb, var(--wa-secondary) 40%, transparent), transparent 55%),
        var(--wa-surface-hover);
}
.wa-media-card p { margin: 0; }
.wa-media-card--voice { min-height: 120px; }
.wa-media-card-lock {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.75);
    color: #2A1A1A;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.wa-media-card-title { font-weight: 700; }
.wa-media-card--working { gap: 12px; }
.wa-media-card--refused { gap: 6px; padding: 18px; text-align: center; font-size: calc(14px * var(--wa-text-scale, 1)); }
.wa-retry {
    margin-left: 6px;
    padding: 2px 8px;
    border: 0;
    border-radius: 999px;
    background: var(--wa-primary-soft);
    color: var(--wa-primary);
    font: inherit;
    font-size: calc(12px * var(--wa-text-scale, 1));
    font-weight: 700;
    cursor: pointer;
}
.wa-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--wa-primary-soft);
    color: var(--wa-text);
    font-size: calc(12px * var(--wa-text-scale, 1));
    font-weight: 700;
}
/* a photo flagged as sensitive stays blurred for good, with no way to open it (as on the phone) */
.wa-photo-sensitive { overflow: clip; border-radius: 14px; max-width: 320px; }
.wa-photo--sensitive { filter: blur(28px); transform: scale(1.1); pointer-events: none; user-select: none; }

.wa-voice-player { width: 260px; max-width: 100%; height: 40px; margin: 2px 0 4px; }
/* the phone's voice note player (VoiceNotePlayerChrome): onSurface disc with a background glyph,
   a 4px line on the button's midline, the length under it (web-app-voice-notes.js) */
.wa-voice-note-player { display: flex; align-items: center; gap: 8px; min-width: 0; width: 220px; max-width: 100%; }
.wa-voice-note-play-button {
    position: relative;
    width: 48px;
    height: 48px;
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: var(--md-on-surface);
    color: var(--md-background);
    cursor: pointer;
}
.wa-voice-note-play-button svg { width: 24px; height: 24px; fill: currentColor; stroke: none; }
.wa-voice-note-pause-icon, .wa-voice-note-loading { display: none !important; }
.wa-voice-note-player.is-playing .wa-voice-note-play-icon { display: none; }
.wa-voice-note-player.is-playing .wa-voice-note-pause-icon { display: inline-flex !important; }
.wa-voice-note-player.is-loading .wa-voice-note-play-icon,
.wa-voice-note-player.is-loading .wa-voice-note-pause-icon { display: none !important; }
.wa-voice-note-player.is-loading .wa-voice-note-loading { display: inline-block !important; width: 16px; height: 16px; border-color: color-mix(in srgb, currentColor 25%, transparent); border-top-color: currentColor; }
.wa-voice-note-track { position: relative; flex: 1; min-width: 0; height: 48px; }
.wa-voice-note-line {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 4px;
    margin-top: -2px;
    border-radius: 2px;
    overflow: hidden;
    background: color-mix(in srgb, var(--md-on-surface) 22%, transparent);
}
.wa-voice-note-line-fill { display: block; height: 100%; background: var(--md-on-surface); transform: scaleX(0); transform-origin: left center; }
.wa-voice-note-time { position: absolute; left: 0; bottom: 0; font-size: calc(12px * var(--wa-text-scale, 1)); line-height: calc(16px * var(--wa-text-scale, 1)); color: var(--md-on-surface-variant); font-variant-numeric: tabular-nums; }
/* a pal's voice note (the phone's VoiceNoteChatBubbleContent): their 48px face, then the player; a
   locked one keeps the same row with a "can't play" button that opens the unlock sheet (Anudeep, 2026-10-28) */
.wa-voice-note-row { display: flex; align-items: center; gap: 8px; width: 276px; max-width: 100%; min-width: 0; }
.wa-voice-note-row .wa-voice-note-player { flex: 1; width: auto; }
.wa-avatar--voice-note { width: 48px; height: 48px; flex: none; font-size: calc(18px * var(--wa-text-scale, 1)); }
.wa-voice-note-locked-button {
    width: 48px;
    height: 48px;
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: var(--md-on-surface);
    color: var(--md-background);
    cursor: pointer;
}
.wa-voice-note-locked-button svg { width: 24px; height: 24px; fill: currentColor; stroke: none; }
.wa-voice-transcript { font-size: calc(13px * var(--wa-text-scale, 1)); margin-top: 4px; }
.wa-voice-transcript summary { cursor: pointer; opacity: 0.85; }

/* reactions: chosen emoji always show; the rest appear when the bubble is hovered or tapped */
.wa-reactions { display: flex; gap: 4px; margin: 3px 4px 4px; min-height: 0; }
.wa-reactions:empty { display: none; }
.wa-reaction-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 26px;
    padding: 0 6px;
    border-radius: 999px;
    border: 1px solid var(--wa-border);
    background: var(--wa-surface);
    font-size: calc(14px * var(--wa-text-scale, 1));
    line-height: 1;
    cursor: pointer;
}
.wa-reaction-chip--chosen { background: var(--wa-primary-soft); border-color: color-mix(in srgb, var(--wa-primary) 40%, transparent); }
.wa-reaction-chip--static { cursor: default; }
.wa-reactions--picker .wa-reaction-chip:not(.wa-reaction-chip--chosen) { display: none; }
.wa-message:hover .wa-reactions--picker .wa-reaction-chip,
.wa-message:focus-within .wa-reactions--picker .wa-reaction-chip { display: inline-flex; }

.wa-typing-row {
    display: none;
    align-items: flex-end;
    gap: 8px;
    max-width: 820px;
    margin: 4px auto 0;
    padding: 0 14px;
}
.wa-typing-row--visible { display: flex; }
.wa-typing-bubble {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 18px;
    border-bottom-left-radius: 6px;
    background: var(--wa-pal-bubble);
    border: 1px solid var(--wa-border);
    color: var(--wa-text-muted);
    font-size: calc(13px * var(--wa-text-scale, 1));
}
.wa-typing-dots { display: inline-flex; gap: 4px; }
.wa-typing-dots span {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: var(--wa-text-muted);
    animation: wa-typing-bounce 1.2s infinite ease-in-out;
}
.wa-typing-dots span:nth-child(2) { animation-delay: 0.15s; }
.wa-typing-dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes wa-typing-bounce { 0%, 60%, 100% { transform: translateY(0); opacity: 0.5; } 30% { transform: translateY(-4px); opacity: 1; } }

.wa-composer {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 10px 12px;
    padding-bottom: max(10px, var(--wa-bottom-inset));
    background: var(--wa-surface);
    border-top: 1px solid var(--wa-border);
}
.wa-composer-text {
    flex: 1;
    min-height: 44px;
    max-height: 160px;
    resize: none;
    padding: 11px 16px;
    border-radius: 22px;
    border: 1px solid var(--wa-border);
    background: var(--wa-background);
    color: var(--wa-text);
    font: inherit;
    line-height: 1.4;
}
.wa-composer-text:focus { outline: none; box-shadow: var(--wa-focus-ring); }
.wa-composer-send {
    width: 44px;
    height: 44px;
    flex: none;
    border: 0;
    border-radius: 999px;
    background: var(--wa-primary);
    color: var(--wa-on-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.wa-composer-send:disabled { opacity: 0.6; }

/* ==================== dialogs and forms ==================== */

.wa-dialog-backdrop {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(20, 8, 8, 0.45);
    animation: wa-fade-in 140ms ease-out;
}
@keyframes wa-fade-in { from { opacity: 0; } }
.wa-dialog {
    width: 100%;
    max-width: 420px;
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    background: var(--wa-surface);
    border-radius: var(--wa-radius-large);
    box-shadow: var(--wa-shadow);
    padding: 22px 20px 18px;
}
.wa-dialog-title { margin: 0 0 14px; font-size: calc(20px * var(--wa-text-scale, 1)); }
.wa-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }

.wa-form-stack { display: grid; gap: 14px; }
.wa-choice-group { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; }
.wa-choice {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--wa-radius);
    border: 1px solid var(--wa-border);
    cursor: pointer;
}
.wa-choice:has(input:checked) { border-color: var(--wa-primary); background: var(--wa-primary-soft); }
.wa-choice--disabled { opacity: 0.55; cursor: not-allowed; }
.wa-choice input { accent-color: var(--wa-primary); width: 18px; height: 18px; }
.wa-choice-text { display: flex; flex-direction: column; }
.wa-choice-title { font-weight: 700; }
.wa-choice-subtitle { font-size: calc(13px * var(--wa-text-scale, 1)); color: var(--wa-text-muted); }
.wa-field { display: grid; gap: 6px; }
.wa-field-label { font-size: calc(14px * var(--wa-text-scale, 1)); font-weight: 600; }
.wa-input, .wa-select {
    width: 100%;
    min-height: 44px;
    padding: 10px 14px;
    border-radius: var(--wa-radius-small);
    border: 1px solid var(--wa-border);
    background: var(--wa-background);
    color: var(--wa-text);
    font: inherit;
}
.wa-input:focus, .wa-select:focus { outline: none; box-shadow: var(--wa-focus-ring); }
.wa-form-error { color: var(--wa-primary); font-size: calc(14px * var(--wa-text-scale, 1)); margin: 0; }
.wa-form-error:empty { display: none; }
.wa-choice-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.wa-inline-field { display: flex; gap: 8px; align-items: center; }
.wa-inline-field .wa-input { flex: 1; }
.wa-setting-form + .wa-setting-form { margin-top: 12px; }

/* ==================== simple pages (profile, diary, settings, onboarding) ==================== */

.wa-page {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    background: var(--wa-surface);
}
.wa-page-header {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    padding-top: max(10px, env(safe-area-inset-top));
    background: color-mix(in srgb, var(--wa-surface) 88%, transparent);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--wa-border);
}
.wa-page-title { margin: 0; font-size: calc(18px * var(--wa-text-scale, 1)); font-weight: 700; }
.wa-page-body { max-width: 720px; margin: 0 auto; padding: 20px 16px 48px; }
.wa-section { margin: 0 0 28px; }
.wa-section-title { font-size: calc(13px * var(--wa-text-scale, 1)); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--wa-text-muted); margin: 0 0 10px; }
.wa-panel {
    background: var(--wa-surface-raised);
    border: 1px solid var(--wa-border);
    border-radius: var(--wa-radius);
    padding: 16px;
}
.wa-panel + .wa-panel { margin-top: 12px; }
.wa-prose { white-space: pre-line; margin: 0; }
.wa-prose p { margin: 0 0 10px; }

.wa-profile-hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 8px 0 22px; }
.wa-profile-name { margin: 0; font-size: calc(26px * var(--wa-text-scale, 1)); letter-spacing: -0.02em; }
.wa-profile-subtitle { margin: 0; color: var(--wa-text-muted); }
.wa-profile-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 6px; }

.wa-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 14px; }
.wa-tab {
    flex: none;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--wa-border);
    background: transparent;
    font-weight: 600;
    font-size: calc(14px * var(--wa-text-scale, 1));
    cursor: pointer;
}
.wa-tab[aria-selected="true"] { background: var(--wa-primary); border-color: var(--wa-primary); color: var(--wa-on-primary); }

.wa-diary-list { display: grid; gap: 10px; }
.wa-diary-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--wa-radius);
    border: 1px solid var(--wa-border);
    background: var(--wa-surface-raised);
    color: inherit;
    text-decoration: none;
}
.wa-diary-row:hover { background: var(--wa-surface-hover); }
.wa-diary-row-text { flex: 1; min-width: 0; }
.wa-diary-row-title { font-weight: 700; display: block; }
.wa-diary-row-date { font-size: calc(13px * var(--wa-text-scale, 1)); color: var(--wa-text-muted); }
.wa-diary-page {
    background: #FFFDF6;
    color: #2D2416;
    border-radius: var(--wa-radius);
    padding: 22px 20px;
    box-shadow: var(--wa-shadow);
    line-height: 1.65;
}
.wa-diary-page + .wa-diary-page { margin-top: 16px; }
.wa-diary-page-title { margin: 0 0 10px; font-size: calc(18px * var(--wa-text-scale, 1)); }
.wa-locked-panel { text-align: center; display: grid; gap: 10px; justify-items: center; }

/* ==================== meta lines, setting rows, onboarding progress ==================== */

.wa-episode-meta { font-size: calc(12px * var(--wa-text-scale, 1)); font-weight: 700; letter-spacing: 0.04em; color: var(--wa-text-muted); margin: 0; }
.wa-page-body > .wa-profile-subtitle:first-child { margin-bottom: 18px; }

.wa-setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
}
.wa-setting-row + .wa-setting-row { border-top: 1px solid var(--wa-border); }
.wa-setting-row-text { display: flex; flex-direction: column; min-width: 0; }
.wa-setting-row-title { font-weight: 600; }
.wa-setting-row-subtitle { font-size: calc(13px * var(--wa-text-scale, 1)); color: var(--wa-text-muted); }
.wa-switch { position: relative; width: 46px; height: 28px; flex: none; }
.wa-switch input { appearance: none; margin: 0; width: 100%; height: 100%; border-radius: 999px; background: var(--wa-border); cursor: pointer; transition: background 140ms ease; }
.wa-switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 999px; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); transition: transform 140ms ease; }
.wa-switch input:checked { background: var(--wa-primary); }
.wa-switch input:checked::after { transform: translateX(18px); }

.wa-onboarding-progress { display: flex; gap: 6px; margin: 0 0 18px; }
.wa-onboarding-progress span { flex: 1; height: 4px; border-radius: 999px; background: var(--wa-border); }
.wa-onboarding-progress span.is-done { background: var(--wa-primary); }

/* ==================== badges, load more, comments, account extras ==================== */

/* the top bar's inbox bell and the tab badges */
.wa-icon-button--with-badge { position: relative; }
/* the phone's tab / bell count (FeedNewPostsBadge, PlatformFloatingIconBadge): a yellow secondary pill with
   onSecondary text in labelSmall, at least 18px round, a hairline ring in the background colour (Anudeep, 2026-10-28) */
.wa-icon-badge {
    position: absolute;
    top: 2px;
    right: 0;
    box-sizing: border-box;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 999px;
    border: 0.5px solid var(--md-background);
    background: var(--md-secondary);
    color: var(--md-on-secondary);
    font-size: 11px;
    font-weight: 500;
    line-height: 17px;
    text-align: center;
    pointer-events: none;
}
.wa-icon-badge:empty { display: none; }
.wa-icon-button--small { width: 32px; height: 32px; }
.wa-icon-button--small .wa-icon svg { width: 18px; height: 18px; }
.wa-page-header-end { margin-left: auto; }
.wa-load-more { display: flex; justify-content: center; padding: 12px 0; }
/* the "show older / more" button loads by itself when it comes into view, so it looks like the phone's
   spinner at the end of a list; its words stay for screen readers (Anudeep, 2026-10-28) */
.wa-load-more > .wa-button {
    width: 28px;
    height: 28px;
    min-height: 0;
    padding: 0;
    border-radius: 999px;
    border: 3px solid color-mix(in srgb, var(--md-on-surface) 20%, transparent);
    border-top-color: var(--md-on-surface);
    background: transparent;
    font-size: 0;
    color: transparent;
    animation: wa-load-more-spin 800ms linear infinite;
}
@keyframes wa-load-more-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .wa-load-more > .wa-button { animation: none; } }
.wa-count-badge {
    display: inline-flex;
    margin-left: 8px;
    padding: 0 8px;
    border-radius: 999px;
    background: var(--wa-primary-soft);
    color: var(--wa-primary);
    letter-spacing: 0;
}

.wa-button--wide { width: 100%; }
.wa-button[hidden], .wa-feedback-question[hidden] { display: none; }

.wa-dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.wa-dialog-header .wa-dialog-title { margin: 0; }
.wa-dialog--scrolling { max-height: 86dvh; }
/* layout/WebAppDialogs.kt: a title row and the dialog's padding inside the shared bottom sheet */
.wa-dialog--sheet > .wa-sheet-scroll { padding: 22px 20px 18px; }
.wa-dialog--sheet > .wa-sheet-handle + .wa-sheet-scroll { padding-top: 0; }
.wa-dialog--sheet .wa-dialog-header .wa-dialog-title { margin: 0; }
.wa-dialog-prompt { margin: 6px 0 10px; font-weight: 600; }
.wa-dialog-choice-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.wa-dialog-link-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; color: inherit; text-decoration: none; border-top: 1px solid var(--wa-border); }

/* comments */
.wa-comment-header { display: flex; align-items: center; gap: 8px; }
.wa-comment-author { display: inline-flex; align-items: center; gap: 8px; color: inherit; text-decoration: none; min-width: 0; }
.wa-comment-author-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wa-comment-time { font-size: calc(12px * var(--wa-text-scale, 1)); color: var(--wa-text-muted); flex: none; }
.wa-comment-time::before { content: "·"; margin-right: 6px; }
.wa-comment-actions { margin-left: auto; display: flex; gap: 2px; }
.wa-comment-list { display: grid; gap: 4px; }
/* "No comments yet": the page body already keeps the phone's 16 px at the sides */
.wa-comments-empty .wa-empty-state { padding-left: 0; padding-right: 0; }
.wa-comment { padding: 10px 0; border-bottom: 1px solid var(--wa-border); }
.wa-comment-body { margin: 4px 0 0 36px; white-space: pre-line; overflow-wrap: anywhere; }
.wa-mention { font-weight: 700; color: var(--wa-link); text-decoration: none; }
.wa-comments-page { display: flex; flex-direction: column; }
.wa-comments-page > .wa-page-body { flex: 1; width: 100%; }
/*
 * The comment bar: the phone's CommentInputBar (home/episodeDetail/CommentInputBar.kt) and its @ tag
 * panel (design/publicComposables/CharacterMentionInput.kt), behaviour in web-app-comment-bar.js.
 * Sizes are the phone's dp as px; text is BodyLarge (16/24), the row names TitleSmall Medium (16/20).
 */
.wa-comment-form-dock {
    position: sticky;
    bottom: 0;
    /* above the page header, so the tag panel may cover it like on the phone */
    z-index: 3;
    padding: 4px 6px;
    padding-bottom: max(4px, var(--wa-bottom-inset));
    background: var(--md-background);
}
/* the safe-area inset is the nav bar. the keyboard already covers that bar, so the inset would
   leave a gap under the comment box (web-app-chat.js adds this while the keyboard is open). */
.wa-comment-form-dock.is-above-keyboard {
    padding-bottom: 4px;
}
.wa-comment-form { max-width: 720px; margin: 0 auto; display: grid; gap: 4px; }
.wa-comment-bar { position: relative; display: flex; align-items: flex-end; gap: 6px; }
/* the text box: surfaceContainerHigh, 12 dp corners, 1 dp outlineVariant line; 56 px tall on one line
   (1 px line + 3 px + the 48 px row), the same height as the chat's message box */
.wa-comment-field {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: flex-start;
    gap: 6px;
    padding: 3px 6px;
    border: 1px solid var(--md-outline-variant);
    border-radius: 12px;
    background: var(--md-surface-container-high);
}
.wa-comment-field:focus-within { box-shadow: inset 0 0 0 1px var(--md-outline-variant); }
/* CharacterTagAtButton: a 48 dp successContainer circle with a bold TitleMedium "@" */
.wa-comment-tag-button {
    width: 48px;
    height: 48px;
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: var(--md-success-container);
    color: var(--md-on-success-container);
    font-family: var(--wa-font);
    font-size: calc(18px * var(--wa-text-scale, 1));
    line-height: calc(24px * var(--wa-text-scale, 1));
    font-weight: 700;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.wa-comment-tag-button:focus-visible { border-radius: 999px; }
.wa-comment-field-text { flex: 1; min-width: 0; min-height: 48px; display: flex; align-items: center; cursor: text; }
.wa-comment-text-stack { position: relative; display: block; width: 100%; }
/* the box and the coloured copy behind it must lay text out the same, letter for letter */
.wa-comment-form .wa-comment-text,
.wa-comment-text-colours {
    margin: 0;
    padding: 0;
    border: 0;
    font-family: var(--wa-font);
    font-size: calc(16px * var(--wa-text-scale, 1));
    font-weight: 400;
    line-height: calc(24px * var(--wa-text-scale, 1));
    letter-spacing: normal;
    word-spacing: normal;
    text-indent: 0;
    text-transform: none;
    text-align: start;
    white-space: pre-wrap;
    overflow-wrap: break-word;
    word-break: normal;
}
/* one line tall, growing with the text (web-app.js) up to the phone's 5 lines, then it scrolls without a bar */
.wa-comment-form .wa-comment-text {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: calc(24px * var(--wa-text-scale, 1));
    min-height: calc(24px * var(--wa-text-scale, 1));
    max-height: calc(120px * var(--wa-text-scale, 1));
    border-radius: 0;
    background: transparent;
    color: var(--md-on-surface);
    caret-color: var(--md-primary);
    resize: none;
    overflow-y: auto;
    scrollbar-width: none;
}
.wa-comment-form .wa-comment-text::-webkit-scrollbar { display: none; }
.wa-comment-form .wa-comment-text:focus,
.wa-comment-form .wa-comment-text:focus-visible { outline: none; box-shadow: none; }
.wa-comment-form .wa-comment-text::placeholder { color: var(--md-on-surface-variant); opacity: 1; }
.wa-comment-text-colours {
    position: absolute;
    inset: 0;
    display: none;
    overflow: hidden;
    color: var(--md-on-surface);
    pointer-events: none;
}
/* the script draws the coloured copy, then the box's own letters go see-through (the caret stays) */
.wa-comment-text-stack.is-showing-tag-colours .wa-comment-text-colours { display: block; }
.wa-comment-text-stack.is-showing-tag-colours .wa-comment-text { color: transparent; }
.wa-comment-text-stack.is-showing-tag-colours .wa-comment-text::selection {
    color: transparent;
    background: color-mix(in srgb, var(--md-primary) 24%, transparent);
}
/* a tag while typing: the phone's success green, semibold (a thin outline, so letters keep their width) */
.wa-comment-text-tag { color: var(--md-success); -webkit-text-stroke: 0.4px currentColor; }
/* the round send button: primary with a small shadow, or 12% onSurface and 85% size while the box is empty */
.wa-comment-send {
    width: 48px;
    height: 48px;
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: var(--md-primary);
    color: var(--md-on-primary);
    box-shadow: var(--wa-shadow-small);
    cursor: pointer;
    transition: transform 200ms ease;
}
.wa-comment-send .wa-icon svg { width: 20px; height: 20px; }
.wa-comment-send:disabled {
    background: color-mix(in srgb, var(--md-on-surface) 12%, transparent);
    color: color-mix(in srgb, var(--md-on-surface) 38%, transparent);
    box-shadow: none;
    transform: scale(0.85);
    cursor: default;
}
.wa-comment-send:focus-visible { border-radius: 999px; }

/* the @ tag panel (AnimatedCharacterTagPanel): 80% of the screen wide on phones (360px at most on wider
   screens), 30% of the window tall but never more than the room above the box; fades and grows up from the box */
.wa-comment-tag-panel {
    position: absolute;
    left: 0;
    bottom: calc(100% + 8px);
    z-index: 4;
    width: min(80vw, 360px);
    height: min(30vh, var(--wa-comment-tag-panel-room, 30vh));
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 0.5px solid var(--md-outline-variant);
    border-radius: 12px;
    background: var(--md-surface-container-high);
    box-shadow: var(--wa-shadow-small);
    visibility: hidden;
    opacity: 0;
    clip-path: inset(calc(100% + 12px) -12px -12px -12px);
    transition: opacity 220ms ease, clip-path 260ms cubic-bezier(0.2, 0, 0, 1), visibility 0s linear 260ms;
}
.wa-comment-tag-panel.is-open {
    visibility: visible;
    opacity: 1;
    clip-path: inset(-12px -12px -12px -12px);
    transition: opacity 220ms ease, clip-path 260ms cubic-bezier(0.2, 0, 0, 1), visibility 0s;
}
.wa-comment-tag-names { position: relative; flex: 1 1 auto; min-height: 0; display: flex; }
.wa-comment-tag-names[hidden] { display: none; }
.wa-comment-tag-names-scroller { flex: 1; min-width: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; }
.wa-comment-tag-names-scroller::-webkit-scrollbar { display: none; }
/* PersistentVerticalScrollbar: 4 dp, track outlineVariant at 40%, thumb onSurfaceVariant at 70% */
.wa-comment-tag-scrollbar {
    position: absolute;
    top: 4px;
    bottom: 4px;
    right: 4px;
    width: 4px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--md-outline-variant) 40%, transparent);
    pointer-events: none;
}
.wa-comment-tag-scrollbar[hidden] { display: none; }
.wa-comment-tag-scrollbar-thumb {
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: var(--wa-comment-tag-thumb-height, 16px);
    transform: translateY(var(--wa-comment-tag-thumb-offset, 0px));
    border-radius: 999px;
    background: color-mix(in srgb, var(--md-on-surface-variant) 70%, transparent);
}
.wa-comment-tag-everyone { flex: none; background: var(--md-surface-container-high); }
.wa-comment-tag-everyone[hidden] { display: none; }
/* CharacterTagSuggestionRow: face and first name (tap = tag and close), then the tick (tag without closing) */
.wa-comment-tag-row { position: relative; display: flex; align-items: center; gap: 6px; }
.wa-comment-tag-row[hidden] { display: none; }
/* the thin line between rows, 8 dp in from each side (also above the pinned "All") */
.wa-comment-tag-row:not(.is-first-shown)::before {
    content: "";
    position: absolute;
    top: 0;
    left: 8px;
    right: 8px;
    border-top: 0.5px solid var(--md-outline-variant);
}
.wa-comment-tag-pick {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px;
    border: 0;
    background: transparent;
    color: var(--md-on-surface);
    text-align: start;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.wa-comment-tag-pick:hover,
.wa-comment-tag-row.is-highlighted .wa-comment-tag-pick { background: color-mix(in srgb, var(--md-on-surface) 8%, transparent); }
.wa-comment-tag-name {
    flex: 1;
    min-width: 0;
    font-size: calc(16px * var(--wa-text-scale, 1));
    line-height: calc(20px * var(--wa-text-scale, 1));
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.wa-comment-tag-everyone-face {
    width: 36px;
    height: 36px;
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--md-insights);
    color: var(--md-on-insights);
}
.wa-comment-tag-everyone-face .wa-icon svg { width: 20px; height: 20px; }
/* CustomCheckbox: a 48 dp touch area around a 16 dp box with 6 dp corners; ticked = InsightsColor with a white check */
.wa-comment-tag-tick {
    width: 48px;
    height: 48px;
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.wa-comment-tag-tick-box {
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--md-outline);
    border-radius: 6px;
    color: transparent;
}
.wa-comment-tag-tick-box .wa-icon svg { width: 12px; height: 12px; }
.wa-comment-tag-tick[aria-checked="true"] .wa-comment-tag-tick-box { background: var(--md-insights); border-color: var(--md-insights); color: var(--md-on-insights); }
@media (prefers-reduced-motion: reduce) {
    .wa-comment-tag-panel { clip-path: none; transition: opacity 120ms ease, visibility 0s linear 120ms; }
    .wa-comment-tag-panel.is-open { clip-path: none; transition: opacity 120ms ease, visibility 0s; }
    .wa-comment-send { transition: none; }
}
.wa-who-reacted-list { display: grid; gap: 4px; margin-top: 8px; }
.wa-who-reacted-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.wa-who-reacted-emoji { margin-left: auto; font-size: calc(18px * var(--wa-text-scale, 1)); }
/* the who-reacted loading look: the real row's text, hidden under breathing grey bars (the phone's placeholder) */
.wa-loading-look-text {
    color: transparent;
    background: var(--md-surface-container-highest);
    border-radius: 999px;
    animation: wa-loading-look-pulse 1s linear infinite alternate;
}
.wa-who-reacted-row--loading .wa-avatar { border-radius: 50%; }
.wa-who-reacted-row--loading .wa-comment-time::before { visibility: hidden; }
@media (prefers-reduced-motion: reduce) {
    .wa-loading-look-text { animation: none; }
}

/* notifications */
/* the phone's empty inbox (DrawNoContentAvailable): the 56 px outlined bell, TitleMedium, then BodyMedium, centred */
.wa-notifications-empty { display: flex; flex-direction: column; align-items: center; padding: 16px; text-align: center; }
.wa-notifications-empty-icon { color: var(--md-on-surface-variant); }
.wa-notifications-empty-icon svg { width: 56px; height: 56px; }
.wa-notifications-empty-title { margin: 16px 0 0; color: var(--md-on-surface); font-size: calc(18px * var(--wa-text-scale, 1)); line-height: calc(24px * var(--wa-text-scale, 1)); }
.wa-notifications-empty-body { margin: 8px 0 0; color: var(--md-on-surface-variant); font-size: calc(14px * var(--wa-text-scale, 1)); line-height: calc(20px * var(--wa-text-scale, 1)); }
/* the phone's NotificationCard: full-width rows with a thin line above and below, tinted while unread */
.wa-notification-list { display: flex; flex-direction: column; }
.wa-notification-row {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-top: 1px solid var(--md-inverse-surface);
    border-bottom: 1px solid var(--md-inverse-surface);
    background: var(--md-background);
    color: var(--md-on-surface);
    text-decoration: none;
}
.wa-notification-row--unread {
    background: var(--md-inverse-primary);
    border-top-color: var(--md-outline-variant);
    border-bottom-color: var(--md-outline-variant);
}
.wa-notification-row:hover { filter: brightness(1.06); }
/* a 64 px rounded square photo, or the sender's first letter on yellow */
.wa-notification-picture {
    flex: none;
    width: 64px;
    height: 64px;
    border-radius: 12px;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--md-secondary);
    color: var(--md-on-secondary);
}
.wa-notification-picture img { width: 100%; height: 100%; object-fit: cover; }
.wa-notification-picture-letter { font-size: calc(18px * var(--wa-text-scale, 1)); font-weight: 600; }
.wa-notification-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
/* titleMedium, bold only while unread; bodyMedium on two fixed lines; labelSmall time */
.wa-notification-title {
    font-size: calc(18px * var(--wa-text-scale, 1));
    line-height: calc(24px * var(--wa-text-scale, 1));
    font-weight: 400;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.wa-notification-row--unread .wa-notification-title { font-weight: 700; }
.wa-notification-body {
    font-size: calc(14px * var(--wa-text-scale, 1));
    line-height: calc(20px * var(--wa-text-scale, 1));
    min-height: calc(40px * var(--wa-text-scale, 1));
    color: var(--md-on-surface-variant);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.wa-notification-time { font-size: calc(10px * var(--wa-text-scale, 1)); line-height: calc(16px * var(--wa-text-scale, 1)); color: var(--md-on-surface-variant); }
/* the unread dot's place is kept on every row so the kind-of-notification icons line up */
.wa-notification-unread-dot { flex: none; width: 8px; height: 8px; border-radius: 999px; background: transparent; }
.wa-notification-row--unread .wa-notification-unread-dot { background: var(--md-primary); }
.wa-notification-kind-icon { flex: none; color: var(--md-on-surface-variant); }
.wa-notification-kind-icon svg { width: 24px; height: 24px; }

/* invite and "Get more coins" */
/* the phone's ShareInviteCodeComposable, top to bottom (8 px, hero, 24 px, stats, 24 px, coupon, 16 px, benefit, 24 px, roster) */
.wa-invite-screen { display: flex; flex-direction: column; }
.wa-invite-page { flex: 1 0 auto; width: 100%; padding: 8px 16px 24px; }
/* CoinRewardHero: a 120 px coin in a 160 px halo of 18% yellow, then the headline (HeadlineLarge bold) 24 px under */
.wa-invite-hero { display: flex; flex-direction: column; align-items: center; text-align: center; }
.wa-invite-hero-halo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 160px;
    height: 160px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--md-secondary) 18%, transparent);
}
.wa-invite-hero-coin { width: 120px; height: 120px; display: block; cursor: pointer; }
.wa-invite-hero-title { margin: 24px 0 0; color: var(--md-on-surface); font-size: calc(30px * var(--wa-text-scale, 1)); line-height: calc(30px * var(--wa-text-scale, 1)); font-weight: 700; }
/* the "Get more coins" sheet uses the same hero */
.wa-sheet .wa-invite-hero { margin: 16px 0 8px; }
.wa-sheet .wa-invite-hero + .wa-invite-benefit { margin-top: 8px; }
/* MomentumBand: two tiles 12 px apart; friends on surfaceContainerHigh, coins earned on yellow with the coin */
.wa-invite-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 24px; }
.wa-invite-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 16px;
    border-radius: 16px;
    background: var(--md-surface-container-high);
    text-align: center;
}
.wa-invite-stat-number {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--md-on-surface);
    font-size: calc(24px * var(--wa-text-scale, 1));
    line-height: calc(32px * var(--wa-text-scale, 1));
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.wa-invite-stat-number img.wa-coin { width: 20px; height: 20px; }
.wa-invite-stat-label { color: var(--md-on-surface-variant); font-size: calc(12px * var(--wa-text-scale, 1)); line-height: calc(16px * var(--wa-text-scale, 1)); font-weight: 600; }
.wa-invite-stat--coins { background: var(--md-secondary); }
.wa-invite-stat--coins .wa-invite-stat-number,
.wa-invite-stat--coins .wa-invite-stat-label { color: var(--md-on-secondary); }
/* InviteCodeCoupon: surfaceContainerHigh, 20 px corners, hairline outline, the 6 px yellow stripe (120 px tall) on its left */
.wa-invite-coupon {
    display: flex;
    align-items: flex-start;
    margin-top: 24px;
    border-radius: 20px;
    border: 0.5px solid var(--md-outline-variant);
    background: var(--md-surface-container-high);
    overflow: hidden;
}
.wa-invite-coupon-stripe { flex: none; width: 6px; height: 120px; background: var(--md-secondary); }
.wa-invite-coupon-body { flex: 1; min-width: 0; padding: 24px; text-align: left; }
.wa-invite-coupon-label { margin: 0; color: var(--md-on-surface-variant); font-size: calc(10px * var(--wa-text-scale, 1)); line-height: calc(16px * var(--wa-text-scale, 1)); font-weight: 600; }
.wa-invite-coupon-code { margin: 12px 0 0; color: var(--md-on-surface); font-size: calc(24px * var(--wa-text-scale, 1)); line-height: calc(32px * var(--wa-text-scale, 1)); font-weight: 700; overflow-wrap: anywhere; }
.wa-invite-coupon-code--waiting { color: var(--md-on-surface-variant); }
/* the invite screen's placeholder while it loads: the code is a shimmering bar */
@keyframes wa-invite-code-shimmer {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}
.wa-invite-screen--loading .wa-invite-coupon-code--waiting {
    width: 5.5em;
    border-radius: 8px;
    color: transparent;
    background: linear-gradient(90deg, var(--md-surface-container-high) 25%, var(--md-surface-container-highest) 50%, var(--md-surface-container-high) 75%);
    background-size: 200% 100%;
    animation: wa-invite-code-shimmer 1.4s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
    .wa-invite-screen--loading .wa-invite-coupon-code--waiting { animation: none; }
}
/* the perforated tear line: 16 short hairline dashes, 6 px apart */
.wa-invite-coupon-perforation {
    display: block;
    height: 1px;
    margin-top: 20px;
    background: repeating-linear-gradient(to right, var(--md-outline-variant) 0 calc((100% - 90px) / 16), transparent calc((100% - 90px) / 16) calc((100% - 90px) / 16 + 6px));
}
.wa-invite-coupon-row { display: flex; align-items: center; gap: 8px; margin-top: 16px; }
/* CopyCodeAffordance: a quiet outlined pill filling the row, the copy icon then "Copy code" */
.wa-invite-copy-code {
    flex: 1;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid var(--md-outline-variant);
    background: transparent;
    color: var(--md-on-surface);
    font: inherit;
    font-size: calc(16px * var(--wa-text-scale, 1));
    line-height: calc(20px * var(--wa-text-scale, 1));
    font-weight: 600;
    cursor: pointer;
}
.wa-invite-copy-code:hover { background: color-mix(in srgb, var(--md-on-surface) 6%, transparent); }
.wa-invite-copy-code:disabled { opacity: 0.5; cursor: default; }
.wa-invite-copy-code .wa-icon { color: var(--md-on-surface-variant); }
.wa-invite-copy-code .wa-icon svg { width: 20px; height: 20px; }
/* RewardChip: a small yellow pill, the 16 px coin then the amount (LabelMedium bold, onSecondary) */
.wa-invite-reward-chip {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--md-secondary);
    color: var(--md-on-secondary);
    font-size: calc(12px * var(--wa-text-scale, 1));
    line-height: calc(16px * var(--wa-text-scale, 1));
    font-weight: 700;
    white-space: nowrap;
}
.wa-invite-reward-chip img.wa-coin { width: 16px; height: 16px; }
/* the benefit line (BodyMedium onSurfaceVariant, centred, the coin inline) 16 px under the coupon */
.wa-invite-benefit { margin: 16px 0 0; text-align: center; color: var(--md-on-surface-variant); font-size: calc(14px * var(--wa-text-scale, 1)); line-height: calc(20px * var(--wa-text-scale, 1)); }
/* InviteeRoster: "Friends who joined" (TitleLarge bold) with the yellow count, 16 px, then the card */
.wa-invitee-roster { margin-top: 24px; }
.wa-invitee-roster-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 0 0 16px;
    color: var(--md-on-surface);
    font-size: calc(22px * var(--wa-text-scale, 1));
    line-height: calc(28px * var(--wa-text-scale, 1));
    font-weight: 700;
}
.wa-invite-count-badge {
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--md-secondary);
    color: var(--md-on-secondary);
    font-size: calc(16px * var(--wa-text-scale, 1));
    line-height: calc(20px * var(--wa-text-scale, 1));
    font-weight: 700;
}
.wa-invite-roster-card { padding: 0 16px; border-radius: 16px; background: var(--md-inverse-on-surface); }
.wa-invitee-row { position: relative; display: flex; align-items: center; gap: 16px; padding: 12px 0; }
/* hairline separators inset to start under the names */
.wa-invitee-row + .wa-invitee-row::before {
    content: "";
    position: absolute;
    top: 0;
    left: 56px;
    right: 0;
    border-top: 0.5px solid var(--md-outline-variant);
}
.wa-invitee-initial {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: var(--md-secondary);
    color: var(--md-on-secondary);
    font-size: calc(18px * var(--wa-text-scale, 1));
    font-weight: 600;
}
.wa-invitee-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.wa-invitee-name { color: var(--md-on-surface); font-size: calc(14px * var(--wa-text-scale, 1)); line-height: calc(20px * var(--wa-text-scale, 1)); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-invitee-subline { color: var(--md-on-surface-variant); font-size: calc(10px * var(--wa-text-scale, 1)); line-height: calc(16px * var(--wa-text-scale, 1)); font-weight: 500; }
/* EmptyRosterCard: a muted 64 px coin disc, "Your first invite is worth 300 coins", the nudge */
.wa-invite-empty { display: flex; flex-direction: column; align-items: center; padding: 24px 16px; text-align: center; }
.wa-invite-empty-coin {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--md-secondary) 22%, transparent);
}
.wa-invite-empty-coin img.wa-coin { width: 20px; height: 20px; }
.wa-invite-empty-title { margin: 16px 0 0; color: var(--md-on-surface); font-size: calc(18px * var(--wa-text-scale, 1)); line-height: calc(24px * var(--wa-text-scale, 1)); font-weight: 600; }
.wa-invite-empty-body { margin: 8px 0 0; color: var(--md-on-surface-variant); font-size: calc(14px * var(--wa-text-scale, 1)); line-height: calc(20px * var(--wa-text-scale, 1)); }
/* the single red Share button, docked at the bottom (16 px all round), capped at 400 px like the phone's */
.wa-invite-bottom-bar {
    position: sticky;
    bottom: 0;
    padding: 16px;
    padding-bottom: max(16px, var(--wa-bottom-inset));
    background: var(--md-background);
}
.wa-invite-share-button { display: flex; max-width: 400px; margin: 0 auto; }
.wa-invite-share-button:disabled { opacity: 1; background: color-mix(in srgb, var(--md-primary) 40%, transparent); border-color: transparent; }
.wa-earn-list { display: grid; gap: 6px; margin: 4px 0 14px; }
.wa-earn-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wa-earn-row-amount { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; }

/* the pal's in-chat feedback ask (a bottom sheet) starts hidden (web-app.js shows it) */
.wa-dialog-backdrop[hidden], .wa-feedback-prompt-step[hidden] { display: none; }
.wa-feedback-prompt-header { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.wa-feedback-prompt p { margin: 0 0 14px; }

/* full screens: the phone's floating top bar with its title pill (settings screens: web-app-settings.css) */
/* no fade under the bar (the phone dropped its TopFadeGradient); only the status bar strip is solid */
.wa-floating-top-bar { justify-content: space-between; border-bottom: 0; background: linear-gradient(var(--wa-surface), var(--wa-surface)) top / 100% env(safe-area-inset-top, 0px) no-repeat; backdrop-filter: none; }
.wa-floating-top-bar::after { content: ""; width: 48px; flex: none; }
.wa-top-bar-title-pill { padding: 8px 18px; border-radius: 999px; background: var(--wa-surface-raised); box-shadow: var(--wa-shadow); font-size: calc(16px * var(--wa-text-scale, 1)); }
/* the phone's FloatingTopBar (Anudeep, 2026-10-28): the title pill sits in the middle at its own width
   (background fill, hairline outline, a long title ends in "…"), never stretched across the bar */
.wa-page-header.wa-floating-top-bar .wa-top-bar-title-pill {
    flex: 0 1 auto;
    min-width: 0;
    max-width: calc(100% - 128px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 8px 16px;
    background: var(--md-background);
    border: 1px solid var(--md-outline-variant);
    box-shadow: none;
}
/* every back (and action) button in a page header is the phone's round floating button: a filled
   circle with a hairline outline, so its touch area shows (Anudeep, 2026-10-28) */
.wa-page-header .wa-icon-button,
:is(a, button).wa-profile-icon-button,
:is(a, button).wa-profile-floating-back {
    width: 48px;
    height: 48px;
    flex: none;
    border: 1px solid var(--md-outline-variant);
    background: var(--md-background);
    color: var(--md-on-surface);
}
/* computers and wide screens: room to spare, so the title pill sits right after the back button on the
   left instead of in the middle (Anudeep, 2026-10-28); phones keep it centred like the app */
@media (min-width: 900px) {
    .wa-page-header.wa-floating-top-bar { justify-content: flex-start; gap: 12px; }
    .wa-page-header.wa-floating-top-bar::after { display: none; }
    .wa-page-header.wa-floating-top-bar .wa-page-header-end { margin-left: auto; }
}
.wa-page-header .wa-icon-button:hover,
:is(a, button).wa-profile-icon-button:hover,
:is(a, button).wa-profile-floating-back:hover { background: var(--md-surface-container-low); }
.wa-docked-action { position: sticky; bottom: 0; max-width: 720px; margin: 0 auto; padding: 12px 16px; padding-bottom: max(12px, var(--wa-bottom-inset)); background: linear-gradient(transparent, var(--wa-surface) 30%); }
/* the feedback screens: web-app-feedback.css */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}


/* ==================== app frame: the phone's screens, tabs and top bar ==================== */

/* the keys cover the nav bar, so every bottom inset that uses --wa-bottom-inset drops out.
   sheets appended to the body are pinned to the full screen; the cover lifts them onto the keys.
   a sheet inside the app already moves with the app, so it is not lifted again. */
html.wa-keyboard-open {
    --wa-bottom-inset: 0px;
}
html.wa-keyboard-open > body > .wa-sheet-backdrop,
html.wa-keyboard-open > body > .wa-profile-sheet-backdrop,
html.wa-keyboard-open > body > .wa-dialog-backdrop {
    bottom: var(--wa-keyboard-cover, 0px);
}
/* a phone screen is 100dvh, which stays the whole screen while the keys are up, so its bottom
   button sits behind them. 100% fills the page box the keyboard already shortened. */
@media (max-width: 899px) {
    html.wa-keyboard-open .wa-dialog-backdrop--full-screen-on-phones .wa-dialog {
        height: 100%;
        max-height: 100%;
    }
}

/* one column like the phone; on a large screen the tabs become a rail on the left */
.wa-app {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    background: var(--md-background);
}
.wa-screen {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: var(--md-background);
}
.wa-tab-screen-scroller {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    touch-action: pan-y;
}
.wa-tab-screen-body { max-width: 720px; margin: 0 auto; padding: 4px 0 24px; }

/* top bar: coin pill, logo, inbox (phone FloatingTopBar) */
.wa-top-bar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    padding-top: max(8px, env(safe-area-inset-top));
    background: var(--md-background);
}
.wa-top-bar-start { display: flex; justify-content: flex-start; }
.wa-top-bar-end { display: flex; justify-content: flex-end; }
.wa-top-bar-logo { display: inline-flex; border-radius: 12px; }
.wa-top-bar-logo img { border-radius: 10px; border: 1px solid var(--md-outline-variant); }
.wa-top-bar-inbox { position: relative; width: 48px; height: 48px; }
.wa-top-bar-inbox .wa-icon svg { width: 24px; height: 24px; }
.wa-top-bar-inbox .wa-icon-badge { top: 6px; right: 6px; }
/* a tab's count (the Feed tab's new posts) sits on the icon's top right, like the phone's tab badge */
.wa-tab-bar-item { position: relative; }
.wa-tab-bar-item .wa-icon-badge { top: 2px; right: auto; left: calc(50% + 6px); }
.wa-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--md-primary);
    color: var(--md-on-primary);
    font-size: calc(11px * var(--wa-text-scale, 1));
    font-weight: 700;
    line-height: calc(18px * var(--wa-text-scale, 1));
    text-align: center;
}

/* coin pill (phone CoinBalancePill): 48 high, soft fill, hairline outline, coin picture + balance */
button.wa-coin-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 48px;
    padding: 0 16px 0 12px;
    border-radius: 999px;
    border: 1px solid var(--md-outline-variant);
    background: var(--md-inverse-primary);
    color: var(--md-on-surface);
    font: inherit;
    font-weight: 700;
    font-size: calc(16px * var(--wa-text-scale, 1));
    font-variant-numeric: tabular-nums;
    cursor: pointer;
}
button.wa-coin-pill:hover { filter: brightness(0.97); }
img.wa-coin { width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.2em; display: inline-block; }
.wa-coin-pill img.wa-coin { width: 24px; height: 24px; }
/* a rise (web-app-coins.js): the pill grows to 1.2 on a bouncy spring, flashes the success green with white
   words and a green ring pulsing out, while the coin spins and the number rolls up; then it settles back */
button.wa-coin-pill {
    transition: transform 450ms cubic-bezier(0.34, 1.56, 0.64, 1), background-color 500ms ease, color 500ms ease;
}
button.wa-coin-pill.is-celebrating-coin-gain {
    transform: scale(1.2);
    background: var(--md-success);
    color: var(--md-on-primary);
    animation: wa-coin-pill-gain-ring 900ms cubic-bezier(0.4, 0, 0.2, 1) infinite;
}
@keyframes wa-coin-pill-gain-ring {
    from { box-shadow: 0 0 0 1px color-mix(in srgb, var(--md-success) 100%, transparent); }
    to { box-shadow: 0 0 0 14px color-mix(in srgb, var(--md-success) 0%, transparent); }
}
/* the odometer: one wheel per digit, each showing its digit and the next one below it */
.wa-coin-pill-rolling { display: inline-flex; }
.wa-coin-pill-wheel { display: inline-block; height: 1.25em; line-height: 1.25em; overflow: hidden; }
.wa-coin-pill-wheel-digits { display: flex; flex-direction: column; }
.wa-coin-pill-wheel-digits > span { display: block; height: 1.25em; text-align: center; }

/* bottom tab bar (phone HomeBottomNavigationBar): divider on top, onSurface active, 50% inactive */
.wa-tab-bar {
    display: flex;
    border-top: 1px solid var(--md-outline-variant);
    background: var(--md-background);
    padding: 4px 0;
    padding-bottom: max(4px, var(--wa-bottom-inset));
}
.wa-tab-bar-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 6px 0;
    border-radius: 16px;
    color: color-mix(in srgb, var(--md-on-surface) 50%, transparent);
    text-decoration: none;
    font-size: calc(11px * var(--wa-text-scale, 1));
    font-weight: 600;
}
.wa-tab-bar-item.is-selected { color: var(--md-on-surface); }
.wa-tab-bar-item .wa-icon svg { width: 24px; height: 24px; }
/* like the phone's bottom bar: the outlined icon, the filled one while the tab is selected (webAppTabBarIcon) */
.wa-tab-bar-icon .wa-tab-bar-icon-selected,
.wa-tab-bar-item.is-selected .wa-tab-bar-icon .wa-tab-bar-icon-unselected { display: none; }
.wa-tab-bar-item.is-selected .wa-tab-bar-icon .wa-tab-bar-icon-selected { display: block; }
/* the phone's HomeYouTabNavIcon: the photo at full strength (24 px), a 1.5 px ring inside it only while the tab is open */
.wa-tab-bar-photo { width: 24px; height: 24px; border-radius: 999px; object-fit: cover; }
.wa-tab-bar-item.is-selected .wa-tab-bar-photo { outline: 1.5px solid var(--md-on-surface); outline-offset: -1.5px; }
/* the rail's logo and Notifications row show on wide screens only; phones keep both in the top bar */
.wa-tab-bar .wa-tab-bar-logo,
.wa-tab-bar .wa-tab-bar-item--notifications { display: none; }

/* large screens: same screens; the tabs move to a rail on the left like X's left sidebar: the logo
   on top, then Chats, For you, Notifications and Me. Icons only up to 1099px wide, icon and label
   rows from 1100px, when there is room beside the chats list and the open chat (Anudeep, 2026-10-28).
   The rail is beside every screen, tab or not (a screen that isn't a tab has no top bar and starts
   at the top, and the window scrolls: web-app-screens.css) */
@media (min-width: 900px) {
    /* the whole app is one block centred in the window, like X's: every screen (tabs, chats, pal
       profile, settings...) sits in the same frame, empty space either side (Anudeep, 2026-10-28) */
    .wa-app { width: 100%; max-width: 1320px; margin: 0 auto; }
    /* the new-message card is centred in the content column, to the right of the 88px rail */
    .wa-in-app-banner-stack {
        left: max(88px, calc((100% - 1320px) / 2 + 88px));
        right: max(0px, calc((100% - 1320px) / 2));
        width: min(400px, calc(100% - 88px - 32px));
    }
    .wa-app[data-home-tab] {
        display: grid;
        grid-template-columns: 88px minmax(0, 1fr);
        grid-template-rows: auto minmax(0, 1fr);
    }
    /* the rail runs the full height on the left and the top bar starts beside it, so the coin pill
       sits in the content area instead of across the rail's edge (Anudeep, 2026-10-28) */
    .wa-app[data-home-tab] .wa-top-bar { grid-column: 2; grid-row: 1; }
    /* the logo and the bell live in the rail. The coin pill stays on the left. */
    .wa-app[data-home-tab] .wa-top-bar-logo,
    .wa-app[data-home-tab] .wa-top-bar-end { display: none; }
    .wa-app[data-home-tab] .wa-tab-bar {
        grid-column: 1;
        grid-row: 1 / -1;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        gap: 4px;
        padding: 8px 8px 16px;
        border-top: 0;
        border-right: 1px solid var(--md-outline-variant);
    }
    .wa-app[data-home-tab] .wa-screen { grid-column: 2; grid-row: 2; }
    .wa-tab-bar .wa-tab-bar-logo {
        display: inline-flex;
        padding: 8px;
        margin-bottom: 8px;
        border-radius: 999px;
    }
    .wa-tab-bar .wa-tab-bar-logo img { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--md-outline-variant); }
    /* the app name beside the logo shows only when the rail has room for labels (from 1100px) */
    .wa-tab-bar .wa-tab-bar-logo-word { display: none; }
    .wa-tab-bar .wa-tab-bar-item--notifications { display: flex; }
    /* each row: a round hover pill around the icon (and the label from 1100px), full-colour text, the open tab bold with a filled icon */
    .wa-tab-bar .wa-tab-bar-item {
        flex: none;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 20px;
        padding: 12px;
        border-radius: 999px;
        color: var(--md-on-surface);
        font-size: calc(18px * var(--wa-text-scale, 1));
        font-weight: 400;
        line-height: 1.2;
        white-space: nowrap;
    }
    .wa-tab-bar .wa-tab-bar-item:hover,
    .wa-tab-bar .wa-tab-bar-logo:hover { background: color-mix(in srgb, var(--md-on-surface) 8%, transparent); }
    .wa-tab-bar .wa-tab-bar-item.is-selected { font-weight: 700; }
    /* each label holds room for its bold self (a hidden bold copy), so the open tab turning bold never shifts anything */
    .wa-tab-bar .wa-tab-bar-label { display: inline-flex; flex-direction: column; }
    .wa-tab-bar .wa-tab-bar-label::after { content: attr(data-label); font-weight: 700; height: 0; overflow: hidden; visibility: hidden; pointer-events: none; }
    .wa-tab-bar .wa-tab-bar-item .wa-icon svg { width: 28px; height: 28px; }
    .wa-tab-bar .wa-tab-bar-photo { width: 28px; height: 28px; opacity: 1; }
    /* the unread count sits on the icon's top right corner */
    .wa-tab-bar .wa-tab-bar-item .wa-icon-badge { top: 4px; right: auto; left: 28px; }
    .wa-thread, .wa-composer-inner { max-width: 820px; }
    /* X's Post button under the tabs: a round "+" here, the word "Post" once the rail has labels */
    .wa-tab-bar .wa-tab-bar-post-button {
        display: inline-flex;
        flex: none;
        align-items: center;
        justify-content: center;
        width: 52px;
        height: 52px;
        margin-top: 12px;
        border-radius: 999px;
        background: var(--md-primary);
        color: var(--md-on-primary);
        box-shadow: var(--wa-shadow-small);
        font-size: calc(17px * var(--wa-text-scale, 1));
        font-weight: 700;
        text-decoration: none;
    }
    .wa-tab-bar .wa-tab-bar-post-button:hover { filter: brightness(1.08); }
    .wa-tab-bar .wa-tab-bar-post-button:focus-visible { outline: none; box-shadow: var(--wa-focus-ring); }
    .wa-tab-bar .wa-tab-bar-post-icon svg { width: 26px; height: 26px; }
    .wa-tab-bar .wa-tab-bar-post-label { display: none; }
}
/* phones: the Feed tab's floating "+" posts; the bottom tab bar has no Post button */
.wa-tab-bar-post-button { display: none; }
/* icons only: the labels stay for screen readers */
@media (min-width: 900px) and (max-width: 1099px) {
    .wa-tab-bar .wa-tab-bar-label {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }
}
/* room for X-style rows: icon and label, left-aligned, the hover pill hugging both */
@media (min-width: 1100px) {
    .wa-app[data-home-tab] { grid-template-columns: 260px minmax(0, 1fr); }
    /* the rail is 260px here, so the card recentres in the wider content column */
    .wa-in-app-banner-stack {
        left: max(260px, calc((100% - 1320px) / 2 + 260px));
        right: max(0px, calc((100% - 1320px) / 2));
        width: min(400px, calc(100% - 260px - 32px));
    }
    .wa-app[data-home-tab] .wa-tab-bar { align-items: flex-start; padding: 8px 12px 16px; }
    /* each row spans the rail's full width, so the whole row is the touch area whatever the label's length (Anudeep, 2026-10-28) */
    .wa-tab-bar .wa-tab-bar-item { align-self: stretch; box-sizing: border-box; justify-content: flex-start; padding: 12px 24px 12px 12px; }
    .wa-tab-bar .wa-tab-bar-logo { align-items: center; gap: 12px; padding: 8px 20px 8px 8px; color: var(--md-on-surface); text-decoration: none; }
    .wa-tab-bar .wa-tab-bar-logo-word { display: inline; font-size: calc(22px * var(--wa-text-scale, 1)); font-weight: 800; letter-spacing: -0.01em; }
    .wa-tab-bar .wa-tab-bar-post-button { align-self: stretch; width: auto; margin: 16px 8px 0 0; }
    .wa-tab-bar .wa-tab-bar-post-icon { display: none; }
    .wa-tab-bar .wa-tab-bar-post-label { display: inline; }
}

/* bottom sheets: web-app-bottom-sheets.css */

/* coins info sheet (phone CoinsInfoBottomSheet) */
/* the phone's DrawCrossIconButton, floating top-right like every web app sheet: inverseSurface circle, thin outline, 20 px cross */
.wa-coins-sheet-close {
    top: 16px;
    right: 16px;
    width: 48px;
    height: 48px;
    border-radius: 999px;
    background: var(--md-inverse-surface);
    border: 0.5px solid var(--md-outline-variant);
    color: var(--md-on-surface);
}
.wa-coins-sheet-close .wa-icon svg { width: 20px; height: 20px; }
/* the phone's CoinBalanceHeaderCard (its cross is the floating one above): one surfaceContainerLow card, 12 px corners,
   16 px inside, holding the coin on its glow and the balance in a row; it starts under the 48 px cross (16 + 48 + 8) */
.wa-coins-sheet-head {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 72px 24px 0;
    padding: 16px;
    border-radius: 12px;
    background: var(--md-surface-container-low);
}
/* a radial fade of the secondary gold (35% at its centre, gone at 70%) behind the coin; nothing is drawn on it, so no on-colour rule applies */
.wa-coins-sheet-coin-glow {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 88px;
    height: 88px;
    background: radial-gradient(circle, color-mix(in srgb, var(--md-secondary) 35%, transparent) 0%, transparent 70%);
}
.wa-coins-sheet-coin { width: 64px; height: 64px; cursor: pointer; }
.wa-coins-sheet-balance-text { flex: 1; min-width: 0; }
/* HeadlineLarge bold on one line, then the "coins" label in onSurfaceVariant */
.wa-coins-sheet-balance { margin: 0; font-size: calc(32px * var(--wa-text-scale, 1)); line-height: calc(40px * var(--wa-text-scale, 1)); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-coins-sheet-label { margin: 0; color: var(--md-on-surface-variant); }
/* wide screens: the phone's landscape header, a smaller coin on a smaller glow */
@media (min-width: 900px) {
    .wa-coins-sheet-coin-glow { width: 72px; height: 72px; }
    .wa-coins-sheet-coin { width: 48px; height: 48px; }
}
/* both tabs share one spot, so the sheet is as tall as the taller tab and keeps that height when you
   switch (Anudeep, 2026-10-28); the hidden tab still takes room but can't be seen, reached or read out */
#wa-coins-sheet .wa-sheet-scroll { display: grid; align-content: start; }
#wa-coins-sheet [data-web-tab-panel] { grid-area: 1 / 1; min-width: 0; }
#wa-coins-sheet [data-web-tab-panel][hidden] { display: block; visibility: hidden; }
/* every bottom sheet's and panel's ✕ looks like the phone's DrawCrossIconButton (48 px circle,
   inverseSurface fill, hairline outline, 20 px cross), so its touch area shows (Anudeep, 2026-10-28); the feed
   composer's Clear all is the same PlatformFloatingIconButton on the phone, so it shares the look;
   `button.` outranks each sheet's own class rule whatever order the stylesheets load in */
button.wa-sheet-close,
button.wa-pal-panel-close,
button.wa-pal-sheet-close,
button.wa-play-sheet-close,
button.wa-round-close-button,
button.wa-magic-close-button,
button.wa-feed-composer-visibility-clear-all {
    width: 48px;
    height: 48px;
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    /* the phone's borderHairline (0.5 dp) */
    border: 0.5px solid var(--md-outline-variant);
    background: var(--md-inverse-surface);
    color: var(--md-on-surface);
    cursor: pointer;
}
button.wa-sheet-close:hover,
button.wa-pal-panel-close:hover,
button.wa-pal-sheet-close:hover,
button.wa-play-sheet-close:hover,
button.wa-round-close-button:hover,
button.wa-magic-close-button:hover,
button.wa-feed-composer-visibility-clear-all:hover { background: var(--md-inverse-surface); filter: brightness(0.95); }
button.wa-sheet-close svg,
button.wa-pal-panel-close svg,
button.wa-pal-sheet-close svg,
button.wa-play-sheet-close svg,
button.wa-round-close-button svg,
button.wa-magic-close-button svg,
button.wa-feed-composer-visibility-clear-all svg { width: 20px; height: 20px; }
/* the pages: a sideways drag moves them with the finger (web-app-coins.js), so the browser only scrolls them up and down. They share
   one spot, so the sheet is as tall as the tallest page and keeps that height when you switch (Anudeep, 2026-10-28);
   a hidden page still takes room but can't be seen, reached or read out */
.wa-coins-pages { touch-action: pan-y; overflow-x: hidden; display: grid; align-content: start; }
.wa-coins-pages > [data-web-coins-sheet-page] { grid-area: 1 / 1; min-width: 0; }
.wa-coins-pages > [data-web-coins-sheet-page][hidden] { display: block; visibility: hidden; }
/* the phone's CoinSectionTabs: one surfaceContainerHigh pill, 4 px inside, the chosen tab onSurface with surface text;
   20 px under the header card, 16 px above the pages */
.wa-coins-tabs {
    display: flex;
    gap: 4px;
    margin: 20px 24px 16px;
    padding: 4px;
    border-radius: 999px;
    background: var(--md-surface-container-high);
}
.wa-coins-tab {
    flex: 1;
    padding: 10px 8px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--md-on-surface-variant);
    font-weight: 600;
    font-size: calc(12px * var(--wa-text-scale, 1));
    white-space: nowrap;
    cursor: pointer;
}
.wa-coins-tab.is-selected { background: var(--md-on-surface); color: var(--md-surface); }
/* the grouped card that holds one page's rows (the phone's CoinCatalogListCard): surfaceContainerLow, 12 px corners, no outline or shadow */
.wa-coins-card { border-radius: 12px; background: var(--md-surface-container-low); overflow: hidden; }
/* a hairline between rows, inset past the icon tile (16 + 40 + 12) so it starts under the row text (CoinCatalogRowDivider) */
.wa-coins-row-divider { height: 1px; margin-left: 68px; background: var(--md-outline-variant); }
/* one row (the phone's CoinCatalogRowLayout): the icon tile, the title (and its one-line subtitle), then the price pill */
.wa-coins-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--md-on-surface);
}
/* the icon tile: a 40 px surfaceContainerHigh square with 8 px corners and a 20 px outlined icon in onSurfaceVariant */
.wa-coins-row-icon {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--md-surface-container-high);
    color: var(--md-on-surface-variant);
}
.wa-coins-row-icon .wa-icon { display: inline-flex; }
.wa-coins-row-icon .wa-icon svg { width: 20px; height: 20px; }
.wa-coins-row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; text-align: left; }
/* BodyMedium at weight 500, then LabelSmall in onSurfaceVariant */
.wa-coins-row-title { font-size: calc(14px * var(--wa-text-scale, 1)); line-height: calc(20px * var(--wa-text-scale, 1)); font-weight: 500; color: var(--md-on-surface); }
.wa-coins-row-subtitle { font-size: calc(11px * var(--wa-text-scale, 1)); line-height: calc(16px * var(--wa-text-scale, 1)); color: var(--md-on-surface-variant); }
/* the price pill (CoinPricePill): surfaceContainerHighest, the 16 px coin first, then the amount in LabelMedium bold */
.wa-coins-amount {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--md-surface-container-highest);
    color: var(--md-on-surface);
    font-weight: 700;
    font-size: calc(12px * var(--wa-text-scale, 1));
    line-height: calc(16px * var(--wa-text-scale, 1));
    white-space: nowrap;
}
.wa-coins-amount img.wa-coin { width: 16px; height: 16px; }
/* a group row (SpendCatalogGroupRow) is a button the whole width: the same row with the phone's ⌄ 4 px after its price range,
   turned over while its price list is open; no tint of its own */
.wa-coins-group-row {
    width: 100%;
    border: 0;
    background: transparent;
    font: inherit;
    cursor: pointer;
}
.wa-coins-group-row:hover { background: color-mix(in srgb, var(--md-on-surface) 6%, transparent); }
.wa-coins-group-row:focus-visible { outline: none; box-shadow: inset var(--wa-focus-ring); }
.wa-coins-group-chevron { flex: none; display: inline-flex; color: var(--md-on-surface-variant); margin-left: -8px; transition: transform 250ms ease; }
.wa-coins-group-chevron svg { width: 20px; height: 20px; }
.wa-coins-group-row[aria-expanded="true"] .wa-coins-group-chevron { transform: rotate(180deg); }
/* the price list grows open under the row (0fr → 1fr) and fades in over 250 ms, like the phone's expandVertically + fadeIn */
.wa-coins-group-items {
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;
    transition: grid-template-rows 250ms ease, opacity 250ms ease;
}
.wa-coins-group-row[aria-expanded="true"] + .wa-coins-group-items { grid-template-rows: 1fr; opacity: 1; }
.wa-coins-group-items-clip { min-height: 0; overflow: hidden; }
/* the per-item prices on a darker inset block (surfaceContainerLowest), 8 px above and below */
.wa-coins-group-items-list { padding: 8px 0; background: var(--md-surface-container-lowest); }
/* one item: indented to the row text (68 px), its name in BodyMedium, "lasts N days" under it, the price pill at the end */
.wa-coins-group-item { display: flex; align-items: center; gap: 12px; padding: 10px 16px 10px 68px; }
.wa-coins-group-item-title { font-size: calc(14px * var(--wa-text-scale, 1)); line-height: calc(20px * var(--wa-text-scale, 1)); color: var(--md-on-surface); }
.wa-coins-note { margin: 12px 0 0; font-size: calc(13px * var(--wa-text-scale, 1)); color: var(--md-on-surface-variant); }
@media (prefers-reduced-motion: reduce) {
    .wa-coins-group-chevron, .wa-coins-group-items { transition: none; }
}
/* the pinned "Get more coins" bar, under a thin line, like the phone */
.wa-coins-sheet-bottom-bar {
    flex: none;
    padding: 16px 24px;
    padding-bottom: max(16px, var(--wa-bottom-inset));
    border-top: 1px solid var(--md-outline-variant);
    background: var(--md-background);
}

/* ==================== Me tab (phone MeComposable) ==================== */

/* the phone's ProfileHeader: a plain row, 16 px sides and 24 px above and below, the 64 px photo */
.wa-me-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px 16px;
    color: inherit;
    text-decoration: none;
}
.wa-me-header:hover { background: color-mix(in srgb, var(--md-on-surface) 6%, transparent); }
.wa-me-header:focus-visible { outline: none; box-shadow: inset var(--wa-focus-ring); }
.wa-me-header-photo { width: 64px; height: 64px; border-radius: 999px; object-fit: cover; flex: none; }
/* no photo: the phone's yellow letter tile (TitleLarge, semibold, onSecondary) */
.wa-me-header-photo--letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--md-secondary);
    color: var(--md-on-secondary);
    font-size: calc(22px * var(--wa-text-scale, 1));
    line-height: calc(28px * var(--wa-text-scale, 1));
    font-weight: 600;
}
.wa-me-header-text { min-width: 0; }
/* HeadlineSmall, then the email in BodySmall onSurfaceVariant 4 px under it */
.wa-me-header-name { margin: 0; font-size: calc(18px * var(--wa-text-scale, 1)); line-height: calc(24px * var(--wa-text-scale, 1)); font-weight: 500; }
.wa-me-header-subtitle { margin: 4px 0 0; color: var(--md-on-surface-variant); font-size: calc(12px * var(--wa-text-scale, 1)); line-height: calc(16px * var(--wa-text-scale, 1)); overflow-wrap: anywhere; }
/* the phone's IosStyleMenuCard: surfaceContainerHigh, 16 px corners, rows darken a step on hover */
.wa-menu-group {
    margin: 0 16px 16px;
    border-radius: 16px;
    background: var(--md-surface-container-high);
    overflow: hidden;
}
.wa-menu-row {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 52px;
    padding: 0 16px;
    color: var(--md-on-surface);
    text-decoration: none;
    background: transparent;
    border: 0;
    width: 100%;
    font: inherit;
    text-align: left;
    cursor: pointer;
}
.wa-menu-row:hover { background: var(--md-surface-container-highest); }
.wa-menu-row + .wa-menu-row { border-top: 1px solid var(--wa-hairline); }
.wa-menu-row-label { flex: 1; font-size: calc(15px * var(--wa-text-scale, 1)); }
.wa-menu-row-chevron { color: var(--md-on-surface-variant); }
/* the Me card's rows (IosStyleMenuRow): 14 px above and below, the 24 px icon, 16 px, the BodyLarge label,
   the 20 px chevron; IosStyleMenuRowDivider: a hairline that starts under the label (16 + 24 + 16 px) */
.wa-me-menu-card { margin: 24px 16px 0; }
.wa-me-menu-card .wa-menu-row { position: relative; min-height: 0; gap: 16px; padding: 14px 16px; }
.wa-me-menu-card .wa-menu-row + .wa-menu-row { border-top: 0; }
.wa-me-menu-card .wa-menu-row + .wa-menu-row::before {
    content: "";
    position: absolute;
    top: 0;
    left: 56px;
    right: 0;
    border-top: 0.5px solid var(--md-outline-variant);
}
.wa-me-menu-card .wa-menu-row > .wa-icon:first-child svg { width: 24px; height: 24px; }
.wa-me-menu-card .wa-menu-row-label { font-size: calc(16px * var(--wa-text-scale, 1)); line-height: calc(24px * var(--wa-text-scale, 1)); }
.wa-me-menu-card .wa-menu-row-chevron svg { width: 20px; height: 20px; }
.wa-me-menu-card .wa-menu-row:focus-visible { outline: none; box-shadow: inset var(--wa-focus-ring); }
/* the phone's DecorativePanelForAppNameAndLogo: a rounded surfaceContainerHigh card, 32 px under the rows */
.wa-me-logo-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 32px 16px 0;
    padding: 32px 16px;
    border-radius: 16px;
    background: var(--md-surface-container-high);
    text-align: center;
}
/* DrawLogo(drawBorder = true): 48 px, the always-dark tile, 16 px corners, a hairline outlineVariant outline */
.wa-me-logo-panel-logo {
    display: inline-flex;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    border: 0.5px solid var(--md-outline-variant);
    background: var(--wa-logo-tile-background);
    overflow: hidden;
}
.wa-me-logo-panel-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wa-me-logo-panel-name { margin-top: 16px; color: var(--md-on-surface); font-size: calc(18px * var(--wa-text-scale, 1)); line-height: calc(24px * var(--wa-text-scale, 1)); }
.wa-me-logo-panel-tagline { margin-top: 4px; color: var(--md-on-surface-variant); font-size: calc(12px * var(--wa-text-scale, 1)); line-height: calc(16px * var(--wa-text-scale, 1)); }
/* DrawTextButton in primary with 4 px above and below (LabelLarge) */
.wa-me-logo-panel-follow {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 4px 12px;
    border-radius: 999px;
    color: var(--md-primary);
    font-size: calc(16px * var(--wa-text-scale, 1));
    line-height: calc(20px * var(--wa-text-scale, 1));
    font-weight: 500;
    text-decoration: none;
}
.wa-me-logo-panel-follow:hover { background: color-mix(in srgb, var(--md-primary) 8%, transparent); }
/* the phone's LegalLinksFooter: its own centred row 32 px under the card, LabelSmall onSurfaceVariant, 16 px apart */
.wa-me-legal-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin: 32px 16px 24px;
    color: var(--md-on-surface-variant);
    font-size: calc(10px * var(--wa-text-scale, 1));
    line-height: calc(16px * var(--wa-text-scale, 1));
    font-weight: 500;
}
.wa-me-legal-links a { color: var(--md-on-surface-variant); text-decoration: none; padding: 4px 0; }
.wa-me-legal-links a:hover { text-decoration: underline; }

/* very wide windows: thin lines mark the centred app's sides, like X */
@media (min-width: 1340px) {
    .wa-app {
        border-left: 1px solid var(--md-outline-variant);
        border-right: 1px solid var(--md-outline-variant);
    }
}

/* computers and wide screens: the phone's text sizes read small at arm's length, so all text is a size up (Anudeep, 2026-10-28) */
@media (min-width: 900px) {
    :root { --wa-text-scale: 1.125; }
    /* the window scrolls on computers: keep the scrollbar's room always, so a short screen and a long one never shift the centred app sideways */
    html { scrollbar-gutter: stable; }
}

