/* ===================================================================
   App shell: the top bar (same shape as the old dashboard's APPBAR) and the page area under it.
   =================================================================== */

/* nothing is shown until the session is checked */
.is-checking body {
    visibility: hidden;
}

/* ===== plan bar: above the top bar; a free trial is running / has ended, or the organization is on Free ===== */

.planbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 2px 14px;

    padding: 8px clamp(14px, 2vw, 20px);

    background: var(--color-green-soft);
    border-bottom: 1px solid color-mix(in srgb, var(--color-green) 28%, var(--color-border-soft));
    color: var(--color-text);
    font-size: 14px;
    line-height: 1.4;
    text-align: center;
}

.planbar p {
    margin: 0;
}

/* after the trial: what Free includes, quieter than the sentence before it */
.planbar-more {
    color: var(--color-text-soft);
    font-size: 13px;
}

.planbar.is-ended {
    background: color-mix(in srgb, #f59e0b 16%, var(--color-bg));
    border-bottom-color: color-mix(in srgb, #f59e0b 40%, var(--color-border-soft));
}

.planbar-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;

    color: var(--color-green-dark);
    font-weight: 700;
    white-space: nowrap;
    text-decoration: none;
}

.planbar-link:hover {
    text-decoration: underline;
}

.planbar-link svg {
    width: 15px;
    height: 15px;
}

[dir="rtl"] .planbar-link svg {
    transform: scaleX(-1);
}

/* ===== the e-mail bar: the address is not confirmed yet (yellow, like an ended trial); "Send the link again", "×" hides it ===== */

.verifybar {
    position: relative;
    padding-inline-end: 48px;   /* room for the "×" */
}

.verifybar-t {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.verifybar-t svg,
.verifybar-note svg {
    flex: none;
    width: 17px;
    height: 17px;
    color: #b45309;
}

.verifybar-send {
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    cursor: pointer;
    color: #92400e;
}

.verifybar-send:disabled { opacity: .6; cursor: default; }

.verifybar-note {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    color: var(--color-green-dark);
}

.verifybar-note svg { color: inherit; }
.verifybar-note.is-bad { color: #b91c1c; }

.verifybar-x {
    position: absolute;
    top: 50%;
    inset-inline-end: 10px;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    margin-top: -15px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: none;
    color: var(--color-text-soft);
    cursor: pointer;
}

.verifybar-x:hover { background: color-mix(in srgb, var(--color-text) 8%, transparent); color: var(--color-text); }
.verifybar-x svg { width: 16px; height: 16px; }

:root[data-theme="dark"] .verifybar-send { color: #fbbf24; }
:root[data-theme="dark"] .verifybar-t svg { color: #fbbf24; }

/* ===== the demo bar (the live demo only): a thin strip above everything, "Live demo · simulated traffic", Log in, Start free ===== */

.demobar {
    position: relative;
    z-index: 51;

    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 4px 18px;

    padding: 6px clamp(14px, 2vw, 20px);

    background: var(--color-green-ink);
    color: #ffffff;
    font-size: 13px;
    line-height: 1.35;
    text-align: center;
}

:root[data-theme="dark"] .demobar {
    background: color-mix(in srgb, var(--color-green) 22%, var(--color-bg));
    border-bottom: 1px solid color-mix(in srgb, var(--color-green) 30%, var(--color-border));
    color: var(--color-text);
}

.demobar p {
    margin: 0;
}

.demobar-t {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

/* a still dot (no endless pulse: the live part of the demo is the Real-time page itself) */
.demobar-dot {
    flex: none;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-green);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, .28);
}

.demobar-acts {
    display: inline-flex;
    align-items: center;
    gap: 14px;
}

.demobar-login {
    color: inherit;
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, .45);
    text-underline-offset: 3px;
}

:root[data-theme="dark"] .demobar-login {
    text-decoration-color: color-mix(in srgb, var(--color-text) 40%, transparent);
}

.demobar-login:hover {
    text-decoration-color: currentColor;
}

.demobar-start {
    display: inline-flex;
    align-items: center;
    gap: 5px;

    padding: 4px 12px;
    border-radius: 999px;
    background: var(--color-green);
    color: var(--color-green-ink);
    font-weight: 700;
    white-space: nowrap;
    text-decoration: none;
    transition: background-color .15s var(--ease);
}

.demobar-start:hover {
    background: #4ade80;
}

.demobar-start svg {
    width: 14px;
    height: 14px;
}

[dir="rtl"] .demobar-start svg {
    transform: scaleX(-1);
}

.demobar a:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

:root[data-theme="dark"] .demobar a:focus-visible {
    outline-color: var(--color-green);
}

@media (prefers-reduced-motion: reduce) {
    .demobar-start {
        transition: none;
    }
}

/* ===== top bar ===== */

.appbar {
    position: sticky;
    top: 0;
    z-index: 50;

    /* its own surface: nearly solid, a line under it and a soft shadow, so it never blends into what is behind (the map) */
    background: color-mix(in srgb, var(--color-bg) 96%, transparent);
    -webkit-backdrop-filter: saturate(1.4) blur(10px);
    backdrop-filter: saturate(1.4) blur(10px);
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 2px 14px rgba(15, 23, 42, .07);
}

:root[data-theme="dark"] .appbar {
    box-shadow: 0 2px 16px rgba(0, 0, 0, .35);
}

.appbar-inner {
    display: flex;
    align-items: center;
    gap: 14px;

    min-height: 56px;
    padding: 0 clamp(14px, 2vw, 20px);
}

.appbar-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    margin-right: 6px;
    border-radius: 6px;
}

.appbar-logo img {
    height: 20px;
    width: auto;
}

.appbar-logo .logo-dark {
    display: none;
}

:root[data-theme="dark"] .appbar-logo .logo-light {
    display: none;
}

:root[data-theme="dark"] .appbar-logo .logo-dark {
    display: block;
}

/* ===== menu ===== */

.appnav ul {
    display: flex;
    gap: 4px;
    height: 56px;
}

.appnav li {
    display: flex;
    align-items: center;
}

/* every item is readable (full-contrast text); the current one is a filled pill, with the line under it */
.appnav-item {
    position: relative;

    display: flex;
    align-items: center;
    gap: 8px;

    height: 38px;
    padding: 0 13px;
    border-radius: 10px;

    font-size: 13.5px;
    font-weight: 600;
    white-space: nowrap;
    color: var(--color-text);

    transition: color .18s var(--ease), background .18s var(--ease);
}

.appnav-item svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

a.appnav-item:hover {
    background: color-mix(in srgb, var(--color-text) 8%, transparent);
}

a.appnav-item:focus-visible {
    outline-offset: -2px;
}

.appnav-item[aria-current="page"] {
    background: color-mix(in srgb, var(--color-green) 18%, transparent);
    color: #15803d;
    font-weight: 800;
}

:root[data-theme="dark"] .appnav-item[aria-current="page"] {
    color: var(--color-green);
}

/* the line under the current page */
.appnav-item[aria-current="page"]::after {
    content: "";
    position: absolute;
    left: 13px;
    right: 13px;
    bottom: -10px;
    height: 2px;
    border-radius: 2px 2px 0 0;
    background: var(--color-green);
}

/* a page that is not there yet: as readable as the others, with a small dot ("Coming soon" is its tooltip) */
.appnav-item.is-disabled {
    cursor: default;
}

.appnav-item.is-disabled > span::after {
    content: "";
    display: inline-block;
    width: 5px;
    height: 5px;
    margin-inline-start: 6px;
    border-radius: 50%;
    background: var(--color-text-muted);
    vertical-align: middle;
}

/* ===== right side ===== */

.appbar-tools {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

.tool-btn {
    display: inline-grid;
    place-items: center;

    min-width: 34px;
    height: 34px;
    padding: 0 8px;

    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: none;
    color: var(--color-text-soft);

    font-size: 12px;
    font-weight: 800;

    transition: color .18s var(--ease), border-color .18s var(--ease);
}

.tool-btn:hover:not(:disabled) {
    color: var(--color-text);
    border-color: var(--color-text-muted);
}

/* the gear while Settings is open */
.tool-btn[aria-current="page"] {
    border-color: color-mix(in srgb, var(--color-green) 55%, transparent);
    background: color-mix(in srgb, var(--color-green) 14%, transparent);
    color: var(--color-green-dark);
}

:root[data-theme="dark"] .tool-btn[aria-current="page"] {
    color: var(--color-green);
}

.tool-btn:disabled {
    opacity: .42;
    cursor: default;
}

.tool-btn svg {
    width: 18px;
    height: 18px;
}

.theme-toggle .icon-moon {
    display: none;
}

:root[data-theme="dark"] .theme-toggle .icon-sun {
    display: none;
}

:root[data-theme="dark"] .theme-toggle .icon-moon {
    display: block;
}

/* ===== user menu ===== */

.usermenu {
    position: relative;
    margin-left: 4px;
}

.user-btn {
    display: grid;
    place-items: center;

    width: 34px;
    height: 34px;

    border-radius: 50%;
    /* the person's colour (--av, set by shell.js; green until it is known): the same initials look as in Settings → Profile */
    --av: var(--color-green);
    background: color-mix(in srgb, var(--av) 20%, transparent);
    color: color-mix(in srgb, var(--av) 80%, var(--color-text));

    font-size: 12.5px;
    font-weight: 800;

    box-shadow: 0 0 0 1px color-mix(in srgb, var(--av) 40%, transparent);
    transition: box-shadow .18s var(--ease);
}

.user-btn:hover,
.user-btn[aria-expanded="true"] {
    box-shadow: 0 0 0 2px var(--av);
}

/* the person's photo over their initials (Settings → Profile); a photo that does not load is removed, the initials stay */
.user-btn,
.usermenu-av {
    position: relative;
    overflow: hidden;
}

.user-av-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

/* the head of the user menu: the picture, then the name and the e-mail */
.usermenu-head {
    display: flex;
    align-items: center;
    gap: 12px;
}

.usermenu-av {
    display: grid;
    flex: none;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    --av: var(--color-green);
    background: color-mix(in srgb, var(--av) 20%, transparent);
    color: color-mix(in srgb, var(--av) 80%, var(--color-text));
    font-size: 14.5px;
    font-weight: 800;
}

.usermenu-who { min-width: 0; }

.usermenu-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;

    width: 270px;
    padding: 16px;
    /* a long list of organizations scrolls inside, so the last ones and Log out stay reachable on a short screen */
    max-height: calc(100vh - 74px);
    max-height: calc(100dvh - 74px);
    overflow-y: auto;
    overscroll-behavior: contain;

    border: 1px solid var(--color-border-soft);
    border-radius: 14px;
    background: var(--color-bg);
    box-shadow: var(--shadow-lg);
}

.usermenu-panel[hidden] {
    display: none;
}

.usermenu-name {
    font-size: 15px;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.usermenu-mail {
    margin-top: 2px;
    font-size: 13px;
    color: var(--color-text-soft);
    overflow-wrap: anywhere;
}

.usermenu-org {
    margin-top: 10px;
    padding-top: 10px;

    border-top: 1px solid var(--color-border-soft);

    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-soft);
}

.usermenu-plan {
    margin-inline-start: 6px;
    padding: 2px 8px;

    border-radius: 999px;
    background: var(--color-green-soft);
    color: var(--color-green-dark);

    font-size: 11.5px;
    font-weight: 800;
}

:root[data-theme="dark"] .usermenu-plan {
    color: var(--color-green);
}

/* "Profile" (everyone) and "Plan and usage" (owners and admins): to Settings */
.usermenu-link {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--color-text);
    transition: background-color .15s ease;
}

.usermenu-link:hover {
    background: var(--color-bg-soft);
}

/* "Profile" and "Plan and usage" one under the other */
.usermenu-link + .usermenu-link {
    margin-top: 2px;
}

.usermenu-link svg {
    flex: none;
    width: 18px;
    height: 18px;
    color: var(--color-text-soft);
}

/* the person's organizations (two or more): the current one has a tick; another one is switched to with a click */
.usermenu-orgs {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--color-border-soft);
}

