.rotary-media-shell {
    --rotary-blue: #005daa;
    --rotary-gold: #f7a81b;
    --rotary-green: #166534;
    --rotary-ink: #1d2a36;
    --rotary-muted: #5e6b7a;
    --rotary-line: #d8dee8;
    color: var(--rotary-ink);
    margin: 0 auto;
    max-width: 1180px;
    padding: 28px 16px;
}

.rotary-login-panel {
    --rotary-blue: #005daa;
    --rotary-green: #166534;
    --rotary-ink: #1d2a36;
    --rotary-line: #d8dee8;
    background: #ffffff;
    border: 1px solid var(--rotary-line);
    border-radius: 8px;
    color: var(--rotary-ink);
    font-size: 14px;
    max-width: 360px;
    padding: 12px;
}

.rotary-login-panel form {
    display: grid;
    gap: 8px;
}

.rotary-login-panel label {
    display: grid;
    gap: 4px;
}

.rotary-login-panel span {
    font-weight: 700;
}

.rotary-login-panel input {
    border: 1px solid #b8c2cf;
    border-radius: 6px;
    min-height: 38px;
    padding: 7px 9px;
}

.rotary-login-panel__user {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: space-between;
    margin-bottom: 8px;
}

.rotary-member-alert {
    background: #f3faf5;
    border-left: 4px solid var(--rotary-green);
    margin: 8px 0;
    padding: 8px 10px;
}

.rotary-member-alert--quiet {
    background: #f7f9fb;
    border-color: var(--rotary-line);
}

.rotary-login-panel__links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.rotary-login-panel__links a {
    color: var(--rotary-blue);
    font-weight: 700;
}

.rotary-login-panel__hint {
    color: #5e6b7a;
    margin: 8px 0 0;
}

.rotary-media-header {
    border-bottom: 1px solid var(--rotary-line);
    margin-bottom: 20px;
    padding-bottom: 14px;
}

.rotary-media-header--split {
    align-items: center;
    display: flex;
    gap: 16px;
    justify-content: space-between;
}

.rotary-media-header h2,
.rotary-dashboard h3 {
    color: var(--rotary-ink);
    letter-spacing: 0;
    margin: 0;
}

.rotary-media-header h2 {
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.12;
}

.rotary-dashboard h3 {
    font-size: 22px;
    margin-bottom: 14px;
}

.rotary-section-heading {
    border-top: 1px solid var(--rotary-line);
    margin-top: 24px !important;
    padding-top: 18px;
}

.rotary-notice {
    border-left: 4px solid var(--rotary-blue);
    margin: 0 0 16px;
    padding: 12px 14px;
}

.rotary-notice--success {
    background: #f3faf5;
    border-color: var(--rotary-green);
}

.rotary-notice--error {
    background: #fff5f5;
    border-color: #b91c1c;
}

.rotary-upload-form {
    background: #ffffff;
    border: 1px solid var(--rotary-line);
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(23, 36, 52, 0.06);
    display: grid;
    gap: 14px;
    padding: 18px;
}

.rotary-upload-form label {
    display: grid;
    gap: 6px;
}

.rotary-upload-form span {
    color: #384657;
    font-size: 14px;
    font-weight: 700;
}

.rotary-upload-form input,
.rotary-upload-form textarea,
.rotary-gallery-tools input,
.rotary-gallery-tools select {
    border: 1px solid #b8c2cf;
    border-radius: 6px;
    box-sizing: border-box;
    min-height: 42px;
    padding: 9px 11px;
    width: 100%;
}

.rotary-upload-form textarea {
    min-height: 92px;
}

.rotary-form-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rotary-button {
    align-items: center;
    background: #ffffff;
    border: 1px solid #9aa8b8;
    border-radius: 6px;
    color: #1f3448;
    cursor: pointer;
    display: inline-flex;
    font-size: 14px;
    font-weight: 700;
    justify-content: center;
    line-height: 1.2;
    min-height: 40px;
    padding: 9px 13px;
    text-decoration: none;
}

.rotary-button--primary {
    background: var(--rotary-blue);
    border-color: var(--rotary-blue);
    color: #ffffff;
}

.rotary-button:disabled {
    cursor: wait;
    opacity: 0.65;
}

.rotary-upload-progress {
    color: var(--rotary-muted);
    font-size: 14px;
    font-weight: 700;
}

.rotary-dashboard-grid {
    display: grid;
    gap: 22px;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
}

.rotary-pending-list {
    display: grid;
    gap: 14px;
}

.rotary-pending-item {
    background: #ffffff;
    border: 1px solid var(--rotary-line);
    border-radius: 8px;
    display: grid;
    gap: 14px;
    grid-template-columns: 160px minmax(0, 1fr);
    padding: 14px;
}

