/* Pods & Rooms test page: layout only. Colours, fonts, stars, buttons (.space-button,
   .icon-button, .profile-tab), fields (.edit-field, .edit-label, .edit-input), the search box
   (.search-input), pop-ups (.post-dialog-*) and toasts come from the site's ../style.css,
   which loads first. This file adds the app layout (top bar, sidebar, pages, member panels)
   and a few size tweaks on the site's pieces. */

:root {
    /* Extra shades this page needs on top of the site's colours. */
    --dim: #a8a8a8;
    --line: rgba(240, 240, 240, 0.45);
    --line-soft: rgba(240, 240, 240, 0.18);
    --online: #7ee2a8;
    --danger: #ff8a8a;
    --bar-h: 72px;
    --rail-w: 86px;
}

/* ---------- Page base ---------- */

/* The site centres its pages in the body; this page is a full-window app instead. */
body.pods-page {
    display: block;
    height: 100vh;
    min-height: 0;
}

/* Keep the site's stars behind the app. */
.pods-page .stars {
    z-index: -1;
}

/* Resets are wrapped in :where() so they're weaker than any class, letting the site's
   .space-button, .icon-button, .search-input and .edit-input keep their own styles. */
:where(.pods-page) *,
:where(.pods-page) *::before,
:where(.pods-page) *::after {
    box-sizing: border-box;
}

:where(.pods-page) :where(button, input, textarea, select) {
    font: inherit;
    letter-spacing: inherit;
    color: inherit;
}

:where(.pods-page) button {
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
}

:where(.pods-page) :focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

:where(.pods-page) .material-symbols-outlined {
    flex: none;
    font-size: 20px;
}

.hidden {
    display: none !important;
}

/* Normal capitals here, not ALL CAPS: in capitals, Orbitron's O and D look the same. */
.pods-page .space-button,
.pods-page .post-dialog-title,
.pods-page .edit-label {
    text-transform: none;
}

/* Usernames use the site's plain font. */
.message-header strong,
.side-member-name strong,
.friend-copy strong,
.user-detail strong,
.reply-bar strong,
.private-room-members > label span,
.pod-pending > div span {
    font-family: var(--font-plain);
    letter-spacing: normal;
    word-spacing: normal;
}

/* Thin accent scrollbars, as on the site's scrolling boxes. */
.pods-page * {
    scrollbar-width: thin;
    scrollbar-color: var(--accent) transparent;
}

/* ---------- Sizes for the site's buttons ---------- */

.pods-page .space-button {
    align-items: center;
    gap: 8px;
}

.pods-page .space-button .material-symbols-outlined {
    font-size: 16px;
}

/* Main actions: a bit smaller than the site's 1.05rem default. */
.directory-create,
.hero-action,
.pod-join-btn {
    padding: 11px 16px;
    font-size: 0.7rem;
    white-space: nowrap;
}

/* Small actions inside cards and panels. */
.side-invite,
.friend-action {
    padding: 8px 12px;
    font-size: 0.6rem;
    white-space: nowrap;
    box-shadow: 3px 3px 0 var(--border);
}

.side-invite {
    justify-content: center;
}

/* Page icon buttons (not the site's quick actions, which keep the site's size). */
.pods-page .icon-button:not(.sidebar *) .material-symbols-outlined {
    font-size: 20px;
}

/* On (its panel open): a lavender icon. The border only turns lavender on hover. */
.sidebar-toggle[aria-expanded="true"],
.pod-member-toggle[aria-expanded="true"] {
    color: var(--accent);
}

.pods-page .sidebar-toggle:hover,
.pods-page .sidebar-toggle:focus-visible {
    border-color: var(--accent);
}

/* Panel toggles are square, like the banner buttons (.pod-customize). */
.pods-page .icon-button.sidebar-toggle,
.pods-page .icon-button.pod-member-toggle {
    width: 38px;
    height: 38px;
    border-radius: 0;
    background: var(--bg);
}

.pods-page .icon-button.sidebar-toggle .material-symbols-outlined,
.pods-page .icon-button.pod-member-toggle .material-symbols-outlined {
    font-size: 18px;
}

/* While a panel is open, its toggle sits half on the panel's edge, the way the banner
   buttons sit half on the banner's border: the sidebar's on its right edge, the Pod
   members panel's on its left edge. */
.sidebar-head .sidebar-toggle,
.pod-members-sidebar > .pod-member-toggle {
    position: absolute;
    top: 22px;
    z-index: 6;
}

.sidebar-head .sidebar-toggle {
    right: 0;
    transform: translateX(50%);
}

.pod-members-sidebar > .pod-member-toggle {
    left: 0;
    transform: translateX(-50%);
}

/* On desktop the sidebar toggle stays in the same spot on the page, open or closed (lavender
   when open). The Pod members toggle moves onto its panel's edge while the panel is open.
   On phones the panels are drawers that cover the page, so each drawer keeps its own
   toggle on its edge for closing it. */
/* The Quick access menu's toggle: top right of its head while it's open (on the Pod shortcuts
   rail while it's closed, and in the top bar on phones). */
/* Tucked into the menu's top right corner, sharing its borders (its own on the left and bottom). */
.sidebar-head .sidebar-toggle {
    top: 0;
    right: 0;
    border-top: 0;
    border-right: 0;
    transform: none;
}

/* On the Pod shortcuts rail: no border or box, just the icon. */
.pods-page .pod-rail-top .sidebar-toggle {
    border: 0;
    background: none;
    color: var(--text);
}

.pods-page .pod-rail-top .sidebar-toggle:hover,
.pods-page .pod-rail-top .sidebar-toggle:focus-visible {
    color: var(--accent);
}

/* (Quick taps on the toggles are taps, not a double-tap zoom.) */
.sidebar-toggle,
.pod-member-toggle {
    touch-action: manipulation;
}

/* side_navigation flips while the menu is open, and flips over when it opens or closes. */
.sidebar-toggle[aria-expanded="true"] .material-symbols-outlined {
    transform: scaleX(-1);
}

.sidebar-toggle[aria-expanded="true"] .material-symbols-outlined.is-flipping {
    animation: sidebar-toggle-open 0.3s ease;
}

.sidebar-toggle[aria-expanded="false"] .material-symbols-outlined.is-flipping {
    animation: sidebar-toggle-close 0.3s ease;
}

@keyframes sidebar-toggle-open {
    from { transform: scaleX(1); }
    to { transform: scaleX(-1); }
}

@keyframes sidebar-toggle-close {
    from { transform: scaleX(-1); }
    to { transform: scaleX(1); }
}

@media (prefers-reduced-motion: reduce) {
    .sidebar-toggle .material-symbols-outlined.is-flipping {
        animation: none;
    }
}

@media (min-width: 761px) {
    .pods-page .global-nav > .sidebar-toggle {
        display: none;
    }
}

/* (Phones: the top bar's toggle closes the drawer, so the menu head doesn't need its own.) */
@media (max-width: 760px) {
    .sidebar-head .sidebar-toggle {
        display: none;
    }
}

/* The member panel toggle (recent_actors, Material Icons Sharp): with the banner buttons while
   the panel's closed, top left of the panel's head while it's open. */
.member-toggle-banner,
.member-toggle-head {
    display: inline-flex;
    flex: none;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 2px solid var(--border);
    background: var(--bg);
    color: var(--text);
    cursor: pointer;
}

.member-toggle-banner[hidden] {
    display: none;
}

.member-toggle-banner .material-icons-sharp,
.member-toggle-head .material-icons-sharp {
    font-size: 20px;
}

.member-toggle-banner:hover,
.member-toggle-banner:focus-visible,
.member-toggle-head:hover,
.member-toggle-head:focus-visible {
    border-color: var(--accent);
    color: var(--accent);
}

/* In the panel's top left corner, sharing its borders (its own on the right and bottom). */
.member-sidebar-head:has(> .member-toggle-head) {
    justify-content: flex-start;
    padding-left: 52px;
}

.member-sidebar-head > .member-toggle-head {
    position: absolute;
    top: 0;
    left: 0;
    border-top: 0;
    border-left: 0;
}

/* Its tooltip opens below, lined up with its left edge (into the panel): the site's below
   tooltips line up with the right edge, which would run off the panel's left side here. */
.member-toggle-head.badge-tooltip.tooltip-below::after {
    left: 0;
    right: auto;
}

.member-toggle-head.badge-tooltip.tooltip-below::before {
    left: 10px;
    right: auto;
}

/* The Quick access and member toggles in the top bar: tabs like ourPods / Friends (an icon each),
   either side of them, lavender while their panel is open. They hang just outside the two tabs,
   so those stay in the middle whether the member toggle is showing or not. */
.pods-page .global-nav {
    position: relative;
}

.pods-page .global-nav > .nav-toggle {
    position: absolute;
    bottom: 0;
    width: 42px;
    padding: 0;
}

.pods-page .global-nav > .sidebar-toggle {
    right: calc(100% + 4px);
}

.pods-page .global-nav > .pod-member-toggle {
    left: calc(100% + 4px);
}

.pods-page .global-nav > .nav-toggle[hidden] {
    display: none;
}

.pods-page .global-nav > .nav-toggle[aria-expanded="true"] {
    color: var(--accent);
}

/* ---------- Tooltips ---------- */

/* Icon buttons use the site's .badge-tooltip with its own placements (tooltip-below,
   tooltip-left, tooltip-right), delay and fade, all from style.css. Here: these are buttons,
   so they keep the pointer, and normal capitals. */
.pods-page .badge-tooltip {
    cursor: pointer;
}

/* (Site role tags only explain themselves.) */
.pods-page .perm-role.badge-tooltip {
    cursor: help;
}

.pods-page .badge-tooltip::after {
    text-transform: none;
}

/* Quieter buttons: thin border, no shadow. */
.friend-minor,
.pod-pending button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 10px;
    border: 1px solid rgba(255, 68, 68, 0.815);
    background: var(--bg);
    color: rgba(255, 68, 68, 0.815);
    font-size: 0.6rem;
    font-weight: 600;
    white-space: nowrap;
}

.friend-minor:hover,
.pod-pending button:hover {
    border-color: var(--accent);
    color: white;
}

/* ---------- Shared page pieces ---------- */

/* Title tags that sit half on a frame's top border, like the site's section titles. */
.hero-pill,
.friends-panel > h2,
.pod-entrance .page-eyebrow,
.room-parent {
    position: absolute;
    top: 0;
    left: 20px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: calc(100% - 40px);
    margin: 0;
    padding: 7px 12px;
    border: 2px solid var(--border);
    background: var(--bg);
    color: var(--accent);
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    white-space: nowrap;
    transform: translateY(-50%);
}

.page-eyebrow span {
    color: var(--text);
}

/* Avatars: square with a thin border, like the site's post avatars. */
.avatar {
    position: relative;
    display: grid;
    flex: none;
    place-items: center;
    border: 1px solid var(--border);
    color: #fff;
    font-weight: 800;
    font-size: 0.75rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

/* ---------- App frame ---------- */

/* Quick access menu, the page, and a rail on the right for the site's quick actions. */
.app {
    display: grid;
    grid-template-columns: 270px minmax(0, 1fr) var(--rail-w);
    grid-template-rows: var(--bar-h) minmax(0, 1fr);
    height: 100dvh;
}

.app.sidebar-collapsed {
    --left-w: var(--pod-rail-w, 0px);
    grid-template-columns: var(--pod-rail-w, 0px) minmax(0, 1fr) var(--rail-w);
}

/* Pod shortcuts down the left while the Quick access menu is closed (bigger screens): round
   icon buttons with just the Pod's picture. */
.pod-rail {
    display: none;
}

.app.sidebar-collapsed {
    --pod-rail-w: 72px;
}

/* (z-index over the Pod's sticky entrance row, 8, so the tooltips go over its banner.) */
.app.sidebar-collapsed .pod-rail {
    position: relative;
    z-index: 9;
    grid-column: 1;
    grid-row: 2;
    display: flex;
    min-height: 0;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 16px 0;
    border-top: 2px solid var(--border);
    border-right: 2px solid var(--border);
    /* (Frosted, like the Quick access menu it stands in for.) */
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* The menu's toggle on top, split from the Pods by a line. */
.pod-rail-top {
    display: flex;
    flex: none;
    align-self: stretch;
    justify-content: center;
    /* (Pulled up into the rail's top padding: about a Pod button's height above the line.) */
    margin-top: -12px;
    padding-bottom: 4px;
    border-bottom: 2px solid var(--border);
}

/* The same size as the Pod buttons under it. */
.pods-page .pod-rail-top .sidebar-toggle {
    width: 46px;
    height: 46px;
}

@media (max-width: 1100px) {
    .app.sidebar-collapsed .pod-rail-top {
        margin-top: -8px;
    }

    .pods-page .pod-rail-top .sidebar-toggle {
        width: 38px;
        height: 38px;
    }
}

.pod-rail.is-scrolling {
    overflow-y: auto;
    scrollbar-width: none;
}

.pods-page .pod-rail-item {
    flex: none;
    cursor: pointer;
    color: var(--accent);
}

.pod-rail-item .pod-picture {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.pod-rail-item:hover,
.pod-rail-item:focus-visible,
.pod-rail-item.active {
    border-color: var(--accent);
}

/* Smaller screens: a narrower rail with smaller buttons. */
@media (max-width: 1100px) {
    .app.sidebar-collapsed {
        --pod-rail-w: 58px;
    }

    .app.sidebar-collapsed .pod-rail {
        gap: 8px;
        padding: 12px 0;
    }

    .pods-page .pod-rail-item {
        width: 38px;
        height: 38px;
    }

    .pods-page .pod-rail-item .material-symbols-outlined {
        font-size: 17px;
    }
}

/* The site's quick actions (settings, notifications, search, profile), down the right: the
   first one sits in the top bar, the rest in the rail under it. */
.pods-page > .sidebar {
    top: calc((var(--bar-h) - 46px) / 2);
    z-index: 30;
}

.app.sidebar-collapsed .app-sidebar {
    overflow: hidden;
    border: 0;
    visibility: hidden;
}

/* Top bar */
.globalbar {
    grid-column: 1 / -1;
    grid-row: 1;
    z-index: 25;
    display: flex;
    min-width: 0;
    /* The nav tabs sit on the bottom edge, over the page's top line. */
    align-items: flex-end;
    /* The nav in the middle (the logo is fixed in the corner, like the other pages). */
    justify-content: center;
    gap: 14px;
    /* (Always in the middle of the window, whether the Quick access menu is open or not.) */
    padding: 0 20px;
    background: var(--bg);
}

/* The nav as browser tabs: they sit on the line along the top of the page, and the open one
   joins the page under it. */
.main {
    border-top: 2px solid var(--border);
    border-right: 2px solid var(--border);
}

.global-nav {
    display: flex;
    flex: none;
    align-items: flex-end;
    gap: 4px;
}

/* The other tabs stand on the page's top line (no bottom border of their own). */
.global-nav .space-button {
    height: 32px;
    justify-content: center;
    gap: 8px;
    padding: 0 18px;
    border-color: var(--line);
    border-bottom: 0;
    box-shadow: none;
    color: var(--muted);
    font-size: 0.68rem;
}

.global-nav .space-button:hover {
    border-color: var(--accent);
    box-shadow: none;
}

/* The open tab reaches down over the line and covers it, so it joins the page. */
.global-nav .space-button.is-active {
    height: 34px;
    margin-bottom: -2px;
    border-color: var(--border);
    border-bottom: 2px solid var(--bg);
    background: var(--bg);
    box-shadow: none;
    color: var(--accent);
}

.global-nav .material-symbols-outlined {
    font-size: 16px;
}

/* ---------- Sidebar ---------- */

.app-sidebar {
    position: relative;
    z-index: 5;
    grid-column: 1;
    grid-row: 2;
    display: flex;
    min-width: 0;
    min-height: 0;
    flex-direction: column;
    border-right: 2px solid var(--border);
    border-top: 2px solid var(--border);
    background: none;
}

.sidebar-head {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 18px 16px 14px;
    border-bottom: 1px solid var(--line-soft);
    background: var(--panel);
}

.sidebar-kicker {
    color: var(--dim);
    font-size: 0.58rem;
    letter-spacing: 0.2em;
}

.sidebar-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--accent);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.06em;
}

.sidebar-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 12px;
    padding: 0 4px 4px 0;
}

.sidebar-tabs .space-button {
    justify-content: center;
    padding: 9px 6px;
    font-size: 0.64rem;
}

.sidebar-tabs .material-symbols-outlined {
    font-size: 15px;
}

/* The list and Google's notice under it, in one frosted box (like the site's sidebar strip). */
.sidebar-frost {
    display: flex;
    flex: 1;
    min-height: 0;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.sidebar-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 18px 14px 20px;
}

.sidebar-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 2px 12px;
    color: var(--accent);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.16em;
}

.sidebar-section-head button {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--muted);
}

.sidebar-section-head button:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.sidebar-section-head button .material-symbols-outlined {
    font-size: 15px;
}

.recent-count {
    padding: 2px 7px;
    border: 1px solid var(--line);
    color: var(--muted);
    letter-spacing: 0.04em;
}

.shortcut-item,
.recent-item {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 10px;
    margin: 0 0 8px;
    padding: 9px 10px;
    border: 1px solid var(--line);
    background: var(--bg);
    color: var(--text);
    text-align: left;
}

