:root {
    color-scheme: dark;
    --page: #23272c;
    --panel: #2f353d;
    --panel-soft: #2c3138;
    --ink: #f8f9fa;
    --muted: #c7cbd1;
    --accent: #d9a441;
    --accent-strong: #f1c40f;
    --danger: #e5484d;
    --warning: #fbc02d;
    --ended: #4d91d8;
    --border: rgba(255, 255, 255, 0.08);
    --shadow: 0 10px 25px rgba(0, 0, 0, 0.45);
}

* {
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: var(--page);
    color: var(--ink);
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
}

button,
input,
select,
textarea {
    font: inherit;
}

a {
    color: inherit;
}

[hidden] {
    display: none !important;
}

.beta-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 5px 16px;
    border-bottom: 1px solid rgba(217, 164, 65, 0.32);
    background: rgba(36, 25, 5, 0.92);
    color: var(--accent-strong);
    font-size: 0.82rem;
    font-weight: 700;
    text-align: center;
}

.site-header {
    position: relative;
    display: grid;
    gap: 10px;
    background: linear-gradient(180deg, #2f353d 0%, #23272c 100%);
    padding: 14px 20px;
    text-align: left;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    max-width: 100%;
}

.site-brand {
    min-width: 0;
    width: 100%;
    text-align: center;
}

.site-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 8px;
    min-width: 0;
    width: 100%;
    order: -1;
    overflow: visible;
}

.site-action-button,
.admin-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    border: 0;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--ink);
    cursor: pointer;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.2s ease, background 0.2s ease;
}

.site-action-button {
    flex: 0 0 auto;
    width: auto;
    min-width: clamp(72px, 10vw, 124px);
    padding: 7px 9px;
    font-size: 0.76rem;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
}

.site-action-button.language-toggle {
    min-width: 48px;
    width: 48px;
    padding-inline: 8px;
}

.site-action-button.repo-link {
    min-width: 42px;
    width: 42px;
    padding: 7px;
}

.repo-link svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.repo-link.is-disabled {
    opacity: 0.58;
}

.site-menu-toggle {
    display: none;
    justify-self: end;
    min-height: 34px;
    padding: 7px 12px;
    border: 0;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--ink);
    cursor: pointer;
    font-weight: 700;
}

.site-action-button:hover,
.site-action-button:focus,
.admin-link:hover,
.admin-link:focus {
    color: var(--accent);
    background: rgba(255, 255, 255, 0.08);
    outline: none;
}

.site-header h1 {
    margin: 0;
    font-size: 2rem;
    font-weight: 500;
    letter-spacing: 0;
    color: var(--accent);
    overflow-wrap: anywhere;
}

.tagline {
    margin: 4px 0 0;
    font-size: 1rem;
    color: var(--muted);
}

.contact-header {
    position: relative;
    min-height: 132px;
    padding-right: 150px;
}

.contact-header-logo {
    position: absolute;
    top: 48px;
    right: 20px;
    width: 112px;
    height: 112px;
    object-fit: contain;
    filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.65));
    pointer-events: none;
}

h2 {
    margin: 0 0 28px;
    text-align: center;
    color: var(--accent);
}

h3 {
    margin: 0 0 14px;
    color: #fff;
    font-weight: 500;
}

p.big,
li.big {
    line-height: 1.8;
    margin: 8px 0;
}

.container {
    width: min(100% - 40px, 1509px);
    margin: 0 auto;
    padding: 30px 0 50px;
}

.hero {
    display: block;
}

.slideshow {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
    background: #15181c;
    box-shadow: var(--shadow);
}

.hero-slider {
    width: 100%;
}

.slide {
    display: none;
    width: 100%;
    height: auto;
}

.slide.active {
    display: block;
}