.usermenu-orgs-t {
    margin-bottom: 4px;
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

.usermenu-orgitem {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-height: 38px;
    padding: 6px 10px;
    border-radius: 9px;
    color: var(--color-text);
    font-size: 13.5px;
    font-weight: 600;
    text-align: start;
    transition: background-color .15s ease;
}

.usermenu-orgitem:hover:not(:disabled) {
    background: var(--color-bg-soft);
}

.usermenu-orgitem:disabled {
    opacity: .6;
    cursor: progress;
}

.usermenu-orgitem[aria-current="true"] {
    font-weight: 800;
}

.usermenu-orgname {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.usermenu-orgplan {
    flex: none;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--color-text-muted);
}

.usermenu-orgitem svg {
    flex: none;
    width: 16px;
    height: 16px;
    color: var(--color-green-dark);
}

:root[data-theme="dark"] .usermenu-orgitem svg {
    color: var(--color-green);
}

/* leaving the current organization: a quiet text button, then the question with Leave / Cancel in its place */
.usermenu-leave {
    margin-top: 4px;
    padding-inline: 10px;
}

.usermenu-leavebtn {
    padding: 4px 0;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--color-text-muted);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.usermenu-leavebtn:hover {
    color: #dc2626;
}

.usermenu-leave-q {
    margin: 4px 0 8px;
    font-size: 12.5px;
    line-height: 1.45;
    color: var(--color-text);
    outline: none;   /* (focused only to keep the menu open while it waits for the answer) */
}

.usermenu-leave-acts {
    display: flex;
    gap: 8px;
}

.usermenu-leave-yes,
.usermenu-leave-no {
    padding: 6px 12px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 700;
}

.usermenu-leave-yes {
    background: #dc2626;
    color: #fff;
}

.usermenu-leave-yes:hover:not(:disabled) {
    background: #b91c1c;
}

.usermenu-leave-no {
    color: var(--color-text);
}

.usermenu-leave-no:hover:not(:disabled) {
    background: var(--color-bg-soft);
}

.usermenu-leave-yes:disabled,
.usermenu-leave-no:disabled {
    opacity: .6;
    cursor: progress;
}

/* the last owner cannot leave yet: the way out (People) in place of Leave */
.usermenu-leave-go {
    padding: 6px 12px;
    border-radius: 9px;
    background: var(--color-green);
    color: var(--color-green-ink);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.usermenu-leave-go:hover {
    filter: brightness(.95);
}

.usermenu-leave[aria-busy="true"] .usermenu-leavebtn {
    cursor: progress;
    opacity: .6;
}

.usermenu-leavebtn:focus-visible,
.usermenu-leave-yes:focus-visible,
.usermenu-leave-no:focus-visible,
.usermenu-leave-go:focus-visible {
    outline: 2px solid var(--color-green);
    outline-offset: 2px;
}

.usermenu-logout {
    display: flex;
    align-items: center;
    gap: 10px;

    width: 100%;
    margin-top: 12px;
    padding: 10px 12px;

    border-radius: 10px;

    font-size: 14px;
    font-weight: 700;
    color: var(--color-text);

    transition: background-color .15s ease;
}

.usermenu-logout:hover {
    background: var(--color-bg-soft);
}

.usermenu-logout:disabled {
    opacity: .6;
    cursor: progress;
}

.usermenu-logout svg {
    width: 18px;
    height: 18px;
    color: var(--color-text-soft);
}

/* ===== the page area (a placeholder until the real pages come) ===== */

.app-main {
    padding: clamp(36px, 8vh, 96px) clamp(16px, 4vw, 40px);
}

.app-welcome {
    max-width: 640px;
    margin: 0 auto;
    text-align: center;
}

.app-welcome h1 {
    font-size: clamp(28px, 4vw, 38px);
    font-weight: 800;
    letter-spacing: -.02em;
}

.app-org {
    margin-top: 6px;
    font-size: 16px;
    font-weight: 600;
    color: var(--color-green-dark);
}

:root[data-theme="dark"] .app-org {
    color: var(--color-green);
}

.app-soon {
    margin-top: 22px;
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text-soft);
}

/* ===== small screens: icons only, then the menu drops to its own row ===== */

@media (max-width: 1000px) {

    .appnav-item {
        padding: 0 11px;
    }

    .appnav-item span {
        position: absolute;
        width: 1px;
        height: 1px;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
    }

    .appnav-item[aria-current="page"]::after {
        left: 10px;
        right: 10px;
    }

    .appnav-item.is-disabled > span::after {
        display: none;
    }
}

@media (max-width: 560px) {

    .appbar-inner {
        flex-wrap: wrap;
        row-gap: 0;
    }

    .appbar-logo {
        height: 56px;
    }

    .appbar-tools {
        height: 56px;
    }

    .appnav {
        order: 3;
        flex-basis: 100%;
        margin: 0 -14px;
        padding: 0 8px;
        border-top: 1px solid var(--color-border-soft);
        overflow-x: auto;
    }

    .appnav ul {
        height: 46px;
        justify-content: space-between;
    }

    .appnav-item {
        padding: 0 16px;
    }

    .appnav-item[aria-current="page"]::after {
        bottom: -5px;
    }

    .usermenu-panel {
        position: fixed;
        top: 62px;
        right: 12px;
        left: 12px;
        width: auto;
    }
}

/* ===== right-to-left languages (Arabic) ===== */

[dir="rtl"] .usermenu-panel {
    right: auto;
    left: 0;
}

@media (max-width: 560px) {

    [dir="rtl"] .usermenu-panel {
        left: 12px;
    }
}

/* ===== Add-ons: a menu section that opens a small list (Website Chat, later Website Widget); scripts/shell.js navGroup ===== */

.appnav-groupbtn {
    border: 0;
    background: none;
    font-family: inherit;
    cursor: pointer;
}

.appnav-groupbtn:hover {
    background: color-mix(in srgb, var(--color-text) 8%, transparent);
}

.appnav-groupbtn .appnav-caret {
    width: 14px;
    height: 14px;
    opacity: .6;
    transition: transform .18s var(--ease);
}

.appnav-groupbtn[aria-expanded="true"] .appnav-caret {
    transform: rotate(180deg);
}

/* one of its pages is open: the button looks like the current menu item */
.appnav-groupbtn.is-current {
    background: color-mix(in srgb, var(--color-green) 18%, transparent);
    color: #15803d;
    font-weight: 800;
}

:root[data-theme="dark"] .appnav-groupbtn.is-current {
    color: var(--color-green);
}

.appnav-groupbtn.is-current::after {
    content: "";
    position: absolute;
    left: 13px;
    right: 13px;
    bottom: -10px;
    height: 2px;
    border-radius: 2px 2px 0 0;
    background: var(--color-green);
}

.appnav .appnav-sub {
    position: fixed;
    z-index: 60;
    display: block;
    height: auto;
    min-width: 210px;
    padding: 6px;
    border: 1px solid var(--color-border-soft);
    border-radius: 12px;
    background: var(--color-bg);
    box-shadow: var(--shadow-lg);
}

.appnav .appnav-sub[hidden] {
    display: none;
}

.appnav .appnav-sub li {
    display: block;
}

.appnav-subitem {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 600;
    white-space: nowrap;
    color: var(--color-text);
}

.appnav-subitem svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.appnav-subitem:hover {
    background: color-mix(in srgb, var(--color-text) 8%, transparent);
}

.appnav-subitem[aria-current="page"] {
    background: color-mix(in srgb, var(--color-green) 18%, transparent);
    color: #15803d;
    font-weight: 800;
}

:root[data-theme="dark"] .appnav-subitem[aria-current="page"] {
    color: var(--color-green);
}

@media (max-width: 1000px) {

    .appnav-groupbtn .appnav-caret {
        display: none;
    }

    .appnav-groupbtn.is-current::after {
        left: 10px;
        right: 10px;
    }
}

@media (max-width: 560px) {

    .appnav-groupbtn.is-current::after {
        bottom: -5px;
    }
}

/* ===== Chat: the number of waiting conversations on the menu item, and the popup when a visitor writes (scripts/shell.js) ===== */

.appnav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--color-green);
    color: var(--color-green-ink);
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
}