.shortcut-item:hover,
.recent-item:hover {
    border-color: var(--accent);
}

.shortcut-item.active {
    border-color: var(--accent);
    box-shadow: 3px 3px 0 var(--accent);
}

.shortcut-icon,
.recent-orb {
    display: grid;
    width: 30px;
    height: 30px;
    flex: none;
    place-items: center;
    border: 1px solid var(--border);
    background: var(--panel);
    color: var(--accent);
}

.shortcut-icon .material-symbols-outlined,
.recent-orb .material-symbols-outlined {
    font-size: 15px;
}

.shortcut-item > span:nth-child(2),
.recent-item > span:last-child {
    flex: 1;
    min-width: 0;
}

.shortcut-item strong,
.recent-item strong {
    display: block;
    overflow: hidden;
    font-size: 0.66rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shortcut-item small,
.recent-item small {
    display: block;
    margin-top: 4px;
    overflow: hidden;
    color: var(--dim);
    font-size: 0.58rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shortcut-item.active strong {
    color: var(--accent);
}

.recent-item em {
    color: var(--dim);
    font-style: normal;
}

.shortcut-arrow {
    color: var(--dim);
}

/* The same arrow as the Pod and room cards (Material Icons Sharp). */
.shortcut-arrow .material-icons-sharp {
    display: block;
    font-size: 22px;
}

/* The arrow on every link that opens a Pod, room or page (pods.js goArrow): a bit bigger than
   the text, in the accent colour while its row or button is hovered or open. */
.go-arrow {
    font-size: 22px;
    vertical-align: middle;
}

button:hover .go-arrow,
button:focus-visible .go-arrow,
.active .go-arrow,
.is-active .go-arrow {
    color: var(--accent);
}

.browse-rooms {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    margin: 6px 0 4px;
    padding: 11px 12px;
    border: 1px dashed var(--line);
    color: var(--muted);
    font-size: 0.62rem;
    font-weight: 600;
}

.browse-rooms:hover {
    border-color: var(--accent);
    border-style: solid;
    color: var(--accent);
}

.sidebar-empty {
    padding: 4px 4px 14px;
    color: var(--dim);
    font-size: 0.62rem;
    line-height: 1.7;
}

/* ---------- Main area and pages ---------- */

.main {
    position: relative;
    grid-column: 2;
    grid-row: 2;
    display: flex;
    min-width: 0;
    min-height: 0;
    flex-direction: column;
}

/* Pages don't scroll as a whole: the top (hero, tabs, search) stays, and only the list
   under the tabs scrolls (rooms scroll their messages). */
.directory-page,
.friends-page {
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.directory-page > .directory-inner,
.friends-inner {
    display: flex;
    height: 100%;
    flex-direction: column;
    /* Only if the window is too short to fit the top and the list. */
    overflow-y: auto;
}

.directory-page > .directory-inner > *,
.friends-inner > * {
    flex: none;
}

/* The scrolling lists: Pods under the tabs, the people lists, and a Pod's rooms. */
.directory-page > .directory-inner > .pod-directory-grid,
.friends-inner > .friends-scroll,
.pod-inner > .directory-grid {
    flex: 1 1 auto;
    min-height: 160px;
    overflow-y: auto;
    align-content: start;
    /* Room for the cards' hover shadow and the scrollbar. */
    padding: 0 8px 8px 0;
}

.friends-scroll > .friends-panel:first-child {
    margin-top: 18px;
}

/* Loading: the site's skeleton shapes (style.css .skeleton-*), laid out like each ourPods screen
   (pods.js skeletons). */
.pods-skeleton {
    gap: 16px;
}

.pods-skeleton-pills {
    flex-wrap: wrap;
}

/* Create Pod / Add friend sit at the right end of the tab row. */
.pods-skeleton-push {
    width: 130px;
    margin-left: auto;
}

.pods-skeleton-hero {
    height: 210px;
}

.pods-skeleton-entrance {
    height: 190px;
}

.pods-skeleton-title {
    width: 190px;
    height: 34px;
}

.pods-skeleton-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.pods-skeleton-grid .skeleton-item {
    min-height: 100px;
}

.pods-skeleton-grid .skeleton-avatar {
    width: 38px;
    height: 38px;
}

.pods-skeleton-panel,
.pods-skeleton-members,
.pods-skeleton-sidebar {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Messages: picture and name, then their text. */
.pods-skeleton-messages {
    padding: 14px 22px;
}

/* First load of a room: its welcome banner too. */
.pods-skeleton-room {
    padding: 12px 22px 0;
}

.pods-skeleton-room .pods-skeleton-messages {
    padding-right: 0;
    padding-left: 0;
}

.pods-skeleton-welcome {
    height: 120px;
}

.pods-skeleton-messages .skeleton-item {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 14px 14px 18px;
}

.pods-skeleton-members {
    padding: 16px 14px;
}

.pods-skeleton-sidebar .skeleton-avatar,
.pods-skeleton-members .skeleton-avatar {
    width: 30px;
    height: 30px;
}

.pods-skeleton-sidebar .skeleton-item,
.pods-skeleton-members .skeleton-item {
    padding: 10px;
}

.pods-skeleton-profile .skeleton-avatar.is-large {
    width: 56px;
    height: 56px;
}

@media (max-width: 760px) {
    .pods-skeleton-hero {
        height: 170px;
    }

    .pods-skeleton-entrance {
        height: 160px;
    }

    .pods-skeleton-grid {
        grid-template-columns: 1fr;
    }

    /* Like the real phone toolbar: tabs fill one row, Create Pod across the width under them. */
    .pods-skeleton-pods .skeleton-pill {
        flex: 1 1 0;
        width: auto;
    }

    .pods-skeleton-pods .skeleton-pill:first-child {
        flex: 0 0 40px;
    }

    .pods-skeleton-pods .pods-skeleton-push {
        flex-basis: 100%;
        margin-left: 0;
    }

    .pods-skeleton-messages,
    .pods-skeleton-room {
        padding-right: 10px;
        padding-left: 10px;
    }
}

/* Profiles live on the site's own profile page (user/), not here. */
#profilePage {
    display: none !important;
}

.directory-inner,
.friends-inner {
    max-width: 1160px;
    margin: 0 auto;
    padding: 24px 32px 20px;
}

.friends-inner {
    max-width: 960px;
}

/* The sidebar toggle sits at the top of each page, right beside the sidebar. */
.directory-inner > .sidebar-toggle,
.friends-inner > .sidebar-toggle {
    margin-bottom: 4px;
}

/* Friends: the Quick access toggle with the page heading to its right. */
.page-head {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 22px;
}

.page-head .directory-title,
.page-head .directory-title h1 {
    margin: 0;
}

/* The heading in a frame, with the Quick access toggle inside on the left and a line
   between them (like the ourPods tag on phones). */
.page-head .directory-title {
    align-items: stretch;
    gap: 0;
    border: 2px solid var(--border);
    background: var(--bg);
}

.page-head .directory-title h1 {
    padding: 7px 14px;
    font-size: 1.05rem;
    line-height: 1.2;
}

.pods-page .page-head .directory-title > .icon-button.sidebar-toggle {
    width: 36px;
    height: auto;
    border: 0;
    border-right: 2px solid var(--border);
    background: none;
}

.directory-title {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin: 10px 0 26px;
}

.directory-title h1 {
    margin: 0 0 8px;
    color: var(--accent);
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 800;
    letter-spacing: 0.06em;
}

.directory-title p {
    margin: 0;
    color: var(--muted);
    font-size: 0.7rem;
    line-height: 1.7;
}

/* ---------- Home ---------- */

.home-hero {
    position: relative;
    display: flex;
    min-height: min(300px, 30vh);
    margin-top: 16px;
    border: 2px solid var(--border);
    background:
        radial-gradient(circle at 78% 50%, rgba(199, 182, 255, 0.22), transparent 38%),
        linear-gradient(115deg, var(--panel), var(--bg) 55%, #29243d);
    box-shadow: 6px 6px 0 var(--accent);
}

/* Pods hero: the Quick access toggle sits half on its left edge, near the top. */
.home-hero > .sidebar-toggle {
    position: absolute;
    top: 22px;
    left: 0;
    z-index: 3;
    transform: translateX(-50%);
}

/* Tabs and the page button (Create Pod / Add friend) share one row: tabs left, button right. */
.page-toolbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin: 30px 0 18px;
}

.page-toolbar .pod-tabs,
.page-toolbar .friends-tabs {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
}

/* Used / allowed count on Create Pod and Add room. */
.limit-count {
    padding: 1px 6px;
    border: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.58rem;
}

.page-toolbar .directory-create {
    flex: none;
}

/* Fills the hero's height so the Welcome back tag lands on the hero's top border. */
.hero-copy {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    max-width: 58%;
    padding: clamp(28px, 4.5vh, 40px) 40px clamp(18px, 3.5vh, 36px);
}

.home-hero h1 {
    margin: 0 0 16px;
    color: var(--text);
    font-size: clamp(1.4rem, min(3.4vw, 4.6vh), 2.6rem);
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: 0.05em;
}

/* The name gets the accent underline, like "Space" in the site header. */
.home-hero h1 em {
    border-bottom: 4px solid var(--accent);
    color: var(--accent);
    font-style: normal;
}

.home-hero p {
    max-width: 420px;
    margin: 0 0 24px;
    color: var(--muted);
    font-size: 0.74rem;
    line-height: 1.7;
}

.hero-art {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.planet,
.orbit {
    position: absolute;
    left: 78%;
    top: 50%;
}

.planet {
    z-index: 1;
    width: min(210px, 18vw);
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 28%, #f6f2ff, #c7b6ff 30%, #8a77d6 62%, #3d3466 92%);
    box-shadow: inset -22px -22px 44px rgba(20, 16, 40, 0.65), 0 0 60px rgba(199, 182, 255, 0.25);
    transform: translate(-50%, -50%);
}

.planet-shine {
    position: absolute;
    inset: 12% 48% 52% 12%;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    filter: blur(16px);
}

.orbit {
    z-index: 2;
    width: min(340px, 30vw);
    height: 150px;
    border: 1px dashed var(--line);
    border-radius: 50%;
    transform: translate(-50%, -50%) rotate(-22deg);
}

.orbit-two {
    z-index: 0;
    width: min(400px, 36vw);
    height: 200px;
    border: 1px solid rgba(199, 182, 255, 0.35);
    transform: translate(-50%, -50%) rotate(28deg);
}

.art-star {
    position: absolute;
    color: var(--text);
}

.star-one {
    right: 4%;
    top: 14%;
    color: var(--accent);
    font-size: 1.4rem;
}

.star-two {
    left: 62%;
    top: 14%;
    font-size: 1rem;
}

.star-three {
    right: 14%;
    bottom: 12%;
    font-size: 0.8rem;
}

/* Cards: framed like the site's search results; accent frame and shadow on hover. */
.directory-card {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 2px solid var(--border);
    background: var(--panel);
    color: var(--text);
    text-align: left;
}

.directory-card:hover {
    border-color: var(--accent);
    background: var(--panel-hover);
    box-shadow: 4px 4px 0 var(--accent);
}

.directory-icon {
    display: grid;
    width: 38px;
    height: 38px;
    flex: none;
    place-items: center;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--accent);
    font-size: 1.1rem;
}

.directory-icon .material-symbols-outlined {
    font-size: 18px;
}

.directory-copy {
    flex: 1;
    min-width: 0;
}

.directory-copy strong {
    display: block;
    overflow: hidden;
    font-size: 0.76rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.directory-arrow {
    color: var(--dim);
    font-size: 1rem;
}

.directory-card:hover .directory-arrow {
    color: var(--accent);
}

/* ---------- Pods directory and Friends ---------- */

.pod-tabs,
.friends-tabs {
    display: flex;
    gap: 10px;
    margin: 0 0 22px;
    padding: 0 4px 4px 0;
    overflow-x: auto;
}

/* Favorites tab: the word on bigger screens, a star on phones (see the 760px rules). */
.pod-tabs .tab-label {
    font-weight: inherit;
}

.pod-tabs [data-tab="favorites"] .material-symbols-outlined {
    display: none;
}

/* Search: ourUniverse's round search button that widens into a search bar (style.css
   .universe-toolbar), here in the tabs row, beside the page button, a little smaller. */
.pods-search {
    position: relative;
    left: auto;
    bottom: auto;
    flex: none;
    width: 42px;
    border-radius: 21px;
}

.page-toolbar .pods-search.is-open {
    width: min(300px, 40%);
}

/* Pods: the search sits on the hero's bottom border in the right corner, and widens to
   the left along it. The tabs row moves down to clear it. */
.home-hero > .pods-search {
    position: absolute;
    right: 20px;
    bottom: 0;
    z-index: 3;
    transform: translateY(50%);
}

.home-hero > .pods-search.is-open {
    width: min(420px, calc(100% - 40px));
}

.home-hero + .page-toolbar {
    margin-top: 34px;
}

/* Friends: the search is in the heading row, on the right (next to your profile picture), and
   only widens into the space beside the heading. */
.page-head .pods-search {
    flex: 0 1 auto;
    min-width: 42px;
    margin-left: auto;
}

.page-head .pods-search.is-open {
    width: min(420px, 100%);
}

/* The bar widens to the left here, so its button stays on the right end. */
.pods-search .universe-search-row {
    flex-direction: row-reverse;
    height: 38px;
}

.pods-search .universe-search-toggle {
    width: 38px;
    height: 38px;
}

.pods-search .universe-search-toggle .material-symbols-outlined {
    font-size: 20px;
}

.pods-search .universe-search {
    padding-left: 14px;
    font-size: 0.8rem;
}

/* The Quick access toggle and Create Pod also sit in the hero, for phones only. */
.pods-page .hero-pill > .icon-button.sidebar-toggle,
.home-hero > .directory-create {
    display: none;
}

/* Bigger screens with too little room for the tabs and Create Pod in one row (pods.js decides):
   Create Pod goes where phones have it, on the hero's top border in the right corner. */
.create-in-hero .home-hero > .directory-create {
    position: absolute;
    top: 0;
    right: 20px;
    z-index: 3;
    display: flex;
    padding: 8px 12px;
    font-size: 0.62rem;
    transform: translateY(-50%);
}

.create-in-hero .page-toolbar > .directory-create[data-action="add-pod"] {
    display: none;
}

/* Cards fill the space there is (it changes with the side panels), at least 300px each. */
.directory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
    gap: 16px;
}

.directory-card {
    min-height: 100px;
}

.directory-copy small {
    display: -webkit-box;
    margin-top: 6px;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.6rem;
    line-height: 1.6;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

.directory-copy em {
    display: inline-block;
    margin-top: 8px;
    color: var(--accent);
    font-size: 0.54rem;
    font-style: normal;
    letter-spacing: 0.08em;
}

/* A Pod's rooms: side by side like their loading shapes (2 across on a computer, more if there's
   room); one column on phones. */
@media (min-width: 521px) {
    .pod-inner > .directory-grid {
        grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
    }
}

/* A room's card: its name in bold with Public / Private small beside it, then its topic. */
.room-card-title {
    display: flex;
    align-items: baseline;
    gap: 8px;
    min-width: 0;
}

.room-card-copy strong {
    min-width: 0;
    font-weight: 700;
}

.room-card-copy .room-card-title em {
    flex: none;
    margin-top: 0;
}

.directory-arrow .material-symbols-outlined {
    font-size: 16px;
}

/* The arrow (Material Icons Sharp), bigger than the lock. */
.directory-arrow .material-icons-sharp {
    display: block;
    font-size: 24px;
}

/* Locked Pods and rooms: dashed frame. */
.directory-card.locked {
    border-style: dashed;
}

.directory-card.locked .directory-icon {
    color: var(--muted);
}

.directory-empty,
.friends-empty {
    grid-column: 1 / -1;
    padding: 18px;
    border: 2px dashed var(--line);
    color: var(--muted);
    font-size: 0.68rem;
    line-height: 1.7;
}

#podSearchEmpty[hidden] {
    display: none;
}

/* Each list (Your friends, Online now, Requests…) is a frame with its title tag on the top
   border, like the other boxes on this page. */
.friends-panel {
    position: relative;
    margin-top: 34px;
    padding: 32px 16px 16px;
    border: 2px solid var(--border);
    background: var(--panel);
}

.friends-panel h2 span {
    padding: 1px 6px;
    border: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.58rem;
}

.friends-panel .friends-empty {
    margin: 0;
    border-width: 1px;
}

/* Hide / show (People you might know): on the top border at the right, square like the
   page's other panel toggles. */
.pods-page .icon-button.friends-panel-toggle {
    position: absolute;
    top: 0;
    right: 16px;
    z-index: 2;
    width: 34px;
    height: 34px;
    border-radius: 0;
    background: var(--bg);
    transform: translateY(-50%);
}

.pods-page .icon-button.friends-panel-toggle .material-symbols-outlined {
    font-size: 18px;
}

/* Hidden: just the frame's top with its title and button. */
.friends-panel.is-collapsed {
    padding-top: 20px;
    padding-bottom: 0;
}

.friends-panel.is-collapsed > :not(h2, .friends-panel-toggle) {
    display: none;
}

.friends-panel[hidden],
.friend-card[hidden],
#friendSearchEmpty[hidden] {
    display: none;
}

#friendSearchEmpty {
    margin-top: 20px;
}

.friends-list {
    display: grid;
    gap: 10px;
}

.friend-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    background: var(--bg);
}