.slideshow .dots {
    position: absolute;
    bottom: 0;
    left: 50%;
    display: flex;
    gap: 10px;
    transform: translateX(-50%);
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.55);
    border-radius: 12px 12px 0 0;
    backdrop-filter: blur(4px);
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.dot {
    width: 14px;
    height: 14px;
    padding: 0;
    background: rgba(255, 255, 255, 0.65);
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.dot.active,
.dot:hover {
    background: #fff;
    transform: scale(1.2);
}

.profile-pic {
    position: absolute;
    top: 14px;
    right: 18px;
    z-index: 9;
    width: clamp(96px, 13vw, 190px);
    height: clamp(96px, 13vw, 190px);
    object-fit: contain;
    filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.65));
    pointer-events: none;
}

.info,
.gallery {
    background: var(--panel);
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-top: 28px;
}

.operators-section,
.events-section,
.cluster-section {
    margin-top: 56px;
}

.operators-grid,
.activators-grid,
.events-grid,
.gallery-grid {
    display: grid;
    gap: 25px;
}

.operators-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

#crew-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.activators-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.events-grid,
.gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.events-grid[data-layout="single"] {
    grid-template-columns: minmax(0, 1fr);
}

.events-grid[data-layout="multiple"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.events-grid .event-card[hidden] {
    display: none;
}

.gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.operator-card,
.activator-card,
.event-card,
.gallery-card,
.cluster-card {
    background: var(--panel-soft);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.operator-card {
    position: relative;
    --operator-image-height: 260px;
}

.operator-card,
.activator-card,
.event-card,
.gallery-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.operator-card:hover,
.activator-card:hover,
.event-card:hover,
.gallery-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.58);
}

.crew-detail-trigger {
    cursor: pointer;
}

.crew-detail-trigger:focus {
    outline: 2px solid rgba(217, 164, 65, 0.8);
    outline-offset: 4px;
}

.operator-card img {
    width: 100%;
    height: var(--operator-image-height);
    object-fit: cover;
    display: block;
}

.operator-card img.operator-placeholder {
    object-fit: contain;
    padding: 18px;
    background: #1f2328;
}

.operator-content,
.event-content {
    padding: 20px;
}

.event-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.event-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
}

.operator-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin-bottom: 10px;
}

.operator-name {
    font-size: 1.15rem;
    font-weight: 700;
}

.callsign {
    background: #1f2328;
    padding: 5px 10px;
    border-radius: 6px;
    font-weight: 700;
    color: var(--accent-strong);
    letter-spacing: 1px;
    white-space: nowrap;
}

.callsign a {
    color: var(--accent-strong);
    text-decoration: none;
}

.callsign a:hover {
    text-decoration: underline;
}

.operator-content p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--muted);
}

.more-about {
    position: absolute;
    top: calc(var(--operator-image-height) - 38px);
    right: 10px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 9px;
    border-radius: 6px;
    background: rgba(31, 35, 40, 0.84);
    color: var(--accent-strong);
    font-size: 0.86rem;
    font-weight: 700;
}

.activators-section {
    margin-top: 40px;
}

.ended-events-section {
    margin-top: 40px;
}

.ended-events-actions {
    display: flex;
    justify-content: center;
    margin: 0 0 18px;
}

.section-heading-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.section-heading-row h2 {
    margin: 0;
    text-align: left;
}

.activator-card {
    display: grid;
    justify-items: center;
    gap: 8px;
    padding: 16px 12px;
    text-align: center;
}

.activator-avatar {
    position: relative;
    container-type: inline-size;
    width: 148px;
    max-width: 100%;
    aspect-ratio: 1;
}

.activator-card .activator-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid rgba(217, 164, 65, 0.55);
    background: #1f2328;
}

