/* KameradenApp custom styles on top of Bootstrap 5. Keep this small. */
body {
    min-height: 100vh;
    padding-bottom: env(safe-area-inset-bottom);
}

/* Landing page for visitors who are not logged in: one screen, no scrolling. */
.landing {
    --landing-accent: #d63384;
    --landing-accent-2: #8a5cff;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(env(safe-area-inset-top, 0px) + 1.25rem) 1.25rem calc(env(safe-area-inset-bottom, 0px) + 1.25rem);
    background:
        radial-gradient(60rem 30rem at 50% -10%, rgba(214, 51, 132, 0.18), transparent 60%),
        radial-gradient(40rem 25rem at 100% 110%, rgba(138, 92, 255, 0.16), transparent 60%),
        var(--bs-body-bg);
    text-align: center;
}

.landing-inner {
    width: 100%;
    max-width: 26rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.9rem;
}

.landing-sofia {
    position: relative;
    width: 9.5rem;
    height: 9.5rem;
}

.landing-photo {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 0.25rem solid var(--bs-body-bg);
    box-shadow: 0 0.75rem 2rem rgba(214, 51, 132, 0.28);
}

.landing-ring {
    position: absolute;
    inset: -0.45rem;
    border-radius: 50%;
    background: conic-gradient(from 0deg, var(--landing-accent), var(--landing-accent-2), #ffb347, var(--landing-accent));
    animation: landing-spin 6s linear infinite;
}

.landing-online {
    position: absolute;
    z-index: 2;
    right: 0.55rem;
    bottom: 0.55rem;
    width: 1.15rem;
    height: 1.15rem;
    border-radius: 50%;
    background: #22c55e;
    border: 0.2rem solid var(--bs-body-bg);
    animation: landing-pulse 2s ease-in-out infinite;
}

.landing-bubble {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.35rem 0 0;
    padding: 0.55rem 0.95rem;
    border-radius: 1.1rem 1.1rem 1.1rem 0.3rem;
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color-translucent);
    box-shadow: 0 0.35rem 1rem rgba(0, 0, 0, 0.08);
    font-style: italic;
    color: var(--bs-body-color);
}

.landing-dots {
    display: inline-flex;
    gap: 0.2rem;
}

.landing-dots span {
    width: 0.38rem;
    height: 0.38rem;
    border-radius: 50%;
    background: var(--landing-accent);
    animation: landing-typing 1.2s ease-in-out infinite;
}

.landing-dots span:nth-child(2) {
    animation-delay: 0.15s;
}

.landing-dots span:nth-child(3) {
    animation-delay: 0.3s;
}