.friend-card:hover {
    border-color: var(--accent);
}

.friend-card .avatar {
    width: 40px;
    height: 40px;
    font-size: 0.85rem;
}

.friend-copy {
    flex: 1;
    min-width: 0;
}

/* The name opens their card. */
.friend-name {
    display: block;
    max-width: 100%;
    overflow: hidden;
    color: var(--accent);
    font-family: var(--font-plain);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: normal;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* (The @username after it is what opens the profile.) */

.friend-copy small {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 5px;
    color: var(--muted);
    font-size: 0.58rem;
}

.friend-actions {
    display: flex;
    flex: none;
    align-items: center;
    gap: 8px;
    /* Room for the Accept / Add button's offset shadow. */
    padding: 0 3px 3px 0;
}

/* Friends have no buttons on their card (Remove is in their profile pop-up). */
.friend-actions:empty {
    display: none;
}

/* ---------- Pod page ---------- */

#podPage {
    overflow: hidden;
}

/* The page scrolls on the left; the Pod members panel sits beside it, full height. */
.pod-shell {
    display: flex;
    height: 100%;
}

.pod-scroll {
    flex: 1;
    min-width: 0;
    height: 100%;
    overflow: hidden;
}

/* The banner stays at the top; the rooms under it scroll. (A Pod you can't enter yet shows
   its gate instead, which scrolls if the window is very short.) */
.pod-inner {
    display: flex;
    max-width: 1100px;
    height: 100%;
    flex-direction: column;
    margin: 0 auto;
    padding: 24px 32px 20px;
    overflow-y: auto;
}

.pod-inner > * {
    flex: none;
}

.pod-inner:has(> .directory-grid) {
    overflow: hidden;
}

.pod-topline {
    display: flex;
    align-items: center;
    gap: 14px;
}

.pod-back {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-right: auto;
    padding: 4px 0;
    color: var(--muted);
    font-size: 0.64rem;
    font-weight: 600;
}

.pod-back .material-symbols-outlined {
    font-size: 15px;
}

.pod-back:hover {
    color: var(--accent);
}

/* The entrance stays in view while the rooms scroll under it. */
.pod-top-row {
    position: sticky;
    top: 22px;
    z-index: 8;
    margin-top: 22px;
}

/* Pod and room banners. --banner-accent is the colour the owner picks. */
.pod-entrance,
.welcome {
    position: relative;
    border: 2px solid var(--border);
    isolation: isolate;
}

/* The about text and details line share one see-through dark box, so they stay readable on
   any colour and backdrop (the Pod's description and details; the room's topic). */
.pod-entrance .banner-about,
.welcome .banner-copy > p {
    width: fit-content;
    max-width: 100%;
    box-sizing: border-box;
    padding: 8px 12px;
    border: 1px solid var(--line);
    background: rgba(31, 31, 31, 0.6);
}

/* No description: just the details line in the box. */
.pod-entrance p:empty {
    display: none;
}

.pod-entrance .banner-about p {
    margin-bottom: 8px;
}

.pod-entrance {
    display: flex;
    min-height: 190px;
    align-items: flex-end;
    padding: 36px 24px 22px;
}

.pod-entrance-copy {
    max-width: 680px;
}

/* Join Pod (a public Pod you're not in): on the banner's bottom-right corner, half on and half
   off its bottom edge, with room left under the banner for its bottom half. */
.pod-entrance > .pod-banner-join {
    position: absolute;
    right: 22px;
    bottom: 0;
    z-index: 2;
    transform: translateY(50%);
}

.pod-entrance:has(> .pod-banner-join) {
    margin-bottom: 30px;
}

.pod-entrance h1 {
    margin: 0 0 6px;
    color: var(--text);
    font-size: clamp(1.3rem, 3vw, 2rem);
    font-weight: 800;
    letter-spacing: 0.05em;
    overflow-wrap: anywhere;
}

.pod-entrance p {
    margin: 0 0 14px;
    color: var(--text);
    font-size: 0.7rem;
    line-height: 1.7;
}

.pod-entrance .page-eyebrow {
    letter-spacing: 0.14em;
}

.pod-entrance-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    color: var(--text);
    font-size: 0.58rem;
}

.pod-entrance-meta .material-symbols-outlined {
    font-size: 15px;
    color: var(--accent);
}

/* The "·" separators are dimmed (not the icons, which stay in the accent colour). */
.pod-entrance-meta > span:not(.material-symbols-outlined) {
    opacity: 0.5;
}