.activator-card .activator-avatar-placeholder img {
    object-fit: contain;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.activator-badge-callsign {
    display: none;
    position: absolute;
    top: 51%;
    left: 18%;
    width: 64%;
    transform: translateY(-50%);
    color: #fff;
    font-family: monospace;
    font-size: min(14px, calc(90cqi / var(--callsign-length, 5)));
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0;
    white-space: nowrap;
    text-shadow: 0 1px 2px #000;
    pointer-events: none;
}

.activator-avatar-placeholder .activator-badge-callsign {
    display: block;
}

.activator-callsign {
    color: var(--accent-strong);
    font-weight: 800;
    letter-spacing: 0.08em;
}

.activator-name {
    color: var(--muted);
    font-size: 0.95rem;
}

.dynamic-empty {
    grid-column: 1 / -1;
    margin: 0;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--muted);
    text-align: center;
}

.event-card {
    background: var(--panel);
}

.event-card.live {
    box-shadow: var(--shadow), 0 0 0 1px rgba(229, 72, 77, 0.3);
}

.event-card.incoming {
    box-shadow: var(--shadow), 0 0 0 1px rgba(251, 192, 45, 0.25);
}

.event-image {
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.event-placeholder-image {
    background-size: contain;
    background-repeat: no-repeat;
    background-color: #1f2328;
}

.event-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.2));
}

.events-grid .event-image {
    height: auto;
    flex-shrink: 0;
}

.events-grid .event-image::after {
    content: none;
}

.events-grid .event-image img {
    display: block;
    width: 100%;
    height: auto;
}

.events-grid[data-layout="multiple"] .event-image {
    aspect-ratio: 16 / 9;
}

.events-grid[data-layout="multiple"] .event-image img {
    height: 100%;
    object-fit: cover;
}

.events-grid .event-placeholder-image img {
    max-height: 320px;
    object-fit: contain;
}

.events-grid .event-card {
    min-width: 0;
}

.events-grid .event-content {
    overflow-wrap: anywhere;
}

.event-content h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.status-ribbon {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 7px 12px;
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #fff;
    background: var(--ended);
    border-radius: 6px;
}

.event-card.live .status-ribbon {
    background: var(--danger);
}

.event-card.incoming .status-ribbon {
    background: var(--warning);
    color: #222;
}

.event-counter {
    color: var(--muted);
    min-height: 1.4em;
}

.event-announcement {
    align-self: stretch;
    min-width: 0;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.event-announcement[hidden],
.event-card.ended .event-announcement {
    display: none;
}

.event-announcement h4 {
    margin: 0 0 8px;
    font-size: 1rem;
    color: var(--accent);
}

.event-announcement p {
    margin: 0;
    color: var(--muted);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    line-height: 1.5;
}

.event-btn,
.cluster-post-btn,
.cluster-form button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 9px 16px;
    border: 0;
    border-radius: 6px;
    background: var(--accent);
    color: #23272c;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.event-btn {
    margin-top: auto;
}

.event-btn:hover,
.cluster-post-btn:hover,
.cluster-form button:hover {
    background: var(--accent-strong);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(217, 164, 65, 0.55);
}

.vote {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 14px;
    font-size: 0.9rem;
}

.vote button {
    flex: 1;
    padding: 7px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #1f2328;
    color: var(--ink);
    cursor: pointer;
}

.vote button:hover,
.vote button.active {
    border-color: rgba(217, 164, 65, 0.8);
}

.vote button:disabled {
    cursor: not-allowed;
    opacity: 0.65;
}

.vote.locked {
    opacity: 0.72;
}

.vote-bar {
    height: 8px;
    background: #444;
    border-radius: 10px;
    margin-top: 8px;
    overflow: hidden;
}

.vote-fill {
    height: 100%;
    width: 0%;
    background: var(--accent);
    border-radius: 10px;
    transition: width 0.6s ease;
}

.vote-percent,
.event-content small {
    display: block;
    margin-top: 5px;
    font-size: 0.8rem;
    color: #aaa;
}

.gallery-card {
    position: relative;
    aspect-ratio: 1 / 1;
}

.gallery-card a,
.gallery-card img {
    display: block;
    width: 100%;
    height: 100%;
}

