:root {
    --ink: #151515;
    --muted: #666a70;
    --line: #dde1e4;
    --paper: #f7f8f8;
    --surface: #ffffff;
    --teal: #087f78;
    --teal-dark: #045c58;
    --red: #e03a5a;
    --amber: #f4b740;
    --blue: #255ec7;
    --shadow: 0 16px 40px rgba(18, 24, 31, .08);
    --radius: 8px;
    color-scheme: light;
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

html {
    min-height: 100%;
    background: var(--paper);
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: 0;
}

button,
input,
select,
textarea {
    font: inherit;
    letter-spacing: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.home-page {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    background:
        radial-gradient(circle at top left, rgba(244, 183, 64, .18), transparent 28rem),
        linear-gradient(135deg, #f9faf9 0%, #eef3f2 42%, #f7f8f8 100%);
}

.home-page.has-custom-background {
    background:
        linear-gradient(90deg, rgba(247, 248, 248, .78), rgba(247, 248, 248, .62)),
        var(--home-background) center / cover fixed no-repeat;
}

.home-page.has-custom-background::before {
    content: none;
}

.contest-sidebar {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
    height: 100vh;
    padding: 28px;
    overflow-y: auto;
    color: #f7f8f8;
    background:
        linear-gradient(180deg, rgba(17, 22, 23, .96), rgba(10, 54, 52, .96)),
        linear-gradient(135deg, var(--teal), #101010);
}

.home-page.has-sidebar-background .contest-sidebar {
    background:
        linear-gradient(180deg, rgba(8, 17, 18, .72), rgba(6, 47, 44, .68)),
        var(--sidebar-background) center / cover no-repeat;
}

.brand-block {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
}

.site-mark,
.site-logo,
.login-logo {
    width: 58px;
    height: 58px;
    border-radius: var(--radius);
    object-fit: contain;
    background: #fff;
}

.site-mark {
    display: grid;
    place-items: center;
    color: var(--teal-dark);
    font-weight: 900;
    border: 1px solid rgba(255, 255, 255, .4);
}

.brand-caption,
.overline {
    margin: 0 0 4px;
    color: var(--teal);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.contest-sidebar .brand-caption {
    color: var(--amber);
}

.brand-block h1,
.gallery-header h2,
.admin-header h1,
.login-panel h1 {
    margin: 0;
    font-size: 28px;
    line-height: 1.08;
}

.upload-panel,
.login-panel,
.admin-form,
.admin-side-note,
.profile-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.upload-panel {
    display: grid;
    gap: 8px;
    padding: 12px 14px;
    color: var(--ink);
}

.upload-panel .field-group {
    gap: 4px;
}

.upload-panel input,
.upload-panel select,
.upload-panel textarea,
.upload-panel .unit-combobox-button {
    min-height: 38px;
    padding: 8px 10px;
}

.upload-panel .icon-label {
    font-size: 12px;
}

.voting-window-notice {
    margin: -8px 4px 0;
    color: rgba(247, 248, 248, .86);
    font-size: 12px;
    font-weight: 650;
    line-height: 1.45;
    text-align: center;
}

.voting-window-notice strong {
    color: #fff;
    font-weight: 950;
}

.voting-window-notice.is-closed {
    color: rgba(255, 236, 220, .94);
}

.field-group {
    display: grid;
    gap: 7px;
}

.field-group label {
    color: #303237;
    font-size: 13px;
    font-weight: 800;
}

.icon-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.icon-label svg {
    width: 16px;
    height: 16px;
    color: var(--teal);
    stroke-width: 2.3;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid #cfd6d9;
    border-radius: 7px;
    padding: 11px 12px;
    color: var(--ink);
    background: #fff;
    outline: none;
    transition: border-color .16s ease, box-shadow .16s ease;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(8, 127, 120, .14);
}

.native-unit-select {
    display: none;
}

.unit-combobox {
    position: relative;
}

.unit-combobox-button {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 20px;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 44px;
    border: 1px solid #cfd6d9;
    border-radius: 7px;
    padding: 11px 12px;
    color: var(--ink);
    text-align: left;
    background: #fff;
    cursor: pointer;
    transition: border-color .16s ease, box-shadow .16s ease;
}

.unit-combobox-button span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.unit-combobox-button svg {
    width: 18px;
    height: 18px;
    color: var(--teal);
    transition: transform .16s ease;
}

.unit-combobox.is-open .unit-combobox-button,
.unit-combobox-button:focus-visible {
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(8, 127, 120, .14);
    outline: none;
}

.unit-combobox.is-open .unit-combobox-button svg {
    transform: rotate(180deg);
}

.unit-combobox-list {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    left: 0;
    z-index: 40;
    max-height: calc(12 * 38px + 16px);
    padding: 7px;
    overflow-y: auto;
    overscroll-behavior: contain;
    border: 1px solid rgba(8, 127, 120, .22);
    border-radius: 8px;
    background: rgba(251, 253, 253, .98);
    box-shadow: 0 18px 38px rgba(16, 24, 28, .18);
}

.unit-combobox-option {
    display: block;
    width: 100%;
    height: 38px;
    border: 0;
    border-radius: 6px;
    padding: 8px 10px;
    overflow: hidden;
    color: #202328;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
    background: transparent;
    cursor: pointer;
}

.unit-combobox-option:hover,
.unit-combobox-option:focus-visible {
    background: rgba(8, 127, 120, .1);
    outline: none;
}

.unit-combobox-option.is-selected {
    color: var(--teal-dark);
    background: rgba(8, 127, 120, .16);
    font-weight: 850;
}

input[type="file"] {
    padding: 10px;
    background: #fbfcfc;
}

.visually-hidden-file {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.file-picker {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    min-height: 48px;
    border: 1px dashed rgba(8, 127, 120, .42);
    border-radius: var(--radius);
    padding: 7px 10px;
    cursor: pointer;
    background:
        linear-gradient(135deg, rgba(8, 127, 120, .09), rgba(244, 183, 64, .09)),
        #fbfdfd;
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.file-picker:hover {
    border-color: var(--teal);
    box-shadow: 0 12px 26px rgba(8, 127, 120, .12);
    transform: translateY(-1px);
}

.file-picker-icon {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: #fff;
    background: var(--teal);
}

.file-picker-icon svg {
    width: 20px;
    height: 20px;
}

.file-picker strong,
.file-picker small {
    display: block;
}

.file-picker strong {
    font-size: 14px;
}

.file-picker small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px;
}

.file-picker small:empty,
.file-picker small[hidden] {
    display: none;
}

.input-help {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.description-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 32px;
    border: 1px solid rgba(8, 127, 120, .24);
    border-radius: 7px;
    color: var(--teal-dark);
    background: rgba(8, 127, 120, .08);
    cursor: pointer;
    font-size: 13px;
    font-weight: 850;
}

.album-mode-panel {
    display: grid;
    gap: 7px;
    border: 1px solid rgba(8, 127, 120, .2);
    border-radius: 8px;
    padding: 9px 10px;
    color: var(--teal-dark);
    font-size: 12px;
    background: rgba(239, 249, 247, .9);
}

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

.album-mode-panel strong {
    font-size: 12px;
}

.album-mode-panel label {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #405257;
    font-weight: 800;
}

.album-mode-panel small {
    color: var(--muted);
    font-weight: 700;
    line-height: 1.35;
}

.upload-panel .primary-action {
    min-height: 38px;
}

.upload-panel .form-status:empty {
    display: none;
}

.individual-fields input::placeholder {
    color: #8a9296;
}

.description-action svg {
    width: 18px;
    height: 18px;
}

.title-fields {
    display: grid;
    gap: 10px;
}

.title-field {
    display: grid;
    gap: 6px;
}

.title-field span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
}

.primary-action,
.secondary-action,
.export-action,
.admin-nav button,
.admin-nav a,
.card-actions button,
.danger-action,
.captcha-row button,
.pagination a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    border: 0;
    border-radius: 7px;
    padding: 0 14px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 850;
    transition: transform .16s ease, background .16s ease, border-color .16s ease, color .16s ease;
}

.primary-action {
    width: 100%;
    gap: 8px;
    color: #fff;
    background: var(--teal);
}

.secondary-action {
    width: max-content;
    border: 1px solid rgba(8, 127, 120, .22);
    color: var(--teal-dark);
    background: rgba(8, 127, 120, .08);
}

.secondary-action:hover {
    border-color: rgba(8, 127, 120, .34);
    background: rgba(8, 127, 120, .14);
}

.primary-action:hover,
.export-action:hover,
.card-actions button:hover {
    background: var(--teal-dark);
}

.primary-action:active,
.like-button:active,
.photo-open:active {
    transform: translateY(1px);
}

.form-status,
.notice {
    min-height: 22px;
    margin: 0;
    color: var(--teal-dark);
    font-size: 13px;
    font-weight: 750;
}

.form-status.is-error,
.notice.is-error {
    color: #b42342;
}

.notice {
    border: 1px solid rgba(8, 127, 120, .22);
    border-radius: var(--radius);
    padding: 12px 14px;
    background: rgba(8, 127, 120, .07);
}

.notice.is-error {
    border-color: rgba(224, 58, 90, .25);
    background: rgba(224, 58, 90, .08);
}

.sidebar-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: auto;
    color: rgba(255, 255, 255, .7);
    font-size: 13px;
}

.sidebar-footer a,
.sidebar-footer button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 0;
    padding: 0;
    color: #fff;
    font-weight: 800;
    background: transparent;
    cursor: pointer;
}

.sidebar-quick-menu,
.sidebar-footer-menu {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.sidebar-quick-menu {
    width: 100%;
    padding-bottom: 2px;
}

.sidebar-quick-menu button {
    color: rgba(255, 255, 255, .92);
}

.sidebar-footer > span {
    display: block;
}

.sidebar-footer a svg,
.sidebar-footer button svg {
    width: 16px;
    height: 16px;
    stroke-width: 2.2;
}

.gallery-shell {
    min-width: 0;
    padding: 30px;
}

.gallery-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}

.gallery-tools {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    width: min(500px, 100%);
}

.gallery-tools .search-box {
    flex: 1 1 auto;
}

.gallery-header h2 {
    max-width: 780px;
    margin: 0;
    color: var(--gallery-title-color);
    font-family: var(--gallery-font, inherit);
    font-size: var(--gallery-title-size);
    line-height: 1.02;
    text-shadow: 0 8px 22px rgba(0, 0, 0, .16), 0 1px 0 rgba(255, 255, 255, .75);
}

.gallery-title-block {
    display: grid;
    gap: 9px;
    max-width: 860px;
}

.gallery-badge {
    display: inline-flex;
    width: fit-content;
    margin: 0;
    border-radius: 999px;
    padding: 8px 12px;
    color: #fff;
    background:
        linear-gradient(135deg, var(--gallery-badge-color), color-mix(in srgb, var(--gallery-badge-color) 68%, #111 32%));
    box-shadow: 0 12px 30px color-mix(in srgb, var(--gallery-badge-color) 28%, transparent);
    font-family: var(--gallery-font, inherit);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.gallery-subtitle {
    max-width: 720px;
    margin: 0;
    color: var(--gallery-subtitle-color);
    font-family: var(--gallery-font, inherit);
    font-size: var(--gallery-subtitle-size);
    line-height: 1.5;
    text-shadow: 0 1px 0 rgba(255, 255, 255, .72);
}

.random-marquee-card {
    position: relative;
    overflow: hidden;
    margin: 0 0 24px;
    border: 0;
    border-radius: 18px;
    padding: 14px 0;
    background:
        radial-gradient(circle at 12% 22%, rgba(244, 183, 64, .28), transparent 30%),
        radial-gradient(circle at 82% 30%, rgba(56, 148, 217, .26), transparent 34%),
        linear-gradient(135deg, rgba(8, 127, 120, .17), rgba(255, 255, 255, .86) 44%, rgba(244, 183, 64, .18));
    box-shadow: 0 20px 58px rgba(18, 24, 31, .1);
}

.random-marquee-card::before,
.random-marquee-card::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 2;
    width: 84px;
    pointer-events: none;
}

.random-marquee-card::before {
    left: 0;
    background: linear-gradient(90deg, rgba(246, 251, 250, .95), transparent);
}

.random-marquee-card::after {
    right: 0;
    background: linear-gradient(270deg, rgba(246, 251, 250, .95), transparent);
}

.random-marquee-track {
    display: flex;
    width: max-content;
    gap: 14px;
    padding-inline: 14px;
    animation: marquee-scroll 42s linear infinite;
}

.random-marquee-card:hover .random-marquee-track {
    animation-play-state: paused;
}

.random-marquee-row {
    display: flex;
    flex: 0 0 auto;
    gap: 14px;
}

.photo-open.marquee-photo {
    position: relative;
    width: clamp(150px, 12vw, 214px);
    height: clamp(98px, 7.8vw, 138px);
    flex: 0 0 auto;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 14px 32px rgba(18, 24, 31, .16);
}

.photo-open.marquee-photo img {
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
}

.photo-open.marquee-photo:hover img {
    filter: saturate(1.12) contrast(1.05);
    transform: scale(1.055);
}

.marquee-like {
    position: absolute;
    left: 9px;
    bottom: 9px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-width: 42px;
    border-radius: 999px;
    padding: 5px 8px;
    color: #fff;
    background: rgba(17, 24, 39, .72);
    box-shadow: 0 8px 20px rgba(0, 0, 0, .22);
    backdrop-filter: blur(8px);
    font-size: 12px;
    font-weight: 900;
}

.marquee-like svg {
    width: 14px;
    height: 14px;
    fill: #ef4f6f;
    stroke: #ef4f6f;
    stroke-width: 2;
}

@keyframes marquee-scroll {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(calc(-50% - 7px));
    }
}

@media (prefers-reduced-motion: reduce) {
    .random-marquee-track {
        animation-play-state: paused;
    }
}

.search-box,
.admin-search {
    position: relative;
    display: flex;
    align-items: center;
    width: min(440px, 100%);
    color: var(--muted);
}

.search-box svg,
.admin-search svg {
    position: absolute;
    left: 12px;
    z-index: 1;
    width: 18px;
    height: 18px;
}

.search-box input,
.admin-search input {
    padding-left: 40px;
}

.search-results {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 20;
    width: min(560px, 88vw);
    max-height: 520px;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 10px;
    color: var(--ink);
    background: #fff;
    box-shadow: var(--shadow);
}

.search-result-group {
    display: grid;
    gap: 8px;
    padding: 8px;
}

.search-result-group h4 {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
}

.search-result-item {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    border-radius: 7px;
    padding: 7px;
    background: #f8faf9;
}

button.search-result-item {
    width: 100%;
    border: 0;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.search-result-item img {
    width: 58px;
    height: 46px;
    border-radius: 6px;
    object-fit: cover;
}

.search-result-item strong,
.photo-meta strong,
.top-row strong,
.admin-photo-card strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-result-item span,
.photo-meta span,
.top-row span,
.admin-photo-card span {
    display: block;
    color: var(--muted);
    font-size: 12px;
}

.gallery-section,
.admin-section {
    min-width: 0;
    margin-bottom: 26px;
    border: 1px solid rgba(207, 214, 217, .85);
    border-radius: var(--radius);
    padding: 20px;
    background: rgba(255, 255, 255, .84);
    box-shadow: var(--shadow);
}

.gallery-section.is-page-loading {
    opacity: .58;
    pointer-events: none;
    transform: translateY(2px);
    transition: opacity .18s ease, transform .18s ease;
}

.top-section {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .92), rgba(232, 247, 245, .92)),
        #fff;
}

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

.section-heading > div {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    border-radius: 999px;
    padding: 8px 14px 8px 8px;
    background:
        linear-gradient(135deg, rgba(8, 127, 120, .11), rgba(244, 183, 64, .13)),
        rgba(255, 255, 255, .82);
    box-shadow: inset 0 0 0 1px rgba(8, 127, 120, .12), 0 10px 24px rgba(18, 24, 31, .06);
}

.section-number {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    border: 1px solid rgba(8, 127, 120, .22);
    border-radius: 50%;
    color: var(--teal);
    font-size: 12px;
    font-weight: 900;
    background: #edf8f7;
}

.section-heading h3,
.section-heading h2,
.unit-gallery-heading h4 {
    margin: 0;
    font-size: 20px;
    line-height: 1.2;
}

.section-heading h3,
.section-heading h2 {
    color: #102f35;
    text-shadow: 0 1px 0 rgba(255, 255, 255, .8);
}

.section-heading p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.photo-grid {
    display: grid;
    gap: 14px;
}

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

.photo-card {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    background: #fff;
}

.photo-open {
    display: block;
    width: 100%;
    height: auto;
    border: 0;
    padding: 0;
    cursor: zoom-in;
    background: #111;
}

.photo-open img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    transition: transform .24s ease, filter .24s ease;
}

.photo-card:hover .photo-open img {
    filter: saturate(1.08) contrast(1.04);
    transform: scale(1.035);
}

.photo-meta {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    min-height: 70px;
    padding: 10px;
}

.photo-meta strong {
    font-size: 13px;
}

.like-button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-width: 58px;
    height: 34px;
    border: 1px solid rgba(224, 58, 90, .28);
    border-radius: 999px;
    color: var(--red);
    background: #fff6f8;
    cursor: pointer;
    font-size: 13px;
    font-weight: 900;
}