.banner-theme {
    background:
        radial-gradient(circle at 88% -10%, transparent 0 88px, color-mix(in srgb, var(--banner-accent) 45%, transparent) 89px 90px, transparent 91px 124px, color-mix(in srgb, var(--banner-accent) 22%, transparent) 125px 126px, transparent 127px),
        radial-gradient(circle at 82% 10%, color-mix(in srgb, var(--banner-accent) 55%, transparent), transparent 46%),
        linear-gradient(115deg, color-mix(in srgb, var(--banner-accent) 38%, #1f1f1f), color-mix(in srgb, var(--banner-accent) 14%, #2a2a2a));
}

.banner-theme.backdrop-stars {
    background:
        radial-gradient(circle at 18% 25%, #fff 0 1px, transparent 2px),
        radial-gradient(circle at 76% 65%, #fffc 0 1px, transparent 2px),
        radial-gradient(circle at 61% 16%, #fffb 0 1px, transparent 2px),
        radial-gradient(circle at 80% 10%, color-mix(in srgb, var(--banner-accent) 48%, transparent), transparent 42%),
        linear-gradient(115deg, color-mix(in srgb, var(--banner-accent) 14%, #2a2a2a), color-mix(in srgb, var(--banner-accent) 38%, #1f1f1f));
    background-size: 110px 85px, 150px 115px, 190px 125px, auto, auto;
}

.banner-theme.backdrop-stripes {
    background:
        repeating-linear-gradient(125deg, transparent 0 19px, rgba(255, 255, 255, 0.06) 20px 21px, transparent 22px 41px),
        radial-gradient(circle at 95% 0%, color-mix(in srgb, var(--banner-accent) 60%, transparent), transparent 46%),
        linear-gradient(110deg, color-mix(in srgb, var(--banner-accent) 14%, #2a2a2a), color-mix(in srgb, var(--banner-accent) 45%, #1f1f1f));
}

.banner-theme.backdrop-horizon {
    background:
        radial-gradient(ellipse 75% 35% at 75% 115%, color-mix(in srgb, var(--banner-accent) 85%, #fff) 0%, transparent 74%),
        radial-gradient(ellipse 60% 55% at 75% 105%, color-mix(in srgb, var(--banner-accent) 50%, transparent), transparent 85%),
        linear-gradient(120deg, color-mix(in srgb, var(--banner-accent) 14%, #2a2a2a), color-mix(in srgb, var(--banner-accent) 32%, #1f1f1f));
}

.banner-theme.backdrop-plain {
    background: linear-gradient(115deg, color-mix(in srgb, var(--banner-accent) 55%, #1f1f1f), color-mix(in srgb, var(--banner-accent) 20%, #1f1f1f));
}

/* Banner buttons sit half on the top border, on the right (like the site's pop-up close button).
   They share one row, so they space themselves whichever ones are showing. */
.banner-actions {
    position: absolute;
    top: 0;
    right: 18px;
    z-index: 3;
    display: flex;
    gap: 8px;
    transform: translateY(-50%);
}

.pod-favorite,
.pod-leave,
.pod-report,
.pod-planet,
.pod-banner-invite,
.pod-customize,
.welcome .room-customize,
.welcome .room-search,
.welcome .room-mentions,
.welcome .room-alerts {
    display: inline-flex;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 2px solid var(--border);
    background: var(--bg);
    color: var(--text);
}

.pod-favorite:hover,
.pod-leave:hover,
.pod-report:hover,
.pod-planet:hover,
.pod-banner-invite:hover,
.pod-customize:hover,
.welcome .room-customize:hover,
.welcome .room-search:hover,
.welcome .room-mentions:hover,
.welcome .room-alerts:hover,
.welcome .room-alerts.active {
    border-color: var(--accent);
    color: var(--accent);
}

.pod-favorite .material-symbols-outlined,
.pod-leave .material-symbols-outlined,
.pod-report .material-symbols-outlined,
.pod-planet .material-symbols-outlined,
.pod-banner-invite .material-symbols-outlined,
.pod-customize .material-symbols-outlined,
.welcome .room-customize .material-symbols-outlined,
.welcome .room-search .material-symbols-outlined,
.welcome .room-mentions .material-symbols-outlined,
.welcome .room-alerts .material-symbols-outlined {
    font-size: 18px;
}

.pod-favorite.active {
    border-color: var(--accent);
    color: var(--accent);
}

/* Favorited: a filled star in the site's gold (like favorite GIFs and pictures). */
.pod-favorite.active .material-symbols-outlined {
    color: #ffd27a;
    font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24;
}

/* On Pod and room banners the sidebar toggle sits on the top border, before the title tag. */
.welcome .sidebar-toggle,
.pod-entrance > .sidebar-toggle {
    position: absolute;
    top: 0;
    left: 20px;
    z-index: 3;
    transform: translateY(-50%);
}

.welcome .sidebar-toggle + .room-parent,
.pod-entrance:has(> .sidebar-toggle) .page-eyebrow {
    left: 68px;
}

.room-parent .material-symbols-outlined {
    font-size: 14px;
}

.room-parent:hover {
    border-color: var(--accent);
}

.pod-content-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    margin: 32px 0 16px;
}

/* No Add room row (you can't add rooms here): the rooms keep a gap under the banner. */
.pod-top-row + .directory-grid {
    margin-top: 28px;
}

.pod-content-head span {
    color: var(--dim);
    font-size: 0.58rem;
    letter-spacing: 0.18em;
}

.pod-content-head h2 {
    margin: 6px 0;
    font-size: 0.95rem;
    letter-spacing: 0.06em;
}

.pod-content-head p {
    margin: 0;
    color: var(--muted);
    font-size: 0.62rem;
    line-height: 1.6;
}

.pod-head-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px;
    padding: 0 4px 4px 0;
}

.pod-gate {
    max-width: 560px;
    margin: 34px auto 0;
    padding: 30px 26px;
    border: 2px solid var(--border);
    background: var(--panel);
    box-shadow: 4px 4px 0 var(--border);
    text-align: center;
}

.pod-gate-icon {
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;
    margin: 0 auto 14px;
    border: 2px solid var(--accent);
    color: var(--accent);
}

.pod-gate-icon .material-symbols-outlined {
    font-size: 24px;
}

.pod-gate h2 {
    margin: 0 0 10px;
    font-size: 0.95rem;
}

.pod-gate p {
    margin: 0 0 20px;
    color: var(--muted);
    font-size: 0.68rem;
    line-height: 1.7;
}

.pod-gate .edit-label {
    margin-bottom: 8px;
    text-align: left;
}

.pod-gate .edit-input {
    flex: 1;
    min-width: 0;
    letter-spacing: 0.12em;
}

/* A Pod's picture (set in Pod settings): fills its icon box on cards, shortcuts and the banner. */
.pod-picture {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.directory-icon:has(.pod-picture),
.shortcut-icon:has(.pod-picture) {
    overflow: hidden;
}

/* (A Pod's own picture shows as it is: no colour behind its see-through parts, wherever it's shown.
   Pods without one keep their icon on its box.) */
.directory-icon:has(> .pod-picture),
.shortcut-icon:has(> .pod-picture),
.pods-page .icon-button.pod-rail-item:has(> .pod-picture),
.pod-entrance-picture:has(> .pod-picture),
.pod-row-picture:has(> .pod-picture),
.pod-picture-preview:has(> .pod-picture) {
    background: none;
}

.pod-entrance-title {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
}

.pod-entrance-title h1 {
    margin: 0;
}

.pod-entrance-picture {
    width: 56px;
    height: 56px;
    flex: none;
    overflow: hidden;
    border: 2px solid var(--border);
}

.pod-row-picture {
    width: 22px;
    height: 22px;
    flex: none;
    overflow: hidden;
    border: 1px solid var(--border);
}

/* Pod settings: the picture preview beside its Choose / Remove buttons. */
.pod-picture-field {
    display: flex;
    align-items: center;
    gap: 14px;
}

.pod-picture-preview {
    display: grid;
    width: 64px;
    height: 64px;
    flex: none;
    place-items: center;
    overflow: hidden;
    border: 2px solid var(--border);
    background: var(--bg);
    color: var(--accent);
}

.pod-picture-preview .material-symbols-outlined {
    font-size: 28px;
}

.pods-page .edit-reset {
    text-transform: none;
}

/* ---------- Member panels (room and Pod) ---------- */

.members,
.pod-members-sidebar {
    width: 260px;
    flex: none;
    overflow-y: auto;
    border-left: 2px solid var(--border);
    background: none;
}

/* The Pod panel doesn't scroll itself (that would clip the toggle on its edge); the list
   inside it does. */
.pod-members-sidebar {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    overflow: visible;
}

/* (Frosted, like the site's sidebar strip.) */
.pod-members-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* The room's member panel (it scrolls itself): frosted the same way. */
.members {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Hidden with the Pod members button on desktop. */
.pod-members-sidebar.is-hidden {
    display: none;
}

.member-sidebar-head {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    min-height: 50px;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--line-soft);
    background: var(--panel);
    color: var(--accent);
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.member-sidebar-head small {
    margin-left: 4px;
    padding: 1px 6px;
    border: 1px solid var(--line);
    color: var(--muted);
}

/* The room panel's close button: shown when the panel is a phone drawer. */
.member-sidebar-head button:not(.icon-button, .member-toggle-head) {
    display: none;
    width: 32px;
    height: 32px;
    place-items: center;
    border: 2px solid var(--border);
    background: var(--bg);
    color: var(--text);
}

.member-sidebar-head button:not(.member-toggle-head):hover {
    border-color: var(--accent);
    color: var(--accent);
}

.member-sidebar-head button .material-symbols-outlined {
    font-size: 16px;
}

.member-tabs {
    display: flex;
    gap: 8px;
    padding: 12px 12px 4px;
}

.member-tabs .space-button {
    flex: 1;
    justify-content: center;
    padding: 8px 4px;
    font-size: 0.54rem;
    white-space: nowrap;
    box-shadow: 2px 2px 0 var(--border);
}

.member-tabs .space-button.is-active {
    box-shadow: 2px 2px 0 var(--accent);
}

.member-tabs .space-button span {
    padding: 0 4px;
}

.side-context {
    padding: 12px;
}

.side-context strong {
    display: block;
    font-size: 0.7rem;
    overflow-wrap: anywhere;
}

/* Member search (the site's search box), under the Pod / room info. */
.member-search-row {
    padding: 0 16px 10px;
}

.member-search-row .search-input {
    display: block;
    width: 100%;
    max-width: 100%;
    padding: 7px 32px 7px 10px;
    font-size: 0.58rem;
}

/* The site's clear button (style.css .search-clear), sized for the smaller box. */
.member-search-row .search-clear {
    right: 6px;
    width: 20px;
    height: 20px;
}

.member-search-row .search-clear .material-symbols-outlined {
    font-size: 16px;
}

.side-member[hidden],
.member-search-empty[hidden] {
    display: none;
}

.member-search-empty {
    padding: 6px;
    font-size: 0.6rem;
}

.side-context p {
    margin: 6px 0;
    color: var(--muted);
    font-size: 0.6rem;
    line-height: 1.6;
}

.side-context small {
    display: block;
    color: var(--dim);
    font-size: 0.56rem;
    line-height: 1.6;
}

.side-invite {
    width: calc(100% - 28px);
    margin: 4px 12px 14px;
}

.side-member-list {
    padding: 4px 8px 14px;
}

.side-member {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 9px;
    padding: 6px;
    border: 1px solid transparent;
}

/* The whole row opens their profile pop-up. */
.side-member {
    cursor: pointer;
}

.side-member:hover,
.side-member:focus-visible {
    outline: none;
    border-color: var(--line);
    background: var(--bg);
}

.side-member .avatar {
    width: 30px;
    height: 30px;
}

.side-member-pic {
    position: relative;
    flex: none;
}

/* The line under a member's name: their profile status, or "Chatting…" while they type in this room. */
/* (One height whether it shows a status with its icon or "Chatting…", so the row doesn't move.) */
.presence-line {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    height: 14px;
    margin-top: 3px;
    color: var(--dim);
    font-size: 0.52rem;
}

.presence-line.no-status:not(.is-chatting),
.presence-line .presence-chatting,
.presence-line.is-chatting .presence-status {
    display: none;
}

.presence-line.is-chatting .presence-chatting {
    display: inline;
    color: var(--accent);
}

.presence-status {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
}

.presence-status > span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.presence-status .material-symbols-outlined {
    flex: none;
    color: var(--accent);
    font-size: 0.8rem;
}

.side-member-name {
    flex: 1;
    min-width: 0;
    color: var(--text);
    text-align: left;
}

.side-member-name strong,
.side-member-name small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.side-member-name strong {
    color: var(--accent);
    font-size: 0.82rem;
}

/* (The @username is what opens the profile.) */

.side-member-name small {
    margin-top: 3px;
    color: var(--dim);
    font-size: 0.52rem;
}

.perm-gear {
    display: grid;
    width: 28px;
    height: 28px;
    flex: none;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--muted);
}

.perm-gear:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.perm-gear .material-symbols-outlined {
    font-size: 14px;
}

.pod-pending {
    margin: 0 12px 16px;
    padding-top: 10px;
    border-top: 1px solid var(--line-soft);
}

.pod-pending h3 {
    margin: 0 0 8px;
    color: var(--accent);
    font-size: 0.6rem;
}

.pod-pending > div {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 5px 0;
}

.pod-pending > div span {
    flex: 1;
    font-size: 0.8rem;
}

.pod-pending button {
    padding: 5px 8px;
    font-size: 0.54rem;
}

/* ---------- Rooms (chat) ---------- */

.chat-layout {
    display: flex;
    flex: 1;
    min-height: 0;
}

/* The open Pod's (or room's) background glow (Customization in its settings) as soft, blurry
   light behind the page: glows coming down from both top corners and up from the bottom (pods.js sets
   --page-accent; transparent for none). The stars still show through. */
#podPage .pod-shell,
#chatLayout {
    --page-glow:
        radial-gradient(ellipse 55% 50% at 0% 0%, color-mix(in srgb, var(--page-accent, transparent) 20%, transparent), transparent 70%),
        radial-gradient(ellipse 55% 50% at 100% 0%, color-mix(in srgb, var(--page-accent, transparent) 20%, transparent), transparent 70%),
        radial-gradient(ellipse 80% 45% at 50% 100%, color-mix(in srgb, var(--page-accent, transparent) 14%, transparent), transparent 70%);
    background: var(--page-glow);
}

/* (Lined up with the screen, like the strip above the room banner, so the two match.) */
#chatLayout {
    background-attachment: fixed;
}

.chat-column {
    position: relative;
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
}

/* Sideways scrolling is off: the strip above the sticky banners reaches a little past the
   edges, which would otherwise add a horizontal scrollbar. */
.messages {
    flex: 1;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 0 0 16px;
}

.welcome {
    position: sticky;
    top: 22px;
    z-index: 3;
    margin: 22px 22px 14px;
    padding: 32px 22px 18px;
}

.welcome .room-title {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 10px;
}

.welcome h1 {
    min-width: 0;
    margin: 0;
    font-size: 1.05rem;
    letter-spacing: 0.05em;
    overflow-wrap: anywhere;
}

.welcome p {
    margin: 8px 0 0;
    color: var(--text);
    font-size: 0.64rem;
    line-height: 1.6;
}

.welcome-line {
    display: none;
}

.date-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 16px 22px 12px;
    color: var(--dim);
    font-size: 0.56rem;
    letter-spacing: 0.2em;
}

.date-divider::before,
/* Someone joined the Pod: a welcome line between the messages. */
.message.message-join {
    align-items: center;
    gap: 10px;
    color: var(--dim);
    font-size: 0.72rem;
}

.message-join p {
    flex: 1;
    min-width: 0;
    margin: 0;
}

.message-join-icon {
    display: grid;
    width: 36px;
    flex: none;
    place-items: center;
    color: var(--accent);
}

.message-join p strong {
    cursor: pointer;
}

/* Pod settings > Rooms: the rooms in order, each with a drag handle and up / down arrows. */
.room-order-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 6px 0 0;
    padding: 0;
    list-style: none;
}

.room-order-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    background: var(--bg);
}

.room-order-row.is-dragging {
    border-color: var(--accent);
    opacity: 0.6;
}

.room-order-handle {
    display: grid;
    flex: none;
    place-items: center;
    color: var(--dim);
    cursor: grab;
}

.room-order-name {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    flex-direction: column;
    gap: 2px;
}

.room-order-name b {
    overflow: hidden;
    font-size: 0.72rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.room-order-name small {
    color: var(--dim);
    font-size: 0.58rem;
}

.room-order-move {
    display: inline-grid;
    flex: none;
    width: 28px;
    height: 28px;
    place-items: center;
    padding: 0;
    border: 1px solid var(--line);
    background: var(--panel);
    color: var(--text);
}

.room-order-move:hover,
.room-order-move:focus-visible {
    border-color: var(--accent);
    color: var(--accent);
}

.room-order-row:first-child [data-order-move="-1"],
.room-order-row:last-child [data-order-move="1"],
.shortcut-order-row:first-child [data-order-move="-1"],
.shortcut-order-row:last-child [data-order-move="1"] {
    visibility: hidden;
}

/* Pod shortcuts pop-up: each Pod's row can be dragged or moved with its arrows. */
.shortcut-order-list {
    margin: 0;
    list-style: none;
}

.shortcut-order-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 8px;
}

.shortcut-order-row > .shortcut-option {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
}

.shortcut-order-row.is-dragging {
    opacity: 0.6;
}

.shortcut-order-row > .shortcut-option {
    cursor: grab;
}

/* Pod shortcuts > Overview: your shortcuts in order, numbered, each with a remove button. */
.shortcut-overview {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.shortcut-overview-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px 8px 12px;
    border: 1px solid var(--line);
    background: var(--bg);
    font-size: 0.66rem;
}

.shortcut-overview-row strong {
    min-width: 0;
    overflow: hidden;
    color: var(--accent);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shortcut-overview-row .material-symbols-outlined:not(.room-order-move *) {
    color: var(--accent);
    font-size: 17px;
}

.shortcut-overview-row small {
    margin-left: auto;
    color: var(--dim);
    font-size: 0.54rem;
    white-space: nowrap;
}

.shortcut-overview-number {
    flex: none;
    min-width: 18px;
    color: var(--dim);
    text-align: center;
}

/* Pod settings > Welcome: the icon choices (round, like the banner buttons), and the preview line. */
.welcome-icon-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.welcome-icon-choice {
    display: inline-grid;
    width: 36px;
    height: 36px;
    place-items: center;
    padding: 0;
    border: 2px solid var(--line);
    background: var(--bg);
    color: var(--text);
    cursor: pointer;
}

.welcome-icon-choice:hover,
.welcome-icon-choice:focus-visible {
    border-color: var(--accent);
}

.welcome-icon-choice.is-selected {
    border-color: var(--accent);
    color: var(--accent);
}

.welcome-icon-choice .material-symbols-outlined {
    font-size: 18px;
}

.message.message-join.welcome-preview {
    margin: 4px 0 0;
}

.welcome-preview p strong {
    cursor: default;
}

.message-join time {
    flex: none;
    color: var(--dim);
    font-size: 0.6rem;
}

.date-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--line-soft);
}

/* Messages are cards like the site's posts. */
.message {
    position: relative;
    display: flex;
    gap: 12px;
    margin: 0 22px 10px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    background: var(--bg);
}

.message:hover {
    border-color: var(--accent);
}

/* Follow-ups from the same person join the card above. */
.message.grouped {
    margin-top: -11px;
    padding-top: 8px;
    border-top: 1px dashed var(--line-soft);
}
.message.grouped:hover {
    border-top: 1px dashed var(--accent);
}

/* The line between a message and its follow-up belongs to the follow-up (drawn on top), so it
   lights up when either one is hovered. */
.message:hover + .message.grouped {
    border-top-color: var(--accent);
}

.message .avatar {
    width: 36px;
    height: 36px;
}

.message .avatar-placeholder {
    width: 36px;
    flex: none;
}

/* A follow-up's time, on the left where the avatar would be, while you hover it. */
.message-side-time {
    display: block;
    padding-top: 3px;
    color: var(--dim);
    font-size: 0.5rem;
    text-align: center;
    visibility: hidden;
}

.message.grouped:hover .message-side-time,
.message.grouped:focus-within .message-side-time {
    visibility: visible;
}

.message-body {
    flex: 1;
    min-width: 0;
}

/* Centred, not on the text baseline: the role tag starts with an icon, whose baseline sits low. */
.message-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
}

.message-header strong {
    color: var(--accent);
    font-size: 0.9rem;
    cursor: text;
}

/* (The @username after the name is what opens the profile.) */

.message-header time {
    color: var(--dim);
    font-size: 0.54rem;
}

.message-text {
    color: var(--text);
    font-size: 0.74rem;
    line-height: 1.7;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    -webkit-user-select: text;
    user-select: text;
}

/* Links in a message (open in a new tab). */
.message-text .message-link {
    color: var(--accent);
    overflow-wrap: anywhere;
}

/* Pictures from links, under the message's text (up to 3). */
.message-images {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.message-image {
    display: block;
    max-width: 100%;
}

.message-image img {
    display: block;
    max-width: min(320px, 100%);
    max-height: 260px;
    border: 1px solid var(--line);
    background: var(--panel);
    object-fit: contain;
}

.message-image:hover img,
.message-image:focus-visible img {
    border-color: var(--accent);
}

/* More than one: a row of square tiles (3, then a "+2" tile for the rest). */
/* (A grid of up to 4 equal squares, so the "+2" tile stays on the same row on narrow screens.) */
.message-images.is-several {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 110px));
    gap: 6px;
}

.message-images.is-several .message-image-wrap,
.message-images.is-several .message-image {
    width: 100%;
}

.message-images.is-several .message-image img,
.message-image-more {
    width: 100%;
    height: auto;
    max-width: none;
    max-height: none;
    aspect-ratio: 1;
    object-fit: cover;
}

.message-image-more {
    position: relative;
    display: grid;
    overflow: hidden;
    place-items: center;
    border: 1px solid var(--line);
    background: var(--bg);
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 700;
}

/* The next picture, blurred and darkened behind the "+2". */
.message-image-more img {
    position: absolute;
    inset: -6px;
    width: calc(100% + 12px);
    height: calc(100% + 12px);
    object-fit: cover;
    filter: blur(5px) brightness(0.55);
}

.message-image-more span {
    position: relative;
}

.message-image-more:hover,
.message-image-more:focus-visible {
    border-color: var(--accent);
    color: var(--accent);
}

@media (max-width: 520px) {
    .message-images.is-several {
        grid-template-columns: repeat(4, minmax(0, 72px));
    }
}

/* @username in a message: in the accent colour, opens their profile pop-up. */
.message-text .message-mention {
    display: inline;
    padding: 0;
    border: 0;
    background: none;
    color: var(--accent);
    font: inherit;
    cursor: pointer;
}

.message-text .message-mention:hover,
.message-text .message-mention:focus-visible {
    text-decoration: underline;
}

/* Blocked either way: "Blocked user" with the text hidden. */
.message.is-blocked .blocked-name {
    color: var(--dim);
}

.message-text.message-hidden {
    color: var(--dim);
    font-style: italic;
}

/* Reply / react / delete sit half on the card's top border. */
.message-tools {
    position: absolute;
    top: 0;
    right: 14px;
    z-index: 2;
    display: none;
    gap: 2px;
    padding: 2px;
    border: 1px solid var(--border);
    background: var(--panel);
    transform: translateY(-50%);
}

.message:hover .message-tools,
.message:focus-within .message-tools {
    display: flex;
}

/* The button that opens a message's tools: touch screens only (below). */
.message-tools-toggle {
    display: none;
}

/* Touch screens: no tools on (sticky) hover. Instead each message has a button half on its top
   border (where the tools go), three dots: it opens the tools joined onto its left, one bar with it,
   and closes them again (pods.js adds .show-tools). */
@media (hover: none) {
    .message:hover .message-tools,
    .message:focus-within .message-tools {
        display: none;
    }

    .message-tools-toggle {
        position: absolute;
        top: 0;
        right: 14px;
        z-index: 2;
        display: grid;
        /* (A circle the tools bar's height: its 30px buttons, 2px padding and 1px border.) */
        width: 36px;
        height: 36px;
        border-radius: 50%;
        box-sizing: border-box;
        place-items: center;
        padding: 0;
        border: 1px solid var(--border);
        background: var(--panel);
        color: var(--muted);
        transform: translateY(-50%);
    }

    .message-tools-toggle .material-symbols-outlined {
        font-size: 18px;
    }

    /* (Open: its left side goes square where the tools join it; its right side stays round.) */
    .message.show-tools .message-tools-toggle {
        border-color: var(--accent);
        border-radius: 0 18px 18px 0;
        color: var(--accent);
    }

    /* (Open: the tools join onto the button's left, sharing its border, in the same colour.) */
    .message.show-tools .message-tools {
        right: 50px;
        display: flex;
        border-color: var(--accent);
        border-right: 0;
    }

    .message.show-tools {
        border-color: var(--accent);
    }

    /* (A welcome line is one short row: its time sits left of the button, not under it.) */
    .message-join:has(.message-tools-toggle) {
        padding-right: 56px;
    }
}

/* Phones and touch screens: no tooltips (a tap would leave them stuck open). */
@media (max-width: 760px), (hover: none) {
    .pods-page .badge-tooltip::before,
    .pods-page .badge-tooltip::after {
        display: none;
    }
}

.message-tools button {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    color: var(--muted);
}

.message-tools button:hover {
    background: var(--panel-hover);
    color: var(--accent);
}

.message-tools .material-symbols-outlined {
    font-size: 16px;
}

/* Reactions look like the site's reaction buttons. */
.reaction {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 10px 6px 0 0;
    padding: 4px 9px;
    border: 1px solid var(--border);
    background: var(--panel);
    font-size: 0.8rem;
}

.reaction span {
    color: var(--muted);
    font-size: 0.6rem;
}

.reaction:hover {
    border-color: var(--accent);
}

.reaction.active {
    border-color: var(--accent);
    box-shadow: 2px 2px 0 var(--accent);
}

.reaction.active span {
    color: var(--accent);
}

.empty-results {
    padding: 30px;
    color: var(--muted);
    font-size: 0.68rem;
    text-align: center;
}

.composer-zone {
    flex: none;
    padding: 6px 22px 18px;
}

/* GIFs and pictures waiting to be sent (up to 5): a row of small boxes above the message box,
   each with the Favorites pop-up's X in its corner. (The space under it is for "name is
   typing...".) */
.attach-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.attach-bar[hidden] {
    display: none;
}

.attach-item {
    position: relative;
    width: 72px;
    height: 72px;
    flex: none;
    border: 2px solid var(--border);
    background: var(--panel);
}

.attach-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.reply-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 12px;
    border: 2px solid var(--border);
    border-bottom: 0;
    background: var(--panel);
    color: var(--muted);
    font-size: 0.62rem;
}

/* "↩ name: their message" (one line, cut off with "…"), together on the left. */
.reply-to {
    display: flex;
    min-width: 0;
    flex: 1;
    align-items: baseline;
    gap: 6px;
    white-space: nowrap;
}

.reply-bar strong {
    flex: none;
    color: var(--accent);
    font-size: 0.7rem;
}

.reply-to .material-symbols-outlined {
    align-self: center;
    color: var(--accent);
    font-size: 16px;
}

.reply-preview {
    min-width: 0;
    overflow: hidden;
    color: var(--text);
    text-overflow: ellipsis;
}

/* The close X, with a line in front of it the full height of the bar (like the bar's border). */
.reply-bar > button {
    display: grid;
    flex: none;
    align-self: stretch;
    place-items: center;
    margin: -8px -12px -8px 0;
    padding: 0 10px;
    border-left: 2px solid var(--border);
}

/* The bar and the message box are one frame: both turn lavender while you type. */
.composer-zone:focus-within .reply-bar,
.composer-zone:focus-within .reply-bar > button {
    border-color: var(--accent);
}

.reply-bar button:hover {
    color: var(--accent);
}

/* The message box is framed like the site's search box. */
.composer {
    display: flex;
    min-height: 54px;
    align-items: flex-end;
    gap: 6px;
    padding: 8px 8px 8px 10px;
    border: 2px solid var(--border);
    background: var(--panel);
}

.composer:focus-within {
    border-color: var(--accent);
}

.composer button {
    display: grid;
    width: 34px;
    height: 34px;
    flex: none;
    place-items: center;
    color: var(--muted);
}

.composer button:hover {
    color: var(--accent);
}

.composer button:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.composer .send {
    border: 2px solid var(--accent);
    background: var(--accent);
    color: var(--bg);
}

.composer .send:hover {
    border-color: var(--text);
    background: var(--text);
    color: var(--bg);
}

.composer textarea {
    flex: 1;
    min-width: 0;
    min-height: 25px;
    max-height: 140px;
    margin-bottom: 4px;
    padding: 0;
    border: 0;
    outline: 0;
    background: none;
    color: var(--text);
    font-family: "Clear Brackets", "Orbitron", sans-serif;
    font-size: 0.74rem;
    line-height: 25px;
    resize: none;
}

.composer textarea::placeholder {
    color: #aaa;
}

.composer textarea:disabled {
    cursor: not-allowed;
}

.composer-tip {
    margin-top: 7px;
    color: var(--dim);
    font-size: 0.54rem;
    text-align: right;
}

/* ---------- Pop-up contents (the frame itself is the site's .post-dialog) ---------- */

.post-dialog-note {
    margin: 0;
}

.banner-color-field .edit-input {
    height: 44px;
    padding: 4px;
    cursor: pointer;
}

.settings-intro,
.access-help,
.invite-note,
.report-summary {
    margin: 0;
    color: var(--muted);
    font-size: 0.6rem;
    line-height: 1.7;
}

.settings-label {
    display: block;
    margin: 0 0 8px;
    color: var(--accent);
    font-size: 0.56rem;
    letter-spacing: 0.16em;
}

.setting-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    padding: 11px 12px;
    border: 1px solid var(--line);
    background: var(--bg);
}

.setting-row > .material-symbols-outlined {
    font-size: 18px;
    color: var(--accent);
}

.setting-row > div {
    flex: 1;
    min-width: 0;
}

.setting-row strong,
.setting-row small {
    display: block;
}

/* A choice in a settings row (the site's input look, sized to its options): Pod invites. */
.setting-row .setting-select {
    width: auto;
    flex: none;
    padding: 7px 10px;
    font-size: 0.62rem;
}

.setting-row strong {
    font-size: 0.66rem;
}

.setting-row small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.56rem;
    line-height: 1.5;
}

.setting-row.muted {
    opacity: 0.6;
}

/* Room alerts pop-up: each Pod is a drop-down of its rooms, each room with its own switch. */
.room-alerts-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.room-alerts-menu > .setting-row {
    margin-bottom: 4px;
}

.alert-pod {
    border: 1px solid var(--line);
    background: var(--bg);
}

.alert-pod summary {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    cursor: pointer;
    list-style: none;
}

.alert-pod summary::-webkit-details-marker {
    display: none;
}

.alert-pod summary:hover,
.alert-pod[open] summary {
    color: var(--accent);
}

.alert-pod-icon {
    display: grid;
    width: 30px;
    height: 30px;
    flex: none;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--panel);
    color: var(--accent);
}

.alert-pod-icon .material-symbols-outlined {
    font-size: 15px;
}

.alert-pod summary strong {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    font-size: 0.72rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.alert-pod-count {
    color: var(--muted);
    font-size: 0.58rem;
}

/* The arrow points up while the drop-down is open. */
.alert-pod[open] summary > .material-symbols-outlined:last-child {
    transform: rotate(180deg);
}

.alert-pod-rooms {
    padding: 0 10px 2px;
}

.alert-pod-rooms .setting-row {
    background: var(--panel);
}

.alert-pod-rooms > p {
    margin: 0 0 10px;
    font-size: 0.62rem;
}

/* All room alerts off: the room switches stay, dimmed, until it's back on. */
.room-alerts-menu.is-paused .alert-pod {
    opacity: 0.5;
}

/* "View" (Blocked users) at the end of its settings row. */
.setting-row .setting-button {
    flex: none;
    padding: 7px 12px;
    font-size: 0.62rem;
}

.setting-row input[type="checkbox"],
.permission-option input,
.room-private-option input,
.private-room-members input {
    width: 18px;
    height: 18px;
    flex: none;
    accent-color: var(--accent);
    cursor: pointer;
}

/* Pod shortcut picker */
.shortcut-options {
    max-height: 320px;
    padding: 2px 4px 4px 0;
    overflow-y: auto;
}

.shortcut-option {
    display: block;
    margin: 0 0 8px;
    cursor: pointer;
}

.shortcut-option input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.shortcut-option > span {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    background: var(--bg);
    font-size: 0.66rem;
}

.shortcut-option .material-symbols-outlined {
    font-size: 17px;
    color: var(--accent);
}

.shortcut-option small {
    margin-left: auto;
    color: var(--dim);
    font-size: 0.54rem;
    white-space: nowrap;
}

.shortcut-option input:checked + span {
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 2px 2px 0 var(--accent);
}

.shortcut-option input:focus-visible + span {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Permission and private-room checkboxes */
.permission-option,
.room-private-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    border: 1px solid var(--line);
    background: var(--bg);
    cursor: pointer;
}

.permission-option:has(input:checked),
.room-private-option:has(input:checked) {
    border-color: var(--accent);
}

.permission-option span,
.room-private-option span {
    display: grid;
    flex: 1;
    grid-template-columns: 18px 1fr;
    align-items: center;
    column-gap: 10px;
}

.permission-option .material-symbols-outlined,
.room-private-option .material-symbols-outlined {
    grid-row: 1 / 3;
    font-size: 17px;
    color: var(--accent);
}

.permission-option strong,
.room-private-option strong {
    font-size: 0.66rem;
}

.permission-option small,
.room-private-option small {
    grid-column: 2;
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.56rem;
    line-height: 1.5;
}

.private-room-members {
    margin: 0;
    padding: 10px 12px;
    border: 1px solid var(--line);
}

.private-room-members legend {
    padding: 0 6px;
    color: var(--accent);
    font-size: 0.58rem;
}

.private-room-members p {
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 0.56rem;
    line-height: 1.6;
}

.private-room-members > label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 2px;
    cursor: pointer;
}

.private-room-members > label span {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
}

.private-room-members .avatar {
    width: 24px;
    height: 24px;
    font-size: 0.6rem;
}

.private-room-members > small {
    color: var(--muted);
    font-size: 0.56rem;
}

/* When creating a room, the member picker only shows once "Private room" is ticked. */
.post-dialog-form:has(.room-private-option) .private-room-members {
    display: none;
}

.post-dialog-form:has(.room-private-option input:checked) .private-room-members {
    display: block;
}

/* Banner backdrop and room icon pickers */
.backdrop-options,
.room-icon-options {
    margin: 0;
    padding: 0;
    border: 0;
}

.backdrop-options legend,
.room-icon-options legend {
    grid-column: 1 / -1;
    margin-bottom: 10px;
    color: var(--accent);
    font-size: 0.6rem;
}

.backdrop-options {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
}

.room-icon-options {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.backdrop-options label,
.room-icon-options label {
    position: relative;
    text-align: center;
    cursor: pointer;
}

.backdrop-options input,
.room-icon-options input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.backdrop-options label > span {
    position: relative;
    display: block;
    height: 44px;
    margin-bottom: 6px;
    overflow: hidden;
    border: 2px solid var(--line);
}

/* Each backdrop's preview is a real banner (the same rules as the Pod and room banners), drawn
   at banner size and shrunk to a quarter, so its rings, stars and stripes look the same. */
.backdrop-sample > .banner-theme {
    position: absolute;
    top: 0;
    left: 0;
    width: 400%;
    height: 176px;
    zoom: 0.25;
    pointer-events: none;
}

.backdrop-options strong {
    color: var(--muted);
    font-size: 0.5rem;
    font-weight: 600;
}

.room-icon-options label > span {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    margin: 0 auto 6px;
    border: 2px solid var(--line);
    background: var(--bg);
}

.room-icon-options .material-symbols-outlined {
    font-size: 19px;
}

.room-icon-options small {
    color: var(--muted);
    font-size: 0.52rem;
    text-transform: capitalize;
}

.backdrop-options input:checked + span,
.room-icon-options input:checked + span {
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 2px 2px 0 var(--accent);
}

.backdrop-options input:focus-visible + span,
.room-icon-options input:focus-visible + span {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

/* Site role tags (the site's .perm-role, as in Moonbase Control), sized for each spot here. */
.pods-page .perm-role {
    gap: 4px;
    font-size: 0.52rem;
    letter-spacing: 0.06em;
    text-transform: none;
}

.pods-page .perm-role .material-symbols-outlined {
    font-size: 0.85rem;
}

.side-member-name .perm-role,
.friend-copy .perm-role,
.profile-pop-head .perm-role {
    display: flex;
    margin-top: 3px;
}

.profile-pop-head .perm-role {
    margin-top: 0;
    font-size: 0.62rem;
}

.profile-pop-head .perm-role .material-symbols-outlined {
    font-size: 1rem;
}

/* The profile pop-up stays put at the top when its tabs change, so only its bottom edge
   moves instead of the whole box re-centring. */
.post-dialog:has(.profile-pop),
.post-dialog:has(.profile-pop-loading) {
    margin-top: max(40px, 8vh);
    margin-bottom: auto;
}

/* No buttons on its bottom border, so it doesn't need the room the site leaves for them. */
.user-dialog-body {
    padding-bottom: 22px;
}

/* Profile pop-up (click anyone's name): picture and name, friend buttons, then tabs. */
.profile-pop {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.profile-pop-head {
    display: flex;
    align-items: center;
    gap: 14px;
}

/* The picture, with Online / Idle / Offline (yours: the status menu) under it. */
.profile-pop-pic-column {
    display: flex;
    flex: none;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.profile-pop-pic-column .profile-pop-presence-row {
    justify-content: center;
    margin-top: 0;
}

/* (Beside the picture: level with it, between the role above and the status word below.) */
.profile-pop-details {
    align-self: center;
    min-width: 0;
}

/* The site role and the name on one line. */
.profile-pop-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    white-space: nowrap;
}

.profile-pop-name-row .perm-role {
    flex: none;
}

/* Its tooltip (what the role means) opens below, from the tag's left edge: above, the pop-up's
   title tag is in the way. */
.profile-pop-name-row .badge-tooltip::after {
    top: calc(100% + 10px);
    bottom: auto;
    left: -6px;
    transform: translate(0, -4px);
}

.profile-pop-name-row .badge-tooltip::before {
    top: calc(100% + 5px);
    bottom: auto;
    left: 6px;
    border-right: 0;
    border-bottom: 0;
    border-top: 2px solid var(--border);
    border-left: 2px solid var(--border);
    transform: translate(0, -4px) rotate(45deg);
}

.profile-pop-name-row .badge-tooltip:hover::after,
.profile-pop-name-row .badge-tooltip:focus-visible::after {
    transform: translate(0, 0);
}

.profile-pop-name-row .badge-tooltip:hover::before,
.profile-pop-name-row .badge-tooltip:focus-visible::before {
    transform: translate(0, 0) rotate(45deg);
}

.profile-pop-name-row .profile-pop-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* The name is the link to the full profile. */
.profile-pop-name {
    text-decoration: none;
}

.profile-pop-name:hover .username,
.profile-pop-name:focus-visible .username {
    text-decoration: underline;
}

/* Online / Idle / Chatting… / Offline (yours: when you show as idle), then their profile status. */
.profile-pop-presence-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

/* In the status's colour (the dots' colours in member lists). */
.profile-pop-presence {
    color: #9a9a9a;
    font-size: 0.62rem;
}

.profile-pop-presence.is-online {
    color: #4ade80;
}

.profile-pop-presence.is-idle {
    color: #facc15;
}

/* Member lists: the site role in front of the name and the profile status under it. */
/* Long names: the @username drops under the display name rather than both being cut short
   (each still ends in … if it's wider than the panel on its own). */
.side-member-name-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1px 6px;
    min-width: 0;
}

.side-member-name-row > * {
    max-width: 100%;
}

.side-member-name-row .username {
    min-width: 0;
}

.side-member-name .side-member-name-row .perm-role {
    flex: none;
    margin-top: 0;
}

/* Its tooltip (what the role means) opens from the tag's left edge, so it stays inside the panel. */
.side-member-name .badge-tooltip::after {
    left: -6px;
    transform: translate(0, 4px);
}

.side-member-name .badge-tooltip::before {
    left: 6px;
    transform: translate(0, 4px) rotate(45deg);
}

.side-member-name .badge-tooltip:hover::after,
.side-member-name .badge-tooltip:focus-visible::after {
    transform: translate(0, 0);
}

.side-member-name .badge-tooltip:hover::before,
.side-member-name .badge-tooltip:focus-visible::before {
    transform: translate(0, 0) rotate(45deg);
}

/* Pictures in member lists and messages: the border in their status colour (green online, yellow
   idle, grey offline). */
/* (The thicker border takes no more room: messages stay lined up.) */
.avatar[data-presence-pic-uid] {
    margin: -1px;
    border-width: 2px;
}

.avatar.is-online {
    border-color: #4ade80;
}

.avatar.is-idle {
    border-color: #facc15;
}

.avatar.is-offline {
    border-color: #9a9a9a;
}

/* Your status: a small menu button, and its menu (the site's panel look). */
.status-picker {
    position: relative;
    display: inline-block;
}

/* (One width whatever it says, so changing it doesn't move the pop-up.) */
.status-picker-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 88px;
    gap: 2px;
    padding: 3px 4px 3px 8px;
    border: 2px solid var(--border);
    background: var(--panel);
    font: inherit;
    font-size: 0.62rem;
    cursor: pointer;
}

.status-picker-button:hover,
.status-picker-button[aria-expanded="true"] {
    background: var(--panel-hover);
}

.status-picker-button .material-symbols-outlined {
    font-size: 1rem;
}

.status-picker-button[aria-expanded="true"] .material-symbols-outlined {
    rotate: 180deg;
}

.status-picker-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    z-index: 5;
    display: flex;
    flex-direction: column;
    min-width: 250px;
    padding: 4px;
    border: 2px solid var(--border);
    background: var(--panel);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45);
}

.status-picker-menu[hidden] {
    display: none;
}

.status-picker-option {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    column-gap: 10px;
    padding: 7px 8px;
    border: 0;
    background: none;
    color: var(--text);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.status-picker-option:hover,
.status-picker-option:focus-visible {
    outline: none;
    background: var(--panel-hover);
}

.status-picker-option > span:first-child {
    font-size: 0.66rem;
    font-weight: 700;
}

.status-picker-option.is-online > span:first-child {
    color: #4ade80;
}

.status-picker-option.is-idle > span:first-child {
    color: #facc15;
}

.status-picker-option.is-offline > span:first-child {
    color: #9a9a9a;
}

.status-picker-option small {
    grid-column: 1;
    margin-top: 2px;
    color: var(--dim);
    font-size: 0.55rem;
}

.status-picker-check {
    grid-row: 1 / span 2;
    grid-column: 2;
    color: var(--accent);
    font-size: 1rem;
    visibility: hidden;
}

.status-picker-option[aria-selected="true"] .status-picker-check {
    visibility: visible;
}

/* Their profile status: the profile page's status tag (the site's .profile-status-tag), sitting
   under the name instead of on a banner's edge. */
.profile-pop .profile-pop-status {
    position: static;
    max-width: 100%;
    margin-top: 6px;
    transform: none;
    font: inherit;
    font-size: 0.72rem;
    letter-spacing: 0.05em;
    text-align: left;
}

.profile-pop .profile-pop-status[hidden] {
    display: none;
}

/* Editing your status: your tag becomes a small editor in the same spot, the same size as the tag. */
.status-inline {
    display: flex;
    align-items: center;
    gap: 2px;
    max-width: 100%;
    min-height: 38px;
    margin-top: 6px;
    padding: 2px 4px 2px 2px;
    box-sizing: border-box;
    border: 2px solid var(--accent);
    background: var(--panel);
}

.status-inline-icon-wrap {
    position: relative;
    flex: none;
}

.status-inline-icon,
.status-inline-action {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--accent);
    cursor: pointer;
}

.status-inline-icon:hover,
.status-inline-icon[aria-expanded="true"],
.status-inline-action:hover {
    background: var(--panel-hover);
}

.status-inline-icon .material-symbols-outlined {
    font-size: 1.1rem;
}

.status-inline-action {
    flex: none;
    width: 26px;
    color: var(--dim);
}

.status-inline-action.is-save {
    color: var(--role-moderator);
}

.status-inline-action .material-symbols-outlined {
    font-size: 1.05rem;
}

.status-inline-input {
    flex: 1;
    min-width: 0;
    padding: 4px 6px;
    border: 0;
    outline: none;
    background: none;
    color: var(--text);
    font: inherit;
    font-size: 0.72rem;
    letter-spacing: 0.05em;
}

/* The icons: a short menu under the icon button that scrolls. */
.status-inline-icons {
    position: absolute;
    top: calc(100% + 6px);
    left: -4px;
    z-index: 6;
    display: grid;
    grid-template-columns: repeat(6, 32px);
    gap: 6px;
    max-height: 166px;
    padding: 8px;
    overflow-y: auto;
    border: 2px solid var(--border);
    background: var(--panel);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45);
    scrollbar-width: thin;
    scrollbar-color: var(--accent) transparent;
}