.appnav-badge[hidden] { display: none; }

@media (max-width: 1000px) {

    /* icons only: the number sits on the corner of the icon */
    .appnav-item span.appnav-badge {
        position: absolute;
        top: 3px;
        inset-inline-end: 3px;
        width: auto;
        height: 16px;
        min-width: 16px;
        margin: 0;
        padding: 0 4px;
        overflow: visible;
        clip: auto;
        font-size: 10px;
    }
}

/* ===== the menu does not fit (a window between the sizes above, or a language with longer names): scripts/shell.js fitNav
   measures it and steps down: first tighter (smaller gaps, the names stay), then icons only (each with its name as a tooltip),
   exactly as below 1000px. Nothing ever sticks out of the window. ===== */

.appbar.is-tight .appbar-inner { gap: 8px; }
.appbar.is-tight .appbar-logo { margin-right: 0; }
.appbar.is-tight .appnav ul { gap: 1px; }
.appbar.is-tight .appnav-item { gap: 6px; padding: 0 9px; font-size: 13px; }
.appbar.is-tight .appnav-item[aria-current="page"]::after,
.appbar.is-tight .appnav-groupbtn.is-current::after { left: 9px; right: 9px; }
.appbar.is-tight .appbar-tools { gap: 4px; }

.appbar.is-compact .appnav-item { padding: 0 11px; }
.appbar.is-compact .appnav-item span {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}
.appbar.is-compact .appnav-item[aria-current="page"]::after,
.appbar.is-compact .appnav-groupbtn.is-current::after { left: 10px; right: 10px; }
.appbar.is-compact .appnav-item.is-disabled > span::after,
.appbar.is-compact .appnav-groupbtn .appnav-caret { display: none; }
.appbar.is-compact .appnav-item span.appnav-badge {
    position: absolute;
    top: 3px;
    inset-inline-end: 3px;
    width: auto;
    height: 16px;
    min-width: 16px;
    margin: 0;
    padding: 0 4px;
    overflow: visible;
    clip: auto;
    font-size: 10px;
}