.like-button svg {
    width: 17px;
    height: 17px;
    fill: transparent;
    stroke-width: 2.3;
}

.like-button.is-liked {
    color: #fff;
    background: var(--red);
}

.like-button.is-liked svg {
    fill: currentColor;
}

.like-button:disabled,
.like-button.is-disabled {
    cursor: not-allowed;
    opacity: .58;
}

.empty-state {
    border: 1px dashed #cfd6d9;
    border-radius: var(--radius);
    padding: 24px;
    color: var(--muted);
    text-align: center;
    background: rgba(255, 255, 255, .6);
}

.pagination {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.pagination a {
    width: 38px;
    min-height: 38px;
    padding: 0;
    border: 1px solid var(--line);
    color: var(--teal-dark);
    background: #fff;
}

.pagination a.is-disabled {
    pointer-events: none;
    opacity: .35;
}

.pagination span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.unit-gallery-list {
    display: grid;
    gap: 18px;
}

.unit-gallery {
    border-top: 1px solid var(--line);
    padding-top: 16px;
}

.unit-gallery:first-child {
    border-top: 0;
    padding-top: 0;
}

.unit-gallery-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.unit-gallery-heading h4,
.unit-manage-open,
.individual-manage-open {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 0;
    border-radius: 999px;
    padding: 8px 14px 8px 8px;
    color: #083e3a;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .94), rgba(211, 235, 230, .92) 58%, rgba(244, 183, 64, .18)),
        #f7fbfa;
    cursor: pointer;
    font-size: inherit;
    font-weight: 950;
    transform: translateZ(0);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .82),
        inset 0 -2px 0 rgba(8, 127, 120, .12),
        0 12px 24px rgba(8, 127, 120, .16),
        0 3px 0 rgba(8, 127, 120, .13);
    transition: transform .16s ease, box-shadow .16s ease;
}