.status-inline-icons[hidden] {
    display: none;
}

.status-inline-error {
    margin: 6px 0 0;
}

.user-detail-avatar {
    display: grid;
    width: 56px;
    height: 56px;
    flex: none;
    place-items: center;
    border: 2px solid var(--border);
    color: #fff;
    font-size: 1.1rem;
    font-weight: 800;
}

.profile-pop-head strong {
    display: block;
    overflow-wrap: anywhere;
    color: var(--accent);
    font-family: var(--font-plain);
    font-size: 1.15rem;
    letter-spacing: normal;
}

/* The site's "Follows you" tag, in normal capitals. */
.pods-page .profile-follows-you {
    font-size: 0.5rem;
    font-weight: 600;
    text-transform: none;
    vertical-align: middle;
}

.profile-pop-head small {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    color: var(--muted);
    font-size: 0.58rem;
}

.profile-pop-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    /* Room for the buttons' offset shadows. */
    padding: 0 4px 4px 0;
}

.profile-pop-actions .space-button {
    padding: 9px 14px;
    font-size: 0.66rem;
    text-decoration: none;
}

/* "Friends" / "Request sent": a label, not a button. */
.profile-pop-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border: 1px solid var(--accent);
    color: var(--accent);
    font-size: 0.62rem;
    font-weight: 600;
}

.profile-pop-badge .material-symbols-outlined {
    font-size: 15px;
}

/* Full profile, Block and Report sit together on the right. */
.profile-pop-link,
.profile-pop-block,
.profile-pop-report {
    margin-left: auto;
}