.landing-title {
    margin: 0.25rem 0 0;
    font-size: clamp(2rem, 9vw, 2.75rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    background: linear-gradient(90deg, var(--landing-accent), var(--landing-accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.landing-intro {
    margin: 0;
    color: var(--bs-secondary-color);
    line-height: 1.5;
}

.landing-qr {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    margin-top: 0.4rem;
    padding: 0.85rem 1rem;
    border-radius: 1rem;
    background: var(--bs-tertiary-bg);
    border: 1px dashed var(--bs-border-color);
    font-weight: 600;
    text-align: left;
}

.landing-qr-icon {
    flex: 0 0 auto;
    width: 2.25rem;
    height: 2.25rem;
    fill: var(--landing-accent);
}

.landing-footnote {
    margin: 0;
    font-size: 0.85rem;
    color: var(--bs-secondary-color);
}

@keyframes landing-spin {
    to { transform: rotate(360deg); }
}

@keyframes landing-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55); }
    50% { box-shadow: 0 0 0 0.45rem rgba(34, 197, 94, 0); }
}

@keyframes landing-typing {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.45; }
    30% { transform: translateY(-0.25rem); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .landing-ring,
    .landing-online,
    .landing-dots span {
        animation: none;
    }
}

@media (max-height: 640px) {
    .landing-sofia {
        width: 7rem;
        height: 7rem;
    }

    .landing-inner {
        gap: 0.6rem;
    }
}

/* Lobby */
/* Destination-reveal lobby (views/lobby.ejs, public/js/lobby.js). */
.lobby {
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem calc(2rem + env(safe-area-inset-bottom));
    background: radial-gradient(circle at 50% 0%, rgba(var(--bs-primary-rgb), 0.18), transparent 65%);
    overflow: hidden;
}

.lobby-panel {
    width: 100%;
    max-width: 28rem;
}

.lobby-kicker {
    color: var(--bs-primary);
    letter-spacing: 0.12em;
}

.lobby-count {
    font-size: 1.1rem;
}

.lobby-roster {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-align: start;
}

.lobby-member {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: 999px;
    background: var(--bs-tertiary-bg);
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.lobby-member.is-joined {
    opacity: 1;
}

.lobby-member.is-you {
    box-shadow: 0 0 0 2px var(--bs-primary);
}

.lobby-avatar {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    border: 2px dashed var(--bs-secondary-color);
    color: var(--bs-secondary-color);
    font-weight: 700;
}

.lobby-member.is-joined .lobby-avatar {
    border: 0;
    background: var(--bs-success);
    color: #fff;
}

.lobby-name {
    flex: 1 1 auto;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lobby-status {
    flex: 0 0 auto;
    font-size: 0.85rem;
    color: var(--bs-secondary-color);
}

.lobby-member.is-joined .lobby-status {
    color: var(--bs-success-text-emphasis);
    font-weight: 600;
}

.lobby-member.just-joined {
    animation: lobby-pop 0.5s ease-out;
}

/* Countdown: full-screen, big centered numbers. */
.lobby-countdown {
    position: fixed;
    inset: 0;
    z-index: 1050;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bs-body-bg);
    background-image: radial-gradient(circle at 50% 50%, rgba(var(--bs-primary-rgb), 0.25), transparent 70%);
}

.lobby-countdown[hidden] {
    display: none;
}

.lobby-countdown-label {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--bs-secondary-color);
    margin-bottom: 0;
}

.lobby-countdown-number {
    font-size: clamp(8rem, 45vw, 18rem);
    font-weight: 800;
    line-height: 1;
    color: var(--bs-primary);
    font-variant-numeric: tabular-nums;
}

.lobby-countdown-number.is-ticking {
    animation: lobby-tick 1s ease-out both;
}

/* Reveal */
.lobby-reveal-title {
    animation: lobby-burst 0.9s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}

.lobby-reveal-text {
    white-space: pre-line;
    animation: lobby-fade-up 0.8s ease-out 0.4s both;
}

.lobby-reveal form {
    animation: lobby-fade-up 0.8s ease-out 0.8s both;
}

.lobby-confetti {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.lobby-reveal > :not(.lobby-confetti) {
    position: relative;
    z-index: 1;
}

.lobby-confetti span {
    position: absolute;
    top: -2rem;
    width: 0.6rem;
    height: 1rem;
    border-radius: 2px;
    background: var(--bs-primary);
    opacity: 0;
    animation: lobby-confetti-fall 3.2s linear 2 both;
}

.lobby-confetti span:nth-child(4n+1) { background: var(--bs-warning); }
.lobby-confetti span:nth-child(4n+2) { background: var(--bs-danger); }
.lobby-confetti span:nth-child(4n+3) { background: var(--bs-success); }
.lobby-confetti span:nth-child(3n) { width: 0.5rem; height: 0.5rem; border-radius: 50%; }
.lobby-confetti span:nth-child(5n+1) { animation-duration: 2.6s; }
.lobby-confetti span:nth-child(5n+3) { animation-duration: 3.8s; }
.lobby-confetti span:nth-child(6n+1) { animation-delay: 0s; }
.lobby-confetti span:nth-child(6n+2) { animation-delay: 0.3s; }
.lobby-confetti span:nth-child(6n+3) { animation-delay: 0.7s; }
.lobby-confetti span:nth-child(6n+4) { animation-delay: 1.1s; }
.lobby-confetti span:nth-child(6n+5) { animation-delay: 0.5s; }
.lobby-confetti span:nth-child(6n) { animation-delay: 0.9s; }
.lobby-confetti span:nth-child(1) { left: 3%; }
.lobby-confetti span:nth-child(2) { left: 7%; }
.lobby-confetti span:nth-child(3) { left: 12%; }
.lobby-confetti span:nth-child(4) { left: 16%; }
.lobby-confetti span:nth-child(5) { left: 21%; }
.lobby-confetti span:nth-child(6) { left: 25%; }
.lobby-confetti span:nth-child(7) { left: 29%; }
.lobby-confetti span:nth-child(8) { left: 33%; }
.lobby-confetti span:nth-child(9) { left: 38%; }
.lobby-confetti span:nth-child(10) { left: 42%; }
.lobby-confetti span:nth-child(11) { left: 46%; }
.lobby-confetti span:nth-child(12) { left: 50%; }
.lobby-confetti span:nth-child(13) { left: 54%; }
.lobby-confetti span:nth-child(14) { left: 58%; }
.lobby-confetti span:nth-child(15) { left: 62%; }
.lobby-confetti span:nth-child(16) { left: 66%; }
.lobby-confetti span:nth-child(17) { left: 70%; }
.lobby-confetti span:nth-child(18) { left: 74%; }
.lobby-confetti span:nth-child(19) { left: 78%; }
.lobby-confetti span:nth-child(20) { left: 82%; }
.lobby-confetti span:nth-child(21) { left: 86%; }
.lobby-confetti span:nth-child(22) { left: 90%; }
.lobby-confetti span:nth-child(23) { left: 94%; }
.lobby-confetti span:nth-child(24) { left: 97%; }
.lobby-confetti span:nth-child(odd) { --lobby-drift: 3rem; }
.lobby-confetti span:nth-child(even) { --lobby-drift: -3rem; }

@keyframes lobby-tick {
    0% { transform: scale(1.8); opacity: 0; }
    25% { transform: scale(1); opacity: 1; }
    80% { transform: scale(0.9); opacity: 1; }
    100% { transform: scale(0.6); opacity: 0; }
}

@keyframes lobby-burst {
    0% { transform: scale(0.4); opacity: 0; }
    60% { transform: scale(1.08); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes lobby-fade-up {
    from { transform: translateY(1rem); opacity: 0; }
    to { transform: none; opacity: 1; }
}

@keyframes lobby-pop {
    0% { transform: scale(0.9); }
    50% { transform: scale(1.04); }
    100% { transform: scale(1); }
}

@keyframes lobby-confetti-fall {
    0% { transform: translate(0, 0) rotate(0deg); opacity: 1; }
    100% { transform: translate(var(--lobby-drift, 0), 110vh) rotate(720deg); opacity: 0.8; }
}

@media (prefers-reduced-motion: reduce) {
    .lobby-confetti {
        display: none;
    }

    .lobby-member.just-joined,
    .lobby-countdown-number.is-ticking,
    .lobby-reveal-title,
    .lobby-reveal-text,
    .lobby-reveal form {
        animation: none;
    }
}

/* App shell (phase 4) */
:root {
    --app-nav-height: 4rem;
    --app-sofia-accent: #d63384;
}

.app-container {
    max-width: 40rem;
}

.app-topbar {
    position: sticky;
    top: 0;
    z-index: 1020;
    padding: calc(env(safe-area-inset-top, 0px) + 0.5rem) 0 0.5rem;
    background: var(--bs-body-bg);
    border-bottom: 1px solid var(--bs-border-color-translucent);
}

.app-brand {
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--bs-body-color);
    text-decoration: none;
    letter-spacing: -0.01em;
}

.app-main {
    padding-top: 1rem;
    padding-bottom: calc(var(--app-nav-height) + env(safe-area-inset-bottom, 0px) + 1.5rem);
}

.app-bottom-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1030;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: var(--bs-body-bg);
    border-top: 1px solid var(--bs-border-color-translucent);
}

.app-bottom-nav-list {
    display: flex;
    max-width: 40rem;
    height: var(--app-nav-height);
    margin: 0 auto;
    padding: 0;
    list-style: none;
}

.app-bottom-nav-list > li {
    flex: 1 1 0;
}

.app-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 0.15rem;
    color: var(--bs-secondary-color);
    font-size: 0.7rem;
    text-decoration: none;
}

.app-nav-item.active {
    color: var(--bs-primary);
    font-weight: 600;
}

.app-nav-icon {
    width: 1.5rem;
    height: 1.5rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.app-nav-post .app-nav-icon {
    width: 2.6rem;
    height: 2.6rem;
    padding: 0.45rem;
    border-radius: 50%;
    color: #fff;
    background: var(--bs-primary);
    box-shadow: 0 0.25rem 0.75rem rgba(var(--bs-primary-rgb), 0.35);
}

.app-nav-post .app-nav-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

/* Avatars */
.avatar {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    object-fit: cover;
    font-weight: 600;
    color: #fff;
    user-select: none;
}

.avatar-sm { width: 2rem; height: 2rem; font-size: 0.85rem; }
.avatar-md { width: 2.5rem; height: 2.5rem; font-size: 1rem; }
.avatar-lg { width: 4.5rem; height: 4.5rem; font-size: 1.75rem; }

.avatar-color-0 { background: #0d6efd; }
.avatar-color-1 { background: #198754; }
.avatar-color-2 { background: #fd7e14; }
.avatar-color-3 { background: #6f42c1; }
.avatar-color-4 { background: #20c997; }
.avatar-color-5 { background: #dc3545; }

.avatar-sofia {
    box-shadow: 0 0 0 2px var(--bs-body-bg), 0 0 0 4px var(--app-sofia-accent);
}

/* Text from users keeps its line breaks; it is always HTML-escaped. */
.user-text {
    white-space: pre-line;
    overflow-wrap: anywhere;
}

/* Live */
/* Live updates (public/js/live.js): "new posts" pill and fade-out of deleted items. */
.live-pill-region {
    position: fixed;
    right: 0;
    bottom: calc(var(--app-nav-height) + env(safe-area-inset-bottom, 0px) + 0.75rem);
    left: 0;
    z-index: 1035;
    display: flex;
    justify-content: center;
    padding: 0 1rem;
    pointer-events: none;
}

.live-pill {
    pointer-events: auto;
    max-width: 100%;
    padding: 0.55rem 1.1rem;
    border: 0;
    border-radius: 999px;
    background: var(--bs-primary);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 0.35rem 1rem rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

.live-pill:focus-visible {
    outline: 3px solid var(--bs-body-color);
    outline-offset: 2px;
}

.live-pill-visible {
    animation: live-pill-in 0.25s ease-out;
}

@keyframes live-pill-in {
    from {
        opacity: 0;
        transform: translateY(0.75rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.live-removing {
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

    .live-removing {
        transition-duration: 0.01s;
    }
}

/* Posts */
/* Post cards, comments, reaction bars, composer (views/partials/post-card.ejs, comment.ejs,
   reaction-bar.ejs, views/post.ejs, views/compose.ejs, public/js/reactions.js). */
.post-card {
    margin-bottom: 1rem;
    overflow: hidden;
    border: 1px solid var(--bs-border-color-translucent);
    border-radius: 1rem;
    background: var(--bs-body-bg);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    scroll-margin-top: 4.5rem;
}

.post-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 0.875rem 0.5rem 1rem;
}

.post-card-heading {
    flex: 1 1 auto;
    min-width: 0;
}

.post-card-author {
    font-weight: 600;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.post-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0 0.3rem;
    font-size: 0.85rem;
    color: var(--bs-secondary-color);
}

.post-card-meta a {
    color: inherit;
    text-decoration: none;
}

.post-card-meta a.post-card-album {
    font-weight: 500;
    color: var(--bs-emphasis-color);
}

.post-card-body {
    padding: 0 1rem 0.75rem;
}

.post-card-text {
    margin: 0;
    font-size: 1rem;
    line-height: 1.5;
}

.post-card-text-big {
    font-size: 1.2rem;
    line-height: 1.45;
}

/* Media: edge-to-edge photos, a 2-column grid for several. */
.post-media {
    display: grid;
    gap: 2px;
    background: var(--bs-secondary-bg);
}

.post-media-count-2,
.post-media-count-3,
.post-media-count-4 {
    grid-template-columns: 1fr 1fr;
}

.post-media-count-3 > :first-child {
    grid-column: 1 / -1;
}

.post-media-photo {
    display: block;
}

.post-media img,
.post-media video {
    display: block;
    width: 100%;
    height: auto;
    max-height: 80vh;
    object-fit: cover;
    background: var(--bs-secondary-bg);
}

.post-media-count-2 img,
.post-media-count-3 img,
.post-media-count-4 img {
    aspect-ratio: 1 / 1;
}

.post-card-actions {
    padding: 0.625rem 0.75rem 0.25rem;
}

.post-card-footer {
    padding: 0.25rem 1rem 0.875rem;
}

.post-card-icon {
    width: 1.15rem;
    height: 1.15rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.post-card-comments-link,
.post-card-all-comments {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 2.75rem;
    color: var(--bs-secondary-color);
    font-size: 0.9rem;
    text-decoration: none;
}

.post-card-comments-link:hover,
.post-card-all-comments:hover {
    color: var(--bs-emphasis-color);
}

.post-card-comments {
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 0.925rem;
}

.post-card-comment {
    display: -webkit-box;
    overflow: hidden;
    margin-bottom: 0.2rem;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow-wrap: anywhere;
}

.post-card-comment-author {
    margin-right: 0.3rem;
    font-weight: 600;
}

/* Sofia: a character, not an advert. Subtle gradient edge + tinted header. */
.post-card-sofia {
    border: 1.5px solid rgba(214, 51, 132, 0.6);
    background:
        linear-gradient(180deg, rgba(214, 51, 132, 0.07), rgba(111, 66, 193, 0.03) 6rem, transparent 12rem),
        var(--bs-body-bg);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.post-sofia-label {
    background: linear-gradient(90deg, var(--app-sofia-accent), #6f42c1);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* "⋯" menu (details/summary): the open menu is the confirmation step, no confirm() needed. */
.item-menu {
    position: relative;
    flex-shrink: 0;
}

.item-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    color: var(--bs-secondary-color);
    font-size: 1.35rem;
    line-height: 1;
    list-style: none;
    cursor: pointer;
}

.item-menu-toggle::-webkit-details-marker {
    display: none;
}

.item-menu-toggle:hover,
.item-menu[open] > .item-menu-toggle {
    background: var(--bs-secondary-bg);
    color: var(--bs-emphasis-color);
}

.item-menu-panel {
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 10;
    min-width: 12rem;
    padding: 0.5rem;
    border: 1px solid var(--bs-border-color-translucent);
    border-radius: 0.75rem;
    background: var(--bs-body-bg);
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.15);
}

.item-menu-danger {
    width: 100%;
    min-height: 2.75rem;
}

/* Reaction bar: five equal, thumb-sized buttons that fit a 375px screen. */
.reaction-bar {
    display: flex;
    gap: 0.375rem;
    margin: 0;
}

.reaction-button {
    display: inline-flex;
    flex: 1 1 0;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    min-width: 0;
    min-height: 2.75rem;
    padding: 0.25rem 0.375rem;
    border: 1px solid var(--bs-border-color-translucent);
    border-radius: 999px;
    background: var(--bs-tertiary-bg);
    color: var(--bs-body-color);
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1;
    transition: transform 0.12s ease, background-color 0.12s ease, border-color 0.12s ease;
    -webkit-tap-highlight-color: transparent;
}

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

.reaction-button:active {
    transform: scale(0.92);
}

.reaction-button:focus-visible {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
}

.reaction-button[aria-pressed="true"] {
    border-color: var(--bs-primary-border-subtle);
    background: var(--bs-primary-bg-subtle);
    color: var(--bs-primary-text-emphasis);
}

.reaction-emoji {
    font-size: 1.25rem;
    line-height: 1;
}

.reaction-count:empty {
    display: none;
}

.reaction-bar[aria-busy="true"] .reaction-button {
    cursor: progress;
}

.reaction-bar-error .reaction-button {
    border-color: var(--bs-danger-border-subtle);
}

/* Post page */
.post-page-back {
    margin-bottom: 0.5rem;
}

.post-page-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    min-height: 2.75rem;
    color: var(--bs-secondary-color);
    font-weight: 500;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.comments-section {
    margin-top: 1.5rem;
    scroll-margin-top: 4.5rem;
}

.comments-title {
    margin-bottom: 0.75rem;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--bs-secondary-color);
}

.comment-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.comments-empty {
    display: none;
    color: var(--bs-secondary-color);
}

.comment-list:not(:has(.comment)) + .comments-empty {
    display: block;
}

.comment {
    display: flex;
    gap: 0.625rem;
    margin-bottom: 1rem;
    scroll-margin-top: 4.5rem;
}

.comment > .avatar {
    margin-top: 0.15rem;
}

.comment-main {
    flex: 1 1 auto;
    min-width: 0;
}

.comment-bubble {
    padding: 0.5rem 0.75rem 0.6rem;
    border-radius: 0.25rem 1rem 1rem 1rem;
    background: var(--bs-tertiary-bg);
}

.comment-sofia .comment-bubble {
    background: linear-gradient(135deg, rgba(214, 51, 132, 0.1), rgba(111, 66, 193, 0.07));
    box-shadow: inset 0 0 0 1px rgba(214, 51, 132, 0.45);
}

.comment:target .comment-bubble {
    outline: 2px solid rgba(var(--bs-primary-rgb), 0.45);
}

.comment-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0 0.5rem;
}

.comment-author {
    font-weight: 600;
}

.comment-sofia .comment-author {
    color: var(--app-sofia-accent);
}

.comment-time {
    font-size: 0.8rem;
    color: var(--bs-secondary-color);
}

.comment-text {
    margin: 0.1rem 0 0;
}

.comment-reply-quote {
    display: block;
    margin: 0.25rem 0;
    padding: 0.25rem 0.5rem;
    overflow: hidden;
    border-left: 3px solid var(--bs-border-color);
    border-radius: 0.25rem;
    background: rgba(var(--bs-body-color-rgb), 0.04);
    color: var(--bs-secondary-color);
    font-size: 0.85rem;
    text-decoration: none;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.comment-reply-author {
    margin-right: 0.25rem;
    font-weight: 600;
    color: var(--bs-body-color);
}

.comment-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 0.5rem;
    margin-top: 0.375rem;
}

.comment-actions .reaction-bar {
    flex: 1 1 15rem;
    gap: 0.25rem;
}

.comment-actions .reaction-button {
    padding-inline: 0.2rem;
    background: transparent;
    font-size: 0.8rem;
}

.comment-actions .reaction-emoji {
    font-size: 1.05rem;
}

.comment-action-link {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    padding: 0 0.25rem;
    color: var(--bs-secondary-color);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
}

.comment-form {
    position: sticky;
    bottom: calc(var(--app-nav-height) + env(safe-area-inset-bottom, 0px));
    margin: 1rem calc(var(--bs-gutter-x, 1.5rem) * -0.5) 0;
    padding: 0.75rem calc(var(--bs-gutter-x, 1.5rem) * 0.5);
    border-top: 1px solid var(--bs-border-color-translucent);
    background: var(--bs-body-bg);
    scroll-margin-bottom: 6rem;
}

.comment-form-row {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
}

.comment-form-input {
    min-height: 2.75rem;
    border-radius: 1.25rem;
    resize: vertical;
}

.comment-form-submit {
    min-height: 2.75rem;
    border-radius: 999px;
    white-space: nowrap;
}

.comment-form-reply {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    padding: 0.25rem 0.25rem 0.25rem 0.75rem;
    border-left: 3px solid var(--bs-primary);
    border-radius: 0.25rem;
    background: var(--bs-tertiary-bg);
    font-size: 0.85rem;
}

.comment-form-reply-text {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.comment-form-reply-excerpt {
    color: var(--bs-secondary-color);
}

.comment-form-reply-cancel {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    color: var(--bs-secondary-color);
    text-decoration: none;
}

/* Composer */
.composer-title {
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.composer-field {
    margin-bottom: 1rem;
}

.composer-label {
    font-weight: 600;
}

.composer-select {
    min-height: 3rem;
}

.composer-textarea {
    min-height: 10rem;
    padding: 0.875rem 1rem;
    border-radius: 1rem;
    font-size: 1.1rem;
    resize: vertical;
}

.composer-submit {
    width: 100%;
    min-height: 3.25rem;
    border-radius: 999px;
    font-weight: 600;
}
/* End Posts */

/* Pages */
/* Home, planning, albums, kameraden, person and profile pages (views/home.ejs, planning.ejs,
   album.ejs, kameraden.ejs, person.ejs, profile.ejs). */
.page-icon {
    width: 1.1em;
    height: 1.1em;
    flex-shrink: 0;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    vertical-align: -0.15em;
}

.page-hello {
    margin-bottom: 1rem;
}

.page-kicker {
    margin: 0;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--bs-secondary-color);
}

.page-greeting {
    margin: 0;
    font-size: clamp(1.75rem, 8vw, 2.25rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    overflow-wrap: anywhere;
}

.page-header {
    margin-bottom: 1rem;
}

.page-title {
    margin-bottom: 0.25rem;
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.page-intro {
    margin: 0;
    color: var(--bs-secondary-color);
}

.section-title {
    margin: 1.5rem 0 0.6rem;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--bs-secondary-color);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    min-height: 2.75rem;
    margin-bottom: 0.25rem;
    color: var(--bs-secondary-color);
    font-weight: 500;
    text-decoration: none;
}

/* Shared activity bits */
.activity-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.35rem;
}

.activity-time {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--bs-primary-text-emphasis);
}

.badge-tentative {
    border: 1px dashed var(--bs-warning-border-subtle);
    background: var(--bs-warning-bg-subtle);
    color: var(--bs-warning-text-emphasis);
    font-weight: 600;
}

.badge-now {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: var(--bs-success-bg-subtle);
    color: var(--bs-success-text-emphasis);
    font-weight: 700;
}

.live-dot {
    display: inline-block;
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: var(--bs-success);
    animation: page-live-pulse 2s ease-in-out infinite;
}

.activity-place {
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
    margin: 0.5rem 0 0;
    color: var(--bs-secondary-color);
    overflow-wrap: anywhere;
}

.activity-place .page-icon {
    margin-top: 0.2em;
}

.activity-location {
    display: block;
    font-weight: 600;
    color: var(--bs-body-color);
}

.activity-address {
    display: block;
    font-size: 0.9rem;
}

.activity-maps {
    margin-left: auto;
    padding-left: 0.5rem;
    font-weight: 600;
    white-space: nowrap;
}

.activity-description {
    margin: 0.35rem 0 0;
    color: var(--bs-body-color);
}

.activity-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.85rem;
}

.activity-links:empty {
    display: none;
}

.activity-links .btn {
    display: inline-flex;
    align-items: center;
    min-height: 2.5rem;
    border-radius: 999px;
    padding-inline: 1rem;
}

/* Home: "Nu" card */
.now-card {
    margin-bottom: 1rem;
    overflow: hidden;
    border: 0;
    border-radius: 1.25rem;
    background:
        radial-gradient(circle at 100% 0%, rgba(var(--bs-primary-rgb), 0.22), transparent 60%),
        linear-gradient(160deg, rgba(var(--bs-primary-rgb), 0.12), rgba(var(--bs-success-rgb), 0.06)),
        var(--bs-body-bg);
    box-shadow: inset 0 0 0 1px rgba(var(--bs-primary-rgb), 0.2), 0 0.4rem 1.2rem rgba(0, 0, 0, 0.06);
}

.now-card .card-body {
    padding: 1.1rem 1.15rem 1.2rem;
}

.now-card-free {
    background: var(--bs-tertiary-bg);
    box-shadow: none;
}

.now-label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.3rem;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--bs-success-text-emphasis);
}

.now-card-free .now-label {
    color: var(--bs-secondary-color);
}

.now-title {
    margin-bottom: 0.35rem;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    overflow-wrap: anywhere;
}

.now-title a {
    color: inherit;
    text-decoration: none;
}

.now-album-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 3rem;
    margin-top: 1rem;
    border-radius: 999px;
    font-weight: 600;
}

/* Home: "Straks" */
.next-card .section-title {
    margin-top: 0.5rem;
}

.next-list {
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--bs-border-color-translucent);
    border-radius: 1rem;
    background: var(--bs-body-bg);
    list-style: none;
}

.next-list > li + li {
    border-top: 1px solid var(--bs-border-color-translucent);
}

.next-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 0.75rem;
    min-height: 3.25rem;
    padding: 0.65rem 1rem;
    color: var(--bs-body-color);
    text-decoration: none;
}

.next-item:hover,
.next-item:focus-visible {
    background: var(--bs-tertiary-bg);
}

.next-time {
    min-width: 3.75rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--bs-primary-text-emphasis);
}

.next-day {
    margin-right: 0.3rem;
    font-weight: 500;
    color: var(--bs-secondary-color);
}

.next-title {
    flex: 1 1 10rem;
    min-width: 0;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.next-empty {
    margin: 0;
    padding: 0.85rem 1rem;
    border: 1px dashed var(--bs-border-color);
    border-radius: 1rem;
    color: var(--bs-secondary-color);
}

/* Home: quick composer entry */
.composer-entry {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 3.5rem;
    margin: 1.25rem 0 0.5rem;
    padding: 0.55rem 1rem 0.55rem 0.6rem;
    border: 1px solid var(--bs-border-color-translucent);
    border-radius: 999px;
    background: var(--bs-body-bg);
    color: var(--bs-secondary-color);
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.composer-entry:hover,
.composer-entry:focus-visible {
    border-color: rgba(var(--bs-primary-rgb), 0.5);
    color: var(--bs-body-color);
}

.composer-entry-text {
    flex: 1 1 auto;
    font-size: 1.05rem;
}

.composer-entry-icon {
    width: 1.5rem;
    height: 1.5rem;
    color: var(--bs-primary);
}

/* Feed wrapper, pager, empty states */
.feed .section-title {
    margin-top: 1.25rem;
}

.feed-list:has(.post-card) > .empty-state {
    display: none;
}

.feed-pager {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.5rem;
}

.feed-pager:empty {
    display: none;
}

.feed-more {
    width: 100%;
    min-height: 3rem;
    border-radius: 999px;
    font-weight: 600;
}

.empty-state {
    padding: 2rem 1.25rem;
    border: 1px dashed var(--bs-border-color);
    border-radius: 1.25rem;
    text-align: center;
}

.empty-state-emoji {
    margin-bottom: 0.5rem;
    font-size: 2.75rem;
    line-height: 1;
}

.empty-state-title {
    margin-bottom: 0.25rem;
    font-size: 1.1rem;
    font-weight: 700;
}

.empty-state-text {
    margin-bottom: 1rem;
    color: var(--bs-secondary-color);
}

.empty-state-text:last-child {
    margin-bottom: 0;
}

/* Planning */
.album-link-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.85rem;
    min-height: 4rem;
    margin-bottom: 1.25rem;
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    color: var(--bs-body-color);
    text-decoration: none;
}

.album-link-card:hover,
.album-link-card:focus-visible {
    background: var(--bs-tertiary-bg);
}

.album-link-icon {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    background: var(--bs-secondary-bg);
    font-size: 1.25rem;
}

.album-link-text {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
}

.album-link-title {
    font-weight: 700;
}

.album-link-sub {
    font-size: 0.875rem;
    color: var(--bs-secondary-color);
}

.album-link-arrow {
    color: var(--bs-secondary-color);
}

.planning-day {
    margin-bottom: 1.25rem;
}

.planning-day-title {
    margin: 0 0 0.6rem;
    font-size: 1.05rem;
    font-weight: 700;
}

.planning-day-note {
    margin-left: 0.25rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--bs-secondary-color);
}

details.planning-day > summary {
    display: flex;
    align-items: center;
    min-height: 2.75rem;
    cursor: pointer;
    color: var(--bs-secondary-color);
    list-style: none;
}

details.planning-day > summary::-webkit-details-marker {
    display: none;
}

details.planning-day > summary::before {
    content: "";
    width: 0.5rem;
    height: 0.5rem;
    margin-right: 0.6rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(-45deg);
    transition: transform 0.15s ease;
}

details.planning-day[open] > summary::before {
    transform: rotate(45deg);
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.activity-card {
    border: 1px solid var(--bs-border-color-translucent);
    border-radius: 1rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.activity-card.is-current {
    border-color: rgba(var(--bs-success-rgb), 0.55);
    box-shadow: inset 4px 0 0 var(--bs-success), 0 0.3rem 1rem rgba(var(--bs-success-rgb), 0.12);
}

.activity-card.is-past {
    background: var(--bs-tertiary-bg);
    box-shadow: none;
}

.activity-card.is-past .activity-title,
.activity-card.is-past .activity-time,
.activity-card.is-past .activity-description {
    color: var(--bs-secondary-color);
}

.activity-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.activity-title a {
    color: inherit;
    text-decoration: none;
}

.activity-album-btn {
    margin-left: auto;
}

.planning-more {
    margin: 0.5rem 0 0;
    text-align: center;
    color: var(--bs-secondary-color);
    font-style: italic;
}

/* Album header */
.album-header {
    margin-bottom: 1.25rem;
    border: 1px solid var(--bs-border-color-translucent);
    border-radius: 1.25rem;
    background:
        linear-gradient(160deg, rgba(var(--bs-primary-rgb), 0.08), transparent 70%),
        var(--bs-body-bg);
}

.album-header.is-current {
    border-color: rgba(var(--bs-success-rgb), 0.55);
}

.album-title {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    overflow-wrap: anywhere;
}

.album-post-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    width: 100%;
    min-height: 3rem;
    margin-top: 1rem;
    border-radius: 999px;
    font-weight: 600;
}

/* Kameraden */
.people-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.person-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.85rem;
    min-height: 4.25rem;
    padding: 0.7rem 1rem;
    border-radius: 1rem;
    color: var(--bs-body-color);
    text-decoration: none;
}

.person-row:hover,
.person-row:focus-visible {
    background: var(--bs-tertiary-bg);
}

.person-row.is-me {
    border-color: rgba(var(--bs-primary-rgb), 0.4);
}

.person-row-sofia {
    border-color: rgba(214, 51, 132, 0.35);
    background:
        linear-gradient(90deg, rgba(214, 51, 132, 0.08), rgba(111, 66, 193, 0.04) 60%, transparent),
        var(--bs-body-bg);
}

.avatar-wrap {
    position: relative;
    display: inline-flex;
    flex-shrink: 0;
}

.presence-dot {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 0.8rem;
    height: 0.8rem;
    border: 2px solid var(--bs-body-bg);
    border-radius: 50%;
    background: var(--bs-success);
}

.avatar-lg + .presence-dot {
    right: 0.2rem;
    bottom: 0.2rem;
    width: 1.1rem;
    height: 1.1rem;
    border-width: 3px;
}

.person-row-text {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
}

.person-name {
    font-weight: 700;
    overflow-wrap: anywhere;
}

.person-me {
    font-weight: 400;
    color: var(--bs-secondary-color);
}

.person-presence {
    font-size: 0.85rem;
    color: var(--bs-secondary-color);
}

.person-presence.is-online,
.profile-sub.is-online {
    font-weight: 600;
    color: var(--bs-success-text-emphasis);
}

.person-count {
    flex-shrink: 0;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    background: var(--bs-secondary-bg);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--bs-secondary-color);
    white-space: nowrap;
}

.sofia-tag {
    font-weight: 600;
    background: linear-gradient(90deg, var(--app-sofia-accent), #6f42c1);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Person / profile header */
.profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0.5rem 0 0.25rem;
    text-align: center;
}

.profile-header .avatar-lg {
    width: 6rem;
    height: 6rem;
    font-size: 2.4rem;
}

.profile-header > .avatar,
.profile-header > .avatar-wrap {
    margin-bottom: 0.75rem;
}

.profile-name {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    overflow-wrap: anywhere;
}

.profile-sub {
    margin: 0.2rem 0 0;
    color: var(--bs-secondary-color);
}

.about-card {
    margin-bottom: 0.5rem;
    border: 1px solid var(--bs-border-color-translucent);
    border-radius: 1rem;
}

.about-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 3.25rem;
    padding: 0.5rem 1rem;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
}

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

.about-summary::after {
    content: "";
    width: 0.5rem;
    height: 0.5rem;
    border-right: 2px solid var(--bs-secondary-color);
    border-bottom: 2px solid var(--bs-secondary-color);
    transform: rotate(45deg);
    transition: transform 0.15s ease;
}

.about-card[open] > .about-summary::after {
    transform: rotate(-135deg);
}

.about-body {
    padding: 0 1rem 1rem;
    color: var(--bs-body-color);
}

@keyframes page-live-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(var(--bs-success-rgb), 0.5); }
    50% { box-shadow: 0 0 0 0.35rem rgba(var(--bs-success-rgb), 0); }
}

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

    details.planning-day > summary::before,
    .about-summary::after {
        transition: none;
    }
}
/* End Pages */