.unit-manage-open:hover,
.individual-manage-open:hover {
    transform: translateY(-1px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .9),
        inset 0 -2px 0 rgba(8, 127, 120, .14),
        0 16px 30px rgba(8, 127, 120, .2),
        0 4px 0 rgba(8, 127, 120, .14);
}

.unit-gallery-heading h4 img,
.unit-manage-open img,
.individual-manage-open img,
.unit-logo-fallback {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: contain;
    background: #fff;
    box-shadow: 0 4px 12px rgba(18, 24, 31, .1);
}

.unit-logo-fallback {
    display: inline-grid;
    place-items: center;
    color: var(--teal-dark);
    font-size: 11px;
    font-weight: 900;
}

.unit-gallery-heading h4 span,
.unit-manage-open span,
.individual-manage-open span {
    color: inherit;
    font-size: inherit;
    font-weight: 950;
    text-shadow:
        0 1px 0 rgba(255, 255, 255, .88),
        0 2px 4px rgba(8, 62, 58, .18);
}

.unit-gallery-heading > span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.unit-description {
    max-width: min(880px, 100%);
    margin: 0 0 14px 48px;
    border-left: 3px solid rgba(8, 127, 120, .24);
    padding: 8px 12px;
    color: #46565c;
    font-size: 13px;
    font-weight: 650;
    line-height: 1.55;
    background: rgba(255, 255, 255, .56);
}

.description-toggle {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    width: fit-content;
    margin: -4px 0 12px 48px;
    border: 1px solid rgba(8, 127, 120, .2);
    border-radius: 999px;
    padding: 7px 11px;
    color: var(--teal-dark);
    font-size: 12px;
    font-weight: 900;
    background: rgba(239, 249, 247, .88);
    box-shadow: 0 10px 20px rgba(8, 62, 58, .08), inset 0 1px 0 rgba(255, 255, 255, .9);
    cursor: pointer;
    transition: transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.description-toggle:hover,
.description-toggle[aria-expanded="true"] {
    border-color: rgba(8, 127, 120, .34);
    background: rgba(220, 244, 240, .96);
    box-shadow: 0 12px 24px rgba(8, 62, 58, .12), inset 0 1px 0 rgba(255, 255, 255, .96);
}

.description-toggle:hover {
    transform: translateY(-1px);
}

.description-toggle svg {
    width: 15px;
    height: 15px;
    flex: 0 0 auto;
    stroke-width: 2.25;
}

.description-toggle-chevron {
    transition: transform .2s ease;
}

.description-toggle[aria-expanded="true"] .description-toggle-chevron {
    transform: rotate(180deg);
}

.description-panel {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-4px);
    transition: max-height .32s ease, opacity .22s ease, transform .22s ease;
}

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

.description-panel.is-open {
    opacity: 1;
    transform: translateY(0);
}