:is(.profile-pop-link, .profile-pop-block) + :is(.profile-pop-block, .profile-pop-report) {
    margin-left: 0;
}

.profile-pop-actions .icon-button.profile-pop-link,
.profile-pop-actions .icon-button.profile-pop-edit,
.profile-pop-actions .icon-button.profile-pop-block,
.profile-pop-actions .icon-button.profile-pop-report {
    width: 34px;
    height: 34px;
}

/* Full profile is a link: no underline under its icon. */
.profile-pop-actions a.profile-pop-link {
    text-decoration: none;
}

.profile-pop-link .material-symbols-outlined,
.profile-pop-block .material-symbols-outlined,
.profile-pop-report .material-symbols-outlined {
    font-size: 18px;
}

.profile-pop-block:hover,
.profile-pop-report:hover {
    border-color: var(--danger);
    color: var(--danger);
}

.profile-pop-tabs {
    display: flex;
    gap: 8px;
    padding: 0 4px 4px 0;
    border-bottom: 1px solid var(--line-soft);
    padding-bottom: 14px;
}

.profile-pop-tabs .space-button {
    padding: 8px 12px;
    font-size: 0.64rem;
    white-space: nowrap;
}

/* Each tab scrolls inside itself, so long lists don't stretch the pop-up. */
.profile-pop-panel {
    max-height: min(320px, 42vh);
    overflow-y: auto;
    /* Space between the list and the scrollbar. */
    padding-right: 6px;
}

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

.profile-pop-panel .profile-modal-rooms {
    padding-top: 0;
    border-top: 0;
}

.profile-pop-panel .profile-modal-rooms > strong:not(:first-child) {
    margin-top: 16px;
}

.profile-pop-panel p,
.profile-pop-empty {
    margin: 0;
    color: var(--muted);
    font-size: 0.64rem;
    line-height: 1.7;
}

.profile-pop-trust {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border: 1px solid var(--line);
    background: var(--bg);
}

.profile-pop-trust .trust-star {
    width: 40px;
    height: 40px;
    font-size: 40px;
}

.profile-pop-trust strong {
    display: block;
    font-size: 0.72rem;
}

.profile-pop-trust small {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 0.58rem;
    line-height: 1.6;
}

.profile-modal-rooms {
    padding-top: 14px;
    border-top: 1px solid var(--line-soft);
}

.profile-modal-rooms > strong {
    display: block;
    margin-bottom: 10px;
    color: var(--accent);
    font-size: 0.6rem;
}

.profile-modal-rooms > p {
    color: var(--muted);
    font-size: 0.62rem;
}

.profile-modal-rooms button {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    padding: 10px;
    border: 1px solid var(--line);
    background: var(--bg);
    color: var(--text);
    text-align: left;
}

.profile-modal-rooms button:hover {
    border-color: var(--accent);
}

.profile-modal-rooms button > .material-symbols-outlined {
    flex: none;
    font-size: 17px;
    color: var(--accent);
}

.profile-modal-rooms button > span {
    flex: 1;
    min-width: 0;
}

/* The arrow keeps its own size, at the row's right end (dim; accent on hover). */
.profile-modal-rooms button > .go-arrow {
    flex: none;
    color: var(--dim);
}

.profile-modal-rooms button:hover > .go-arrow,
.profile-modal-rooms button:focus-visible > .go-arrow {
    color: var(--accent);
}

/* The Pod's picture stays a small square (the row's text takes the rest of the width). */
.profile-modal-rooms button > .pod-row-picture {
    width: 30px;
    height: 30px;
    flex: none;
}

.profile-modal-rooms button b,
.profile-modal-rooms button small {
    display: block;
}

.profile-modal-rooms button b {
    font-size: 0.64rem;
}

.profile-modal-rooms button small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.54rem;
}

.profile-modal-rooms .user-room-link {
    width: calc(100% - 16px);
    margin-left: 16px;
    border-style: dashed;
}

.report-link {
    align-self: flex-start;
    color: var(--danger);
    font-size: 0.6rem;
    text-decoration: underline;
}

.report-link:hover {
    color: var(--text);
}

/* Trust star: fills from the bottom as the trust level rises. */
/* The outline star is the icon at the box's full size; the "liquid" fills it from the bottom. */
.trust-star {
    position: relative;
    display: inline-block;
    width: 18px;
    height: 18px;
    flex: none;
    font-size: 18px;
    line-height: 1;
}

.trust-star > .material-symbols-outlined {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: var(--accent);
    font-size: inherit;
}

.trust-star-liquid {
    position: absolute;
    inset: 1px;
    -webkit-clip-path: polygon(50% 0%, 62% 34%, 98% 35%, 69% 57%, 79% 92%, 50% 72%, 21% 92%, 31% 57%, 2% 35%, 38% 34%);
    clip-path: polygon(50% 0%, 62% 34%, 98% 35%, 69% 57%, 79% 92%, 50% 72%, 21% 92%, 31% 57%, 2% 35%, 38% 34%);
    background: var(--panel-hover);
}

.trust-star-fill {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(180deg, #eee8ff, var(--accent));
}

/* Toasts use the site's .toast-stack / .toast; just the text size here. */
.toast-stack .toast {
    font-size: 0.66rem;
    line-height: 1.6;
}

/* Phones, in a room: toasts at the top, just under the room's banner (pods.js sets the top). */
.toast-stack.is-top {
    right: 16px;
    bottom: auto;
    left: 16px;
    width: auto;
}

/* Scrims behind the phone drawers (shown by the script). */
.mobile-scrim,
.member-scrim {
    display: none;
}

/* ---------- Smaller screens ---------- */


@media (max-width: 1100px) {
    .members,
    .pod-members-sidebar {
        width: 230px;
    }

    .pod-inner {
        padding-left: 22px;
        padding-right: 22px;
    }
}

@media (max-width: 980px) {
    

    

    

    .hero-copy {
        max-width: 65%;
    }

    .global-nav .space-button {
        padding: 0 11px;
    }
}

@media (max-width: 760px) {
    :root {
        /* The logo row, then the nav tabs a little under it. */
        --bar-h: 104px;
        --rail-w: 0px;
    }

    /* Friends: the tabs row a little closer to the heading. */
    .page-head {
        margin-bottom: 6px;
    }

    /* Follows the visible area when the phone keyboard is open (set by the script). */
    .app,
    .app.sidebar-collapsed {
        grid-template-columns: minmax(0, 1fr);
        --pod-rail-w: 0px;
        height: var(--chat-viewport-height, 100dvh);
    }

    /* Two rows: the logo and the quick actions on top, the nav centred under them. */
    .globalbar {
        align-items: flex-end;
        gap: 8px;
        padding: 0 10px;
    }

    .pods-page > .sidebar {
        top: 12px;
        right: 12px;
        flex-direction: row;
        gap: 8px;
    }

    .global-nav {
        margin: 0 auto;
    }

    /* Icon and name, a little smaller. */
    .global-nav .space-button {
        height: 30px;
        padding: 0 14px;
        font-size: 0.64rem;
    }

    .global-nav .space-button.is-active {
        height: 32px;
    }

    .pods-page .icon-button {
        width: 40px;
        height: 40px;
    }

    .pods-page > .sidebar .icon-button {
        width: 42px;
        height: 42px;
    }

    /* (Phones: no Pod shortcuts rail; the Quick access drawer has them.) */
    .app.sidebar-collapsed .pod-rail {
        display: none;
    }

    /* The sidebar slides in over the page. */
    .app-sidebar,
    .app.sidebar-collapsed .app-sidebar {
        position: fixed;
        top: var(--bar-h);
        bottom: 0;
        left: 0;
        /* Over the top bar, so its top border shows over the open nav tab. */
        z-index: 26;
        /* Its right edge lines up with the Friends tab's (measured by pods.js). */
        width: var(--nav-right, min(300px, 88vw));
        overflow: visible;
        /* (All four, even if it was last closed on desktop, which takes its border off.) */
        border: 2px solid var(--border);
        visibility: visible;
        transform: translateX(-120%);
    }

    /* While it's open the nav tabs go darker, like the page under the scrim. (The open drawer's own
       toggle stays bright: with the members open, the Quick access toggle goes darker too.) */
    .app:has(.app-sidebar.open, .members.open, .pod-members-sidebar.open) .global-nav > .profile-tab:not(.nav-toggle),
    .app:has(.members.open, .pod-members-sidebar.open) .global-nav > .nav-toggle.sidebar-toggle {
        filter: brightness(0.45);
    }

    /* Open, even if the sidebar was last closed on desktop. */
    .app-sidebar.open,
    .app.sidebar-collapsed .app-sidebar.open {
        transform: none;
    }

    /* Pop-ups: content starts a little higher under the title tag. */
    .pods-page .post-dialog-body {
        padding-top: 24px;
    }

    /* (Its tabs stop a little lower than on a computer, clear of the title tag: style.css.) */
    .pods-page .post-dialog-body :is([role="tablist"]:not(.profile-pop-tab-list), .profile-pop-tabs) {
        top: -8px;
    }

    .sidebar-scroll {
        padding-bottom: calc(24px + env(safe-area-inset-bottom));
    }

    .main {
        grid-column: 1;
        border-right: none;
    }

    .mobile-scrim:not(.hidden),
    .member-scrim:not(.hidden) {
        position: fixed;
        inset: var(--bar-h) 0 0;
        z-index: 20;
        display: block;
        width: 100%;
        background: rgba(10, 10, 14, 0.72);
        -webkit-backdrop-filter: blur(2px);
        backdrop-filter: blur(2px);
    }

    .member-scrim:not(.hidden) {
        z-index: 31;
    }

    /* Member panels become drawers from the right, framed like the Quick access drawer (a border
       all round, its top one over the open nav tab). */
    .members,
    .pod-members-sidebar {
        position: fixed;
        top: var(--bar-h);
        right: 0;
        bottom: 0;
        z-index: 32;
        display: none !important;
        width: min(320px, 86vw);
        border: 2px solid var(--border);
    }

    .members.open {
        display: block !important;
    }

    /* (Shown while it's dragged open, pods.js: it follows the finger.) */
    .members.is-dragging {
        display: block !important;
    }

    .pod-members-sidebar.is-dragging {
        display: flex !important;
    }

    .pod-members-sidebar.open {
        display: flex !important;
    }

    .member-sidebar-head button:not(.icon-button, .member-toggle-head) {
        display: grid;
    }

    .pod-top-row {
        top: 20px;
    }

    .directory-inner,
    .friends-inner,
    .pod-inner {
        padding: 18px 14px 12px;
    }

    .pod-entrance {
        min-height: 170px;
        padding: 32px 18px 18px;
    }

    /* Rooms: a smaller banner and messages, so more of the conversation fits. */
    .welcome {
        top: 20px;
        margin: 20px 12px 12px;
        padding: 26px 14px 12px;
    }

    .welcome h1 {
        font-size: 0.85rem;
    }

    .welcome p {
        margin-top: 6px;
        font-size: 0.58rem;
    }

    .message {
        gap: 10px;
        padding: 10px;
    }

    .message .avatar,
    .message .avatar-placeholder {
        width: 30px;
    }

    .message .avatar {
        height: 30px;
    }

    .message-header strong {
        font-size: 0.8rem;
    }

    .message-text {
        font-size: 0.68rem;
        line-height: 1.6;
    }

    /* Room and Pod cards: no fixed height, just their content. */
    .directory-card {
        min-height: 0;
        padding: 12px;
    }

    .message {
        margin: 0 12px 10px;
    }

    .message.grouped {
        margin-top: -11px;
    }

    .date-divider {
        margin: 14px 12px 12px;
    }

    .composer-zone {
        padding: 6px 12px calc(12px + env(safe-area-inset-bottom));
    }

    body.chat-keyboard-open .composer-zone {
        padding-bottom: calc(18px + env(safe-area-inset-bottom));
    }

    .composer {
        align-items: center;
    }

    .composer textarea {
        max-height: 100px;
        margin-bottom: 0;
    }

    .hero-copy {
        max-width: 75%;
        padding: 36px 26px 30px;
    }

    .planet {
        width: 150px;
    }

    .orbit {
        width: 240px;
        height: 110px;
    }

    .orbit-two {
        width: 290px;
        height: 140px;
    }

    /* Pods page: the hero only as tall as its words, and tighter gaps between the parts. */
    .home-hero {
        min-height: 0;
        margin-top: 20px;
    }

    /* The Quick access toggle goes inside the ourPods tag, just its icon, with a line between
       it and the name (the tag's full height). */
    .home-hero > .sidebar-toggle {
        display: none;
    }

    .pods-page .hero-pill > .icon-button.sidebar-toggle {
        display: flex;
        align-self: stretch;
        width: 34px;
        height: auto;
        margin: -7px 2px -7px -12px;
        border: 0;
        border-right: 2px solid var(--border);
        background: none;
    }

    /* Create Pod sits on the hero's top border, in the right corner (not in the tabs row). */
    .home-hero > .directory-create {
        position: absolute;
        top: 0;
        right: 20px;
        z-index: 3;
        display: flex;
        padding: 8px 12px;
        font-size: 0.62rem;
        transform: translateY(-50%);
    }

    .page-toolbar > .directory-create[data-action="add-pod"] {
        display: none;
    }

    /* Phones: the tabs fill their row (the search is in the hero or the heading, pods.js). */
    .page-toolbar {
        align-items: center;
        gap: 12px;
        margin: 20px 0 14px;
    }

    .home-hero > .pods-search.is-open {
        width: calc(100% - 40px);
    }

    .page-head .directory-title {
        flex: none;
    }

    .pod-tabs,
    .friends-tabs {
        overflow-x: visible;
        margin-bottom: 0;
    }

    .pod-tabs {
        display: grid;
        grid-template-columns: auto repeat(3, minmax(0, 1fr));
        gap: 8px;
    }

    .pod-tabs .space-button {
        min-width: 0;
        justify-content: center;
        padding-right: 8px;
        padding-left: 8px;
        /* Smaller words (the Favorites star keeps its own px size). */
        font-size: 0.62rem;
    }

    .pod-tabs .tab-extra {
        display: none;
    }


    /* Favorites tab shows a star instead of the word. */
    .pod-tabs [data-tab="favorites"] .material-symbols-outlined {
        display: block;
    }

    .pod-tabs [data-tab="favorites"] .tab-label {
        display: none;
    }

    .toast-stack {
        bottom: 20px;
    }
}

@media (max-width: 520px) {
    .directory-grid {
        grid-template-columns: 1fr;
    }

    .directory-title {
        align-items: flex-start;
    }

    .directory-title h1 {
        font-size: 1.4rem;
    }

    /* Create buttons beside a page heading shrink to their icon. */
    .directory-title:has(h1) .directory-create {
        padding: 10px;
        font-size: 0;
    }

    .directory-title:has(h1) .directory-create .material-symbols-outlined {
        font-size: 18px;
    }

    .hero-copy {
        max-width: 100%;
        padding: 30px 18px 22px;
    }

    .home-hero h1 {
        font-size: 1.35rem;
    }

    .hero-art {
        opacity: 0.35;
    }

    .planet,
    .orbit {
        left: 88%;
    }

    

    

    

    

    

    

    .pod-entrance h1 {
        font-size: 1.2rem;
    }

    /* No room for the "Pod entrance" tag beside the toggle and the banner buttons. */
    .pod-entrance .page-eyebrow {
        display: none;
    }

    .pod-gate {
        padding: 24px 16px;
    }

    .friends-panel {
        padding: 30px 10px 10px;
    }

    .backdrop-options {
        gap: 4px;
    }

    .backdrop-options label > span {
        height: 36px;
    }

}

/* ---------- Live data pieces (pods.js) ---------- */

/* Profile pictures fill their square (the site's astronaut picture when there isn't one). */
.avatar,
.user-detail-avatar {
    overflow: hidden;
    background: var(--panel);
}

.avatar img,
.user-detail-avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* The whole friend card opens their profile pop-up. */
.friend-card {
    cursor: pointer;
}

.friend-card:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Site role tag right after the username. */
.friend-name-row {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 8px;
}

.friend-name {
    min-width: 0;
}

.friend-name-row .perm-role {
    flex: none;
    margin-top: 0;
}

/* (The @username opens the profile.) */

/* The name in the profile pop-up, with "Follows you" / "Blocked" tags on a line under it. */
.profile-pop-name {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
}

.profile-pop-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

/* (The site's tag has a gap on its left for sitting after a name; here it starts the line.) */
.profile-pop-tags > .profile-follows-you {
    margin-left: 0;
}

/* "Replying to" line above a message. */
.message-reply {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 6px;
    margin: 2px 0 4px;
    color: var(--muted);
    font-size: 0.62rem;
}

.message-reply .material-symbols-outlined {
    font-size: 15px;
}

.message-reply b {
    flex: none;
    color: var(--text);
    font-family: var(--font-plain);
}

.message-reply span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* (The message replied to is still here: click to go to it.) */
button.message-reply {
    max-width: 100%;
    padding: 0;
    border: 0;
    background: none;
    color: var(--muted);
    font-family: inherit;
    font-size: 0.62rem;
    letter-spacing: inherit;
    text-align: left;
    cursor: pointer;
}

button.message-reply:hover b,
button.message-reply:focus-visible b {
    color: var(--accent);
}

/* Its picture or GIF, small. */
.message-reply-thumb {
    flex: none;
    width: auto;
    max-width: 56px;
    height: 28px;
    border: 1px solid var(--line);
    object-fit: cover;
}

/* Emoji picker above the message box. */
.composer-zone {
    position: relative;
}

/* "name is typing..." just above the message box (and reply bar), under a GIF or picture waiting
   to be sent. It floats there (instead of taking a line), so the messages don't jump each time
   someone starts or stops typing. */
.composer-stack {
    position: relative;
}

.typing-indicator {
    position: absolute;
    bottom: 100%;
    left: 0;
    z-index: 1;
    max-width: 100%;
    overflow: hidden;
    padding: 2px 8px;
    background: var(--bg);
    color: var(--dim);
    font-size: 0.58rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.typing-indicator[hidden] {
    display: none;
}

/* @mentions: the site's search suggestions (style.css .search-suggestions), above the message
   box instead of under a search box. */
/* (Placed on the reply bar / message box, so they open right above it.) */
.mention-suggestions {
    top: auto;
    bottom: calc(100% + 2px);
    left: 0;
    right: 0;
    z-index: 5;
    max-height: min(260px, 40vh);
    border-top: 2px solid var(--border);
}

.mention-suggestion {
    justify-content: flex-start;
    padding: 8px 12px;
}

.mention-suggestion.is-active {
    background: var(--panel-hover);
    color: var(--accent);
}

.mention-suggestion .avatar {
    width: 26px;
    height: 26px;
}

/* :emoji suggestions: the emoji where a person's picture would be. */
.mention-emoji {
    width: 26px;
    flex: none;
    font-size: 1.1rem;
    text-align: center;
}

.mention-name {
    display: flex;
    min-width: 0;
    align-items: baseline;
    gap: 8px;
}

.mention-name small {
    overflow: hidden;
    color: var(--muted);
    font-size: 0.62rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Emoji menu above the message box: groups of emojis, scrolling inside the menu. (The GIF picker
   and the Favorites pop-up use the same frame.) */
.emoji-picker,
.fav-picker {
    position: absolute;
    right: 0;
    bottom: calc(100% + 2px);
    z-index: 5;
    width: min(380px, 100%);
    max-height: min(340px, 50vh);
    overflow-y: auto;
    padding: 4px 10px 10px;
    border: 2px solid var(--border);
    background: var(--panel);
}

.emoji-group-title {
    position: sticky;
    /* (Just under the category tabs, which stay at the top too.) */
    top: 41px;
    z-index: 1;
    display: block;
    margin: 0 -10px 6px;
    padding: 8px 10px 6px;
    background: var(--panel);
    color: var(--accent);
    font-size: 0.58rem;
}

.emoji-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(36px, 1fr));
    gap: 2px;
}

.emoji-picker[hidden],
.fav-picker[hidden] {
    display: none;
}

.emoji-picker button {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    font-size: 1.1rem;
}

.emoji-picker button:not(.profile-tab):hover,
.emoji-picker button:not(.profile-tab):focus-visible {
    background: var(--bg);
    outline: 1px solid var(--accent);
}

/* The GIF picker and Favorites pop-up keep one size (their contents scroll inside), so they don't
   grow and shrink as tabs change or GIFs load. */
.gif-picker,
.fav-picker,
.emoji-picker {
    height: min(340px, 50vh);
}

/* GIF picker (GIPHY): the emoji menu's frame, with the site's search box at the top (staying put
   while the GIFs scroll), a grid of GIFs and GIPHY's credit at the bottom. */
.gif-search {
    position: sticky;
    top: -4px;
    z-index: 1;
    margin: 6px 0 8px;
    padding: 9px 12px;
}

.gif-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
}

