.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    background: var(--pk-navy);
    color: #fff;
    bottom: 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.25);
    box-sizing: border-box;
    display: none;
    font: 600 0.95rem var(--pk-body);
    left: 0;
    padding: 0.7rem 2.75rem calc(0.7rem + env(safe-area-inset-bottom)) 1rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .what { margin-right: 0.5rem; }

    #blazor-error-ui button {
        border: 0;
        border-radius: 999px;
        cursor: pointer;
        font: inherit;
        margin: 0.15rem 0.35rem 0.15rem 0;
        padding: 0.35rem 0.85rem;
    }

    #blazor-error-ui .reload { background: var(--pk-blue); color: #fff; }

    #blazor-error-ui .copy { background: transparent; color: var(--pk-light); box-shadow: inset 0 0 0 1px rgba(190, 227, 255, 0.5); }

    #blazor-error-ui .dismiss {
        background: transparent;
        color: #fff;
        margin: 0;
        padding: 0.35rem 0.6rem;
        position: absolute;
        right: 0.4rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.loading-progress {
    position: absolute;
    display: block;
    width: 10rem;
    height: 10rem;
    inset: 20vh 0 auto 0;
    margin: 0 auto 0 auto;
}

    .loading-progress circle {
        fill: none;
        stroke: var(--pk-line, #e0e0e0);
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1b6ec2;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

/* "Get ready to" inside the ring, "partakie" under it in the brand's type (Darrell, 2026-10-07). */
.loading-progress-text {
    position: absolute;
    inset: 20vh 0 auto 0;
    text-align: center;
    color: var(--pk-heading, #04203D);
}

    .loading-progress-text:before {
        content: "Get ready to";
        display: block;
        font: 600 1.05rem/10rem var(--pk-body, system-ui, sans-serif);
    }

    .loading-progress-text:after {
        content: "partakie";
        display: block;
        margin-top: 0.5rem;
        font: 800 2.4rem/1 var(--pk-display, "Segoe UI", system-ui, sans-serif);
        letter-spacing: -0.03em;
    }

code {
    color: #c02d76;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}
/* ---- Partakie brand (00-vision: icon and wordmark) ---- */
:root {
    --pk-blue: #378ADD;
    --pk-navy: #04203D;
    --pk-mid: #2E6DA6;
    --pk-light: #BEE3FF;
    --pk-bg: #F4F5F7;
    --pk-ink: #16181D;
    --pk-muted: #5A606C;
    --pk-ok: #1B9A66;
    --pk-warn: #C0571C;
    --pk-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
    --pk-body: "Figtree", "Segoe UI", system-ui, sans-serif;

    /* Surfaces and lines, so the whole app can switch to dark (Darrell, 2026-10-08). */
    --pk-surface: #FFFFFF;
    --pk-heading: #04203D;
    --pk-strong: #04203D;
    --pk-line: #DDE3EA;
    --pk-line-strong: #C9D2DE;
    --pk-hover: #E9EEF4;
    --pk-chip: #E3EAF3;
    --pk-faint: #A0AAB6;
    --pk-warn-bg: #FFF7F2;
    --pk-warn-line: #E9C2A8;
    --pk-warn-line-soft: #F0DCCD;
    --pk-danger: #B3261E;
    --pk-danger-line: #E3B7B4;
    color-scheme: light;
}

/* Dark: follows the phone unless you picked Light or Dark in Settings (data-theme on <html>). */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --pk-bg: #0E1116;
        --pk-surface: #181D25;
        --pk-ink: #E6EAF0;
        --pk-muted: #9AA4B2;
        --pk-heading: #EAF0F7;
        --pk-strong: #378ADD;
        --pk-line: #29313C;
        --pk-line-strong: #3A4452;
        --pk-hover: #222A35;
        --pk-chip: #26303D;
        --pk-faint: #6E7988;
        --pk-ok: #3CC48A;
        --pk-warn: #F08A4B;
        --pk-warn-bg: #2A1D15;
        --pk-warn-line: #5C3B26;
        --pk-warn-line-soft: #47301F;
        --pk-danger: #F2766B;
        --pk-danger-line: #6A2E2A;
        color-scheme: dark;
    }
}
:root[data-theme="dark"] {
    --pk-bg: #0E1116;
    --pk-surface: #181D25;
    --pk-ink: #E6EAF0;
    --pk-muted: #9AA4B2;
    --pk-heading: #EAF0F7;
    --pk-strong: #378ADD;
    --pk-line: #29313C;
    --pk-line-strong: #3A4452;
    --pk-hover: #222A35;
    --pk-chip: #26303D;
    --pk-faint: #6E7988;
    --pk-ok: #3CC48A;
    --pk-warn: #F08A4B;
    --pk-warn-bg: #2A1D15;
    --pk-warn-line: #5C3B26;
    --pk-warn-line-soft: #47301F;
    --pk-danger: #F2766B;
    --pk-danger-line: #6A2E2A;
    color-scheme: dark;
}

html, body { margin: 0; background: var(--pk-bg); color: var(--pk-ink); font-family: var(--pk-body); }

.welcome {
    min-height: 100dvh;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 10px;
    padding: 24px 16px calc(24px + env(safe-area-inset-bottom));
    text-align: center;
}
.welcome .mark { width: 96px; height: 96px; border-radius: 22px; }
.wordmark {
    font-family: var(--pk-display);
    font-weight: 800;
    font-size: 3rem;
    letter-spacing: -0.04em;
    line-height: 1;
    margin: 6px 0 0;
    color: var(--pk-heading);
}
.tagline { margin: 0 0 14px; color: var(--pk-muted); }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 0.875rem; text-align: left; }
.checks li::before { display: inline-block; width: 1.4em; font-weight: 700; }
.checks li.ok::before { content: "✓"; color: var(--pk-ok); }
.checks li.warn::before { content: "!"; color: var(--pk-warn); }
.checks li.wait::before { content: "…"; color: var(--pk-muted); }
.note { margin-top: 16px; font-size: 0.75rem; color: var(--pk-muted); }

.loading-progress circle:last-child { stroke: var(--pk-blue) !important; }

.btn { font: 600 0.9375rem var(--pk-body); border: 0; border-radius: 999px; padding: 11px 22px; background: var(--pk-strong); color: #fff; cursor: pointer; margin-top: 14px; }
.btn.ghost { background: transparent; color: var(--pk-heading); border: 1px solid var(--pk-line-strong); }
.signed-in { margin-top: 12px; display: grid; justify-items: center; gap: 2px; }
.signed-in p { margin: 0; }
.muted { color: var(--pk-muted); }
.center { text-align: center; padding: 40px 16px; }

/* Blazor focuses the page heading after navigation for screen readers; no visible box needed. */
h1:focus { outline: none; }
.confirm { margin-top: 6px; font-size: 0.875rem; }
.confirm.ok::before { content: "✓ "; color: var(--pk-ok); font-weight: 700; }
.confirm.warn::before { content: "! "; color: var(--pk-warn); font-weight: 700; }

/* Long lines wrap inside the screen instead of running off the edge on narrow windows. */
.welcome > * { max-width: 100%; box-sizing: border-box; }
.signed-in { padding-inline: 16px; text-align: center; }
.signed-in p { overflow-wrap: anywhere; }

/* ---- Account screens (wireframes: Sign in, Your name and handle) ---- */
.btn.wide { width: 100%; max-width: 340px; }
.btn:disabled { opacity: .45; cursor: default; }
.center-text { text-align: center; }
.footer-link { margin-top: 18px; font-size: 0.75rem; color: var(--pk-muted); }

.hint { display: block; min-height: 1.25em; margin: 6px 0 0; font-size: 0.8125rem; color: var(--pk-muted); }
.hint.ok { color: var(--pk-ok); }
.hint.warn { color: var(--pk-warn); }

.account { display: grid; gap: 4px; justify-items: center; max-width: 360px; margin-top: 6px; }
.account p { margin: 0; }
.account .who { font-weight: 600; font-size: 1.0625rem; display: block; padding: 0; border-bottom: 0; } /* not the people-list ".who" grid, which squeezed this heading into one word a line */
.account .handle { color: var(--pk-mid); font-weight: 600; }
.account .checks { margin-top: 10px; }

.form-screen { min-height: 100dvh; display: grid; grid-template-rows: auto 1fr; }
.bar {
    display: flex;
    align-items: center;
    padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
    border-bottom: 1px solid var(--pk-line);
    background: var(--pk-surface);
}
.bar .brand { font-family: var(--pk-display); font-weight: 800; font-size: 1.3125rem; letter-spacing: -0.03em; color: var(--pk-heading); }
.form {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    box-sizing: border-box;
    padding: 28px 16px calc(28px + env(safe-area-inset-bottom));
    display: grid;
    align-content: start;
    gap: 14px;
}
.form p { margin: 0; }
.form .btn { margin-top: 4px; max-width: none; }
.form-title { font-family: var(--pk-display); font-weight: 800; font-size: 1.75rem; letter-spacing: -0.03em; line-height: 1.1; margin: 0; color: var(--pk-heading); }
.form .note { margin-top: 0; font-size: 0.8125rem; background: var(--pk-hover); border-radius: 10px; padding: 9px 12px; }

.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field .label { font-size: 0.7188rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--pk-muted); }
/* 16px text stops iPhone Safari zooming in on the field. */
.field input {
    font: 1rem var(--pk-body);
    color: var(--pk-ink);
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    border: 1px solid var(--pk-line-strong);
    border-radius: 10px;
    padding: 10px 12px;
    background: var(--pk-surface);
}
.field input:focus { outline: 2px solid var(--pk-blue); outline-offset: -1px; border-color: transparent; }
.handle-box { display: flex; align-items: center; border: 1px solid var(--pk-line-strong); border-radius: 10px; background: var(--pk-surface); }
.handle-box:focus-within { outline: 2px solid var(--pk-blue); outline-offset: -1px; border-color: transparent; }
.handle-box .at { padding-left: 12px; color: var(--pk-muted); font-size: 1rem; }
.handle-box input { border: 0; padding-left: 2px; background: transparent; }
.handle-box input:focus { outline: none; }
@media (max-width: 340px) { .pair { grid-template-columns: 1fr; } }

/* ---- App screens: main list, group, settings, recovery (wireframes) ---- */
.app-screen { min-height: 100dvh; display: flex; flex-direction: column; background: var(--pk-bg); }
.app-screen .bar { position: sticky; top: 0; z-index: 2; gap: 8px; }
.bar-actions { margin-left: auto; display: flex; gap: 4px; }
.bar-title { font-weight: 600; font-size: 1.0625rem; display: grid; line-height: 1.2; min-width: 0; }
.bar-title small { font-weight: 400; font-size: 0.75rem; color: var(--pk-muted); }
.icon-btn { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; color: var(--pk-heading); }
.icon-btn:active { background: var(--pk-hover); }
.icon-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.list { width: 100%; max-width: 640px; margin: 0 auto; box-sizing: border-box; padding: 8px 16px calc(24px + env(safe-area-inset-bottom)); display: grid; gap: 0; }
.hrow { display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: center; padding: 12px 2px; border-bottom: 1px solid var(--pk-line); color: inherit; text-decoration: none; }
.tile { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; font-weight: 700; font-size: 1.0625rem; color: var(--c); background: color-mix(in srgb, var(--c) 16%, var(--pk-surface)); }
.htext { display: grid; min-width: 0; }
.hname { font-weight: 600; font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hprev { font-size: 0.875rem; color: var(--pk-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.empty { text-align: center; padding: 48px 16px; display: grid; gap: 6px; justify-items: center; }
.empty p { margin: 0; }
.pad { padding: 24px 0; text-align: center; }
.small { font-size: 0.8125rem; }

.card { display: grid; gap: 4px; padding: 12px 14px; border-radius: 14px; background: var(--pk-surface); border: 1px solid var(--pk-line); margin: 8px 0 4px; color: inherit; text-decoration: none; font-size: 0.875rem; }
.card.nudge { border-color: color-mix(in srgb, var(--pk-blue) 45%, var(--pk-surface)); background: color-mix(in srgb, var(--pk-light) 35%, var(--pk-surface)); }
.card.warn-card { border-color: var(--pk-warn-line); background: var(--pk-warn-bg); text-align: left; }
.link-btn { background: none; border: 0; padding: 6px 0; font: 600 0.875rem var(--pk-body); color: var(--pk-mid); cursor: pointer; justify-self: start; }
.welcome .link-btn { justify-self: center; }
.choices { display: grid; gap: 10px; width: 100%; max-width: 340px; justify-items: stretch; }
.choices .btn { margin-top: 0; max-width: none; }

.chat .stream { flex: 1; width: 100%; max-width: 640px; margin: 0 auto; box-sizing: border-box; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.sys { background: var(--pk-surface); border: 1px dashed var(--pk-line-strong); border-radius: 16px; padding: 10px 12px; font-size: 0.9375rem; display: grid; gap: 4px; }
.sys .from { font-weight: 700; font-size: 0.8125rem; color: var(--pk-heading); }
.composer { position: sticky; bottom: 0; border-top: 1px solid var(--pk-line); background: var(--pk-surface); padding: 8px 12px calc(10px + env(safe-area-inset-bottom)); display: grid; gap: 6px; }
.field-row input { width: 100%; box-sizing: border-box; font: 1rem var(--pk-body); border: 1px solid var(--pk-line); border-radius: 999px; padding: 10px 14px; background: var(--pk-bg); }

.setting { display: grid; gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--pk-line); color: inherit; text-decoration: none; }
.code { font: 600 1.25rem ui-monospace, "SF Mono", Consolas, monospace; letter-spacing: .04em; text-align: center; padding: 16px 12px; background: var(--pk-surface); border: 1px solid var(--pk-line); border-radius: 12px; overflow-wrap: anywhere; user-select: all; }
.save-form { display: grid; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pin { letter-spacing: .5em; text-align: center; font-size: 1.375rem !important; }

/* ---- Invites and people ---- */
.invite-note { color: var(--pk-blue); font-weight: 600; }
.people { display: grid; }
.who { display: grid; grid-template-columns: 36px 1fr auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--pk-line); }
.av { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--pk-chip); color: var(--pk-heading); }
.who-text { display: grid; min-width: 0; }
.who-text small { color: var(--pk-muted); font-size: 0.75rem; }
.btn.small-btn { margin: 0; padding: 7px 14px; font-size: 0.875rem; }
.people-box { display: grid; gap: 4px; background: var(--pk-surface); border: 1px solid var(--pk-line); border-radius: 14px; padding: 12px 14px; }
.invite-card { justify-items: center; text-align: center; }
.invite-card .btn { width: 100%; }
.tile.big { width: 72px; height: 72px; border-radius: 20px; font-size: 1.875rem; }

/* ---- Messages (wireframes; V2-FR-116) ---- */
.msg { display: grid; justify-items: start; gap: 2px; }
.msg.mine { justify-items: end; }
.bub { max-width: 80%; display: grid; gap: 2px; padding: 8px 12px 6px; border-radius: 18px 18px 18px 6px; background: color-mix(in srgb, var(--c) 14%, var(--pk-surface)); color: var(--pk-ink); }
.msg.mine .bub { border-radius: 18px 18px 6px 18px; background: var(--c); color: #fff; }
.bub .from { font-size: 0.7812rem; font-weight: 700; color: var(--c); }
.msg.mine .bub .from { color: color-mix(in srgb, #fff 80%, var(--c)); }
.bub .text { font-size: 1rem; line-height: 1.35; white-space: pre-wrap; overflow-wrap: anywhere; }
.bub .time { font-size: 0.6875rem; opacity: .65; justify-self: end; }
.msg .status { font-size: 0.75rem; color: var(--pk-muted); padding: 0 6px; }
.msg .status.warn { color: var(--pk-warn); }

/* ---- Reply, reactions, flags (V2-FR-8b, 146, 148, 138) ---- */
.bub .quote { display: grid; gap: 1px; font-size: 0.8125rem; line-height: 1.3; padding: 4px 8px; margin: 2px 0; border-left: 3px solid var(--c);
    border-radius: 6px; background: color-mix(in srgb, var(--c) 10%, var(--pk-surface)); color: var(--pk-ink); cursor: pointer; }
.msg.mine .bub .quote { border-left-color: #fff; background: color-mix(in srgb, #fff 22%, var(--c)); color: #fff; }
.bub .quote span { opacity: .8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reactions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: -6px; padding: 0 8px; position: relative; }
.reactions .chip { font: 0.8125rem var(--pk-body); padding: 1px 7px; border-radius: 999px; border: 1px solid var(--pk-line); background: var(--pk-surface); color: var(--pk-ink); }
.reactions .chip.me { border-color: var(--c); background: color-mix(in srgb, var(--c) 12%, var(--pk-surface)); }
.msg .who { font-size: 0.75rem; color: var(--pk-muted); padding: 0 8px; }
.msg .acts { display: flex; gap: 2px; padding: 0 4px; }
.msg .acts button { width: 28px; height: 24px; display: grid; place-items: center; border: 0; background: transparent; color: var(--pk-faint); border-radius: 6px; padding: 0; }
.msg .acts button:active { background: var(--pk-hover); }
.msg .acts svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.msg .acts button.on { color: var(--pk-warn); }
.msg .acts button.on svg { fill: currentColor; }
.msg .picker { display: flex; gap: 2px; padding: 4px 6px; background: var(--pk-surface); border: 1px solid var(--pk-line); border-radius: 999px; box-shadow: 0 2px 8px rgb(0 0 0 / .08); }
.msg .picker button { font-size: 1.375rem; border: 0; background: transparent; padding: 2px 4px; border-radius: 8px; }
.msg .picker button:active { background: var(--pk-hover); }
.composer .replying { display: flex; align-items: center; gap: 8px; font-size: 0.8125rem; padding: 4px 8px; border-left: 3px solid var(--c);
    background: color-mix(in srgb, var(--c) 8%, var(--pk-surface)); border-radius: 6px; }
.composer .replying span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* ---- DMs (V2-FR-26, 139, 149) ---- */
.tile.person { border-radius: 50%; }
.who-btn { width: 100%; font: inherit; color: inherit; text-align: left; background: transparent; border: 0; border-bottom: 1px solid var(--pk-line); cursor: pointer; }
.who-btn:active { background: var(--pk-hover); }
.bub .from a.person { color: inherit; text-decoration: none; }
.bub .from a.person:hover { text-decoration: underline; }
.flag-btn { position: relative; }
.flag-btn .count { position: absolute; top: 2px; right: 0; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px;
    background: var(--pk-warn); color: #fff; font: 700 0.625rem/1rem var(--pk-body); text-align: center; }
.link-btn.inline { padding: 0; display: inline; }
.composer select { font: 600 0.8125rem var(--pk-body); color: var(--c); border: 0; background: transparent; max-width: 60%; }
.composer .new-name { font: 1rem var(--pk-body); border: 1px solid var(--pk-line); border-radius: 10px; padding: 8px 12px; }
.send-row { display: grid; grid-template-columns: 1fr 42px; gap: 8px; align-items: end; }
.send-row textarea { font: 1rem var(--pk-body); border: 1px solid var(--pk-line); border-radius: 20px; padding: 9px 14px; resize: none; background: var(--pk-bg); max-height: calc(var(--app-height, 100dvh) * 0.4); overflow-y: auto; box-sizing: border-box; }
.send { width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--c); color: #fff; display: grid; place-items: center; cursor: pointer; }
.send:disabled { opacity: .35; }
.send svg { width: 20px; height: 20px; fill: currentColor; }

/* ---- The chat screen as a laid-out column (see platform.js fitChat) ---- */
html.chat-locked, html.chat-locked body { height: 100%; overflow: hidden; overscroll-behavior: none; }
.app-screen.chat { height: var(--app-height, 100dvh); min-height: 0; overflow: hidden; }
.app-screen.chat .bar { position: static; flex: none; }
.chat .stream { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.chat .composer { position: static; flex: none; }
html.keyboard-open .chat .composer { padding-bottom: 8px; }

/* ---- Partakie's notices: warnings and "expired" (V2-FR-12b, 12h, 117) ---- */
.sys.notice { border-style: solid; border-color: color-mix(in srgb, var(--c) 35%, var(--pk-surface)); }
.sys.notice.warning { background: var(--pk-warn-bg); border-color: var(--pk-warn-line); }
.sys .where { font-weight: 600; color: var(--c); }
.btn.partakie { background: var(--c, var(--pk-strong)); justify-self: start; margin-top: 4px; }
.warn-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 0; border-top: 1px solid var(--pk-warn-line-soft); }
.warn-line .btn { margin: 0; }
.link-btn.small { font-size: 0.8125rem; padding: 2px 6px; }
.hprev.time-left { color: var(--pk-warn); font-weight: 600; }
.card-actions { display: flex; gap: 12px; align-items: center; margin-top: 4px; }

/* ---- Group life: events, ended groups, settings ---- */
.event-line { text-align: center; font-size: 0.8125rem; color: var(--pk-muted); padding: 2px 0; }
a.from { text-decoration: none; }
.tile.faded { opacity: .55; }
.ended-link { justify-self: center; margin-top: 28px; }
.notice-link { color: inherit; text-decoration: none; }
.btn.danger { background: none; color: var(--pk-danger); border: 1px solid var(--pk-danger-line); }
.field-select { font: 1rem var(--pk-body); border: 1px solid var(--pk-line-strong); border-radius: 10px; padding: 10px 12px; background: var(--pk-surface); }

/* ---- Step 3a: Everything, unread, drill-down ---- */
.hrow { grid-template-columns: 44px 1fr auto; }
.count { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--c, var(--pk-blue)); color: #fff; font-size: 0.75rem; font-weight: 700; display: grid; place-items: center; box-sizing: border-box; }
.tile.all { background: conic-gradient(#E8603A33 0 25%, #2F76EE33 0 50%, #1B9A6633 0 75%, #C08A1E33 0); }
.bub a.drill { color: inherit; text-decoration: none; }
.bub a.drill:hover { text-decoration: underline; }
.bub .place { opacity: .85; }
.unread-divider { justify-self: stretch; width: 100%; align-self: stretch; text-align: center; font-size: 0.75rem; font-weight: 700; color: var(--pk-blue); border-top: 1px solid color-mix(in srgb, var(--pk-blue) 40%, var(--pk-surface)); margin: 6px 0 2px; padding-top: 2px; }
.msg .bub { cursor: pointer; }

/* Where back goes, and why you can't send */
.back-btn { display: flex; align-items: center; gap: 0; color: var(--pk-heading); text-decoration: none; font-weight: 600; font-size: 0.9375rem; padding-right: 6px; flex: none; }
.back-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.shut-note { color: var(--pk-muted); font-size: 0.875rem; }
.shut-note .btn { margin-top: 2px; }

/* "N new messages ↓" while you're reading older ones */
.pill-anchor { position: relative; height: 0; flex: none; }
.new-below { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); border: 0; border-radius: 999px; padding: 8px 16px; background: var(--pk-strong); color: #fff; font: 600 0.875rem var(--pk-body); box-shadow: 0 4px 14px rgba(4, 32, 61, .25); cursor: pointer; z-index: 3; white-space: nowrap; }
.back-title { display: flex; align-items: center; gap: 2px; min-width: 0; color: var(--pk-heading); text-decoration: none; }
.back-title svg { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.back-title .bar-title { color: var(--pk-ink); }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; column-gap: 8px; min-width: 0; }
.crumb { display: inline-flex; align-items: center; color: var(--pk-heading); text-decoration: none; font-weight: 600; font-size: 1.0625rem; white-space: nowrap; }
.crumb svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.crumb-sub { flex-basis: 100%; font-size: 0.75rem; color: var(--pk-muted); padding-left: 20px; }
/* The back arrow as a real button: a filled circle that reacts to the pointer (Darrell, 2026-10-07: "doesn't look clickable"). */
.crumb-back { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; flex: none;
    color: var(--pk-blue); background: color-mix(in srgb, var(--pk-blue) 12%, var(--pk-surface)); transition: background .15s; }
.crumb-back:hover { background: color-mix(in srgb, var(--pk-blue) 22%, var(--pk-surface)); }
.crumb-back:active { background: color-mix(in srgb, var(--pk-blue) 30%, var(--pk-surface)); }
.crumb-back svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; margin-left: -2px; }
.crumb { font-weight: 600; font-size: 1.0625rem; color: var(--pk-blue); text-decoration: none; white-space: nowrap; cursor: pointer; }
a.crumb:hover { text-decoration: underline; }
.crumb.here { color: var(--pk-ink); cursor: default; }

/* No scroll bars: lists still scroll by touch, wheel and trackpad (Darrell, 2026-10-07). */
* { scrollbar-width: none; }
*::-webkit-scrollbar { display: none; }
.crumb-sep { color: var(--pk-muted); font-size: 1.0625rem; }
.crumb-sub { padding-left: 0; }

/* ---- Where it goes, in the box itself (Darrell, 2026-10-07): no "To" line ---- */
.send-row.with-pick { grid-template-columns: 40px 1fr 42px; }
.send-row .pick { position: relative; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
    background: color-mix(in srgb, var(--c) 12%, var(--pk-surface)); color: var(--c); font: 700 1.1875rem var(--pk-body); cursor: pointer; }
.send-row .pick:active { background: color-mix(in srgb, var(--c) 24%, var(--pk-surface)); }
.send-row .pick select { position: absolute; inset: 0; width: 100%; max-width: none; height: 100%; opacity: 0; cursor: pointer; font-size: 1rem; }
.send-row textarea::placeholder { color: color-mix(in srgb, var(--c) 65%, #8A96A3); font-weight: 600; }
.bar-step-out { margin-left: auto; color: var(--pk-muted); white-space: nowrap; }
.composer .at-hint { font-size: 0.8125rem; color: var(--c); padding: 0 4px; }

/* ---- Times (V2-FR-147): a line where there's a gap; tap a message for its exact time ---- */
.time-divider { display: flex; align-items: center; gap: 10px; font-size: 0.75rem; font-weight: 600; color: var(--pk-muted); margin: 6px 0 2px; }
.time-divider::before, .time-divider::after { content: ""; flex: 1; height: 1px; background: var(--pk-line); }
.bub .time { font-size: 0.7188rem; opacity: .75; justify-self: end; }

/* ---- "@": where it goes, and mentions (V2-FR-110a, 141, 116b) ---- */
.composer .suggest { display: grid; gap: 2px; max-height: 40vh; overflow-y: auto; padding: 4px; margin: 0 0 2px;
    background: var(--pk-surface); border: 1px solid var(--pk-line); border-radius: 12px; box-shadow: 0 4px 16px rgb(0 0 0 / .08); }
.composer .suggest button { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; font: 0.9375rem var(--pk-body);
    color: var(--pk-ink); background: transparent; border: 0; border-radius: 8px; padding: 8px 10px; cursor: pointer; }
.composer .suggest button:hover, .composer .suggest button:active { background: var(--pk-hover); }
.composer .suggest button small { margin-left: auto; color: var(--pk-muted); font-size: 0.75rem; }
.composer .suggest .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; }
.composer .suggest .mention-here { color: var(--pk-blue); font-weight: 600; }
.small-av { width: 24px; height: 24px; font-size: 0.75rem; flex: none; }
.bub .mention { font-weight: 700; }
.bub .mention.me { background: color-mix(in srgb, var(--c) 22%, var(--pk-surface)); border-radius: 4px; padding: 0 2px; color: var(--pk-ink); }
.msg.mine .bub .mention.me { background: rgb(255 255 255 / .25); color: inherit; }

/* ---- Your colors and nicknames (V2-FR-116a/b) ---- */
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--c); cursor: pointer; box-shadow: inset 0 0 0 2px rgb(255 255 255 / .6); }
.swatch.on { box-shadow: 0 0 0 2px var(--pk-surface), 0 0 0 4px var(--c); }
.swatch.default { --c: var(--pk-chip); color: var(--pk-muted); font-size: 0.8125rem; }
.swatch.default.on { box-shadow: 0 0 0 2px var(--pk-surface), 0 0 0 4px var(--pk-muted); }
.person-details { justify-items: center; }
.person-details .field, .person-details .btn { justify-self: stretch; }
.who-text.center { display: grid; justify-items: center; gap: 2px; font-size: 1.125rem; }
.bar-end { margin-left: auto; }

/* ---- Your streams and order (V2-FR-130, 150) ---- */
.tile.stream { border-radius: 12px; background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 45%, var(--pk-surface))); }
.rows { display: grid; }
.rows .hrow { position: relative; background: var(--pk-bg); }
.rows.arranging .hrow { cursor: default; }
.rows .hrow.dragging { z-index: 2; box-shadow: 0 6px 20px rgb(0 0 0 / .15); background: var(--pk-surface); transition: none; }
.rows.arranging .hrow:not(.dragging) { transition: transform .15s ease; }
.drag { width: 36px; height: 36px; display: grid; place-items: center; color: var(--pk-muted); touch-action: none; cursor: grab; flex: none; }
.drag svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.list-actions { display: flex; justify-content: center; gap: 20px; padding: 12px 0 4px; }
.pick-row { cursor: pointer; }
.pick-row input { width: 20px; height: 20px; }
.link-btn.danger { color: var(--pk-warn); }

/* ---- Side by side on wide screens (V2-FR-143) ---- */
.split { display: grid; grid-template-columns: minmax(300px, 380px) 1fr; height: 100dvh; overflow: hidden; }
.split-list { overflow-y: auto; border-right: 1px solid var(--pk-line); background: var(--pk-bg); }
.split-list .app-screen { min-height: 100%; }
.split-main { min-width: 0; height: 100dvh; overflow: hidden; }
.split-main .app-screen.chat { height: 100dvh; }
.split-main .app-screen:not(.chat) { height: 100dvh; overflow-y: auto; }
/* The list beside it is the way back from a stream; anything else in this pane (a new private conversation, who is in one) keeps its arrow (Darrell, 2026-10-08). */
.split-main .app-screen.chat .crumb-back { display: none; }
.hrow.here { background: color-mix(in srgb, var(--pk-blue) 10%, var(--pk-surface)); border-radius: 12px; }
.bub .from .drill.gone { text-decoration: line-through; text-decoration-thickness: 1.5px; opacity: .55; }

/* ---- Typing, edit, unsend (V2-FR-36c, 8g) ---- */
.typing-row { display: flex; align-items: center; gap: 4px; padding: 0 4px; min-height: 24px; }
.typing-row .dots { display: inline-flex; gap: 3px; margin-right: 4px; }
.typing-row .dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--pk-muted); animation: pk-typing 1.2s infinite ease-in-out; }
.typing-row .dots i:nth-child(2) { animation-delay: .15s; }
.typing-row .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes pk-typing { 0%, 60%, 100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
.typer { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font: 700 0.625rem var(--pk-body); color: #fff; background: var(--c); }
.typer-more { font-size: 0.75rem; color: var(--pk-muted); }
.msg.unsent .bub { background: transparent; border: 1px dashed var(--pk-line-strong); color: var(--pk-muted); }
.msg.mine.unsent .bub { background: transparent; color: var(--pk-muted); }
.bub .edited { justify-self: start; font: 600 0.7188rem var(--pk-body); color: inherit; opacity: .7; background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; }
.bub .original { display: grid; gap: 1px; font-size: 0.8125rem; padding: 4px 8px; border-radius: 6px; background: rgb(0 0 0 / .06); white-space: pre-wrap; }
.msg.mine .bub .original { background: rgb(255 255 255 / .18); }
.bub .original small { font-size: 0.6875rem; opacity: .7; font-weight: 600; }
.msg-menu { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 6px; background: var(--pk-surface); border: 1px solid var(--pk-line); border-radius: 12px; box-shadow: 0 2px 8px rgb(0 0 0 / .08); max-width: 320px; }
.msg-menu button { font: 600 0.875rem var(--pk-body); border: 0; background: var(--pk-hover); color: var(--pk-ink); border-radius: 8px; padding: 6px 10px; cursor: pointer; }
.msg-menu button.danger { background: color-mix(in srgb, var(--pk-warn) 14%, var(--pk-surface)); color: var(--pk-warn); }
.msg-menu .menu-note { flex-basis: 100%; font-size: 0.7812rem; color: var(--pk-muted); }
.composer .at-hint.warn { color: var(--pk-warn); }
.composer .editing { border-left-color: var(--pk-blue); }

/* ---- Appearance choice (Settings) ---- */
.segmented { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--pk-hover); justify-self: start; }
.segmented button { font: 600 0.875rem var(--pk-body); border: 0; background: transparent; color: var(--pk-muted); padding: 6px 14px; border-radius: 999px; cursor: pointer; }
.segmented button.on { background: var(--pk-surface); color: var(--pk-ink); box-shadow: 0 1px 3px rgb(0 0 0 / .12); }

/* ---- A new version is ready (2026-10-08) ---- */
.update-bar { position: fixed; z-index: 50; left: 50%; transform: translateX(-50%); top: calc(env(safe-area-inset-top) + 8px);
    border: 0; border-radius: 999px; padding: 9px 18px; background: var(--pk-blue); color: #fff; font: 600 0.9375rem var(--pk-body);
    box-shadow: 0 4px 16px rgb(0 0 0 / .2); cursor: pointer; white-space: nowrap; }

/* ---- Text follows the phone's text size (Darrell, 2026-10-08) ----
   On iPhone and iPad, Settings > Display & Brightness > Text Size (Dynamic Type) sets the base size and
   every size above is in rem, so the whole app scales with it; elsewhere the browser's own text size
   does the same. Boxes you type in never go under 16px, or iPhone zooms the page when you tap them. */
@supports (font: -apple-system-body) and (-webkit-touch-callout: none) {
    html { font: -apple-system-body; }
}
html, body { font-family: var(--pk-body); }
input, textarea, select { font-size: max(16px, 1rem) !important; }

/* ---- Your devices (V2-FR-100-105) ---- */
.device-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.device-row small.warn { color: var(--pk-warn); }
.confirm-card { display: grid; gap: 8px; text-align: left; margin: 4px 0 8px; }
.check-row { display: flex; gap: 8px; align-items: flex-start; font-size: 0.875rem; color: var(--pk-muted); cursor: pointer; }
.check-row input { margin-top: 2px; width: 18px; height: 18px; flex: none; }
.btn.danger-fill { background: var(--pk-danger); }

/* ---- Linking a new device (V2-FR-46) ---- */
.pair-prompt { position: fixed; z-index: 60; left: 16px; right: 16px; bottom: calc(env(safe-area-inset-bottom) + 16px); max-width: 420px; margin: 0 auto;
    display: grid; gap: 8px; padding: 16px; background: var(--pk-surface); color: var(--pk-ink); border: 1px solid var(--pk-line);
    border-radius: 16px; box-shadow: 0 10px 40px rgb(0 0 0 / .25); }
.pair-code { font: 800 2rem/1.1 var(--pk-display); letter-spacing: 0.08em; color: var(--pk-heading); text-align: center; padding: 6px 0; }
.pair-card { text-align: left; }

/* ---- Press-and-hold for a message's actions (2026-10-08, revising V2-FR-146) ---- */
.msg .acts { display: none; }
.msg.acts-open .acts { display: flex; }
@media (hover: hover) and (pointer: fine) { .msg:hover .acts { display: flex; } }
.msg .bub { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; position: relative; }
.msg.acts-open .bub { box-shadow: 0 0 0 2px color-mix(in srgb, var(--c) 45%, transparent); }
.bub .flag-mark { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center;
    background: var(--pk-surface); color: var(--pk-warn); box-shadow: 0 1px 3px rgb(0 0 0 / .2); }
.msg.mine .bub .flag-mark { right: auto; left: -6px; }
.bub .flag-mark svg { width: 12px; height: 12px; fill: currentColor; stroke: currentColor; stroke-width: 2; }

/* ---- Reaction picker: recent five, + for more (2026-10-08) ---- */
.msg .picker { flex-direction: column; align-items: stretch; border-radius: 16px; max-width: min(340px, 90vw); }
.msg .picker-row { display: flex; gap: 2px; align-items: center; }
.msg .picker .picker-more { font: 700 1.25rem var(--pk-body); color: var(--pk-muted); width: 36px; }
.msg .picker-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; max-height: 180px; overflow-y: auto; padding-top: 6px; border-top: 1px solid var(--pk-line); margin-top: 4px; }
.msg .picker-grid button { font-size: 1.3rem; }
.msg .picker-any { display: flex; gap: 6px; align-items: center; padding-top: 6px; }
.msg .picker-any input { flex: 1; min-width: 0; border: 1px solid var(--pk-line); border-radius: 10px; padding: 6px 10px; background: var(--pk-bg); color: var(--pk-ink); }
.msg .picker-any .btn { margin-top: 0; }

/* ---- Held message: actions above, reactions below (Darrell, 2026-10-08) ---- */
.msg .acts { display: none !important; }
.msg-bar { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; margin-bottom: 4px; background: var(--pk-surface);
    border: 1px solid var(--pk-line); border-radius: 14px; box-shadow: 0 4px 16px rgb(0 0 0 / .12); max-width: min(360px, 92vw); }
.msg-bar button { display: grid; justify-items: center; gap: 2px; min-width: 52px; padding: 6px 6px 4px; border: 0; border-radius: 10px;
    background: transparent; color: var(--pk-ink); font: 600 0.6875rem var(--pk-body); cursor: pointer; }
.msg-bar button:active, .msg-bar button:hover { background: var(--pk-hover); }
.msg-bar button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.msg-bar button.on { color: var(--pk-warn); }
.msg-bar button.on svg { fill: currentColor; }
.msg-bar button.danger { color: var(--pk-danger); }
.msg-bar .menu-note { flex-basis: 100%; font-size: 0.78rem; color: var(--pk-muted); padding: 4px 6px; }
.msg-bar:has(.menu-note) button { display: inline-block; min-width: 0; padding: 6px 12px; font-size: 0.85rem; background: var(--pk-hover); }
.bub .more-dot { display: none; position: absolute; top: 50%; transform: translateY(-50%); right: -34px; width: 28px; height: 28px; border-radius: 50%;
    border: 0; background: var(--pk-hover); color: var(--pk-muted); cursor: pointer; padding: 0; place-items: center; }
.msg.mine .bub .more-dot { right: auto; left: -34px; }
.bub .more-dot svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; }
@media (hover: hover) and (pointer: fine) { .msg .bub:hover .more-dot { display: grid; } }

/* No phone text selection anywhere in a conversation: holding a message shows its actions instead, and
   Copy is one of them (Darrell, 2026-10-08). Boxes you type in still select normally. */
.stream, .stream * { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.stream input, .stream textarea { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }

/* ---- The AI chip (V2-FR-19f) ---- */
.composer .ai-chip { display: flex; align-items: center; gap: 4px; }
.composer .ai-take { flex: 1; min-width: 0; text-align: left; font: 0.875rem var(--pk-body); color: var(--pk-ink); cursor: pointer;
    background: color-mix(in srgb, var(--c) 12%, var(--pk-surface)); border: 1px solid color-mix(in srgb, var(--c) 35%, var(--pk-surface));
    border-radius: 999px; padding: 6px 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.composer .ai-take b { color: var(--c); }
.composer .ai-spark { color: var(--c); margin-right: 2px; }
.composer .ai-chip.taken { font-size: 0.875rem; color: var(--pk-muted); }
.composer .ai-chip.taken input { flex: 1; min-width: 0; font: 600 1rem var(--pk-body); color: var(--c); border: 1px solid var(--pk-line); border-radius: 10px; padding: 6px 10px; background: var(--pk-bg); }
.composer .ai-note { font-size: 0.75rem; color: var(--pk-muted); padding: 0 4px; }
.composer .ai-snooze { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 0.8125rem; color: var(--pk-muted); padding: 0 4px; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.toggle-row input[type=checkbox] { width: 44px; height: 26px; appearance: none; -webkit-appearance: none; border-radius: 999px; background: var(--pk-line-strong); position: relative; cursor: pointer; flex: none; transition: background .15s; }
.toggle-row input[type=checkbox]::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: left .15s; box-shadow: 0 1px 2px rgb(0 0 0 / .3); }
.toggle-row input[type=checkbox]:checked { background: var(--pk-ok); }
.toggle-row input[type=checkbox]:checked::after { left: 21px; }
.ai-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 0.8125rem; color: var(--pk-muted); padding: 2px 4px 6px; }

/* A settings row that opens another page shows › on the far right (Darrell, 2026-10-08). */
a.setting.link-row { position: relative; padding-right: 32px; color: inherit; text-decoration: none; cursor: pointer; }
a.setting.link-row::after { content: "›"; position: absolute; right: 10px; top: 50%; transform: translateY(-55%); font-size: 1.6rem; line-height: 1; color: var(--pk-muted); }
a.setting.link-row:active { background: var(--pk-hover); }

/* ---- Bottom of the main list: tools and ended groups (Darrell, 2026-10-08) ---- */
.list-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0 4px; }
.list-tool { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 12px; border-radius: 12px;
    border: 1px solid var(--pk-line); background: var(--pk-surface); color: var(--pk-heading); font: 600 0.875rem var(--pk-body);
    text-decoration: none; cursor: pointer; }
.list-tool:active, .list-tool:hover { background: var(--pk-hover); }
.list-tool.on { border-color: var(--pk-blue); color: var(--pk-blue); }
.list-tool svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ended-toggle { display: flex; align-items: center; gap: 8px; width: 100%; margin-top: 18px; padding: 8px 4px; border: 0; border-top: 1px solid var(--pk-line);
    background: transparent; color: var(--pk-muted); font: 600 0.8125rem var(--pk-body); text-transform: uppercase; letter-spacing: .04em; cursor: pointer; }
.ended-toggle svg { width: 16px; height: 16px; margin-left: auto; fill: none; stroke: currentColor; stroke-width: 2; transition: transform .15s; }
.ended-toggle svg.open { transform: rotate(90deg); }
.ended-rows .hrow { opacity: .8; }
button.crumb-back { border: 0; padding: 0; cursor: pointer; }
.ended-note .from { font-weight: 700; color: var(--pk-heading); margin-right: 4px; text-decoration: none; }

/* ---- Main header icons and arranging (Darrell, 2026-10-08) ---- */
.new-group-btn { position: relative; }
.new-group-btn .plus { position: absolute; top: 3px; right: 1px; width: 15px; height: 15px; border-radius: 50%; background: var(--pk-blue); color: #fff;
    font: 700 13px/15px var(--pk-body); text-align: center; }
.bar .done-btn { margin-top: 0; padding: 7px 16px; }
.list-hint { text-align: center; font-size: 0.78rem; color: var(--pk-muted); margin: 14px 0 4px; }
.list-tool.add-stream { margin-top: 12px; justify-content: flex-start; }
.rows .hrow { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.list-tools { display: none; }

/* New stream, on the Everything row's far right (Darrell, 2026-10-08). */
.hrow-with-tool { display: flex; align-items: center; gap: 6px; }
.hrow-with-tool > .hrow { flex: 1; min-width: 0; }
.row-tool { display: inline-flex; align-items: center; gap: 4px; flex: none; padding: 6px 10px; border-radius: 999px;
    border: 1px solid var(--pk-line); background: var(--pk-surface); color: var(--pk-heading); font: 600 0.78rem var(--pk-body); text-decoration: none; }
.row-tool:active, .row-tool:hover { background: var(--pk-hover); }
.row-tool svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

/* ---- Photos (V2-FR-170-182) ---- */
/* The row: +, the box, and Send only when a picture is waiting with nothing typed (Darrell, 2026-10-08). */
.send-row { grid-template-columns: minmax(0, 1fr); }
.send-row.with-add { grid-template-columns: 34px minmax(0, 1fr); }
.send-row.with-send { grid-template-columns: minmax(0, 1fr) 42px; }
.send-row.with-add.with-send { grid-template-columns: 34px minmax(0, 1fr) 42px; }
.attach { border: 0; background: none; padding: 0; transition: transform .15s; }
.attach.open { transform: rotate(45deg); }
.add-menu { display: flex; gap: 8px; padding: 2px 0 8px; }
.add-item { position: relative; display: inline-flex; align-items: center; gap: 8px; font: 600 0.9375rem var(--pk-body); color: var(--pk-ink); background: var(--pk-hover); border: 0; border-radius: 999px; padding: 8px 14px 8px 10px; cursor: pointer; }
.add-item svg { width: 22px; height: 22px; fill: none; stroke: var(--c); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

.gif-panel { display: grid; gap: 8px; padding: 2px 0 8px; }
.gif-top { display: flex; gap: 6px; align-items: center; }
.gif-top input { flex: 1; min-width: 0; font: 1rem var(--pk-body); border: 1px solid var(--pk-line); border-radius: 999px; padding: 8px 14px; background: var(--pk-bg); color: var(--pk-ink); }
/* Fixed-height rows: tiles sized by their width overlapped (Darrell, 2026-10-08). Narrow columns keep the small GIFs sharp. */
.gif-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); grid-auto-rows: 100px; gap: 4px; max-height: min(36dvh, 312px); overflow-y: auto; border-radius: 10px; }
.gif-grid .gif { padding: 0; border: 0; background: var(--pk-hover); height: 100%; cursor: pointer; overflow: hidden; border-radius: 6px; }
.gif-grid .gif img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gif-empty { grid-column: 1 / -1; padding: 12px 4px; font-size: 0.875rem; }
.gif-foot { display: flex; justify-content: flex-end; font-size: 0.75rem; color: var(--pk-muted); } /* just the attribution GIPHY requires (Darrell, 2026-10-08) */
.gif-foot b { white-space: nowrap; color: var(--pk-ink); font-size: 0.75rem; letter-spacing: .02em; }
.bub .photos .photo.gif { cursor: default; }
.send-row textarea { min-width: 0; width: 100%; }
.attach { position: relative; flex: none; width: 34px; height: 40px; display: grid; place-items: center; color: var(--c); cursor: pointer; border-radius: 50%; }
.attach:active { background: color-mix(in srgb, var(--c) 18%, var(--pk-surface)); }
.attach svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.file-hidden { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; pointer-events: none; }

.tray { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 2px 2px 6px; }
.tray-item { position: relative; width: 64px; height: 64px; border-radius: 10px; overflow: hidden; background: var(--pk-hover); flex: none; }
.tray-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tray-x { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgb(0 0 0 / .6); color: #fff; font-size: 0.75rem; line-height: 1; cursor: pointer; display: grid; place-items: center; padding: 0; }
.tray-busy, .tray-note { font-size: 0.8125rem; color: var(--pk-muted); }
.tray-note { flex-basis: 100%; }

.bub .photos { display: grid; gap: 3px; border-radius: 12px; overflow: hidden; width: min(260px, 62vw); }
.bub .photos.n2, .bub .photos.n4 { grid-template-columns: 1fr 1fr; }
.bub .photos.n3 { grid-template-columns: 1fr 1fr 1fr; }
.bub .photos .photo { padding: 0; border: 0; margin: 0; background: color-mix(in srgb, var(--pk-ink) 10%, transparent); cursor: zoom-in; aspect-ratio: 1; display: block; width: 100%; max-height: 360px; }
.bub .photos.n1 .photo { aspect-ratio: auto; }
.bub .photos img { width: 100%; height: 100%; object-fit: cover; display: block; -webkit-touch-callout: none; user-select: none; }
.bub .photos .photo.missing { cursor: default; }
.bub .photos .photo.missing::after { content: "Photo no longer available"; display: grid; place-items: center; height: 100%; font-size: 0.75rem; color: var(--pk-muted); }
.bub .photos .photo.missing img { display: none; }
.bub .photos + .text { margin-top: 2px; }

.photo-viewer { position: fixed; inset: 0; z-index: 900; background: rgb(0 0 0 / .94); display: grid; place-items: center; touch-action: pan-y; }
.pv-media { display: grid; place-items: center; }
.pv-media img, .pv-media video { max-width: 100vw; max-height: calc(100dvh - 120px); object-fit: contain; -webkit-touch-callout: none; user-select: none; }
.photo-viewer button { font: 600 1rem var(--pk-body); border: 0; cursor: pointer; color: #fff; background: rgb(255 255 255 / .14); }
.pv-close { position: absolute; top: calc(12px + env(safe-area-inset-top)); right: 12px; width: 40px; height: 40px; border-radius: 50%; }
.pv-prev, .pv-next { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; font-size: 1.6rem !important; line-height: 1; }
.pv-prev { left: 10px; }
.pv-next { right: 10px; }
.pv-bar { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); display: flex; align-items: center; justify-content: space-between; color: #fff; font: 600 0.9375rem var(--pk-body); }
.pv-save { border-radius: 999px; padding: 8px 18px; background: var(--pk-blue) !important; }
.save-card { background: var(--pk-surface); color: var(--pk-ink); border-radius: 16px; padding: 18px; display: grid; gap: 10px; width: min(300px, 86vw); text-align: center; }
.save-card p { margin: 0; font: 600 1rem var(--pk-body); }
.save-card .pv-cancel { background: var(--pk-hover) !important; color: var(--pk-ink) !important; border-radius: 999px; padding: 8px 18px; }

/* ---- Videos (V2-FR-174) ---- */
.bub .photos .photo { position: relative; }
.play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 44px; height: 44px; border-radius: 50%; background: rgb(0 0 0 / .55); display: grid; place-items: center; pointer-events: none; }
.play svg { width: 22px; height: 22px; fill: #fff; margin-left: 3px; }
.play.small { width: 26px; height: 26px; }
.play.small svg { width: 14px; height: 14px; margin-left: 2px; }
.dur { position: absolute; right: 6px; bottom: 6px; font: 600 0.75rem var(--pk-body); color: #fff; background: rgb(0 0 0 / .55); border-radius: 6px; padding: 1px 6px; pointer-events: none; }

/* ---- The one-time @ and @@ tip ---- */
.tip { display: flex; align-items: flex-start; gap: 10px; padding: 8px 10px; margin-bottom: 6px; border-radius: 12px; font-size: 0.8125rem; line-height: 1.35; color: var(--pk-ink); background: color-mix(in srgb, var(--c) 12%, var(--pk-surface)); }
.tip span { flex: 1; }
.tip .link-btn { flex: none; }

/* ---- Unread above / below on the main list (V2-FR-151) ---- */
.unread-signpost { position: fixed; z-index: 5; transform: translateX(-50%); font: 600 0.8125rem var(--pk-body); color: #fff; background: var(--pk-blue); border: 0; border-radius: 999px; padding: 7px 14px; box-shadow: 0 2px 8px rgb(0 0 0 / .2); cursor: pointer; }

/* ---- Admin: usage totals ---- */
.stats-table { overflow-x: auto; }
.stats-table table { width: 100%; border-collapse: collapse; font-size: 0.8125rem; font-variant-numeric: tabular-nums; }
.stats-table th, .stats-table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--pk-line); white-space: nowrap; }
.stats-table th { color: var(--pk-muted); font-weight: 600; }
.section-title { font: 700 1.0625rem var(--pk-display); color: var(--pk-heading); margin: 22px 0 4px; }

/* ---- What a square is: a small mark in its top-right corner (Darrell, 2026-10-08) ---- */
.tile { position: relative; }
.tile-mark { position: absolute; top: 4px; right: 4px; line-height: 0; pointer-events: none; } /* inside the square, top right: a watermark, not a badge on top (Darrell, 2026-10-08) */
.tile-mark svg { width: 12px; height: 12px; fill: none; stroke: currentColor; opacity: .5; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.tile.stream .tile-mark svg { stroke: #fff; opacity: .7; } /* the stream square is filled with its colour */

/* ---- The login page is also the home page: what Partakie is, in three lines (2026-10-08) ---- */
.welcome .about { display: grid; gap: 8px; max-width: 340px; margin: 0 0 18px; text-align: center; font-size: 0.9375rem; line-height: 1.45; color: var(--pk-muted); }
.welcome .about p { margin: 0; }
.welcome .about b { color: var(--pk-ink); font-weight: 600; }
.footer-links { display: flex; gap: 18px; justify-content: center; }
.start-over-link { justify-self: center; margin-top: 6px; color: var(--pk-muted); }

/* ---- Sign in with Google / Microsoft: their logos on a plain button, as their brand rules ask (2026-10-08) ---- */
.signin-buttons { display: grid; gap: 10px; width: 100%; max-width: 320px; }
.signin-btn { display: flex; align-items: center; justify-content: center; gap: 12px; height: 46px; padding: 0 16px; border-radius: 999px; border: 1px solid #747775; background: #FFFFFF; color: #1F1F1F; font: 500 0.9375rem var(--pk-body); cursor: pointer; }
.signin-btn:hover { background: #F2F2F2; }
.signin-btn svg { width: 20px; height: 20px; flex: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .signin-btn { background: #131314; color: #E3E3E3; border-color: #8E918F; }
  :root:not([data-theme="light"]) .signin-btn:hover { background: #1F1F20; }
}
:root[data-theme="dark"] .signin-btn { background: #131314; color: #E3E3E3; border-color: #8E918F; }
:root[data-theme="dark"] .signin-btn:hover { background: #1F1F20; }