.individual-meta {
    margin: -6px 0 10px 48px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
}

.home-footer {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 58px;
    margin-top: 4px;
    border-radius: var(--radius);
    padding: 14px 18px;
    color: var(--muted);
    font-size: 13px;
    text-align: center;
    background: rgba(255, 255, 255, .7);
}

.footer-text {
    display: block;
    max-width: calc(100% - 96px);
    line-height: 1.45;
    text-align: center;
}

.home-footer.has-footer-background {
    color: #fff;
    background:
        linear-gradient(135deg, rgba(8, 27, 31, .42), rgba(8, 127, 120, .18)),
        var(--footer-background) center / cover no-repeat;
    box-shadow: 0 16px 40px rgba(18, 24, 31, .12);
}

.home-footer img,
.footer-mark {
    width: 30px;
    height: 30px;
    flex: 0 0 auto;
    border-radius: 9px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(18, 24, 31, .14);
}

.home-footer img {
    object-fit: contain;
    border-radius: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
}

.footer-mark {
    display: inline-grid;
    place-items: center;
    color: var(--teal-dark);
    font-size: 11px;
    font-weight: 900;
}

.share-page-button {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, var(--teal), #3894d9);
    box-shadow: 0 12px 26px rgba(8, 127, 120, .22);
    cursor: pointer;
    transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}

.share-page-button:hover {
    filter: saturate(1.1);
    box-shadow: 0 16px 34px rgba(8, 127, 120, .3);
    transform: scale(1.04);
}

.share-page-button svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.home-footer .share-page-button {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
}

.home-footer .share-page-button:hover {
    transform: translateY(-50%) scale(1.04);
}

.slideshow-page {
    min-height: 100vh;
    color: #f8fbfb;
    background:
        radial-gradient(circle at 15% 10%, rgba(244, 183, 64, .26), transparent 34%),
        radial-gradient(circle at 78% 6%, rgba(56, 148, 217, .28), transparent 34%),
        linear-gradient(145deg, #071414, #0d2f33 48%, #131820);
}

.slideshow-page.has-slideshow-background {
    background:
        linear-gradient(135deg, rgba(4, 14, 16, .82), rgba(6, 27, 30, .72)),
        var(--slideshow-background) center / cover fixed no-repeat;
}

.slideshow-shell {
    display: grid;
    gap: 18px;
    min-height: 100vh;
    padding: 26px;
}

.slideshow-header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
}

.slideshow-home-link,
.slideshow-music-state,
.slideshow-controls button,
.slideshow-filter-form button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, .1);
    backdrop-filter: blur(14px);
}

.slideshow-home-link {
    min-height: 42px;
    padding: 0 14px;
    font-weight: 850;
}

.slideshow-home-link svg,
.slideshow-music-state svg,
.slideshow-controls svg,
.slideshow-filter-form label svg {
    width: 18px;
    height: 18px;
}

.slideshow-title-block {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    min-width: 0;
    text-align: center;
}

.slideshow-title-block img,
.slideshow-title-block > span {
    width: 58px;
    height: 58px;
    flex: 0 0 auto;
    border-radius: 18px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 18px 46px rgba(0, 0, 0, .24);
}

.slideshow-title-block img {
    object-fit: contain;
    padding: 8px;
}

.slideshow-title-block > span {
    display: inline-grid;
    place-items: center;
    color: var(--teal-dark);
    font-weight: 950;
}

.slideshow-title-block h1 {
    margin: 0;
    font-size: clamp(32px, 4.8vw, 76px);
    line-height: .96;
    letter-spacing: 0;
    text-shadow: 0 18px 54px rgba(0, 0, 0, .42);
}

.slideshow-title-block p {
    max-width: 760px;
    margin: 9px auto 0;
    color: rgba(248, 251, 251, .78);
    font-size: 15px;
}

.slideshow-music-state {
    min-height: 42px;
    padding: 0 14px;
    color: rgba(255, 255, 255, .78);
    font-weight: 800;
}

.slideshow-config-panel {
    position: relative;
    z-index: 30;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 18px;
    padding: 14px;
    background: rgba(255, 255, 255, .08);
    box-shadow: 0 22px 80px rgba(0, 0, 0, .16);
    backdrop-filter: blur(18px);
}

.slideshow-filter-form {
    display: grid;
    grid-template-columns: minmax(190px, 280px) minmax(240px, 380px) minmax(240px, 380px) max-content;
    gap: 12px;
    align-items: end;
}

.slideshow-filter-form .field-group label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #fff;
}

.slideshow-filter-form select {
    color: #102024;
}

.slideshow-unit-dropdown {
    position: relative;
    align-self: stretch;
}

.dropdown-label {
    display: block;
    margin-bottom: 6px;
    color: rgba(255, 255, 255, .72);
    font-size: 12px;
    font-weight: 850;
}

.multi-select-menu {
    position: relative;
    z-index: 31;
}

.multi-select-menu summary {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    width: 100%;
    min-height: 44px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 12px;
    padding: 0 12px;
    color: #102024;
    background: #fff;
    cursor: pointer;
    list-style: none;
    font-weight: 850;
}

.multi-select-menu summary::-webkit-details-marker {
    display: none;
}

.multi-select-menu summary span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.multi-select-menu summary svg {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    color: var(--teal-dark);
}

.multi-select-options {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 80;
    display: grid;
    max-height: 352px;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 14px;
    padding: 8px;
    background: rgba(255, 255, 255, .1);
    box-shadow: 0 22px 60px rgba(0, 0, 0, .24);
    backdrop-filter: blur(18px);
}

.multi-select-options label {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    border-radius: 10px;
    padding: 0 8px;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
}

.multi-select-options label:hover {
    background: rgba(255, 255, 255, .12);
}

.multi-select-options input {
    width: auto;
}

.slideshow-filter-form button,
.slideshow-controls button {
    min-height: 44px;
    padding: 0 16px;
    cursor: pointer;
    font-weight: 900;
}

.slideshow-filter-form button {
    border-color: transparent;
    background: linear-gradient(135deg, #f4b740, #e85d75);
    white-space: nowrap;
}

.slideshow-stage {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-rows: minmax(420px, 1fr) auto auto;
    gap: 14px;
    min-height: min(760px, calc(100vh - 230px));
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 28px;
    padding: 22px;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .035)),
        rgba(5, 14, 16, .52);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .05), 0 28px 100px rgba(0, 0, 0, .28);
    backdrop-filter: blur(20px);
}

.slideshow-stage::before {
    content: "";
    position: absolute;
    inset: auto 8% 104px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(244, 183, 64, .52), rgba(56, 148, 217, .42), transparent);
}

.slideshow-frame {
    position: relative;
    display: grid;
    align-items: center;
    justify-items: center;
    gap: 22px;
    min-height: 0;
    perspective: 1200px;
}