.chatpop {
    position: fixed;
    z-index: 1500;
    inset-inline-end: 20px;
    bottom: 20px;
    display: flex;
    align-items: flex-start;
    width: min(360px, calc(100vw - 32px));
    border: 1px solid color-mix(in srgb, var(--color-green) 40%, var(--color-border));
    border-radius: 16px;
    background: var(--color-bg);
    box-shadow: var(--shadow-lg);
    color: var(--color-text);
    font-family: var(--font-sans);
    animation: chatpop-in .25s var(--ease);
}

@keyframes chatpop-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
    .chatpop { animation: none; }
}

.chatpop-main {
    display: flex;
    flex: 1;
    align-items: flex-start;
    gap: 12px;
    min-width: 0;
    padding: 14px 4px 14px 14px;
    border-radius: 16px 0 0 16px;
    text-align: start;
}

[dir="rtl"] .chatpop-main { border-radius: 0 16px 16px 0; padding: 14px 14px 14px 4px; }

.chatpop-ico {
    display: grid;
    flex: none;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--color-green-soft);
    color: var(--color-green-dark);
}

:root[data-theme="dark"] .chatpop-ico { color: var(--color-green); }

.chatpop-ico svg { width: 20px; height: 20px; }

.chatpop-text {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.chatpop-t {
    font-size: 14px;
    font-weight: 800;
}

.chatpop-body {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 14px;
    line-height: 1.4;
    color: var(--color-text-soft);
    overflow-wrap: anywhere;
}

.chatpop-site {
    font-size: 12px;
    color: var(--color-text-muted);
}

.chatpop-go {
    align-self: center;
    flex: none;
    padding: 7px 12px;
    border-radius: 10px;
    background: var(--color-green);
    color: var(--color-green-ink);
    font-size: 13px;
    font-weight: 800;
}

.chatpop-main:hover .chatpop-go { filter: brightness(.95); }

.chatpop-x {
    display: grid;
    flex: none;
    place-items: center;
    width: 32px;
    height: 32px;
    margin: 6px 6px 0 0;
    border-radius: 8px;
    color: var(--color-text-muted);
}

[dir="rtl"] .chatpop-x { margin: 6px 0 0 6px; }

.chatpop-x:hover { background: color-mix(in srgb, var(--color-text) 8%, transparent); color: var(--color-text); }

.chatpop-x svg { width: 16px; height: 16px; }

@media (max-width: 560px) {
    .chatpop { inset-inline: 16px; bottom: 16px; width: auto; }
}