/* Media */
/* Profile photos: big avatar on your own profile, upload form (views/profile.ejs) and the
   per-participant photo form on the admin dashboard (views/admin/dashboard.ejs). */
.profile-header-own .avatar-lg {
    width: 8rem;
    height: 8rem;
    font-size: 3.2rem;
    box-shadow: 0 0 0 3px var(--bs-body-bg), 0 0 0 5px var(--bs-border-color);
}

.profile-flash {
    border-radius: 1rem;
}

.profile-photo-form {
    display: grid;
    gap: 0.5rem;
}

.profile-photo-form .form-label,
.profile-photo-form .form-text {
    margin: 0;
}

.profile-photo-form .form-control {
    min-height: 3rem;
    padding-block: 0.65rem;
}

.profile-photo-save,
.profile-photo-delete .btn {
    width: 100%;
    min-height: 3rem;
    border-radius: 999px;
}

.profile-photo-delete {
    margin-top: 0.75rem;
}

.admin-avatar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.75rem;
}

.admin-avatar-preview {
    width: 4rem;
    height: 4rem;
    font-size: 1.6rem;
}

.admin-avatar-forms {
    flex: 1 1 14rem;
    min-width: 0;
}
/* End Media */

/* Uploads */
/* Photo picker in the composer and photo galleries in post cards (views/compose.ejs,
   public/js/compose.js, views/partials/post-card.ejs). */
.composer-photos {
    margin-bottom: 1rem;
}