.slideshow-frame.is-double {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.slideshow-frame.is-three-d {
    grid-template-columns: .72fr 1.16fr .72fr;
}

.slideshow-photo {
    position: relative;
    width: min(100%, 1040px);
    height: 100%;
    max-height: calc(100vh - 340px);
    min-height: 360px;
    margin: 0;
    border-radius: 24px;
    overflow: hidden;
    background: #081014;
    box-shadow: 0 32px 90px rgba(0, 0, 0, .38);
    animation: slide-photo-in .56s ease both;
}

.slideshow-frame.is-double .slideshow-photo {
    min-height: 360px;
}

.slideshow-frame.is-cinema .slideshow-photo {
    width: min(100%, 1180px);
    aspect-ratio: 16 / 8;
}

.slideshow-frame.is-three-d .slideshow-photo {
    min-height: 330px;
    transform-style: preserve-3d;
}

.slideshow-frame.is-three-d .is-left {
    opacity: .55;
    transform: rotateY(18deg) scale(.88);
}

.slideshow-frame.is-three-d .is-right {
    opacity: .55;
    transform: rotateY(-18deg) scale(.88);
}

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

.slideshow-photo::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, .08), transparent 22%, rgba(0, 0, 0, .08));
    pointer-events: none;
}

.slideshow-like {
    position: absolute;
    left: 20px;
    top: 18px;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    padding: 8px 11px;
    color: #fff;
    background: rgba(10, 14, 18, .56);
    backdrop-filter: blur(10px);
}

.slideshow-like svg {
    width: 17px;
    height: 17px;
    fill: #ef4f6f;
    stroke: #ef4f6f;
}

.slideshow-caption {
    display: grid;
    justify-items: center;
    gap: 4px;
    text-align: center;
}

.slideshow-caption strong {
    font-size: 20px;
}

.slideshow-caption span {
    color: rgba(255, 255, 255, .7);
    font-weight: 750;
}