.gallery-card img {
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-card:hover img {
    transform: scale(1.05);
}

.gallery-card.is-broken {
    background: #1f2328;
}

.gallery-card.is-broken:hover img {
    transform: none;
}

.gallery-fallback-image {
    padding: 42px;
    object-fit: contain !important;
    opacity: 0.85;
}

.gallery-caption-text {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 8px 10px;
    background: rgba(0, 0, 0, 0.68);
    color: var(--ink);
    font-size: 0.9rem;
    font-weight: 700;
    text-align: center;
}

.archived-event-card .gallery-caption-text {
    background: rgba(31, 35, 40, 0.82);
}

.contact-section h3 {
    margin-top: 18px;
}

.contact-page {
    min-height: calc(100vh - 170px);
    display: grid;
    align-items: start;
}

.highlight {
    color: var(--accent);
    font-weight: 700;
}

.cluster-section {
    width: min(100% - 40px, 1509px);
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 50px;
}

.cluster-section:focus {
    outline: 2px solid rgba(217, 164, 65, 0.55);
    outline-offset: 8px;
}

.cluster-auth-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 auto 20px;
}

.cluster-post-btn.secondary {
    background: #444;
    color: #fff;
}

.cluster-post-btn.secondary:hover {
    background: #555;
    color: #fff;
}

.cluster-status {
    width: min(100%, 620px);
    margin: 0 auto 20px;
    padding: 10px 14px;
    border: 1px solid rgba(251, 192, 45, 0.35);
    border-radius: 6px;
    background: rgba(251, 192, 45, 0.1);
    color: var(--warning);
    text-align: center;
}

.cluster-feed {
    display: grid;
    gap: 15px;
}

.cluster-card {
    position: relative;
    padding: 16px 18px;
    border-left: 4px solid var(--accent);
    overflow: visible;
}

.cluster-card.can-edit {
    padding-right: 150px;
}

.cluster-card.live {
    border-left-color: var(--danger);
    box-shadow: var(--shadow), 0 0 12px rgba(229, 72, 77, 0.18);
}

.cluster-card.planned {
    border-left-color: var(--warning);
}

.cluster-callsign {
    font-weight: 700;
    color: #fff;
}

.cluster-details,
.cluster-meta {
    color: var(--muted);
}

.cluster-meta {
    margin-top: 8px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.cluster-card p {
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.cluster-actions {
    position: absolute;
    top: 16px;
    right: 18px;
    z-index: 8;
}

.cluster-actions[open] {
    z-index: 1100;
}

body.cluster-menu-open .cluster-actions:not([open]) summary {
    visibility: hidden;
    pointer-events: none;
}

.cluster-actions summary {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: 6px;
    background: #444;
    color: #fff;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 700;
    list-style: none;
}

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

.cluster-action-menu {
    position: fixed;
    display: grid;
    gap: 6px;
    width: min(176px, calc(100vw - 24px));
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #1f2328;
    box-shadow: var(--shadow);
    z-index: 10000;
    overflow: hidden;
}

.cluster-action-menu button {
    min-height: 34px;
    width: 100%;
    padding: 6px 12px;
    border: 0;
    border-radius: 6px;
    background: #444;
    color: #fff;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.2s ease, color 0.2s ease;
}

.cluster-actions summary:hover,
.cluster-action-menu button:hover {
    background: var(--accent);
    color: #23272c;
}

.cluster-modal {
    position: fixed;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
}

.cluster-form {
    width: min(100%, 380px);
    max-height: calc(100vh - 40px);
    overflow: auto;
    display: grid;
    gap: 8px;
    background: var(--panel);
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
}

.rd-helper-panel {
    width: min(100%, 420px);
    display: grid;
    gap: 14px;
    background: var(--panel);
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
}

.rd-helper-panel h3 {
    margin: 0;
    font-size: 1.35rem;
}

.rd-helper-panel p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

.rd-mobile-help {
    padding: 10px 12px;
    border: 1px solid rgba(217, 164, 65, 0.35);
    border-radius: 6px;
    background: rgba(217, 164, 65, 0.08);
}

.rd-bookmarklet {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border-radius: 6px;
    background: var(--warning);
    color: #23272c;
    font-weight: 700;
    text-decoration: none;
}

.cluster-form label {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
}

.cluster-form input,
.cluster-form textarea,
.cluster-form select {
    width: 100%;
    min-height: 42px;
    padding: 10px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: #1f2328;
    color: #fff;
}

.cluster-form input:focus,
.cluster-form textarea:focus,
.cluster-form select:focus {
    outline: none;
    border-color: rgba(217, 164, 65, 0.9);
}

.cluster-form textarea {
    resize: vertical;
}

.cluster-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.cluster-form-actions button {
    flex: 1 1 110px;
}

.cluster-form button.danger {
    background: var(--danger);
    color: #fff;
}

.cluster-form button.danger:hover {
    background: #ff686d;
    color: #fff;
}

.cluster-note {
    margin: 8px 0 0;
    color: var(--warning);
    font-size: 0.9rem;
}

#lightbox-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 18px;
    padding: 24px 76px;
    background: rgba(0, 0, 0, 0.92);
    z-index: 9998;
}

.lightbox-panel {
    width: min(100%, 920px);
    max-height: 88vh;
    display: grid;
    grid-template-rows: auto auto auto;
    margin: 0;
    overflow: auto;
    border: 1px solid rgba(217, 164, 65, 0.35);
    border-radius: 8px;
    background: #1f2328;
    box-shadow: 0 0 25px rgba(217, 164, 65, 0.45);
}

#lightbox-overlay img {
    width: 100%;
    max-height: min(58vh, 560px);
    object-fit: contain;
    background: #121417;
}