.rotary-pending-item h4 {
    font-size: 18px;
    margin: 0 0 6px;
}

.rotary-pending-item p {
    color: var(--rotary-muted);
    margin: 0 0 8px;
}

.rotary-meta-list {
    display: grid;
    gap: 4px 10px;
    grid-template-columns: max-content minmax(0, 1fr);
    margin: 8px 0 12px;
}

.rotary-meta-list dt {
    color: #384657;
    font-weight: 700;
}

.rotary-meta-list dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.rotary-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.rotary-actions form {
    margin: 0;
}

.rotary-gallery-tools {
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(240px, 1fr) 210px;
    margin-bottom: 16px;
}

.rotary-view-toggle {
    background: #eef3f8;
    border: 1px solid var(--rotary-line);
    border-radius: 8px;
    display: inline-flex;
    padding: 3px;
}

.rotary-view-toggle button {
    background: transparent;
    border: 0;
    border-radius: 6px;
    color: #384657;
    cursor: pointer;
    font-weight: 700;
    min-height: 34px;
    padding: 7px 12px;
}

.rotary-view-toggle button.is-active {
    background: var(--rotary-blue);
    color: #ffffff;
}

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

.rotary-gallery[data-view="cards"] .rotary-gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rotary-gallery-item {
    background: #ffffff;
    border: 1px solid var(--rotary-line);
    border-radius: 8px;
    overflow: hidden;
}

.rotary-image-button {
    background: #ffffff;
    border: 0;
    color: inherit;
    cursor: pointer;
    display: block;
    padding: 0;
    position: relative;
    text-align: left;
    width: 100%;
}

.rotary-image-button img {
    aspect-ratio: 4 / 3;
    display: block;
    height: auto;
    object-fit: cover;
    width: 100%;
}

.rotary-image-button video {
    aspect-ratio: 4 / 3;
    background: #0f1720;
    display: block;
    height: auto;
    object-fit: cover;
    width: 100%;
}

.rotary-media-placeholder {
    align-items: center;
    aspect-ratio: 4 / 3;
    background: #f1f5f9;
    color: var(--rotary-ink);
    display: flex;
    flex-direction: column;
    font-weight: 700;
    gap: 8px;
    justify-content: center;
    min-height: 140px;
    padding: 16px;
    text-align: center;
}

.rotary-media-type {
    background: var(--rotary-blue);
    border-radius: 999px;
    color: #ffffff;
    display: inline-flex;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    padding: 7px 10px;
}

.rotary-gallery-caption {
    background: linear-gradient(0deg, rgba(0, 41, 77, 0.88), rgba(0, 41, 77, 0.1));
    bottom: 0;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    left: 0;
    line-height: 1.35;
    padding: 40px 10px 10px;
    position: absolute;
    right: 0;
}

.rotary-gallery[data-view="cards"] .rotary-gallery-caption {
    background: #ffffff;
    color: var(--rotary-ink);
    display: block;
    min-height: 74px;
    padding: 12px;
    position: static;
}

.rotary-modal {
    align-items: center;
    background: rgba(12, 20, 28, 0.82);
    display: none;
    inset: 0;
    justify-content: center;
    padding: 20px;
    position: fixed;
    z-index: 99999;
}

.rotary-modal.is-open {
    display: flex;
}

.rotary-modal__panel {
    background: #ffffff;
    border-radius: 8px;
    max-height: 92vh;
    max-width: 920px;
    overflow: auto;
    position: relative;
    width: min(920px, 100%);
}

.rotary-modal__close {
    background: #ffffff;
    border: 1px solid var(--rotary-line);
    border-radius: 999px;
    color: var(--rotary-ink);
    cursor: pointer;
    font-size: 22px;
    height: 38px;
    line-height: 1;
    position: absolute;
    right: 10px;
    top: 10px;
    width: 38px;
}

.rotary-modal img,
.rotary-modal video {
    display: block;
    max-height: 76vh;
    object-fit: contain;
    width: 100%;
}

.rotary-modal__audio {
    align-items: center;
    background: #f1f5f9;
    display: flex;
    min-height: 220px;
    padding: 28px;
}

.rotary-modal audio {
    width: 100%;
}

.rotary-modal p {
    margin: 0;
    padding: 12px 14px 16px;
}

@media (max-width: 940px) {
    .rotary-dashboard-grid,
    .rotary-gallery[data-view="cards"] .rotary-gallery-grid {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 640px) {
    .rotary-media-header--split,
    .rotary-gallery-tools,
    .rotary-form-grid,
    .rotary-pending-item {
        grid-template-columns: 1fr;
    }

    .rotary-media-header--split {
        align-items: stretch;
        display: grid;
    }

    .rotary-gallery-grid {
        grid-template-columns: 1fr;
    }
}