/* The big, friendly primary action: a tappable tile that opens the photo picker. */
.composer-pick {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-height: 9rem;
    padding: 1.25rem 1rem;
    border: 2px dashed rgba(var(--bs-primary-rgb), 0.45);
    border-radius: 1rem;
    background: rgba(var(--bs-primary-rgb), 0.06);
    color: var(--bs-primary-text-emphasis);
    text-align: center;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.composer-pick:hover,
.composer-pick:active {
    border-color: var(--bs-primary);
    background: rgba(var(--bs-primary-rgb), 0.12);
}

/* Drag and drop (public/js/compose.js): only mentioned where there is a mouse. */
.composer-pick-drop {
    display: none;
    font-size: 0.85rem;
}

@media (hover: hover) and (pointer: fine) {
    .composer-pick-drop {
        display: block;
    }
}

.composer-dragging .composer-pick {
    border-style: solid;
    border-color: var(--bs-primary);
    background: rgba(var(--bs-primary-rgb), 0.16);
    transform: scale(1.01);
}

.composer-photos:has(.composer-file-input:focus-visible) .composer-pick {
    outline: 3px solid rgba(var(--bs-primary-rgb), 0.5);
    outline-offset: 2px;
}

.composer-pick-icon {
    width: 2.5rem;
    height: 2.5rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.composer-pick-text {
    font-size: 1.25rem;
    font-weight: 700;
}

.composer-pick-hint {
    font-size: 0.85rem;
    color: var(--bs-secondary-color);
}

/* Without JavaScript the native input stays visible (it shows what was chosen). */
.composer-file-input {
    margin-top: 0.5rem;
}

.composer-enhanced .composer-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    border: 0;
    white-space: nowrap;
}

/* Once photos are chosen the tile shrinks to an "add more" button above the previews. */
.composer-has-photos .composer-pick {
    flex-direction: row;
    min-height: 3.25rem;
    padding: 0.5rem 1rem;
}

.composer-has-photos .composer-pick-icon {
    width: 1.5rem;
    height: 1.5rem;
}

.composer-has-photos .composer-pick-text {
    font-size: 1rem;
}

.composer-has-photos .composer-pick-hint {
    display: none;
}

.composer-previews {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
    margin: 0.75rem 0 0;
    padding: 0;
    list-style: none;
}

.composer-preview {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    border-radius: 0.75rem;
    background: var(--bs-secondary-bg);
}

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

/* HEIC outside Safari (and anything else the browser cannot show): a neat name tile. */
.composer-preview-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    height: 100%;
    padding: 0.5rem 0.4rem;
    color: var(--bs-secondary-color);
    font-size: 0.75rem;
    text-align: center;
}

.composer-preview-placeholder .composer-pick-icon {
    width: 1.75rem;
    height: 1.75rem;
}

.composer-preview-name {
    display: -webkit-box;
    max-width: 100%;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow-wrap: anywhere;
}

.composer-preview-remove {
    position: absolute;
    top: 0.3rem;
    right: 0.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 1rem;
    line-height: 1;
}

.composer-preview-remove:hover,
.composer-preview-remove:focus-visible {
    background: rgba(0, 0, 0, 0.8);
}

.composer-uploading .composer-preview-remove {
    display: none;
}

.composer-message {
    margin: 0.5rem 0 0;
    color: var(--bs-warning-text-emphasis);
    font-size: 0.9rem;
}

.composer-progress {
    margin-bottom: 1rem;
}

.composer-progress .progress {
    height: 0.75rem;
    border-radius: 999px;
}

.composer-progress-bar {
    width: 0;
    transition: width 0.2s ease;
}

.composer-progress-text {
    margin: 0.35rem 0 0;
    color: var(--bs-secondary-color);
    font-size: 0.85rem;
    text-align: center;
}

.composer-uploading .composer-pick {
    opacity: 0.5;
    pointer-events: none;
}

/* Post galleries: one photo at its own aspect ratio; several in a swipeable scroll-snap row. */
.post-gallery {
    position: relative;
    background: var(--bs-secondary-bg);
}

.post-gallery-item {
    position: relative;
}

.post-gallery-link {
    display: block;
}

.post-gallery-img,
.post-gallery-video {
    display: block;
    width: 100%;
    height: auto;
    background: var(--bs-secondary-bg);
}

.post-gallery-single .post-gallery-img,
.post-gallery-single .post-gallery-video {
    max-height: 75vh;
    object-fit: cover;
}

.post-gallery-multi .post-gallery-track {
    display: flex;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
}

.post-gallery-multi .post-gallery-track:focus-visible {
    outline: 3px solid rgba(var(--bs-primary-rgb), 0.6);
    outline-offset: -3px;
}

/* Touch screens swipe; mouse users keep the scrollbar. */
@media (hover: none) {
    .post-gallery-multi .post-gallery-track {
        scrollbar-width: none;
    }

    .post-gallery-multi .post-gallery-track::-webkit-scrollbar {
        display: none;
    }
}

.post-gallery-multi .post-gallery-item {
    flex: 0 0 100%;
    scroll-snap-align: center;
    scroll-snap-stop: always;
}

.post-gallery-multi .post-gallery-img,
.post-gallery-multi .post-gallery-video {
    aspect-ratio: 4 / 5;
    max-height: 75vh;
    object-fit: cover;
}

.post-gallery-multi.post-gallery-square .post-gallery-img,
.post-gallery-multi.post-gallery-square .post-gallery-video {
    aspect-ratio: 1 / 1;
}

.post-gallery-multi.post-gallery-landscape .post-gallery-img,
.post-gallery-multi.post-gallery-landscape .post-gallery-video {
    aspect-ratio: 4 / 3;
}

/* Post page: show whole photos. */
.post-card-detail .post-gallery-img {
    max-height: 85vh;
    object-fit: contain;
}

.post-gallery-count {
    position: absolute;
    top: 0.625rem;
    left: 0.625rem;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    pointer-events: none;
}

.post-gallery-menu {
    position: absolute;
    top: 0.375rem;
    right: 0.375rem;
}

.post-gallery-menu-toggle {
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
}

.post-gallery-menu-toggle:hover,
.post-gallery-menu[open] > .post-gallery-menu-toggle {
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
}

@media (prefers-reduced-motion: reduce) {
    .composer-pick,
    .composer-progress-bar {
        transition: none;
    }

    .post-gallery-multi .post-gallery-track {
        scroll-behavior: auto;
    }
}
/* End Uploads */

/* Composer order: in the DOM caption and album come before the file input (multipart parts arrive in
   DOM order, so the server still knows them when a photo is refused); visually photos stay on top. */
.composer-form {
    display: flex;
    flex-direction: column;
}

.composer-form > .composer-photos {
    order: -1;
}

/* Admin planning */
.admin-activity {
    scroll-margin-top: 1rem;
}

.admin-activity:target {
    box-shadow: inset 0.25rem 0 0 var(--bs-primary);
}

.admin-activity-cancelled .admin-activity-main > .fw-semibold {
    text-decoration: line-through;
    text-decoration-thickness: 1px;
    color: var(--bs-secondary-color);
}

.admin-activity-head {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.admin-activity-time {
    font-variant-numeric: tabular-nums;
}

.admin-activity-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.admin-activity-actions .btn,
.admin-activity-actions .form-select,
.admin-form .btn {
    min-height: 2.75rem;
}

.admin-status-form {
    flex: 1 1 16rem;
    max-width: 24rem;
}

.admin-input-narrow {
    max-width: 10rem;
}

.admin-planning-help summary,
.admin-activity details summary {
    padding-block: 0.25rem;
}

@media (min-width: 576px) {
    .admin-activity-head {
        flex-direction: row;
        gap: 1rem;
    }

    .admin-activity-time {
        flex: 0 0 7.5rem;
    }

    .admin-activity-main {
        flex: 1 1 auto;
        min-width: 0;
    }
}
/* End Admin planning */

/* Admin system */
/* Admin dashboard summary cards, quick toggles, Sofia & AI settings and the job overview
   (views/admin/dashboard.ejs, ai.ejs, jobs.ejs, job.ejs). Mobile first: cards stack two per row. */
.admin-tap {
    min-height: 2.75rem;
}

.admin-summary-grid,
.admin-toggle-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
}

@media (min-width: 768px) {
    .admin-summary-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .admin-toggle-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.admin-summary-card .card-body,
.admin-toggle-card .card-body {
    padding: 0.75rem;
}

/* Narrow phones: a long label ("Gezichtsherkenning") wraps instead of pushing the status badge out. */
.admin-toggle-head {
    min-width: 0;
}

.admin-toggle-label {
    min-width: 0;
    overflow-wrap: anywhere;
}

.admin-toggle-head .badge {
    flex-shrink: 0;
}

.admin-summary-link {
    color: inherit;
    text-decoration: none;
}

.admin-summary-link:hover,
.admin-summary-link:focus-visible {
    border-color: var(--bs-primary);
}

.admin-section-links,
.admin-job-counts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.admin-section-links .btn,
.admin-job-counts .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.admin-setting {
    padding-block: 0.75rem;
    border-bottom: 1px solid var(--bs-border-color-translucent);
}

.admin-setting:first-of-type {
    padding-top: 0;
}

.admin-setting:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.admin-switch {
    min-height: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-switch .form-check-input {
    width: 2.75rem;
    height: 1.5rem;
    margin-top: 0;
}

.admin-input-short {
    max-width: 12rem;
}

.admin-reset {
    min-height: 2rem;
}

.admin-pre {
    max-height: 60vh;
    overflow: auto;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.admin-pre-wrap {
    white-space: pre-wrap;
}
/* End Admin system */

/* Admin people */
/* Participants, moderation and people-tag pages in /admin (views/admin/participants.ejs,
   participant-form.ejs, moderation.ejs, comments.ejs, photos.ejs, photo.ejs). Mobile first. */
.admin-people-tap {
    min-height: 2.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-sm.admin-people-tap {
    min-height: 2.5rem;
    padding-inline: 0.85rem;
}

.admin-people-avatar {
    width: 3rem;
    height: 3rem;
    flex: 0 0 auto;
    font-size: 1.25rem;
}

.admin-people-avatar-lg {
    width: 4rem;
    height: 4rem;
    flex: 0 0 auto;
    font-size: 1.6rem;
}

.admin-people-inactive {
    background: var(--bs-tertiary-bg);
}

.admin-people-list .min-w-0 {
    min-width: 0;
}

.admin-mod-deleted {
    border-color: var(--bs-danger-border-subtle);
    background: var(--bs-danger-bg-subtle);
}

.admin-mod-body {
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.admin-confirm-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
}

.admin-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.admin-thumb {
    display: block;
    width: 6rem;
    height: 6rem;
    border-radius: 0.5rem;
    overflow: hidden;
    background: var(--bs-tertiary-bg);
}

.admin-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.admin-thumb-missing {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: 1px dashed var(--bs-border-color);
}

.admin-photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
    gap: 0.75rem;
}

.admin-photo-thumb {
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.admin-photo-display {
    width: 100%;
    height: auto;
    max-height: 80vh;
    object-fit: contain;
    background: var(--bs-tertiary-bg);
}

.admin-tag-rejected {
    color: var(--bs-secondary-color);
}

.admin-tag-rejected .fw-semibold {
    text-decoration: line-through;
}
/* End Admin people */

/* Faces */
.face-ref-list {
    display: grid;
    gap: 0.75rem;
}

.face-ref-item {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.face-ref-thumb {
    flex: 0 0 auto;
    width: 96px;
    height: 96px;
    object-fit: cover;
    border-radius: 0.5rem;
    background: var(--bs-secondary-bg);
}

.face-ref-body {
    min-width: 0;
    flex: 1 1 auto;
}

.face-wipe-form {
    margin-top: 1rem;
}
/* End Faces */

/* Admin face tags */
/* Face overlay and per-face cards on /admin/fotos/:uuid (views/admin/photo.ejs). The SVG overlay has
   the same box as the image and the same aspect handling (object-fit: contain = xMidYMid meet). */
.face-stage {
    position: relative;
}

.face-stage-img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 80vh;
    object-fit: contain;
    background: var(--bs-tertiary-bg);
}

.face-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    --face-colour: #6c757d;
    --face-text: #ffffff;
}

.face-overlay .face-link {
    pointer-events: all;
    cursor: pointer;
}

.face-overlay .face-box {
    fill: none;
    stroke: var(--face-colour);
    stroke-width: 3px;
    vector-effect: non-scaling-stroke;
}

.face-overlay .face-label-bg {
    fill: var(--face-colour);
    stroke: rgba(0, 0, 0, 0.45);
    stroke-width: 1px;
    vector-effect: non-scaling-stroke;
}

.face-overlay .face-label-text {
    fill: var(--face-text);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-weight: 600;
}

.face-overlay .face-link:focus-visible .face-box,
.face-overlay .face-link:hover .face-box {
    stroke-width: 5px;
}

.face-state-confirmed {
    --face-colour: #198754;
}

.face-state-certain {
    --face-colour: #0d6efd;
}

.face-state-uncertain {
    --face-colour: #fd7e14;
    --face-text: #212529;
}

.face-state-unknown {
    --face-colour: #adb5bd;
    --face-text: #212529;
}

.face-state-rejected {
    --face-colour: #dc3545;
}

.face-overlay .face-state-rejected .face-box {
    stroke-dasharray: 8 6;
}

.face-key {
    display: inline-block;
    width: 0.85rem;
    height: 0.85rem;
    border-radius: 0.2rem;
    border: 2px solid transparent;
    vertical-align: -0.1rem;
    margin-left: 0.35rem;
}

.face-key:first-child {
    margin-left: 0;
}

.face-key-lg {
    flex: 0 0 auto;
    width: 1.25rem;
    height: 1.25rem;
    margin: 0.15rem 0 0;
}

.face-key-confirmed {
    background: #198754;
}

.face-key-certain {
    background: #0d6efd;
}

.face-key-uncertain {
    background: #fd7e14;
}

.face-key-unknown {
    background: #adb5bd;
}

.face-key-rejected {
    background: transparent;
    border: 2px dashed #dc3545;
}

.face-badge-confirmed {
    background: #198754;
    color: #ffffff;
}

.face-badge-certain {
    background: #0d6efd;
    color: #ffffff;
}

.face-badge-uncertain {
    background: #fd7e14;
    color: #212529;
}

.face-badge-unknown {
    background: #adb5bd;
    color: #212529;
}

.face-badge-rejected {
    background: #dc3545;
    color: #ffffff;
}

.face-cards {
    display: grid;
    gap: 0.75rem;
    margin: 0;
}

.face-card {
    scroll-margin-top: 1rem;
    border-left-width: 0.35rem;
}

.face-card-confirmed {
    border-left-color: #198754;
}

.face-card-certain {
    border-left-color: #0d6efd;
}

.face-card-uncertain {
    border-left-color: #fd7e14;
}

.face-card-unknown {
    border-left-color: #adb5bd;
}

.face-card-rejected {
    border-left-color: #dc3545;
    border-left-style: dashed;
}

.face-card:target {
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.35);
}

.face-card-name {
    font-size: 1.1rem;
    overflow-wrap: anywhere;
}

.face-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
    gap: 0.5rem;
}

.face-actions form,
.face-action-button,
.face-assign-button,
.face-sofia-button {
    width: 100%;
}

.face-action-button {
    min-height: 3rem;
    font-size: 1.05rem;
}

.face-assign select {
    min-height: 2.75rem;
}

.face-assign .form-check-input {
    width: 1.25rem;
    height: 1.25rem;
}

.face-assign .form-check-label {
    padding-left: 0.25rem;
    padding-top: 0.1rem;
}

.face-assign-toggle summary,
.face-all-tags summary {
    cursor: pointer;
    min-height: 2.25rem;
    padding-block: 0.4rem;
}

.face-others li + li {
    margin-top: 0.35rem;
}
/* End Admin face tags */

/* Sofia video */
.post-sofia-video {
    background: #000;
}

.post-video-attribution {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
    padding: 0.6rem 1rem 0;
    color: var(--bs-secondary-color);
    font-size: 0.875rem;
}

.post-video-attribution .post-card-icon {
    flex-shrink: 0;
    width: 1rem;
    height: 1rem;
    fill: var(--app-sofia-accent);
    stroke: none;
}

.post-video-attribution a {
    color: var(--app-sofia-accent);
    font-weight: 600;
    text-decoration: none;
}

.post-video-attribution a:hover,
.post-video-attribution a:focus-visible {
    text-decoration: underline;
}
/* End Sofia video */

/* Video */
.video-admin-thumb {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4.5rem;
    height: 4.5rem;
    object-fit: cover;
    border-radius: 0.5rem;
    background: var(--bs-secondary-bg);
}

.video-admin-prompt {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font-size: 0.8rem;
}

.video-admin-preview {
    display: block;
    width: 100%;
    max-width: 22rem;
    max-height: 22rem;
    border-radius: 0.5rem;
    background: #000;
}

.video-admin-item .min-w-0 {
    min-width: 0;
}

.video-request-idea {
    min-height: 4.5rem;
}
/* End Video */

/* PWA */
/* Install card (views/lobby.ejs, views/profile.ejs; public/js/install.js) and offline page. */
.install-card {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--bs-border-color-translucent);
    border-radius: 1rem;
    background: var(--bs-body-bg);
}