.slideshow-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.slideshow-controls button:first-child {
    border-color: transparent;
    background: linear-gradient(135deg, var(--teal), #3894d9);
}

.slideshow-controls button:disabled {
    cursor: not-allowed;
    opacity: .45;
}

.slideshow-empty {
    position: absolute;
    inset: 22px;
    z-index: 4;
    display: none;
    place-items: center;
    border: 1px dashed rgba(255, 255, 255, .24);
    border-radius: 22px;
    color: rgba(255, 255, 255, .76);
    text-align: center;
    background: rgba(0, 0, 0, .18);
}

.slideshow-empty.is-visible {
    display: grid;
}

.slideshow-empty strong,
.slideshow-empty span {
    display: block;
}

@keyframes slide-photo-in {
    from {
        opacity: 0;
        transform: translateY(18px) scale(.982);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.hover-preview {
    position: fixed;
    z-index: 60;
    width: min(480px, calc(100vw - 32px));
    pointer-events: none;
    border: 1px solid rgba(255, 255, 255, .55);
    border-radius: var(--radius);
    overflow: hidden;
    color: #fff;
    background: #151515;
    box-shadow: 0 28px 80px rgba(0, 0, 0, .28);
}

.hover-preview img {
    display: block;
    width: 100%;
    max-height: 62vh;
    object-fit: contain;
    background: #080808;
}

.hover-preview div,
.dialog-caption {
    display: grid;
    gap: 2px;
    padding: 11px 12px;
}

.hover-preview span,
.dialog-caption span {
    color: rgba(255, 255, 255, .76);
    font-size: 13px;
}

.photo-dialog {
    width: min(980px, calc(100vw - 32px));
    border: 0;
    border-radius: var(--radius);
    padding: 0;
    color: #fff;
    background: #111;
    box-shadow: 0 34px 90px rgba(0, 0, 0, .36);
}

.unit-description-dialog {
    width: min(520px, calc(100vw - 28px));
    border: 0;
    border-radius: var(--radius);
    padding: 0;
    color: var(--ink);
    background: #fff;
    box-shadow: 0 30px 84px rgba(0, 0, 0, .28);
}

.unit-manage-dialog {
    width: min(900px, calc(100vw - 28px));
    border: 0;
    border-radius: var(--radius);
    padding: 0;
    color: var(--ink);
    background: #fff;
    box-shadow: 0 30px 84px rgba(0, 0, 0, .28);
}

.home-menu-dialog {
    width: min(1040px, calc(100vw - 28px));
    border: 0;
    border-radius: var(--radius);
    padding: 0;
    color: var(--ink);
    background: #fff;
    box-shadow: 0 30px 84px rgba(0, 0, 0, .32);
}

.photo-dialog::backdrop {
    background: rgba(0, 0, 0, .68);
}

.unit-description-dialog::backdrop,
.unit-manage-dialog::backdrop,
.home-menu-dialog::backdrop {
    background: rgba(0, 0, 0, .52);
}

.unit-description-panel,
.unit-manage-panel,
.home-menu-panel {
    display: grid;
    gap: 12px;
    padding: 20px;
}

.unit-description-panel h3,
.unit-manage-panel h3,
.home-menu-panel h3 {
    margin: 0;
    padding-right: 42px;
    font-size: 20px;
}

.home-menu-dialog-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.home-menu-dialog-header svg {
    width: 22px;
    height: 22px;
    color: var(--teal);
    stroke-width: 2.3;
}

.home-menu-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    max-height: min(66vh, 720px);
    overflow-y: auto;
    padding-right: 4px;
}

.menu-clip-card,
.menu-regulation-card,
.menu-schedule-card {
    display: grid;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 8px;
    color: var(--ink);
    text-align: left;
    background: #fff;
    cursor: pointer;
}

.menu-clip-card img,
.menu-regulation-card img,
.menu-schedule-card img {
    width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: 6px;
    object-fit: cover;
    background: #eef3f2;
}

.menu-clip-card strong,
.menu-regulation-card strong,
.menu-schedule-card strong {
    min-height: 34px;
    font-size: 13px;
    line-height: 1.25;
}

.clip-viewer,
.regulation-viewer,
.schedule-viewer {
    display: grid;
    gap: 12px;
}

.clip-viewer video,
.regulation-viewer img,
.schedule-viewer img {
    width: 100%;
    max-height: min(68vh, 720px);
    border-radius: var(--radius);
    object-fit: contain;
    background: #0d1111;
}

.clip-viewer strong,
.regulation-viewer strong,
.schedule-viewer strong {
    font-size: 16px;
}

.schedule-viewer > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.download-action {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    border-radius: 7px;
    padding: 0 12px;
    color: #fff;
    font-size: 13px;
    font-weight: 850;
    background: var(--teal);
}

.welcome-modal {
    width: min(920px, calc(100vw - 40px));
    max-width: none;
    border: 0;
    padding: 0;
    overflow: visible;
    color: #fff;
    background: transparent;
}

.welcome-modal::backdrop {
    background: rgba(6, 15, 17, .36);
    backdrop-filter: blur(5px);
}

.welcome-modal-panel {
    display: grid;
    justify-items: center;
    gap: 16px;
    background: transparent;
}

.welcome-modal img,
.welcome-modal video {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: min(74vh, 760px);
    border: 0;
    border-radius: 0;
    object-fit: contain;
    box-shadow: 0 28px 90px rgba(0, 0, 0, .34);
}

.welcome-enter-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    border: 0;
    border-radius: 999px;
    padding: 0 18px;
    color: #fff;
    background: linear-gradient(135deg, #087f78, #2c95b3);
    box-shadow: 0 14px 34px rgba(8, 127, 120, .32);
    cursor: pointer;
    font-weight: 950;
}

.welcome-enter-button svg {
    width: 18px;
    height: 18px;
}

.award-result-list {
    display: grid;
    gap: 10px;
    max-height: min(68vh, 720px);
    overflow-y: auto;
    padding-right: 4px;
}

.award-result-item {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    border: 1px solid rgba(8, 127, 120, .14);
    border-radius: var(--radius);
    padding: 12px;
    background: linear-gradient(135deg, #ffffff, #f5fbfa);
}

.award-rank-icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    color: #fff;
    font-weight: 950;
    box-shadow: 0 10px 24px rgba(18, 24, 31, .14);
}

.award-result-item[data-rank="cup"] .award-rank-icon {
    background: linear-gradient(135deg, #f4b740, #c98516);
}

.award-result-item[data-rank="medal"] .award-rank-icon {
    background: linear-gradient(135deg, #8fa2ad, #53656f);
}

.award-result-item[data-rank="star"] .award-rank-icon {
    background: linear-gradient(135deg, #c88343, #8d4f20);
}

.award-result-item[data-rank="badge"] .award-rank-icon {
    background: linear-gradient(135deg, var(--teal), var(--teal-dark));
}

.award-result-item strong {
    display: block;
    color: #173134;
    font-size: 16px;
}

.award-result-item span:last-child {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 750;
}

.unit-description-panel textarea,
.unit-manage-panel textarea {
    min-height: 160px;
    resize: vertical;
}

.unit-manage-auth,
.unit-manage-editor {
    display: grid;
    gap: 12px;
}

.unit-manage-photos {
    display: grid;
    gap: 12px;
    max-height: min(48vh, 520px);
    overflow: auto;
    padding-right: 4px;
}

.unit-manage-photo {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px;
    background: #fbfdfd;
}

.unit-manage-photo img {
    width: 96px;
    aspect-ratio: 4 / 3;
    border-radius: 7px;
    object-fit: cover;
    background: #eef3f2;
}

.unit-manage-photo-fields {
    display: grid;
    gap: 8px;
}

.unit-manage-photo-fields small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
}

.description-dialog-footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
}

.description-dialog-footer span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.description-dialog-footer .is-over-limit,
.unit-description-panel .is-over-limit {
    color: #b42342;
}

.description-dialog-footer .primary-action {
    width: auto;
}

.photo-dialog img {
    display: block;
    width: 100%;
    max-height: 78vh;
    object-fit: contain;
    background: #080808;
}

.dialog-close {
    position: absolute;
    top: 10px;
    right: 10px;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: rgba(0, 0, 0, .58);
    cursor: pointer;
}

.admin-login-page {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 24px;
    background:
        linear-gradient(135deg, rgba(8, 127, 120, .14), transparent 42%),
        linear-gradient(315deg, rgba(224, 58, 90, .12), transparent 36%),
        #f6f8f8;
}

.login-shell {
    width: min(430px, 100%);
}

.login-panel {
    display: grid;
    gap: 18px;
    padding: 28px;
}

.login-logo {
    width: 74px;
    height: 74px;
}

.captcha-row {
    display: grid;
    grid-template-columns: minmax(0, 180px) 46px;
    gap: 10px;
    align-items: center;
}

.captcha-row img {
    width: 180px;
    height: 58px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fff;
}

.captcha-row button {
    width: 46px;
    min-height: 46px;
    padding: 0;
    border: 1px solid var(--line);
    color: var(--teal-dark);
    background: #fff;
}

.login-note,
.back-link,
.muted-text {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.back-link {
    color: var(--teal-dark);
    font-weight: 850;
}

.admin-page {
    background: #f3f5f5;
}

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 24px 30px;
    border-bottom: 1px solid var(--line);
    background: #fff;
}

.admin-title-block {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
}

.admin-header-logo {
    width: 58px;
    height: 58px;
    border-radius: var(--radius);
    object-fit: contain;
    background: #fff;
    border: 1px solid var(--line);
}

.admin-nav {
    display: flex;
    gap: 10px;
    align-items: center;
}

.admin-nav button,
.admin-nav a {
    border: 1px solid var(--line);
    color: var(--ink);
    background: #fff;
}

.admin-shell {
    display: grid;
    gap: 18px;
    width: min(1480px, calc(100% - 40px));
    margin: 22px auto 44px;
}

.admin-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 8px;
    background: #fff;
    box-shadow: var(--shadow);
}

.admin-tabs a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 7px;
    padding: 10px 13px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 850;
}

.admin-tabs a svg {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    stroke-width: 2.2;
}

.admin-tabs a.is-active {
    color: #fff;
    background: var(--ink);
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
}

.metric {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px;
    background: #fff;
    box-shadow: var(--shadow);
}

.metric span {
    display: block;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.metric strong {
    display: block;
    margin-top: 8px;
    font-size: 34px;
    line-height: 1;
}

.admin-table-wrap {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
}

.admin-data-table {
    width: 100%;
    min-width: 920px;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.admin-data-table th,
.admin-data-table td {
    border-bottom: 1px solid rgba(207, 214, 217, .72);
    padding: 10px 12px;
    color: #1f2933;
    font-size: 13px;
    line-height: 1.25;
    text-align: right;
    vertical-align: middle;
}

.admin-data-table th:first-child,
.admin-data-table td:first-child {
    text-align: left;
}

.admin-data-table th {
    color: #5f6770;
    font-size: 12px;
    font-weight: 900;
    background: #f6f8f9;
}

.admin-data-table tbody tr:last-child td {
    border-bottom: 0;
}

.admin-data-table tbody tr.has-no-posts {
    background: #fff8f5;
}

.admin-data-table td strong,
.admin-data-table td span {
    display: block;
}

.admin-data-table td span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
}

.status-pill {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 82px;
    margin: 0 !important;
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 12px !important;
    font-weight: 900 !important;
}

.status-pill.is-live {
    color: #0f766e !important;
    background: rgba(20, 184, 166, .13);
}

.status-pill.is-muted {
    color: #b45309 !important;
    background: rgba(245, 158, 11, .16);
}

.storage-metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.storage-metric {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 12px 14px;
    background: linear-gradient(135deg, #fff, #f4faf9);
    box-shadow: 0 10px 24px rgba(18, 24, 31, .06);
}

.storage-metric span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
}

.storage-metric strong {
    display: block;
    margin-top: 6px;
    color: #102f35;
    font-size: 22px;
    line-height: 1;
}

.two-column {
    display: grid;
    grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr);
    gap: 18px;
}

.upload-admin-layout {
    grid-template-columns: minmax(0, 1fr) 340px;
}

.admin-form {
    display: grid;
    gap: 14px;
    padding: 18px;
}

.admin-side-note,
.profile-card {
    align-self: start;
    padding: 18px;
}

.admin-side-note h3 {
    margin: 0 0 8px;
}

.admin-side-note p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.limit-settings-form {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

.limit-settings-form .primary-action {
    min-height: 40px;
}

.unit-description-admin-form {
    margin: 0 0 16px;
}

[data-word-count-for].is-over-limit {
    color: #b42342;
}

.file-grid,
.compact-fields {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

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

.file-preview-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.file-preview-row span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 7px;
    padding: 6px 8px;
    color: var(--muted);
    font-size: 13px;
}

.file-preview-row img {
    width: 46px;
    height: 34px;
    border-radius: 5px;
    object-fit: cover;
    background: #f2f4f4;
}

.slideshow-admin-preview {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 360px);
    gap: 12px;
}

.slideshow-admin-preview > div {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px;
    background: #fbfcfc;
}

.slideshow-admin-preview strong,
.slideshow-admin-preview span,
.slideshow-admin-preview li {
    font-size: 13px;
}

.slideshow-admin-preview ul {
    display: grid;
    gap: 4px;
    margin: 8px 0 0;
    padding-left: 18px;
    color: var(--muted);
}

.slideshow-admin-preview img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 7;
    margin-top: 8px;
    border-radius: 8px;
    object-fit: cover;
}