.lightbox-caption {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 34vh;
    overflow: auto;
    padding: 16px 18px;
    color: var(--muted);
    line-height: 1.5;
}

.lightbox-caption strong {
    color: var(--accent);
    font-size: 1.15rem;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.lightbox-caption span {
    overflow-wrap: anywhere;
}

.lightbox-thumbnails {
    box-sizing: border-box;
    position: relative;
    display: flex;
    flex-shrink: 0;
    gap: 8px;
    width: 100%;
    min-width: 0;
    padding: 6px 18px 14px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
}

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

.lightbox-panel:has(.lightbox-thumbnails:not([hidden])) #lightbox-img {
    max-height: min(58vh, 560px, max(100px, calc(84dvh - 190px)));
}

.lightbox-panel:has(.lightbox-thumbnails:not([hidden])) .lightbox-caption {
    max-height: min(34vh, 100px);
}

.lightbox-thumbnail {
    box-sizing: border-box;
    flex: 0 0 72px;
    width: 72px;
    height: 64px;
    padding: 3px;
    border: 2px solid transparent;
    border-radius: 4px;
    background: #121417;
    cursor: pointer;
}

#lightbox-overlay .lightbox-thumbnail img {
    display: block;
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: contain;
}

.lightbox-thumbnail.is-active {
    border-color: var(--accent);
}

.lightbox-thumbnail:hover,
.lightbox-thumbnail:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

.lightbox-link {
    justify-self: start;
    margin-top: 4px;
    padding: 8px 12px;
    border-radius: 6px;
    background: var(--accent);
    color: #23272c;
    font-weight: 700;
    text-decoration: none;
}

.lightbox-link:hover {
    background: var(--accent-strong);
}

#lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    cursor: pointer;
    font-size: 2rem;
    line-height: 1;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    width: 46px;
    height: 64px;
    border: 0;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    cursor: pointer;
    font-size: 3rem;
    line-height: 1;
    transform: translateY(-50%);
}

.lightbox-nav:hover,
#lightbox-close:hover {
    background: var(--accent);
    color: #23272c;
}

#lightbox-prev {
    left: 20px;
}

#lightbox-next {
    right: 20px;
}

footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 20px 40px;
    background: var(--panel);
    color: var(--muted);
    font-size: 0.95rem;
}