.install-card[hidden] {
    display: none;
}

.install-card-icon {
    flex: 0 0 auto;
    font-size: 1.5rem;
    line-height: 1.2;
}

.install-card-body {
    min-width: 0;
}

.install-card-title {
    margin: 0 0 0.25rem;
    font-size: 1rem;
    font-weight: 700;
}

.install-card-text {
    margin-bottom: 0.5rem;
    color: var(--bs-secondary-color);
    font-size: 0.9rem;
}

.install-card .btn {
    border-radius: 999px;
    padding-inline: 1rem;
}

.lobby-install {
    margin-top: 1.5rem;
    background: var(--bs-tertiary-bg);
}

.offline-page {
    max-width: 28rem;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-block: 2rem calc(2rem + env(safe-area-inset-bottom));
}

.offline-icon {
    width: 6rem;
    height: 6rem;
    margin-bottom: 1.25rem;
    border-radius: 1.25rem;
}
/* End PWA */

/* Push */
/* "Meldingen" card on /profiel and the lobby step (views/profile.ejs, views/lobby.ejs; public/js/push.js). */
.push-card {
    margin-bottom: 0.5rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--bs-border-color-translucent);
    border-radius: 1rem;
    background: var(--bs-body-bg);
}

.push-card[hidden],
.push-card [hidden] {
    display: none !important;
}

.push-card-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
}

.push-card-icon {
    flex: 0 0 auto;
    font-size: 1.35rem;
    line-height: 1;
}

.push-card-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
}

.push-card-text {
    margin-bottom: 0.5rem;
    color: var(--bs-secondary-color);
    font-size: 0.9rem;
}

.push-card-steps {
    margin-bottom: 0.5rem;
    padding-left: 1.25rem;
    font-size: 0.9rem;
}

.push-card .btn {
    border-radius: 999px;
    padding-inline: 1rem;
}

.push-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.push-card-message {
    margin: 0.4rem 0 0;
    font-size: 0.85rem;
    color: var(--bs-secondary-color);
}

.push-card-message:empty {
    display: none;
}

.push-card-prefs {
    margin-top: 0.75rem;
    padding-top: 0.6rem;
    border-top: 1px solid var(--bs-border-color-translucent);
}

.push-card-legend {
    margin-bottom: 0.35rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--bs-secondary-color);
}

.push-card-prefs .form-check {
    min-height: 2rem;
    margin-bottom: 0.25rem;
}

.push-card-prefs .form-check-label {
    font-size: 0.95rem;
}

.lobby-push {
    margin-top: 0.75rem;
    background: var(--bs-tertiary-bg);
}
/* End Push */

/* Admin Sofia profile */
/* /admin/sofia (views/admin/sofia.ejs): current profile photo, candidate grid, persona texts. */
.admin-sofia-current {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}

.admin-sofia-current-photo {
    width: 10rem;
    max-width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid var(--bs-border-color);
}

.admin-sofia-current-fallback {
    background: var(--bs-tertiary-bg);
}

.admin-sofia-current-text {
    flex: 1 1 12rem;
    min-width: 0;
}

.admin-sofia-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin: 0;
}

@media (min-width: 768px) {
    .admin-sofia-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.admin-sofia-candidate-photo {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.admin-sofia-candidate-active {
    border: 2px solid var(--bs-success);
}

.admin-sofia-text {
    font-size: 0.9rem;
    line-height: 1.4;
}

.admin-sofia-default {
    white-space: pre-wrap;
    font-size: 0.8rem;
    max-height: 20rem;
    overflow: auto;
    padding: 0.5rem;
    background: var(--bs-tertiary-bg);
    border-radius: 0.375rem;
}
/* End Admin Sofia profile */

.install-card-apk {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--bs-border-color-translucent);
}

.install-card-apk-note {
    margin-top: 0.4rem;
    font-size: 0.8rem;
    color: var(--bs-secondary-color);
}

/* Beheer in de app (moderators, partials/admin-*): small and muted, so the app stays the app. */
.app-topbar-right {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.app-topbar-admin {
    font-size: 1.1rem;
    line-height: 1;
    text-decoration: none;
    opacity: 0.75;
}

.app-admin-flash {
    margin-bottom: 1rem;
    font-size: 0.9rem;
    transition: opacity 0.4s ease;
}

.app-admin-flash.is-leaving {
    opacity: 0;
}

.admin-menu {
    margin-top: 0.5rem;
    padding-top: 0.4rem;
    border-top: 1px dashed var(--bs-border-color);
}

.admin-menu form {
    margin: 0;
}

.admin-menu-item {
    display: block;
    width: 100%;
    padding: 0.45rem 0.25rem;
    border: 0;
    background: none;
    color: var(--bs-secondary-color);
    font-size: 0.85rem;
    text-align: left;
    text-decoration: none;
}

.admin-menu-item:hover,
.admin-menu-item:focus-visible {
    color: var(--bs-emphasis-color);
}

.admin-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.6rem;
    border-top: 1px dashed var(--bs-border-color);
    color: var(--bs-secondary-color);
    font-size: 0.8rem;
}

.profile-header + .admin-strip,
.next-card .admin-strip {
    margin-bottom: 1rem;
}

.admin-strip-stack {
    flex-direction: column;
    align-items: flex-start;
}

.admin-strip-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
}

.admin-strip form {
    margin: 0;
}

.admin-strip-label {
    margin-right: 0.15rem;
}

.admin-strip-button {
    min-height: 2rem;
    padding: 0.15rem 0.6rem;
    border: 1px solid var(--bs-border-color);
    border-radius: 999px;
    background: var(--bs-body-bg);
    color: var(--bs-secondary-color);
    font-size: 0.8rem;
}

.admin-strip-button:hover,
.admin-strip-button:focus-visible {
    color: var(--bs-emphasis-color);
    border-color: var(--bs-secondary-color);
}

.admin-strip-link {
    color: var(--bs-secondary-color);
    font-size: 0.8rem;
}

.admin-action-armed {
    border-color: var(--bs-warning) !important;
    color: var(--bs-warning-text-emphasis) !important;
}

.admin-unlock {
    margin-top: 0.5rem;
    padding: 1.25rem;
}

.admin-unlock-icon {
    margin-bottom: 0.5rem;
    font-size: 2rem;
}

.admin-tools-card {
    margin-bottom: 1rem;
    padding: 0.875rem 1rem;
}

.admin-tools-card-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.admin-tools-card-icon {
    font-size: 1.2rem;
}

.admin-tools-card-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.admin-tools-toggle {
    margin: 0;
}

.admin-tools-card-text {
    margin: 0.4rem 0 0;
    color: var(--bs-secondary-color);
    font-size: 0.85rem;
}

.admin-login-qr {
    max-width: 18rem;
    margin: 0 0 1rem;
}

.admin-login-qr svg {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 0.5rem;
}

/* Sharing (src/routes/share.js, public/js/share.js). */
.post-card-links {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.post-card-share {
    margin: 0;
}

.post-card-share-button {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 2.75rem;
    padding: 0 0.25rem;
    border: 0;
    background: none;
    color: var(--bs-secondary-color);
    font-size: 0.9rem;
}

.post-card-share-button:hover,
.post-card-share-button:focus-visible {
    color: var(--bs-emphasis-color);
}

.item-menu-share {
    width: 100%;
    min-height: 2.75rem;
}

.item-menu-panel form + form {
    margin-top: 0.5rem;
}

.share-toast {
    position: fixed;
    left: 50%;
    bottom: calc(var(--app-nav-height) + env(safe-area-inset-bottom, 0px) + 1rem);
    z-index: 1060;
    max-width: calc(100% - 2rem);
    padding: 0.6rem 1rem;
    border-radius: 999px;
    background: var(--bs-emphasis-color);
    color: var(--bs-body-bg);
    font-size: 0.9rem;
    text-align: center;
    transform: translateX(-50%);
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.2);
}

.share-sheet {
    position: fixed;
    right: 0.75rem;
    bottom: calc(var(--app-nav-height) + env(safe-area-inset-bottom, 0px) + 0.75rem);
    left: 0.75rem;
    z-index: 1060;
    max-width: 30rem;
    margin: 0 auto;
    padding: 1rem;
    border: 1px solid var(--bs-border-color-translucent);
    border-radius: 1rem;
    background: var(--bs-body-bg);
    box-shadow: 0 0.75rem 2rem rgba(0, 0, 0, 0.25);
}