/* (Squares made with padding, a share of the width: the phone menu's fixed-height scrolling grid
   squashed aspect-ratio squares into strips.) */
.gif-picker .gif-choice {
    position: relative;
    width: 100%;
    height: 0;
    padding: 0 0 100%;
    overflow: hidden;
    border: 1px solid var(--line-soft);
    background: var(--bg);
}

.gif-choice img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gif-note {
    grid-column: 1 / -1;
    margin: 12px 0;
    color: var(--muted);
    font-size: 0.62rem;
}

.gif-credit {
    margin: 8px 0 0;
    color: var(--dim);
    font-size: 0.52rem;
    text-align: right;
}

/* Favorites pop-up: GIFs / Images tabs (staying put while the grid scrolls), then a grid of
   favorites; tap one to send it, or its X to remove it. */
.fav-tabs {
    position: sticky;
    top: -4px;
    z-index: 1;
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 0 -10px 10px;
    padding: 8px 10px 10px;
    border-bottom: 1px solid var(--line-soft);
    background: var(--panel);
}

.fav-tabs .profile-tab {
    padding: 7px 12px;
    font-size: 0.6rem;
}

.fav-count {
    color: var(--muted);
}

.fav-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
}

.fav-item {
    position: relative;
}

.fav-send {
    position: relative;
    display: block;
    width: 100%;
    height: 0;
    padding: 0 0 100%;
    overflow: hidden;
    border: 1px solid var(--line-soft);
    background: var(--bg);
}

.fav-send:hover,
.fav-send:focus-visible {
    border-color: var(--accent);
}

.fav-send img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* A favorite whose link stopped working: just the empty square (it can still be removed). */
.fav-send.is-broken img {
    visibility: hidden;
}

.fav-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    display: grid;
    width: 22px;
    height: 22px;
    place-items: center;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
}

.fav-remove:hover,
.fav-remove:focus-visible {
    border-color: var(--accent);
    color: var(--accent);
}

.fav-remove .material-symbols-outlined {
    font-size: 14px;
}

/* The star on a picture in a message (add to / remove from favorites). Shows when you hover the
   picture (favorite or not); always on touch screens. */
.message-image-wrap {
    position: relative;
    display: block;
    max-width: 100%;
}

/* One picture: the 320px limit goes on the wrapper, so it hugs the picture (a wide one would
   otherwise stretch it across the message, putting the star out past the picture). */
.message-images:not(.is-several) .message-image-wrap {
    max-width: min(320px, 100%);
}

.message-images:not(.is-several) .message-image img {
    max-width: 100%;
}

.message-image-fav {
    position: absolute;
    top: 6px;
    right: 6px;
    display: none;
    width: 28px;
    height: 28px;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--bg);
    color: var(--text);
}

.message-image-wrap:hover .message-image-fav,
.message-image-fav:focus-visible {
    display: grid;
}

/* Hovered: a see-through yellow star. A favorite: solid yellow (the site's gold, style.css). */
.message-image-fav:hover {
    border-color: #ffd27a80;
    color: #ffd27a80;
}

.message-image-fav.is-on {
    border-color: #ffd27a;
    color: #ffd27a;
}

.message-image-fav .material-symbols-outlined {
    font-size: 16px;
}

.message-image-fav:hover .material-symbols-outlined,
.message-image-fav.is-on .material-symbols-outlined {
    font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24;
}

/* Touch screens: no star on the picture; it's in the picture viewer (tap the picture). */
@media (hover: none) {
    .message-images .message-image-fav {
        display: none;
    }
}

/* Picture viewer (the site's pop-up): the GIF or picture as big as fits, then a row of buttons. */
.post-dialog:has(.picture-view-body) {
    width: min(640px, calc(100vw - 32px));
}

.picture-view {
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    background: var(--bg);
}

/* Small pictures are scaled up to fill the space too (keeping their shape). */
/* A message with GIFs and pictures: two title tags (the site's pop-up title tag look), tap one to
   see that set. The one showing is in the accent colour. */
.post-dialog-title.picture-view-kinds {
    display: flex;
    gap: 8px;
    padding: 0;
    overflow: visible;
    border: 0;
    background: none;
}

.picture-view-kind {
    padding: 7px 12px;
    border: 2px solid var(--border);
    background: var(--bg);
    color: var(--muted);
    font: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
    white-space: nowrap;
}

.picture-view-kind:hover,
.picture-view-kind:focus-visible,
.picture-view-kind.is-active {
    color: var(--accent);
}

.picture-view-step[hidden] {
    display: none;
}

/* Previous / next (a message with more than one), over the picture's sides. */
.picture-view {
    position: relative;
}

.picture-view-step {
    position: absolute;
    top: 50%;
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 2px solid var(--border);
    background: var(--panel);
    color: var(--text);
    transform: translateY(-50%);
}

.picture-view-step.is-prev {
    left: 8px;
}

.picture-view-step.is-next {
    right: 8px;
}

.picture-view-step:hover,
.picture-view-step:focus-visible {
    border-color: var(--accent);
    color: var(--accent);
}

.picture-view img {
    display: block;
    width: 100%;
    height: min(400px, 48vh);
    object-fit: contain;
}

/* The buttons: the site's pop-up buttons, on the frame's bottom edge at the right (style.css). */
.picture-view-actions .space-button {
    gap: 8px;
    text-decoration: none;
}

.picture-view-actions .material-symbols-outlined {
    font-size: 18px;
}

/* Favorited: the star's gold. */
.picture-view-fav.is-on {
    border-color: #ffd27a;
    color: #ffd27a;
}

.picture-view-actions .picture-view-fav.is-on .material-symbols-outlined {
    font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24;
}

/* Phones: one row of smaller buttons with short labels (Delete, Open). */
@media (max-width: 520px) {
    .picture-view-actions {
        gap: 8px;
        padding: 0 12px 4px;
    }

    .picture-view-actions .space-button {
        gap: 6px;
        padding: 9px 10px;
        font-size: 0.62rem;
    }

    .picture-view-actions .material-symbols-outlined {
        font-size: 16px;
    }

    .picture-view-extra {
        display: none;
    }

    .picture-view img {
        height: min(300px, 40vh);
    }
}

/* Category tabs: one row along the top that stays put while the emojis scroll under it. */
.emoji-tabs {
    position: sticky;
    top: -4px;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(28px, 1fr));
    gap: 2px;
    margin: 0 -10px;
    padding: 6px 10px;
    border-bottom: 1px solid var(--line-soft);
    background: var(--panel);
}

.emoji-picker .emoji-tab {
    width: auto;
    height: 32px;
    font-size: 1rem;
}

/* The open category: the hover look, with an accent line under it. */
.emoji-picker .emoji-tab.is-active {
    background: var(--bg);
    box-shadow: inset 0 -2px 0 var(--accent);
}

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

/* Pod and room settings: Settings / Customization tabs (the site's profile tabs) at the top of the
   pop-up. */
.post-dialog-body .settings-tabs {
    margin: 0 0 6px;
}

/* Both tabs sit in the same spot (the hidden one just can't be seen), so the pop-up keeps the
   taller one's size instead of changing size with the tab. */
.settings-panels {
    display: grid;
}

.settings-panel {
    display: flex;
    grid-area: 1 / 1;
    flex-direction: column;
    gap: 14px;
}

.settings-panel[hidden] {
    visibility: hidden;
}

.settings-note {
    margin: 0 0 8px;
    font-size: 0.6rem;
}

/* "None" / "Same as the Pod" for the glow: an empty swatch with a no-entry sign. */
.name-color-swatch.glow-off {
    display: grid;
    place-items: center;
    background: var(--bg);
    color: var(--muted);
}

.name-color-swatch.glow-off .material-symbols-outlined {
    font-size: 16px;
}

/* The site's danger zone (Delete Pod / room), with a little space above it. */
.post-dialog-body .danger-zone {
    margin-top: 18px;
}

.pod-gate .space-button {
    margin-top: 14px;
}

/* Phones' one menu for Favorites, GIFs and emojis: its buttons along the bottom (pods.js). */
.media-nav {
    display: none;
}

@media (max-width: 760px) {
    .emoji-picker,
    .fav-picker {
        width: 100%;
    }

    /* The GIF and Favorites buttons are in the emoji button's menu. */
    .composer #gifButton,
    .composer #favButton {
        display: none;
    }

    /* The menu keeps its tabs at the top and its buttons (and the GIF search) at the bottom, with
       just the emojis / GIFs / favorites scrolling between them. */
    .emoji-picker,
    .fav-picker {
        display: flex;
        height: min(340px, 50vh);
        flex-direction: column;
        overflow: hidden;
        padding-bottom: 0;
    }

    .emoji-picker.is-reacting {
        padding-bottom: 10px;
    }

    .emoji-tabs,
    .fav-tabs {
        position: static;
        flex: none;
    }

    .emoji-panel,
    .gif-grid,
    .fav-grid {
        min-height: 0;
        flex: 1;
        align-content: start;
        overflow-y: auto;
    }

    /* (Phones: the emojis scroll inside their panel, so the title sticks to its top.) */
    .emoji-group-title {
        top: 0;
    }

    .gif-grid {
        order: 1;
        margin-top: 8px;
    }

    .gif-credit {
        order: 2;
    }

    .gif-search {
        position: static;
        order: 3;
        flex: none;
        margin: 8px 0 0;
    }

    .media-nav {
        display: flex;
        order: 4;
        flex: none;
        justify-content: center;
        gap: 8px;
        margin: auto -10px 0;
        padding: 10px;
        border-top: 1px solid var(--line-soft);
        background: var(--panel);
    }

    .media-nav .profile-tab {
        width: auto;
        height: auto;
        padding: 7px 12px;
        font-size: 0.6rem;
    }

    .emoji-picker.is-reacting .media-nav {
        display: none;
    }

    .friend-name-row {
        gap: 6px;
    }
}

@media (max-width: 520px) {
    /* Profile pop-up buttons fit on one row on phones. */
    .profile-pop-actions {
        gap: 8px;
    }

    .profile-pop-actions .space-button,
    .profile-pop-actions .friend-minor,
    .profile-pop-badge {
        padding: 7px 9px;
    }
}

/* The linked planet's button on a Pod's banner (a link). */
.pod-planet {
    text-decoration: none;
}

/* Pod settings > Members. */
.settings-member-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.settings-member {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    background: var(--bg);
}

.settings-member .avatar {
    width: 32px;
    height: 32px;
}

.settings-member > div {
    min-width: 0;
}

.settings-member-name {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.settings-member-name .perm-role {
    flex: none;
}

/* The name (opens their profile pop-up), the size of names in the member lists. */
.settings-member-link {
    min-width: 0;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
}

.settings-member-link .username {
    display: block;
    overflow: hidden;
    font-family: var(--font-plain);
    font-size: 0.82rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.settings-member-link:hover .username,
.settings-member-link:focus-visible .username {
    text-decoration: underline;
}

.settings-member small {
    display: block;
    margin-top: 3px;
    color: var(--dim);
    font-size: 0.56rem;
}

/* Pod settings > Logs. */
.pod-log-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pod-log-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: start;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    background: var(--bg);
    font-size: 0.66rem;
}

.pod-log-item > .material-symbols-outlined {
    color: var(--accent);
    font-size: 1.05rem;
}

.pod-log-item p {
    margin: 0;
    line-height: 1.5;
}

.pod-log-item small {
    display: block;
    margin-top: 2px;
    color: var(--dim);
    font-size: 0.58rem;
}

.pod-log-item time {
    color: var(--dim);
    font-size: 0.56rem;
    white-space: nowrap;
}

/* Room options (Create a room, Room settings). */
.room-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Pod settings: a bigger pop-up, its tabs in a column on the left. (Phones: a row on top, as
   elsewhere.) */
.post-dialog:has(.settings-layout.is-vertical) {
    width: min(860px, calc(100vw - 32px));
}

.settings-layout.is-vertical {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    align-items: start;
    gap: 22px;
}

.post-dialog-body .settings-layout.is-vertical .settings-tabs {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 10px;
    margin: 0;
    padding: 0 4px 4px 0;
}

.settings-layout.is-vertical .settings-tabs .profile-tab {
    justify-content: flex-start;
    width: 100%;
    text-align: left;
}

/* (Nothing in a tab may be wider than its column: no sideways scrolling.) */
.post-dialog-body:has(> .settings-layout.is-vertical) {
    overflow-x: hidden;
}

/* Desktop: one size whatever the tab, and only the open tab scrolls (when it's longer than
   that); the tabs stay put. Hidden tabs take no room. */
@media (min-width: 761px) {
    .post-dialog-body:has(> .settings-layout.is-vertical) {
        overflow: hidden;
    }

    .settings-layout.is-vertical {
        height: min(560px, calc(100dvh - 210px));
    }

    .settings-layout.is-vertical .settings-panels {
        display: block;
        height: 100%;
        padding-right: 10px;
        overflow-y: auto;
        scrollbar-width: thin;
        scrollbar-color: var(--accent) transparent;
    }

    .settings-layout.is-vertical .settings-panel[hidden] {
        display: none;
    }
}

.settings-layout.is-vertical .settings-panels,
.settings-layout.is-vertical .settings-panel {
    min-width: 0;
}

/* Hints ("under 200 KB") beside their label, not at the far edge of the wide pop-up. */
.settings-layout.is-vertical .edit-label {
    justify-content: flex-start;
    align-items: baseline;
}

@media (max-width: 760px) {
    .settings-layout.is-vertical {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }

    /* (One row of smaller tabs you can swipe sideways, out to the pop-up's edges. It stays at the
       top as the pop-up scrolls: style.css.) */
    .post-dialog-body .settings-layout.is-vertical .settings-tabs {
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 8px;
        margin: 0 -20px;
        padding: 0 20px 6px;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .post-dialog-body .settings-layout.is-vertical .settings-tabs::-webkit-scrollbar {
        display: none;
    }

    .settings-layout.is-vertical .settings-tabs .profile-tab {
        flex: none;
        width: auto;
        padding: 8px 12px;
        font-size: 0.62rem;
    }
}

/* Friends: your ourPods profile (its pop-up), at the top right: your picture, round. */
.page-head > .friends-profile-button {
    flex: none;
    width: 46px;
    height: 46px;
    margin-left: auto;
    padding: 0;
    overflow: visible;
    border: 2px solid var(--border);
    border-radius: 50%;
    background: var(--panel);
    cursor: pointer;
}

/* (Phones: the search sits right next to it; only the search pushes right.) */
.page-head > .pods-search + .friends-profile-button {
    margin-left: -6px;
}

.friends-profile-button img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.friends-profile-button:hover,
.friends-profile-button:focus-visible {
    border-color: var(--accent);
}

/* The profile pop-up: @username under the name. */
.profile-pop-handle {
    display: block;
    margin-top: 2px;
    color: var(--dim);
    font-size: 0.62rem;
}

/* Edit ourPods profile: the picture's preview. */
.pod-profile-preview {
    display: grid;
    width: 64px;
    height: 64px;
    flex: none;
    place-items: center;
    overflow: hidden;
    border: 2px solid var(--border);
    background: var(--panel);
}

.pod-profile-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* The profile pop-up's name: the display name in white; the picture's border in their status colour. */
.profile-pop-head .profile-pop-display-name {
    color: var(--text);
    font-family: var(--font-plain);
    font-size: 1.25rem;
}

/* The display name with @username under it, and their profile status to the right of those. */
.profile-pop-names-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 16px;
}

.profile-pop-names {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    min-width: 0;
}

.profile-pop .profile-pop-handle {
    margin: 0;
    font-size: 0.66rem;
    text-decoration: none;
}

/* The profile pop-up doesn't select as you click and drag around it; just their display name and
   @username can be selected (and anything you type, like your status). */
.profile-pop {
    user-select: none;
}

.profile-pop .profile-pop-display-name,
.profile-pop .profile-pop-handle,
.profile-pop :is(input, textarea) {
    user-select: text;
}

/* Their ourSpaceShip badges (Verified, Contribution, one-of-a-kind ones), small and round like on
   their profile. They only explain themselves. */
.profile-pop-site-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.pods-page .profile-pop-site-badge.badge-tooltip {
    display: inline-grid;
    width: 26px;
    height: 26px;
    box-sizing: border-box;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--panel);
    cursor: help;
    user-select: none;
}