.menu-settings-form {
    margin-top: 10px;
}

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

.menu-admin-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    align-items: stretch;
}

.menu-admin-column {
    display: grid;
    grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
    gap: 14px;
    align-items: start;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px;
    background: rgba(255, 255, 255, .86);
}

.compact-heading {
    grid-column: 1 / -1;
    margin-bottom: 0;
}

.menu-admin-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    max-height: calc((var(--menu-admin-card-row-height, 520px) * 2) + 12px);
    overflow-y: auto;
    padding-right: 4px;
    scrollbar-gutter: stable;
}

.menu-admin-column:nth-child(4) .menu-admin-list {
    --menu-admin-card-row-height: 360px;
}

.menu-admin-card {
    display: grid;
    gap: 10px;
    align-content: start;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 10px;
    background: #fff;
}

.menu-admin-card > img {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 7px;
    object-fit: cover;
    background: #eef3f2;
}

.menu-admin-card form {
    min-width: 0;
}

.award-admin-card {
    padding-top: 12px;
}

.admin-user-list {
    display: grid;
    gap: 12px;
    max-height: 760px;
    overflow: auto;
    padding-right: 4px;
}

.unit-admin-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    transition: opacity .14s ease, transform .14s ease;
}

.unit-global-settings {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    margin: -2px 0 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
    background: rgba(255, 255, 255, .72);
}

.unit-global-settings .primary-action {
    width: auto;
    min-height: 38px;
}

.unit-admin-grid.is-changing-page {
    opacity: .72;
    transform: translateY(2px);
}

.unit-admin-card,
.admin-user-card,
.admin-photo-card,
.admin-top-list {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}

.unit-admin-card,
.admin-user-card {
    display: grid;
    gap: 10px;
    padding: 14px;
}

.unit-admin-card {
    align-content: start;
    padding: 12px;
}

.unit-admin-card[hidden] {
    display: none !important;
}

.unit-admin-card form:first-child {
    display: grid;
    gap: 9px;
}

.unit-admin-card .field-group {
    gap: 5px;
}

.unit-admin-card input {
    padding: 9px 10px;
}

.unit-admin-card .card-actions {
    justify-content: stretch;
}

.unit-admin-card .card-actions button {
    width: 100%;
    min-height: 36px;
}

.unit-admin-card .danger-action {
    min-height: 36px;
}

.checkbox-line,
.permission-grid label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #33363a;
    font-size: 13px;
    font-weight: 750;
}

.checkbox-line input,
.permission-grid input {
    width: auto;
}

.card-actions {
    display: flex;
    justify-content: flex-end;
}

.card-actions button {
    color: #fff;
    background: var(--teal);
}

.unit-pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin: -4px 0 12px;
}

.unit-pager[hidden] {
    display: none;
}

.unit-pager button {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--line);
    border-radius: 7px;
    color: var(--teal-dark);
    background: #fff;
    cursor: pointer;
}

.unit-pager button:disabled {
    cursor: default;
    opacity: .4;
}

.unit-pager svg {
    width: 18px;
    height: 18px;
}

.unit-pager span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 850;
}

.unit-pager select {
    width: auto;
    min-width: 112px;
    padding: 8px 10px;
}

.unit-empty-state {
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    padding: 18px;
    color: var(--muted);
    text-align: center;
    background: rgba(255, 255, 255, .7);
}

.danger-action {
    width: 100%;
    border: 1px solid rgba(224, 58, 90, .25);
    color: #b42342;
    background: #fff4f6;
}

.danger-action:hover {
    color: #fff;
    background: #b42342;
}

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

.admin-top-list {
    display: grid;
    gap: 8px;
    padding: 14px;
    align-content: start;
}

.admin-top-list h3 {
    margin: 0 0 4px;
}

.top-list-window {
    display: grid;
    gap: 8px;
}

.admin-top-list.is-scrollable {
    position: relative;
}

.admin-top-list.is-scrollable .top-list-window {
    max-height: 312px;
    padding-right: 7px;
    overflow-y: auto;
    scrollbar-color: var(--teal) #e8eeee;
    scrollbar-width: thin;
}

.admin-top-list.is-scrollable .top-list-window::after {
    position: sticky;
    bottom: 0;
    display: block;
    height: 28px;
    margin-top: -28px;
    content: "";
    pointer-events: none;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0), #fff 82%);
}

.scroll-hint {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    margin: 2px 0 0;
    border: 1px solid rgba(8, 127, 120, .18);
    border-radius: 999px;
    color: var(--teal-dark);
    background: #edf8f7;
    font-size: 12px;
    font-weight: 850;
}

.top-row {
    display: grid;
    grid-template-columns: 36px 54px minmax(0, 1fr) 42px;
    gap: 10px;
    align-items: center;
    border-radius: 7px;
    padding: 7px;
    background: #f7f9f9;
}

.top-row img {
    width: 54px;
    height: 42px;
    border-radius: 6px;
    object-fit: cover;
}

.top-row .rank {
    display: block;
    justify-self: center;
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 50%;
    color: #ffd84d;
    font-size: 13px;
    line-height: 32px;
    text-align: center;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .38), 0 0 8px rgba(255, 216, 77, .34);
    background: linear-gradient(135deg, #0b9ed0, #066fb8);
    box-shadow: 0 6px 14px rgba(6, 111, 184, .22);
}

.like-stat {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: var(--red);
    font-size: 17px;
    line-height: 1;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
}

.like-stat svg {
    width: 15px;
    height: 15px;
    fill: currentColor;
    stroke: currentColor;
    stroke-width: 1.7;
}

.export-action {
    gap: 8px;
    color: #fff;
    background: var(--teal);
}

.export-action svg {
    width: 18px;
    height: 18px;
}

.admin-photo-grid {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 12px;
    align-items: start;
}

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

.individual-admin-card {
    display: block;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    overflow: hidden;
}

.individual-admin-summary {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 12px 14px;
    cursor: pointer;
    list-style: none;
    transition: background .16s ease;
}

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

.individual-admin-summary:hover {
    background: rgba(8, 127, 120, .06);
}