.share-sheet-title {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.share-sheet-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.shared-link {
    margin-bottom: 0.75rem;
    padding: 0.75rem;
}

.shared-link-head {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.shared-link-thumb {
    flex: 0 0 auto;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 0.5rem;
    object-fit: cover;
}

.shared-link-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.shared-link-title {
    font-weight: 600;
    text-decoration: none;
}

.shared-link-excerpt {
    overflow: hidden;
    color: var(--bs-body-color);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shared-link-meta {
    color: var(--bs-secondary-color);
    font-size: 0.8rem;
}

.shared-link-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-top: 0.6rem;
}

.shared-link-row form {
    margin: 0;
}

.shared-link-url {
    flex: 1 1 12rem;
    min-width: 0;
}

.profile-link-card {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0.875rem 1rem;
    color: inherit;
    text-decoration: none;
}

.profile-link-card-icon {
    font-size: 1.4rem;
}

.profile-link-card-text {
    display: flex;
    flex-direction: column;
}

.profile-link-card-title {
    font-weight: 600;
}

.profile-link-card-sub {
    color: var(--bs-secondary-color);
    font-size: 0.85rem;
}

/* The public share page: same look as the app, without navigation. */
.share-topbar-label {
    color: var(--bs-secondary-color);
    font-size: 0.85rem;
}

.share-main {
    padding-top: 1rem;
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 2rem);
}

.share-photo {
    margin: 0;
}

.share-photo-media {
    display: block;
    width: 100%;
    height: auto;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 1rem;
    background: var(--bs-tertiary-bg);
}

.share-photo-caption {
    margin-top: 0.6rem;
    color: var(--bs-secondary-color);
    font-size: 0.9rem;
    text-align: center;
}

.share-reactions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.share-reaction {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.6rem;
    border: 1px solid var(--bs-border-color-translucent);
    border-radius: 999px;
    background: var(--bs-body-bg);
    font-size: 0.9rem;
}

.share-footnote {
    margin-top: 1.5rem;
    color: var(--bs-secondary-color);
    font-size: 0.8rem;
    text-align: center;
}

.share-missing {
    padding-top: 3rem;
    text-align: center;
}

.share-missing-emoji {
    margin-bottom: 0.75rem;
    font-size: 3rem;
}

/* Reaction themes: a post or comment whose most-given reaction reached 2+ votes gets that reaction's look.
   Classes + data-reaction-level (2..5) are set server-side (reactionThemeOf) and updated live by
   public/js/reactions.js. All decorations sit behind the content (isolation + z-index -1). */
.reaction-theme {
    --theme-strength: 1;
    position: relative;
    isolation: isolate;
    border-width: 2px;
    border-style: solid;
    transition: background-color 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

.reaction-theme[data-reaction-level="3"] { --theme-strength: 1.5; }
.reaction-theme[data-reaction-level="4"] { --theme-strength: 2; }
.reaction-theme[data-reaction-level="5"] { --theme-strength: 2.6; }

.reaction-theme::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    pointer-events: none;
}

li.comment.reaction-theme {
    padding: 0.45rem 0.55rem;
    border-radius: 0.75rem;
}

/* The reaction's emoji, fully visible: left of the ⋯ menu on posts, next to the time on comments. */
.reaction-theme-badge {
    display: none;
    flex: 0 0 auto;
    align-self: center;
    font-size: 1.35rem;
    line-height: 1;
}

.reaction-theme > .post-card-header > .reaction-theme-badge,
.reaction-theme > .comment-main .comment-meta > .reaction-theme-badge {
    display: inline-block;
}

.reaction-theme > .comment-main .comment-meta > .reaction-theme-badge {
    margin-left: auto;
    font-size: 1.05rem;
}

.post-card-header > .reaction-theme-badge {
    margin-left: auto;
}

.post-card-header > .reaction-theme-badge + .post-card-menu {
    margin-left: 0.25rem;
}

/* 😂 warm yellow, more intense with every vote. */
.reaction-theme-laugh {
    border-color: #ffb300;
    background-image: linear-gradient(135deg,
        rgba(255, 193, 7, calc(0.16 * var(--theme-strength))),
        rgba(255, 152, 0, calc(0.06 * var(--theme-strength))) 70%);
    box-shadow: 0 0 calc(0.5rem * var(--theme-strength)) rgba(255, 179, 0, 0.35);
}

.reaction-theme-laugh .reaction-theme-badge {
    animation: reaction-wobble 2.4s ease-in-out infinite;
}

/* 🤩 golden glow with twinkling monochrome stars (darker on light, lighter on dark). */
.reaction-theme-starstruck {
    --star-color: rgba(33, 37, 41, 0.16);
    border-color: #ffc107;
    background-image: linear-gradient(135deg, rgba(255, 215, 64, 0.14), rgba(255, 193, 7, 0.04));
    box-shadow: 0 0 0.9rem rgba(255, 193, 7, 0.5), 0 0 2.2rem rgba(255, 193, 7, 0.25);
    animation: reaction-glow-gold 2.8s ease-in-out infinite;
}

[data-bs-theme="dark"] .reaction-theme-starstruck {
    --star-color: rgba(255, 255, 255, 0.2);
}

.reaction-theme-starstruck::before {
    background-color: var(--star-color);
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='90'%3E%3Cpath d='M12 4l1.6 4.4L18 10l-4.4 1.6L12 16l-1.6-4.4L6 10l4.4-1.6z'/%3E%3Cpath d='M64 30l1 2.8 2.8 1-2.8 1-1 2.8-1-2.8-2.8-1 2.8-1z'/%3E%3Cpath d='M38 62l1.3 3.6 3.6 1.3-3.6 1.3L38 72l-1.3-3.6-3.6-1.3 3.6-1.3z'/%3E%3Cpath d='M80 74l.8 2.2 2.2.8-2.2.8-.8 2.2-.8-2.2-2.2-.8 2.2-.8z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='90'%3E%3Cpath d='M12 4l1.6 4.4L18 10l-4.4 1.6L12 16l-1.6-4.4L6 10l4.4-1.6z'/%3E%3Cpath d='M64 30l1 2.8 2.8 1-2.8 1-1 2.8-1-2.8-2.8-1 2.8-1z'/%3E%3Cpath d='M38 62l1.3 3.6 3.6 1.3-3.6 1.3L38 72l-1.3-3.6-3.6-1.3 3.6-1.3z'/%3E%3Cpath d='M80 74l.8 2.2 2.2.8-2.2.8-.8 2.2-.8-2.2-2.2-.8 2.2-.8z'/%3E%3C/svg%3E");
    -webkit-mask-size: 90px 90px;
    mask-size: 90px 90px;
    animation: reaction-twinkle 2.2s ease-in-out infinite;
}

/* 👍 fresh green, more intense with every vote. */
.reaction-theme-thumbsup {
    border-color: #2fb344;
    background-image: linear-gradient(135deg,
        rgba(47, 179, 68, calc(0.15 * var(--theme-strength))),
        rgba(32, 201, 151, calc(0.05 * var(--theme-strength))) 70%);
    box-shadow: 0 0 calc(0.5rem * var(--theme-strength)) rgba(47, 179, 68, 0.3);
}

/* 🤢 queasy: green liquid sloshing along the bottom and a pulsing sickly glow. */
.reaction-theme-nauseated {
    border-color: #8bc34a;
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='56' preserveAspectRatio='none'%3E%3Cpath d='M0 22 C40 4 80 4 120 22 S200 40 240 22 V56 H0z' fill='%238bc34a' fill-opacity='0.16'/%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='44' preserveAspectRatio='none'%3E%3Cpath d='M0 18 C30 32 60 32 90 18 S150 4 180 18 V44 H0z' fill='%23689f38' fill-opacity='0.14'/%3E%3C/svg%3E"),
        linear-gradient(170deg, rgba(139, 195, 74, calc(0.06 * var(--theme-strength))), rgba(139, 195, 74, calc(0.16 * var(--theme-strength))));
    background-repeat: repeat-x, repeat-x, no-repeat;
    background-position: 0 100%, 0 100%, 0 0;
    background-size: 240px 56px, 180px 44px, 100% 100%;
    animation: reaction-queasy 2.6s ease-in-out infinite, reaction-slosh 9s linear infinite;
}

.reaction-theme-nauseated .reaction-theme-badge {
    animation: reaction-sway 3s ease-in-out infinite;
}

/* 🦄 pink, glittery and over the top. */
.reaction-theme-unicorn {
    border-color: #ff4fa3;
    background-image: linear-gradient(135deg,
        rgba(255, 79, 163, calc(0.22 * var(--theme-strength))),
        rgba(255, 145, 210, calc(0.16 * var(--theme-strength))) 50%,
        rgba(214, 120, 255, calc(0.14 * var(--theme-strength))));
    box-shadow: 0 0 1.2rem rgba(255, 79, 163, 0.6), 0 0 2.6rem rgba(255, 79, 163, 0.35);
    animation: reaction-unicorn-border 6s linear infinite, reaction-glow-pink 3s ease-in-out infinite;
}

.reaction-theme-unicorn .reaction-theme-badge {
    animation: reaction-bounce 1.8s ease-in-out infinite;
}

@keyframes reaction-wobble {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-12deg); }
    75% { transform: rotate(12deg); }
}

@keyframes reaction-sway {
    0%, 100% { transform: translateX(0) rotate(0deg); }
    50% { transform: translateX(-0.15rem) rotate(-8deg); }
}

@keyframes reaction-bounce {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-0.2rem) scale(1.12); }
}

@keyframes reaction-glow-gold {
    0%, 100% { box-shadow: 0 0 0.7rem rgba(255, 193, 7, 0.4), 0 0 1.6rem rgba(255, 193, 7, 0.18); }
    50% { box-shadow: 0 0 1.2rem rgba(255, 193, 7, 0.7), 0 0 2.8rem rgba(255, 193, 7, 0.35); }
}

@keyframes reaction-twinkle {
    0%, 100% { opacity: 0.55; }
    50% { opacity: 1; }
}

@keyframes reaction-queasy {
    0%, 100% { box-shadow: 0 0 0.6rem rgba(139, 195, 74, 0.35), inset 0 0 0.8rem rgba(139, 195, 74, 0.15); }
    50% { box-shadow: 0 0 1.4rem rgba(139, 195, 74, 0.6), inset 0 0 1.6rem rgba(139, 195, 74, 0.3); }
}

@keyframes reaction-slosh {
    to { background-position: 240px 100%, -180px 100%, 0 0; }
}