.footer-left,
.footer-right,
.footer-visitors {
    display: flex;
    align-items: center;
}

.footer-visitors {
    gap: 6px;
}

.footer-left,
.footer-right,
.footer-links {
    flex-wrap: wrap;
    min-width: 0;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 10px 18px;
}

.footer-links a,
.footer-links button,
.designer-highlight {
    text-decoration: underline;
    text-underline-offset: 4px;
    overflow-wrap: anywhere;
}

.footer-links button {
    border: 0;
    background: transparent;
    color: var(--muted);
    padding: 0;
    font: inherit;
    cursor: pointer;
}

.privacy-page {
    max-width: 1000px;
    padding-bottom: 32px;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.privacy-page h2 {
    font-size: 1.75rem;
}

.privacy-page h3 {
    font-size: 1.25rem;
    margin-top: 28px;
}

.privacy-page a,
.privacy-preferences a {
    color: var(--accent);
}

.privacy-preferences {
    position: fixed;
    inset: auto 0 0;
    z-index: 1600;
    max-height: 65dvh;
    overflow: auto;
    padding: 18px 24px;
    border-top: 1px solid var(--accent);
    background: var(--panel);
    box-shadow: var(--shadow);
}

.privacy-preferences h2 {
    margin: 0 0 8px;
    font-size: 1.125rem;
}

.privacy-preferences p {
    max-width: 900px;
    margin: 0 0 12px;
    line-height: 1.5;
}

.privacy-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.privacy-actions button {
    min-height: 42px;
    max-width: 100%;
    padding: 8px 14px;
    border: 1px solid var(--accent);
    border-radius: 6px;
    background: #23272c;
    color: var(--ink);
    font: inherit;
    white-space: normal;
    cursor: pointer;
}

.privacy-actions button:hover {
    color: var(--accent-strong);
}

.footer-partners {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 18px;
    min-width: 0;
    max-width: 100%;
}

.footer-partners[hidden] {
    display: none;
}

.footer-partners a {
    color: var(--ink);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 4px;
    overflow-wrap: anywhere;
}

.footer-partners a:hover {
    color: var(--accent-strong);
}

.footer-partners a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}

#visitors-count,
.designer-highlight {
    color: var(--accent);
    font-weight: 700;
}

@media screen and (max-width: 1320px) {
    .site-header {
        gap: 8px;
        padding: 10px 12px;
        text-align: center;
    }

    .site-brand {
        min-width: 0;
        padding: 0 64px;
    }

    .site-header h1 {
        font-size: clamp(1.35rem, 4vw, 1.8rem);
    }

    .site-actions {
        display: none;
        width: 100%;
        justify-content: stretch;
        order: 1;
    }

    .site-header.menu-open .site-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .site-action-button {
        min-width: 0;
        width: 100%;
        min-height: 32px;
        padding: 6px 9px;
        font-size: 0.72rem;
    }

    .site-menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: 10px;
        right: 12px;
    }

    .contact-header {
        min-height: 118px;
        padding-right: 112px;
    }

    .contact-header-logo {
        top: 42px;
        right: 12px;
        width: 86px;
        height: 86px;
    }

    .container,
    .cluster-section {
        width: min(100% - 24px, 1509px);
    }

    .container {
        padding-top: 16px;
    }

    .profile-pic {
        top: 10px;
        right: 12px;
        width: 120px;
        height: 120px;
    }

    .operators-section,
    .activators-section,
    .events-section,
    .cluster-section {
        margin-top: 42px;
    }

    h2 {
        font-size: 1.5rem;
    }

    p.big,
    li.big {
        line-height: 1.55;
    }

    .info,
    .gallery {
        padding: 18px;
    }

    .operators-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
    }

    #crew-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .events-grid,
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 18px;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    }

    .operator-card:hover,
    .activator-card:hover,
    .event-card:hover,
    .gallery-card:hover {
        transform: none;
    }

    .operator-card {
        --operator-image-height: 220px;
    }

    .event-image {
        height: 180px;
    }

    .cluster-card {
        padding: 14px;
    }

    .cluster-card.can-edit {
        padding-right: 118px;
    }

    .cluster-action-menu button {
        min-height: 40px;
    }

    .cluster-modal {
        align-items: flex-start;
        padding: 12px;
        overflow-y: auto;
    }

    .cluster-form,
    .rd-helper-panel {
        width: 100%;
        max-height: none;
        padding: 18px;
    }

    footer {
        flex-direction: column;
        align-items: flex-start;
        padding: 18px 24px;
    }
}