/* (Their tooltips open below, lined up with the badge's right edge so they stay inside the pop-up;
   the arrow points at the middle of these smaller badges.) */
.profile-pop-site-badge.badge-tooltip.tooltip-below::before {
    right: 7px;
}

.profile-pop-site-badge img {
    width: 20px;
    height: 20px;
    pointer-events: none;
}

.profile-pop-site-badge.is-verified {
    border-color: #a8d4ff;
    background: color-mix(in srgb, #a8d4ff 14%, var(--panel));
    color: #a8d4ff;
}

.profile-pop-site-badge .material-symbols-outlined {
    font-size: 16px;
    font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24;
}

.profile-pop a.profile-pop-handle:hover,
.profile-pop a.profile-pop-handle:focus-visible {
    text-decoration: underline;
}

/* (The profile status leads the buttons row; the pencil sits beside the names.) */
.profile-pop-actions .profile-pop-status {
    margin: 0;
}

.profile-pop-names-row > .profile-pop-edit {
    width: 34px;
    height: 34px;
}

/* Editing your status there: a line of its own. */
.profile-pop-actions .status-inline,
.profile-pop-actions .status-inline-error {
    flex-basis: 100%;
    margin-top: 0;
}

/* Tooltips in the profile pop-up: it scrolls, so it cuts off anything poking out past its edges.
   The role's opens below it and the buttons' from their left edge, so they stay inside. */
.profile-pop-pic-column .badge-tooltip::after {
    top: calc(100% + 10px);
    bottom: auto;
    left: -6px;
    transform: translate(0, -4px);
}

.profile-pop-pic-column .badge-tooltip::before {
    top: calc(100% + 5px);
    bottom: auto;
    left: 6px;
    border-right: 0;
    border-bottom: 0;
    border-top: 2px solid var(--border);
    border-left: 2px solid var(--border);
    transform: translate(0, -4px) rotate(45deg);
}

.profile-pop-pic-column .badge-tooltip:hover::after,
.profile-pop-pic-column .badge-tooltip:focus-visible::after {
    transform: translate(0, 0);
}

.profile-pop-pic-column .badge-tooltip:hover::before,
.profile-pop-pic-column .badge-tooltip:focus-visible::before {
    transform: translate(0, 0) rotate(45deg);
}

.profile-pop-names-row .badge-tooltip::after,
.profile-pop-actions .badge-tooltip:not(.tooltip-left)::after {
    left: -6px;
    transform: translate(0, 4px);
}

.profile-pop-names-row .badge-tooltip::before,
.profile-pop-actions .badge-tooltip:not(.tooltip-left)::before {
    left: 12px;
}

.profile-pop-names-row .badge-tooltip:hover::after,
.profile-pop-names-row .badge-tooltip:focus-visible::after,
.profile-pop-actions .badge-tooltip:not(.tooltip-left):hover::after,
.profile-pop-actions .badge-tooltip:not(.tooltip-left):focus-visible::after {
    transform: translate(0, 0);
}

.profile-pop-pic-column > .perm-role {
    margin: 0;
}

.user-detail-avatar.is-online {
    border-color: #4ade80;
}

.user-detail-avatar.is-idle {
    border-color: #facc15;
}

.user-detail-avatar.is-offline {
    border-color: #9a9a9a;
}

/* Edit ourPods profile: Reset to default. */
.pod-profile-reset {
    align-self: flex-start;
    padding: 9px 14px;
    font-size: 0.66rem;
}

/* The profile pop-up's tab row: its tabs, and the ourSpaceShip profile link at the end. */
.profile-pop-tabs {
    flex-wrap: wrap;
    align-items: center;
}

/* (The tabs stay side by side, at their own size; the link too.) */
.profile-pop-tabs .profile-pop-tab-list {
    display: flex;
    flex: none;
    flex-wrap: nowrap;
    gap: inherit;
}

.profile-pop-tabs .profile-pop-tab-list .space-button,
.profile-pop-tabs > .profile-pop-site-link {
    flex: none;
}

.profile-pop-site-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    text-decoration: none;
    cursor: alias;
}

.profile-pop-site-link .material-symbols-outlined {
    font-size: 15px;
}

/* The top bar's profile button, between the ourPods and Friends tabs: your picture, round. */
.global-nav > .nav-profile {
    width: 42px;
    padding: 0;
}

.nav-profile img {
    display: block;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
}

/* Messages, member lists and friends: @username after the display name, smaller and quieter; it's
   the button that opens their profile (underlined on hover). */
.name-handle {
    flex: none;
    min-width: 0;
    padding: 0;
    overflow: hidden;
    border: 0;
    background: none;
    color: var(--dim);
    font: inherit;
    font-size: 0.6rem;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
}

/* (In their ourSpaceShip name colour, like everywhere: the site's .username rule.) */
.name-handle:hover,
.name-handle:focus-visible {
    text-decoration: underline;
}

.side-member-name-row .name-handle {
    flex: 0 1 auto;
}

/* ==== The profile pop-up's top (2 rows): the picture, the names (level with the picture's middle)
   and the edit button on the right; then the status word under the picture, the profile status
   beside it. ==== */
.profile-pop .profile-pop-head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    grid-template-areas:
        "pic names badges edit"
        "presence status status status";
    align-items: center;
    gap: 8px 14px;
}

.profile-pop-head > .user-detail-avatar {
    grid-area: pic;
    justify-self: center;
}

.profile-pop-head > .profile-pop-names {
    grid-area: names;
}

/* Their ourSpaceShip badges: on the right, level with the name. */
.profile-pop-head > .profile-pop-site-badges {
    grid-area: badges;
    justify-content: flex-end;
    margin: 0;
}

.profile-pop-head > .profile-pop-edit {
    grid-area: edit;
    width: 34px;
    height: 34px;
}

.profile-pop-head > .profile-pop-presence-row {
    grid-area: presence;
    justify-content: center;
    margin: 0;
}

.profile-pop-head > .profile-pop-status {
    grid-area: status;
    justify-self: start;
    margin: 0;
}

/* (Editing your status: its own line under them.) */
.profile-pop-head > .status-inline,
.profile-pop-head > .status-inline-error {
    grid-column: 1 / -1;
    margin: 0;
}

/* The site role's tag on the top border, next to the name's (placed by pods.js), in the role's colour. */
.post-dialog-title.profile-pop-role-title {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: none;
    border-color: var(--role-color, var(--border));
    color: var(--role-color, var(--accent));
}

.profile-pop-role-title.is-founder {
    --role-color: var(--role-founder);
}

.profile-pop-role-title.is-admin {
    --role-color: var(--role-admin);
}

.profile-pop-role-title.is-moderator {
    --role-color: var(--role-moderator);
}

.profile-pop-role-title .material-symbols-outlined {
    font-size: 1rem;
}

/* Phones: the ourSpaceShip profile link on a line of its own at the top (from the left), the tabs
   under it. */
@media (max-width: 760px) {
    .profile-pop .profile-pop-tabs {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .profile-pop-site-link {
        order: -1;
        margin-left: 0;
    }
}

/* ---- Mentions ---- */
/* The Mentions button (in the room banner's buttons): how many, in a small accent badge. */
.welcome .room-mentions {
    position: relative;
}

.room-mentions-count {
    position: absolute;
    top: -8px;
    right: -8px;
    min-width: 18px;
    padding: 1px 4px;
    box-sizing: border-box;
    border: 1px solid var(--bg);
    background: var(--accent);
    color: #1f1f1f;
    font-size: 0.55rem;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
}

/* The newest message that mentions you, under the room's name (the banner stays at the top). */
.mention-bar {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    padding: 8px 10px;
    border: 1px solid var(--accent);
    background: var(--bg);
    font-size: 0.72rem;
}

.mention-bar > .material-symbols-outlined {
    flex: 0 0 auto;
    color: var(--accent);
    font-size: 18px;
}

.mention-bar-text {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mention-bar-text b {
    color: var(--accent);
}

.space-button.mention-bar-go,
.space-button.mention-row-go {
    flex: 0 0 auto;
    padding: 6px 10px;
    font-size: 0.62rem;
    white-space: nowrap;
}

.mention-bar-close {
    display: inline-grid;
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    place-items: center;
    padding: 0;
    border: 0;
    background: none;
    color: var(--dim);
    cursor: pointer;
}

.mention-bar-close:hover,
.mention-bar-close:focus-visible {
    color: var(--accent);
}

/* The pop-up's X (on the right of Go to message): takes that mention out of the list. */
.mention-row-remove {
    display: inline-grid;
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    place-items: center;
    padding: 0;
    border: 0;
    background: none;
    color: var(--dim);
}

.mention-row-remove:hover,
.mention-row-remove:focus-visible {
    color: var(--like);
}

.mention-row-remove .material-symbols-outlined {
    font-size: 18px;
}

.mention-bar-close .material-symbols-outlined {
    font-size: 18px;
}

/* The Mentions pop-up: one row each (who, when, what), with Go to message. */
.mention-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: min(420px, 60vh);
    margin: 0;
    padding: 0;
    overflow-y: auto;
    list-style: none;
}

.mention-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid rgba(240, 240, 240, 0.25);
    background: var(--bg);
}

.mention-row .avatar {
    width: 36px;
    height: 36px;
    overflow: hidden;
}

.mention-row .avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mention-row-body {
    flex: 1 1 auto;
    min-width: 0;
}

/* Read (gone to, or marked read from the bar): quieter. */
.mention-row.is-read {
    border-color: rgba(240, 240, 240, 0.1);
}

.mention-row.is-read .mention-row-body {
    opacity: 0.6;
}

.mention-row-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 8px;
    font-size: 0.72rem;
}

.mention-row-head time {
    color: var(--dim);
    font-size: 0.6rem;
}

.mention-row-body p {
    margin: 4px 0 0;
    overflow: hidden;
    font-size: 0.7rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Gone to: the message lights up for a moment. */
.message.is-highlighted {
    border-color: var(--accent);
    box-shadow: inset 0 0 0 1px var(--accent);
}

/* Phones: the bar's text gets the room, the button stays. */
@media (max-width: 600px) {
    .mention-bar {
        gap: 8px;
        padding: 7px 8px;
    }

    .mention-row {
        flex-wrap: wrap;
    }

    .space-button.mention-row-go {
        margin-left: auto;
    }
}

/* Google's reCAPTCHA notice (its badge is hidden, style.css) at the bottom of the Quick access menu,
   in the list's frosted box. */
.sidebar-frost > .recaptcha-note {
    flex: none;
    max-width: none;
    margin: 0;
    padding: 10px 16px 12px;
    border-top: 1px solid var(--line-soft);
    text-align: left;
}

/* (The link cards under messages are site-wide now: user/users.js has their styles.) */

/* A room's pinned message, under its banner (it shares the mention bar's look). */
/* (Its link cards go on their own line under it.) The whole bar is the button that goes to the
   message. */
.mention-bar.pinned-bar {
    flex-wrap: wrap;
    cursor: pointer;
}

.mention-bar.pinned-bar:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Its link cards, a little smaller than in the chat. */
.pinned-bar .planet-link-card {
    width: min(280px, 100%);
    height: 66px;
    gap: 10px;
    padding: 8px 12px;
}

.pinned-bar .planet-link-card-pic {
    width: 38px;
    height: 38px;
}

.pinned-bar .planet-link-card-name {
    font-size: 0.7rem;
}

.pinned-bar .planet-link-card-handle {
    font-size: 0.56rem;
}

.pinned-bar .planet-link-card-bio {
    font-size: 0.64rem;
}

.pinned-bar > .planet-link-cards {
    flex-basis: 100%;
    margin-top: 2px;
}

/* Who wrote it: their name, in the accent colour, opens their profile. */
.pinned-bar-author {
    display: inline;
    padding: 0;
    border: 0;
    background: none;
    color: var(--accent);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.pinned-bar-author:hover,
.pinned-bar-author:focus-visible {
    text-decoration: underline;
}

/* Its links, @mentions and #hashtags, as in the chat. */
.pinned-bar .message-mention {
    display: inline;
    padding: 0;
    border: 0;
    background: none;
    color: var(--accent);
    font: inherit;
    cursor: pointer;
}

.pinned-bar .message-link {
    color: var(--accent);
}

.pinned-bar > .material-symbols-outlined {
    font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24;
}

/* #hashtags in messages (and in search results): like @mentions, they open the Hashtags pop-up. */
.message-hashtag {
    display: inline;
    padding: 0;
    border: 0;
    background: none;
    color: var(--accent);
    font: inherit;
    cursor: pointer;
}

.message-hashtag:hover,
.message-hashtag:focus-visible {
    text-decoration: underline;
}

/* The Search pop-up: its tabs (All, Messages, Hashtags) along the top, and the ourPods page's
   search in the top right corner. Opening it pops the bar out over the tabs (they stay where they
   are) and fades them back behind it; a click on them then closes it. Under them, the hashtags and
   messages found (rows like Mentions'). The pop-up keeps one size whatever it shows. */
.post-dialog:has(.room-search-pop) {
    width: min(560px, calc(100vw - 32px));
}

.room-search-view {
    height: min(440px, 58vh);
    overflow-y: auto;
}

.room-search-view .mention-list {
    max-height: none;
    overflow: visible;
}
.room-search-top {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 42px;
    margin-bottom: 14px;
    /* (Room on the right for the closed search button.) */
    padding-right: 52px;
}

.room-search-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.room-search-top:has(.pods-search.is-open) .room-search-tabs {
    opacity: 0.25;
    pointer-events: none;
}

.room-search-top .pods-search {
    position: absolute;
    top: 50%;
    right: 0;
    z-index: 2;
    transform: translateY(-50%);
}

.room-search-top .pods-search.is-open {
    width: min(300px, 100%);
}

.mention-row-body p .message-link {
    overflow-wrap: anywhere;
}

.room-search-heading {
    margin: 14px 0 8px;
    color: var(--dim);
    font-size: 0.66rem;
}

.room-search-view > .room-search-heading:first-child {
    margin-top: 0;
}

/* The room's hashtags, most used first, each with how many messages have it. */
.hashtag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: min(160px, 30vh);
    margin: 0;
    padding: 0;
    overflow-y: auto;
    list-style: none;
}

.hashtag-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border: 1px solid rgba(240, 240, 240, 0.25);
    background: var(--bg);
    color: var(--text);
    font: inherit;
    font-size: 0.72rem;
    cursor: pointer;
}

.hashtag-chip:hover,
.hashtag-chip:focus-visible {
    border-color: var(--accent);
    color: var(--accent);
}

.hashtag-chip small {
    color: var(--dim);
}

/* One hashtag's messages: back to them all, its name and how many. */
.hashtag-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.space-button.hashtag-back {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    font-size: 0.62rem;
}

.space-button.hashtag-back .material-symbols-outlined {
    font-size: 15px;
}