.individual-admin-identity {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.individual-admin-identity strong {
    color: var(--ink);
    font-size: 16px;
    line-height: 1.2;
}

.individual-admin-identity span {
    overflow: hidden;
    color: var(--muted);
    font-size: 13px;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.individual-admin-stats {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
    white-space: nowrap;
}

.individual-admin-stats > span {
    border: 1px solid rgba(8, 127, 120, .14);
    border-radius: 999px;
    padding: 6px 10px;
    background: rgba(8, 127, 120, .06);
}

.individual-admin-open {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--teal-dark);
}

.individual-admin-open svg {
    width: 15px;
    height: 15px;
    transition: transform .18s ease;
}

.individual-admin-card[open] .individual-admin-open svg {
    transform: rotate(180deg);
}

.individual-admin-detail {
    display: grid;
    gap: 12px;
    border-top: 1px solid var(--line);
    padding: 12px;
    background: linear-gradient(180deg, rgba(248, 250, 250, .9), #fff);
}

.individual-admin-info-form {
    gap: 10px;
    border: 1px solid rgba(207, 214, 217, .72);
    border-radius: 8px;
    padding: 10px;
    background: rgba(255, 255, 255, .86);
}

.compact-admin-fields {
    gap: 10px;
}

.compact-primary-action {
    width: max-content;
    min-height: 36px;
    padding: 0 12px;
}

.compact-primary-action svg {
    width: 16px;
    height: 16px;
}

.individual-admin-photos {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
}

.individual-admin-photos .admin-photo-card:hover img {
    transform: none;
}

.individual-admin-photos .admin-photo-card form {
    display: grid;
    gap: 6px;
}

.individual-photo-card {
    gap: 0;
    border: 1px solid rgba(207, 214, 217, .78);
    background: #fff;
    overflow: hidden;
}

.individual-photo-card img {
    border-radius: 0;
}

.individual-photo-editor {
    display: grid;
    gap: 8px;
    padding: 10px;
}

.admin-photo-card .individual-photo-editor {
    padding: 10px;
}

.individual-photo-editor label {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.individual-photo-editor label span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 850;
}

.individual-photo-editor input,
.individual-photo-editor select {
    width: 100%;
    min-height: 38px;
    padding: 0 10px;
    font-size: 13px;
}

.individual-photo-title-form,
.individual-photo-move-form {
    grid-template-columns: minmax(0, 1fr) 40px;
    align-items: end;
    gap: 8px;
}

.individual-photo-row-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 40px;
    gap: 8px;
    align-items: end;
}

.individual-photo-row-actions .individual-photo-move-form {
    min-width: 0;
}

.individual-photo-delete-form {
    justify-self: end;
}

.icon-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    min-height: 38px;
    border: 1px solid rgba(8, 127, 120, .2);
    border-radius: 7px;
    padding: 0;
    color: var(--teal-dark);
    background: rgba(8, 127, 120, .08);
    cursor: pointer;
}

.icon-action:hover {
    background: rgba(8, 127, 120, .16);
}

.icon-action svg {
    width: 17px;
    height: 17px;
}

.icon-action.danger-action {
    border-color: rgba(224, 58, 90, .22);
    color: #b42342;
    background: rgba(224, 58, 90, .08);
}

.icon-action.danger-action:hover {
    background: rgba(224, 58, 90, .14);
}

.admin-photo-card {
    position: relative;
    display: grid;
    gap: 8px;
    min-width: 0;
    overflow: visible;
    border-radius: var(--radius);
}

.admin-photo-card img {
    position: relative;
    z-index: 1;
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 7px 7px 0 0;
    object-fit: cover;
    background: #111;
    transform-origin: center;
    transition: transform .18s ease, box-shadow .18s ease, border-radius .18s ease;
}

.admin-photo-card:hover img {
    z-index: 8;
    border-radius: 7px;
    box-shadow: 0 18px 44px rgba(18, 24, 31, .28);
    transform: scale(1.9);
}

.admin-photo-card div {
    min-width: 0;
    padding: 0 9px;
}

.admin-photo-card strong {
    font-size: 13px;
    line-height: 1.25;
}

.admin-photo-card small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
}

.admin-photo-card form {
    padding: 0 9px 9px;
}

.admin-photo-card .danger-action {
    min-height: 34px;
    font-size: 13px;
}

.admin-search.wide {
    width: min(520px, 100%);
}

.admin-photo-filter {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(190px, 260px) auto;
    gap: 10px;
    align-items: center;
    width: min(820px, 100%);
}

.admin-photo-filter button {
    min-height: 44px;
    border: 0;
    border-radius: 7px;
    padding: 0 16px;
    color: #fff;
    background: var(--teal);
    cursor: pointer;
    font-size: 14px;
    font-weight: 850;
}

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

.profile-card {
    display: grid;
    gap: 5px;
}

.profile-card strong {
    font-size: 22px;
}

.profile-card span {
    color: var(--muted);
}

@media (max-width: 1180px) {
    .home-page {
        grid-template-columns: 320px minmax(0, 1fr);
    }

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

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

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

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

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

    .unit-admin-grid {
        grid-template-columns: 1fr;
    }

    .slideshow-filter-form {
        grid-template-columns: 1fr;
    }

    .menu-admin-layout,
    .menu-setting-grid {
        grid-template-columns: 1fr;
    }

    .menu-admin-column {
        grid-template-columns: 1fr;
    }

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

    .slideshow-frame.is-double,
    .slideshow-frame.is-three-d {
        grid-template-columns: 1fr;
    }

    .slideshow-frame.is-three-d .is-left,
    .slideshow-frame.is-three-d .is-right {
        display: none;
    }
}

@media (min-width: 1181px) and (max-width: 1540px) {
    .individual-admin-photos {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .individual-photo-title-form,
    .individual-photo-move-form {
        grid-template-columns: 1fr;
    }

    .individual-photo-row-actions {
        grid-template-columns: minmax(0, 1fr) 40px;
    }

    .individual-photo-title-form .icon-action,
    .individual-photo-move-form .icon-action {
        justify-self: end;
    }
}

@media (max-width: 900px) {
    .home-page {
        display: block;
    }

    .contest-sidebar {
        position: relative;
        height: auto;
        padding: 20px;
    }

    .gallery-shell {
        padding: 20px;
    }

    .gallery-header,
    .section-heading,
    .admin-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .gallery-tools {
        width: 100%;
        justify-content: flex-start;
    }

    .slideshow-shell {
        padding: 16px;
    }

    .slideshow-header {
        grid-template-columns: 1fr;
        justify-items: start;
    }

    .slideshow-title-block {
        justify-content: flex-start;
        text-align: left;
    }

    .slideshow-stage {
        min-height: 620px;
        padding: 16px;
    }

    .gallery-header h2 {
        font-size: 30px;
    }

    .five-columns,
    .top-stats-grid,
    .two-column,
    .upload-admin-layout,
    .home-menu-grid,
    .file-grid,
    .metric-grid,
    .storage-metric-grid {
        grid-template-columns: 1fr;
    }

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

    .admin-photo-filter {
        grid-template-columns: 1fr;
    }

    .admin-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
    }

    .admin-tabs a {
        flex: 0 0 auto;
    }

    .individual-admin-summary {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .individual-admin-stats {
        flex-wrap: wrap;
    }

    .individual-admin-photos {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .admin-shell {
        width: min(100% - 24px, 760px);
    }
}

@media (max-width: 680px) {
    .menu-admin-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .photo-grid {
        gap: 10px;
    }

    .random-marquee-card {
        border-radius: 14px;
        padding: 10px 0;
    }

    .random-marquee-card::before,
    .random-marquee-card::after {
        width: 38px;
    }

    .photo-open.marquee-photo {
        width: 136px;
        height: 92px;
    }

    .home-footer {
        padding-right: 64px;
        text-align: left;
    }

    .footer-text {
        max-width: none;
    }

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

    .gallery-section,
    .admin-section {
        padding: 14px;
    }

    .photo-meta {
        grid-template-columns: 1fr;
    }

    .like-button {
        justify-self: start;
    }

    .admin-header,
    .gallery-shell,
    .contest-sidebar {
        padding: 16px;
    }

    .permission-grid,
    .compact-fields,
    .slideshow-admin-preview {
        grid-template-columns: 1fr;
    }

    .slideshow-title-block {
        align-items: flex-start;
    }

    .slideshow-title-block img,
    .slideshow-title-block > span {
        width: 46px;
        height: 46px;
        border-radius: 14px;
    }

    .slideshow-photo {
        min-height: 300px;
        max-height: 58vh;
    }

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

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