@keyframes reaction-unicorn-border {
    0% { border-color: #ff4fa3; }
    25% { border-color: #c56bff; }
    50% { border-color: #6ec5ff; }
    75% { border-color: #ffd36e; }
    100% { border-color: #ff4fa3; }
}

@keyframes reaction-glow-pink {
    0%, 100% { box-shadow: 0 0 1rem rgba(255, 79, 163, 0.5), 0 0 2.2rem rgba(255, 79, 163, 0.28); }
    50% { box-shadow: 0 0 1.6rem rgba(255, 79, 163, 0.75), 0 0 3.2rem rgba(255, 79, 163, 0.42); }
}

@media (prefers-reduced-motion: reduce) {
    .reaction-theme,
    .reaction-theme::before,
    .reaction-theme .reaction-theme-badge {
        animation: none;
    }
}

/* Quiz (phone) */
/* Sofia's KameradenQuiz on the phone (views/quiz.ejs, public/js/quiz.js), the questionnaire
   (views/quiz-intake.ejs) and the home card (partials/quiz-home-card). Team colours come in as the
   custom property --quiz-team (set through the CSSOM by quiz.js). */
.quiz {
    --quiz-accent: #d63384;
    --quiz-team: var(--bs-secondary-color);
    padding-bottom: 1rem;
}

.quiz-header {
    margin-bottom: 0.75rem;
}

.quiz-title {
    margin-bottom: 0;
}

.quiz-pause {
    font-size: 1rem;
}

.quiz-bar {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin: 0 -0.25rem 0.75rem;
    padding: 0.4rem 0.6rem;
    border-radius: 0.6rem;
    background: var(--bs-tertiary-bg);
    font-size: 0.85rem;
}

.quiz-bar-label {
    overflow: hidden;
    color: var(--bs-secondary-color);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.quiz-timer {
    flex: none;
    min-width: 3.5rem;
    padding: 0.1rem 0.6rem;
    border-radius: 999px;
    background: var(--quiz-accent);
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    text-align: center;
}

.quiz-timer.is-urgent {
    animation: quiz-pulse 1s ease-in-out infinite;
}

.quiz-panel {
    margin-bottom: 1rem;
}

.quiz-panel-title {
    margin-bottom: 0.5rem;
    font-size: 1.35rem;
    font-weight: 700;
}

.quiz-panel-text {
    color: var(--bs-secondary-color);
}

.quiz-prepare-step {
    min-height: 1.5em;
    margin-bottom: 0.35rem;
    font-weight: 600;
}

.quiz-progress {
    width: 100%;
    height: 0.6rem;
    margin-bottom: 1rem;
    accent-color: var(--quiz-accent);
}

.quiz-note {
    color: var(--bs-secondary-color);
    font-style: italic;
}

.quiz-my-team {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 1.05rem;
}

.quiz-teams {
    display: grid;
    gap: 0.5rem;
    margin: 0.75rem 0;
    padding: 0;
    list-style: none;
}

.quiz-team {
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--bs-border-color);
    border-left: 0.35rem solid var(--quiz-team);
    border-radius: 0.6rem;
    background: var(--bs-body-bg);
}

.quiz-team.is-mine {
    box-shadow: 0 0 0 2px var(--quiz-team);
}

.quiz-team.is-winner {
    background: var(--bs-warning-bg-subtle);
}

.quiz-team.is-correct {
    background: var(--bs-success-bg-subtle);
}

.quiz-team-head {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.quiz-team-dot {
    flex: none;
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    background: var(--quiz-team);
}

.quiz-team-name {
    flex: 1;
    min-width: 0;
    font-weight: 600;
}

.quiz-team-answered,
.quiz-team-pick {
    color: var(--bs-secondary-color);
    font-size: 0.85rem;
}

.quiz-team-answered.is-done {
    color: var(--bs-success-text-emphasis);
    font-weight: 600;
}

.quiz-team-score {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.quiz-team-members {
    margin: 0.15rem 0 0 1.2rem;
    color: var(--bs-secondary-color);
    font-size: 0.9rem;
}

.quiz-sofia-line {
    margin: 1rem 0;
    padding: 0.75rem 1rem;
    border-left: 0.3rem solid var(--quiz-accent);
    border-radius: 0.5rem;
    background: var(--bs-tertiary-bg);
    font-style: italic;
}

.quiz-sofia-name {
    display: block;
    margin-bottom: 0.15rem;
    color: var(--quiz-accent);
    font-size: 0.8rem;
    font-style: normal;
    font-weight: 700;
    text-transform: uppercase;
}

.quiz-round-intro {
    padding: 1.5rem 0;
    text-align: center;
}

.quiz-round-number {
    margin-bottom: 0.25rem;
    color: var(--quiz-accent);
    font-weight: 700;
    text-transform: uppercase;
}

.quiz-round-title {
    font-size: 1.6rem;
    font-weight: 800;
}

.quiz-question-meta {
    margin-bottom: 0.25rem;
    color: var(--bs-secondary-color);
    font-size: 0.85rem;
}

.quiz-question-text {
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.35;
}

.quiz-art {
    display: block;
    width: 100%;
    max-height: 60vh;
    margin-bottom: 0.75rem;
    border-radius: 0.75rem;
    object-fit: contain;
    background: var(--bs-tertiary-bg);
}

.quiz-art-small {
    max-height: 30vh;
}

.quiz-options {
    display: grid;
    gap: 0.6rem;
}

.quiz-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    min-height: 3.5rem;
    padding: 0.6rem 0.85rem;
    border: 2px solid var(--bs-border-color);
    border-radius: 0.85rem;
    background: var(--bs-body-bg);
    color: var(--bs-body-color);
    font-size: 1.05rem;
    text-align: left;
}

.quiz-option:disabled {
    opacity: 0.6;
}

.quiz-option.is-sending {
    border-color: var(--quiz-accent);
    border-style: dashed;
}

.quiz-option.is-chosen {
    border-color: var(--quiz-accent);
    background: var(--bs-danger-bg-subtle);
    font-weight: 600;
}

.quiz-option-letter {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 50%;
    background: var(--bs-tertiary-bg);
    font-weight: 800;
}

.quiz-option.is-chosen .quiz-option-letter,
.quiz-reveal-option.is-correct .quiz-option-letter {
    background: var(--quiz-accent);
    color: #fff;
}

.quiz-option-text {
    min-width: 0;
    overflow-wrap: anywhere;
}

.quiz-estimate-row {
    display: flex;
    gap: 0.5rem;
}

.quiz-estimate-row .form-control {
    min-width: 0;
}

.quiz-team-choice {
    margin: 0.85rem 0 0;
    font-weight: 600;
}

.quiz-reveal-options {
    display: grid;
    gap: 0.4rem;
    margin: 0 0 0.75rem;
    padding: 0;
    list-style: none;
}

.quiz-reveal-option {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.4rem 0.6rem;
    border: 1px solid var(--bs-border-color);
    border-radius: 0.6rem;
    opacity: 0.65;
}

.quiz-reveal-option.is-correct {
    border: 2px solid var(--bs-success);
    background: var(--bs-success-bg-subtle);
    font-weight: 700;
    opacity: 1;
}

.quiz-reveal-number {
    font-size: 1.2rem;
    font-weight: 700;
}

.quiz-verdict {
    padding: 0.5rem 0.75rem;
    border-radius: 0.6rem;
    font-weight: 700;
}

.quiz-verdict.is-correct {
    background: var(--bs-success-bg-subtle);
    color: var(--bs-success-text-emphasis);
}

.quiz-verdict.is-wrong {
    background: var(--bs-secondary-bg);
    color: var(--bs-secondary-color);
}

.quiz-explanation {
    margin-top: 0.75rem;
}

.quiz-toast {
    position: fixed;
    right: 1rem;
    bottom: calc(5rem + env(safe-area-inset-bottom));
    left: 1rem;
    z-index: 1050;
    margin: 0;
    padding: 0.65rem 0.9rem;
    border-radius: 0.6rem;
    background: var(--bs-dark);
    color: #fff;
    text-align: center;
}

.quiz-admin {
    margin-top: 1.5rem;
}

.quiz-admin-primary {
    border-color: var(--quiz-accent);
    color: var(--quiz-accent);
    font-weight: 600;
}

.quiz-admin-prepare {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
}

.quiz-admin-select {
    width: auto;
}

.quiz-admin-block {
    display: grid;
    gap: 0.35rem;
    width: 100%;
}

.quiz-admin-url {
    font-size: 0.75rem;
}

/* The admin's Pauze/Hervat button: always in reach above the bottom navigation while the quiz runs. */
.quiz-dock {
    position: fixed;
    right: 0;
    bottom: calc(var(--app-nav-height) + env(safe-area-inset-bottom, 0px) + 0.75rem);
    left: 0;
    z-index: 1036;
    display: flex;
    justify-content: center;
    padding: 0 1rem;
    pointer-events: none;
}

.quiz-dock[hidden] {
    display: none;
}

.quiz-dock-form {
    pointer-events: auto;
    width: 100%;
    max-width: 22rem;
}

.quiz-dock-button {
    width: 100%;
    min-height: 3.25rem;
    border: 0;
    border-radius: 999px;
    background: var(--bs-warning);
    color: #212529;
    font-size: 1.15rem;
    font-weight: 700;
    box-shadow: 0 0.35rem 1rem rgba(0, 0, 0, 0.25);
}

.quiz-dock-button.is-resume {
    background: var(--quiz-accent);
    color: #fff;
}

.quiz-dock-button:focus-visible {
    outline: 3px solid var(--bs-body-color);
    outline-offset: 2px;
}

.has-quiz-dock .quiz {
    padding-bottom: 4.5rem;
}

.quiz-home-card .now-title a {
    color: inherit;
    text-decoration: none;
}

.quiz-home-card-text {
    margin-bottom: 0.9rem;
    color: var(--bs-secondary-color);
}

/* The live quiz card glows in Sofia's pink instead of the "Nu" green. */
.quiz-home-card-live {
    background:
        radial-gradient(circle at 100% 0%, rgba(214, 51, 132, 0.25), transparent 60%),
        linear-gradient(160deg, rgba(214, 51, 132, 0.12), rgba(var(--bs-primary-rgb), 0.06)),
        var(--bs-body-bg);
    box-shadow: inset 0 0 0 1px rgba(214, 51, 132, 0.3), 0 0.4rem 1.2rem rgba(0, 0, 0, 0.06);
}

.quiz-home-card-live .now-label {
    color: #d63384;
}

.quiz-home-card-live .live-dot {
    background: #d63384;
}

.quiz-home-card-intake .now-label {
    color: var(--bs-primary-text-emphasis);
}

.quiz-intake-question {
    margin-bottom: 0.75rem;
    padding: 0.75rem 1rem;
}

.quiz-intake-prompt {
    font-weight: 600;
}

.quiz-intake-number {
    color: #d63384;
}

.quiz-intake-number-input {
    max-width: 18rem;
}

/* Reveal suspense on the phone ("Het juiste antwoord is…" until reveal.at). */
.quiz-suspense-line {
    margin: 1rem 0 0;
    font-size: 1.15rem;
    font-weight: 700;
    text-align: center;
}

.quiz-suspense-drum {
    display: inline-block;
    animation: quiz-drum 0.18s ease-in-out infinite alternate;
}

@keyframes quiz-drum {
    from { transform: translateY(0) rotate(-6deg); }
    to { transform: translateY(-3px) rotate(6deg); }
}

/* The last 5 seconds of a question (the phone also vibrates once). */
.quiz-timer.is-final {
    animation: quiz-shake 0.5s ease-in-out infinite;
}

@keyframes quiz-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-2px); }
    75% { transform: translateX(2px); }
}

@keyframes quiz-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.55; }
}

@media (prefers-reduced-motion: reduce) {
    .quiz-timer.is-urgent,
    .quiz-timer.is-final,
    .quiz-suspense-drum {
        animation: none;
    }
}

/* Admin quiz */
/* /admin/quiz (views/admin/quiz.ejs): the big switch, action rows and team colour dots (by position:
   the same colours as store.TEAM_COLORS; no inline styles under the CSP). */
.admin-quiz-switch.is-on {
    border-color: var(--bs-success);
}

.admin-quiz-switch-control .form-check-input {
    width: 3.25rem;
    height: 1.75rem;
    cursor: pointer;
}

.admin-quiz-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.admin-quiz-select {
    width: auto;
    min-height: 2.75rem;
}

.admin-quiz-progress {
    display: block;
    width: 100%;
    height: 0.75rem;
    margin-bottom: 0.5rem;
}

.admin-quiz-team {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 0.5rem;
    padding: 0.25rem 0;
}

.admin-quiz-team-dot {
    display: inline-block;
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    background: var(--bs-secondary);
}

.admin-quiz-team-0 {
    background: #e83e8c;
}

.admin-quiz-team-1 {
    background: #20c997;
}

.admin-quiz-team-2 {
    background: #fd7e14;
}
/* End Admin quiz */

/* Photo lightbox (public/js/lightbox.js): a full-screen <dialog> over the app. */
html.lightbox-open {
    overflow: hidden;
}

.lightbox {
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    padding: 0;
    border: 0;
    background: rgba(0, 0, 0, 0.94);
    color: #fff;
    overscroll-behavior: contain;
}

.lightbox::backdrop {
    background: rgba(0, 0, 0, 0.94);
}

.lightbox-stage {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    overflow: hidden;
    touch-action: none;
    user-select: none;
}

.lightbox-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    cursor: zoom-in;
    transition: transform 0.15s ease-out, filter 0.2s ease;
    -webkit-user-drag: none;
}

.lightbox-image.is-loading {
    filter: blur(2px);
}

.lightbox.is-zoomed .lightbox-stage {
    display: block;
    overflow: auto;
    touch-action: pan-x pan-y;
}

.lightbox.is-zoomed .lightbox-image {
    max-width: none;
    max-height: none;
    cursor: zoom-out;
    transition: none;
}

.lightbox-close,
.lightbox-nav {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    font-size: 1.4rem;
    line-height: 1;
}

.lightbox-close {
    top: max(0.75rem, env(safe-area-inset-top));
    right: 0.75rem;
}

.lightbox-nav {
    top: 50%;
    transform: translateY(-50%);
    font-size: 2rem;
}

.lightbox-prev {
    left: 0.75rem;
}

.lightbox-next {
    right: 0.75rem;
}

.lightbox-nav[hidden] {
    display: none;
}

.lightbox-counter {
    position: absolute;
    bottom: max(0.75rem, env(safe-area-inset-bottom));
    left: 50%;
    margin: 0;
    padding: 0.2rem 0.7rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    font-size: 0.9rem;
    transform: translateX(-50%);
}

.lightbox-close:focus-visible,
.lightbox-nav:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* Swipe through photos on a phone; the arrows are for a mouse. */
@media (hover: none) {
    .lightbox-nav {
        display: none;
    }
}

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

/* "Laat Sofia posten" (partials/selfie-request): a selfie or video of Sofia on request. */
.selfie-request .selfie-request-kind,
.selfie-request .selfie-request-companion {
    width: auto;
    max-width: 16rem;
}

.selfie-request .selfie-request-theme {
    flex: 1 1 12rem;
    width: auto;
    min-width: 10rem;
}

/* "4 opties" on /admin/sofia: the images of a selfie request to choose from. */
.selfie-request .selfie-request-options {
    align-self: center;
}

.selfie-choice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
    gap: 0.5rem;
}

.selfie-choice-option img {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 0.375rem;
}