@media screen and (max-width: 760px) {
    .events-grid[data-layout] {
        grid-template-columns: minmax(0, 1fr);
    }

    .activators-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media screen and (max-width: 480px) {
    .site-action-button {
        min-width: 0;
        min-height: 30px;
        padding: 5px 8px;
        font-size: 0.68rem;
    }

    .site-header.menu-open .site-actions {
        grid-template-columns: 1fr;
    }

    .contact-header {
        min-height: 104px;
        padding-right: 82px;
    }

    .contact-header-logo {
        top: 42px;
        right: 8px;
        width: 66px;
        height: 66px;
    }

    .site-header h1 {
        font-size: 1.35rem;
        line-height: 1.1;
    }

    .site-brand {
        padding: 0 56px 0 0;
    }

    .tagline {
        font-size: 0.92rem;
    }

    .slideshow .dots {
        gap: 7px;
        padding: 6px 10px;
    }

    .dot {
        width: 10px;
        height: 10px;
    }

    .profile-pic {
        top: 8px;
        right: 8px;
        width: 72px;
        height: 72px;
    }

    .operators-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    #crew-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .events-grid {
        grid-template-columns: 1fr;
    }

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

    .activators-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .activator-avatar {
        width: 120px;
    }

    .activator-badge-callsign {
        font-size: min(12px, calc(90cqi / var(--callsign-length, 5)));
    }

    .operator-content,
    .event-content {
        padding: 12px;
    }

    .operator-card {
        --operator-image-height: 150px;
    }

    .operator-name {
        font-size: 0.92rem;
    }

    .callsign {
        padding: 4px 6px;
        font-size: 0.72rem;
    }

    .more-about {
        right: 6px;
        min-height: 24px;
        padding: 4px 6px;
        font-size: 0.66rem;
    }

    .event-image {
        height: 160px;
    }

    .gallery-fallback-image {
        padding: 18px;
    }

    .gallery-caption-text {
        padding: 6px;
        font-size: 0.72rem;
    }

    .operator-header,
    .vote {
        flex-direction: column;
        align-items: flex-start;
    }

    .callsign {
        max-width: 100%;
        white-space: normal;
        letter-spacing: 0.04em;
        overflow-wrap: anywhere;
    }

    .vote button {
        width: 100%;
        min-height: 42px;
    }

    .cluster-auth-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .cluster-post-btn {
        width: 100%;
    }

    .cluster-form,
    .rd-helper-panel {
        padding: 16px;
    }

    .cluster-form-actions {
        grid-template-columns: 1fr;
    }

    #lightbox-overlay {
        padding: 58px 12px 18px;
    }

    .lightbox-panel {
        max-height: 84vh;
    }

    #lightbox-overlay img {
        max-height: 58vh;
    }

    .lightbox-caption {
        padding: 12px;
    }

    .lightbox-nav {
        top: auto;
        bottom: 18px;
        width: 44px;
        height: 44px;
        font-size: 2.2rem;
        transform: none;
    }

    #lightbox-prev {
        left: 16px;
    }

    #lightbox-next {
        right: 16px;
    }
}

@media screen and (max-width: 360px) {
    .site-header {
        padding: 12px;
    }

    .site-header h1 {
        font-size: 1.2rem;
    }

    .container,
    .cluster-section {
        width: min(100% - 16px, 1509px);
    }

    .profile-pic {
        width: 60px;
        height: 60px;
    }

}