/* Dice (public/js/dice.js): 🎲 in the top bar, a 3D die of kameraden in a <dialog>, a toast on quiz pages. */
.app-topbar-dice {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 0;
    border-radius: 0.55rem;
    background: transparent;
    color: #6f42c1;
    transition: transform 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.app-topbar-dice-icon {
    width: 1.8rem;
    height: 1.8rem;
    fill: #fff;
    filter: drop-shadow(0 1px 1.5px rgba(111, 66, 193, 0.35));
}

.app-topbar-dice-body {
    fill: currentColor;
}

.app-topbar-dice:hover {
    transform: rotate(-10deg) scale(1.06);
}

.app-topbar-dice:active {
    transform: rotate(-24deg) scale(0.92);
}

.app-topbar-dice:focus-visible {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
}

[data-bs-theme="dark"] .app-topbar-dice {
    color: #a98eda;
}

[data-bs-theme="dark"] .app-topbar-dice-icon {
    fill: #1f1630;
    filter: none;
}

/* Quiz replay button (partials/app-start, res.locals.quizReplay): left of the dice, same size and weight. */
.app-topbar-replay {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.55rem;
    color: #d63384;
    text-decoration: none;
    transition: transform 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.app-topbar-replay-icon {
    width: 1.8rem;
    height: 1.8rem;
    fill: #fff;
    filter: drop-shadow(0 1px 1.5px rgba(214, 51, 132, 0.35));
}

.app-topbar-replay-body {
    fill: currentColor;
}

.app-topbar-replay-arrow {
    fill: none;
    stroke: #fff;
    stroke-width: 1.7;
    stroke-linecap: round;
}

.app-topbar-replay:hover {
    transform: rotate(-10deg) scale(1.06);
}

.app-topbar-replay:active {
    transform: rotate(-24deg) scale(0.92);
}

.app-topbar-replay:focus-visible {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
}

[data-bs-theme="dark"] .app-topbar-replay {
    color: #e685b5;
}

[data-bs-theme="dark"] .app-topbar-replay-icon {
    fill: #2a1020;
    filter: none;
}

[data-bs-theme="dark"] .app-topbar-replay-arrow {
    stroke: #2a1020;
}

/* "Bekijk de quiz nog eens" on /quiz once the quiz is over (public/js/quiz.js buildFinished). */
.quiz-replay-link {
    display: block;
    margin-top: 1rem;
    font-weight: 700;
}

html.dice-open {
    overflow: hidden;
}

.dice-dialog {
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    margin: 0;
    padding: max(1rem, env(safe-area-inset-top)) 1rem max(1rem, env(safe-area-inset-bottom));
    border: 0;
    background: transparent;
    color: var(--bs-body-color);
    overscroll-behavior: contain;
}

.dice-dialog[open] {
    display: flex;
    align-items: center;
    justify-content: center;
}

.dice-dialog::backdrop {
    background: rgba(24, 12, 44, 0.66);
    backdrop-filter: blur(3px);
}

.dice-card {
    position: relative;
    width: 100%;
    max-width: 22rem;
    max-height: 100%;
    overflow-y: auto;
    padding: 1.1rem 1rem 1rem;
    border-radius: 1.5rem;
    background: var(--bs-body-bg);
    box-shadow: 0 1.5rem 3rem rgba(0, 0, 0, 0.35);
    text-align: center;
    outline: none;
    animation: dice-card-in 0.28s cubic-bezier(0.2, 1.4, 0.5, 1);
}

.dice-card::before {
    content: "";
    position: absolute;
    top: 0;
    right: 1.5rem;
    left: 1.5rem;
    height: 0.3rem;
    border-radius: 0 0 0.3rem 0.3rem;
    background: linear-gradient(90deg, var(--app-sofia-accent), #6f42c1, #0d6efd);
}

.dice-header {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 2.25rem;
    text-align: left;
}

.dice-roller-avatar {
    display: inline-flex;
    flex-shrink: 0;
}

.dice-roller-img {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    object-fit: cover;
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
}

.dice-roller-img.avatar-initials {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.dice-heading {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.dice-close {
    flex-shrink: 0;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--bs-tertiary-bg);
    color: var(--bs-secondary-color);
    font-size: 1rem;
    line-height: 1;
}

.dice-stage {
    --dice-size: min(38vw, 9.25rem);
    --dice-half: calc(var(--dice-size) / 2);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: calc(var(--dice-size) * 1.9);
    margin: 0.5rem 0 0.25rem;
    border-radius: 1.25rem;
    background: radial-gradient(ellipse at 50% 42%, rgba(111, 66, 193, 0.16), rgba(214, 51, 132, 0.06) 55%, transparent 72%);
    perspective: 900px;
}

.dice-bouncer {
    position: relative;
    z-index: 1;
    width: var(--dice-size);
    height: var(--dice-size);
    margin-top: calc(var(--dice-size) * -0.18);
    transform-style: preserve-3d;
}

.dice-cube {
    position: relative;
    width: 100%;
    height: 100%;
    transform: rotateX(-16deg) rotateY(22deg);
    transform-style: preserve-3d;
}

.dice-face {
    position: absolute;
    /* Square, opaque faces that overlap their neighbours by a pixel: no gaps on the edges. */
    inset: -1px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ddd0f0;
    color: #212529;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* The rounded tile on the square face keeps the soft look of a real die. */
.dice-face::before {
    content: "";
    position: absolute;
    inset: 4%;
    border: 2px solid rgba(111, 66, 193, 0.22);
    border-radius: 16%;
    background: linear-gradient(150deg, #ffffff 0%, #f6f2fc 60%, #ebe3f7 100%);
    box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.7), inset 0 -0.6rem 1.2rem rgba(111, 66, 193, 0.12);
}

.dice-face > * {
    position: relative;
}

.dice-face-front { transform: translateZ(var(--dice-half)); }
.dice-face-right { transform: rotateY(90deg) translateZ(var(--dice-half)); }
.dice-face-back { transform: rotateY(180deg) translateZ(var(--dice-half)); }
.dice-face-left { transform: rotateY(-90deg) translateZ(var(--dice-half)); }
.dice-face-top { transform: rotateX(90deg) translateZ(var(--dice-half)); }
.dice-face-bottom { transform: rotateX(-90deg) translateZ(var(--dice-half)); }

.dice-face-pips {
    position: absolute;
    top: 7%;
    left: 7%;
    width: 17%;
    height: 17%;
    fill: rgba(111, 66, 193, 0.5);
}

.dice-face-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: calc(var(--dice-size) * 0.04);
    width: 100%;
    padding-top: 4%;
}

.dice-face-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52%;
    height: auto;
    aspect-ratio: 1;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 0 3px #fff, 0 0.2rem 0.5rem rgba(0, 0, 0, 0.18);
    color: #fff;
    font-size: calc(var(--dice-size) * 0.24);
    font-weight: 800;
    line-height: 1;
    user-select: none;
}

.dice-face-name {
    max-width: 86%;
    overflow: hidden;
    font-size: calc(var(--dice-size) * 0.135);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.01em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dice-face-mystery {
    background: linear-gradient(135deg, var(--app-sofia-accent), #6f42c1);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-size: calc(var(--dice-size) * 0.5);
    font-weight: 900;
    line-height: 1;
}

.dice-face.is-result {
    box-shadow: 0 0 1.6rem 0.4rem rgba(255, 193, 7, 0.65);
}

.dice-face.is-result::before {
    border: 3px solid #ffc107;
}

.dice-shadow {
    position: absolute;
    top: calc(50% + var(--dice-size) * 0.5);
    left: 50%;
    width: calc(var(--dice-size) * 1.05);
    height: calc(var(--dice-size) * 0.2);
    margin-left: calc(var(--dice-size) * -0.525);
    border-radius: 50%;
    background: radial-gradient(ellipse at center, rgba(30, 10, 60, 0.45), transparent 70%);
    opacity: 0.6;
}

.dice-dialog.is-pending .dice-bouncer {
    animation: dice-wobble 0.32s ease-in-out infinite alternate;
}

.dice-dialog.is-revealed .dice-bouncer {
    animation: dice-pop 0.55s cubic-bezier(0.25, 1.7, 0.5, 1);
}

.dice-burst {
    position: absolute;
    top: 42%;
    left: 50%;
    z-index: 3;
    width: 0;
    height: 0;
    pointer-events: none;
}

.dice-confetti {
    position: absolute;
    top: -6px;
    left: -4px;
    width: 8px;
    height: 12px;
    border-radius: 2px;
    opacity: 0;
    animation: dice-confetti 1.2s cubic-bezier(0.12, 0.75, 0.3, 1) var(--delay, 0ms) forwards;
}

.dice-result {
    min-height: 4.4rem;
}

/* Keep the space while waiting, so the die does not jump when the name appears. */
.dice-result.is-waiting {
    visibility: hidden;
}

.dice-result-emoji {
    color: var(--bs-body-color);
    -webkit-text-fill-color: currentColor;
}

.dice-dialog.is-revealed .dice-result {
    animation: dice-name-in 0.45s cubic-bezier(0.25, 1.6, 0.5, 1);
}

.dice-result-name {
    margin: 0;
    overflow: hidden;
    background: linear-gradient(100deg, var(--app-sofia-accent), #6f42c1 70%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-size: 2.4rem;
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: -0.02em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dice-result-by {
    margin: 0;
    color: var(--bs-secondary-color);
    font-size: 0.9rem;
}

.dice-dialog.is-error .dice-result {
    display: none;
}

.dice-error {
    margin: 0.25rem 0 0.5rem;
    padding: 0.6rem 0.8rem;
    border-radius: 0.75rem;
    background: var(--bs-danger-bg-subtle);
    color: var(--bs-danger-text-emphasis);
    font-size: 0.9rem;
}

.dice-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.6rem;
}

.dice-actions .btn {
    flex: 1 1 0;
    min-width: 0;
    padding-right: 0.5rem;
    padding-left: 0.5rem;
    border-radius: 999px;
    font-weight: 700;
    white-space: nowrap;
}

.dice-again {
    border: 0;
    background: linear-gradient(100deg, var(--app-sofia-accent), #6f42c1);
    box-shadow: 0 0.35rem 0.9rem rgba(111, 66, 193, 0.35);
}

.dice-again:hover,
.dice-again:focus-visible {
    background: linear-gradient(100deg, #c2287a, #5e35a8);
}

.dice-again:disabled {
    background: linear-gradient(100deg, var(--app-sofia-accent), #6f42c1);
    box-shadow: none;
    opacity: 0.45;
}

.dice-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 0.85rem;
    padding-top: 0.7rem;
    border-top: 1px solid var(--bs-border-color-translucent);
    font-size: 0.85rem;
    text-align: left;
}

.dice-sound {
    flex-shrink: 0;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--bs-tertiary-bg);
    font-size: 1.05rem;
    line-height: 1;
}

.dice-shake {
    margin: 0;
    color: var(--bs-secondary-color);
}

.dice-shake[hidden] {
    display: none;
}

.dice-note {
    margin: 0.4rem 0 0;
    color: var(--bs-secondary-color);
    font-size: 0.8rem;
    text-align: left;
}

.dice-toast {
    position: fixed;
    top: calc(env(safe-area-inset-top, 0px) + 3.75rem);
    left: 50%;
    z-index: 1060;
    max-width: calc(100% - 2rem);
    padding: 0.5rem 1rem;
    border-radius: 999px;
    background: var(--bs-emphasis-color);
    color: var(--bs-body-bg);
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transform: translateX(-50%);
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.2);
    animation: dice-toast-in 0.3s ease-out;
}

[data-bs-theme="dark"] .dice-dialog::backdrop {
    background: rgba(0, 0, 0, 0.72);
}

[data-bs-theme="dark"] .dice-card {
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: #241d33;
}

[data-bs-theme="dark"] .dice-stage {
    background: radial-gradient(ellipse at 50% 42%, rgba(169, 142, 218, 0.22), rgba(214, 51, 132, 0.08) 55%, transparent 72%);
}

[data-bs-theme="dark"] .dice-shadow {
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.75), transparent 70%);
}

[data-bs-theme="dark"] .dice-result-name {
    background-image: linear-gradient(100deg, #ff7ab8, #b99cff 70%);
}

@keyframes dice-card-in {
    from { opacity: 0; transform: translateY(1rem) scale(0.94); }
    to { opacity: 1; transform: none; }
}

@keyframes dice-wobble {
    from { transform: translateY(-3%) rotate(-7deg); }
    to { transform: translateY(2%) rotate(7deg); }
}

@keyframes dice-pop {
    0% { transform: scale(1); }
    40% { transform: scale(1.14); }
    100% { transform: scale(1); }
}

@keyframes dice-name-in {
    from { opacity: 0; transform: scale(0.6); }
    to { opacity: 1; transform: none; }
}

@keyframes dice-confetti {
    0% { opacity: 1; transform: translate(0, 0) rotate(0deg); }
    75% { opacity: 1; }
    100% { opacity: 0; transform: translate(var(--dx), calc(var(--dy) + 40px)) rotate(var(--spin)); }
}

@keyframes dice-toast-in {
    from { opacity: 0; transform: translate(-50%, -0.75rem); }
    to { opacity: 1; transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
    .app-topbar-dice,
    .dice-card,
    .dice-dialog.is-pending .dice-bouncer,
    .dice-dialog.is-revealed .dice-bouncer,
    .dice-dialog.is-revealed .dice-result,
    .dice-toast {
        animation: none;
        transition: none;
    }

    .app-topbar-dice:hover,
    .app-topbar-dice:active {
        transform: none;
    }
}
/* End Dice */

/* Links in comments (public/js/links.js, views/link.ejs) ------------------------------------- */
.comment-link {
    overflow-wrap: anywhere;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid currentColor;
}

.comment-link-icon {
    margin-right: 0.2em;
    font-size: 0.85em;
}

.comment-link-host {
    font-weight: 400;
    color: var(--bs-secondary-color);
}

.link-dialog {
    width: min(26rem, calc(100vw - 2rem));
    padding: 0;
    border: 0;
    border-radius: 1rem;
    background: var(--bs-body-bg);
    color: var(--bs-body-color);
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.3);
}

.link-dialog::backdrop {
    background: rgba(10, 6, 20, 0.55);
}

.link-dialog-card {
    padding: 1.25rem;
}

.link-dialog-host,
.link-dialog-note {
    margin-bottom: 0.35rem;
    font-size: 0.85rem;
    color: var(--bs-secondary-color);
}

.link-dialog-title {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.link-dialog-title.is-loading {
    opacity: 0.6;
}

.link-dialog-description {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.link-dialog-url,
.link-card-url {
    margin-bottom: 1rem;
    padding: 0.5rem 0.65rem;
    border-radius: 0.5rem;
    background: var(--bs-tertiary-bg);
    font-size: 0.8rem;
    overflow-wrap: anywhere;
}

.link-dialog-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.link-dialog-actions .btn {
    flex: 1 1 8rem;
}

.link-card-title {
    overflow-wrap: anywhere;
}
