:root {
    color-scheme: light;
    --bg: #f4f6f8;
    --surface: #ffffff;
    --surface-soft: #eef2f5;
    --text: #17212b;
    --muted: #667480;
    --line: #dce3e8;
    --brand: #145c52;
    --brand-dark: #0d443d;
    --danger: #a83232;
    --warning: #9a6418;
    --radius: 16px;
    --shadow: 0 14px 40px rgba(26, 39, 50, .08);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body { margin: 0; min-height: 100vh; color: var(--text); background: var(--bg); font: 15px/1.55 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 250px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 28px 20px; color: #fff; background: #102c2a; }
.sidebar-header { display: flex; align-items: center; }
.sidebar-menu-panel { display: contents; }
.brand { color: #fff; font-size: 21px; font-weight: 750; letter-spacing: -.03em; }
.brand:hover { color: #d8f4ef; }
.mobile-menu-toggle { display: none; }
.nav { display: grid; gap: 6px; margin-top: 36px; }
.nav a { padding: 11px 13px; border-radius: 10px; color: #cfe2df; }
.nav a:hover { color: #fff; background: rgba(255,255,255,.09); }
.sidebar-footer { margin-top: auto; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.12); }
.user-name { font-weight: 700; }
.user-role { margin: 2px 0 12px; color: #9eb9b5; font-size: 13px; }

.main { min-width: 0; padding: 38px clamp(24px, 5vw, 72px) 64px; }
.main-centered { grid-column: 1 / -1; display: grid; place-items: center; }
.main-centered .topbar { display: none; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.topbar h1 { margin: 2px 0 0; font-size: clamp(28px, 4vw, 42px); line-height: 1.1; letter-spacing: -.04em; }
.eyebrow { color: var(--brand); font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.site-link { padding: 9px 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }

.card { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.auth-card { width: min(460px, calc(100vw - 32px)); }
.auth-card h2 { margin: 16px 0 6px; }
.application-card { width: min(680px, calc(100vw - 32px)); }
.guide-card { width: min(860px, calc(100vw - 32px)); }
.guide-card h1 { margin: 18px 0 10px; font-size: clamp(27px, 5vw, 40px); line-height: 1.1; letter-spacing: -.035em; }
.guide-lead { margin: 0 0 22px; color: var(--muted); font-size: 17px; line-height: 1.55; }
.guide-illustration { width: 100%; margin: 4px 0 24px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft); }
.guide-steps { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; counter-reset: guide-step; }
.guide-steps li { position: relative; min-height: 48px; padding: 3px 0 3px 58px; line-height: 1.55; counter-increment: guide-step; }
.guide-steps li::before { content: counter(guide-step); position: absolute; top: 0; left: 0; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; color: #fff; background: var(--brand); font-weight: 800; }
.guide-note { margin: 20px 0; padding: 14px 16px; border-radius: 12px; color: #765019; background: #fff7e6; line-height: 1.5; }
.guide-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.help-link { font-weight: 700; }
.auth-secondary { margin: 18px 0 0; text-align: center; }
.auth-mark { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; color: #fff; background: var(--brand); font-weight: 800; }
.muted { color: var(--muted); }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.stack { display: grid; gap: 16px; }
label { display: grid; gap: 6px; font-weight: 650; }
label span { color: #41505c; font-size: 13px; }
input, textarea { width: 100%; padding: 11px 12px; border: 1px solid #cbd5dc; border-radius: 10px; color: var(--text); background: #fff; outline: none; }
input:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(20, 92, 82, .12); }
textarea { resize: vertical; }

.button { display: inline-flex; min-height: 40px; align-items: center; justify-content: center; padding: 9px 14px; border: 1px solid transparent; border-radius: 10px; font-weight: 750; }
.button-primary { color: #fff; background: var(--brand); }
.button-primary:hover { color: #fff; background: var(--brand-dark); }
.button-danger { color: #fff; background: var(--danger); }
.button-warning { color: #fff; background: var(--warning); }
.button-reject { color: #8b2929; border-color: #e5b5b5; background: #fff0f0; }
.button-reject:hover { color: #fff; border-color: var(--danger); background: var(--danger); }
.button-quiet { color: var(--text); border-color: var(--line); background: var(--surface-soft); }
.button-block { width: 100%; }
.sidebar .button-quiet { color: #fff; border-color: rgba(255,255,255,.16); background: rgba(255,255,255,.08); }

.alert { margin: 0 0 20px; padding: 13px 15px; border-radius: 11px; border: 1px solid; }
.alert-success { color: #155747; border-color: #a8d9cc; background: #e9f7f2; }
.alert-danger { color: #7f2525; border-color: #e2aaaa; background: #fbecec; }
.alert-warning { color: #775019; border-color: #e4c48e; background: #fff7e6; }

.stats-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.stat-card { min-height: 165px; display: flex; flex-direction: column; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); background: var(--surface); box-shadow: var(--shadow); }
.stat-card span, .stat-card small { color: var(--muted); }
.stat-card strong { margin-top: auto; font-size: 42px; line-height: 1; letter-spacing: -.05em; }
.prose-card { margin-top: 18px; }
.prose-card h2 { margin-top: 0; }

.telegram-bot-settings { max-width: 820px; }
.telegram-bot-card { display: grid; gap: 22px; }
.telegram-bot-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.telegram-bot-card-head h2 { margin: 4px 0 0; font-size: clamp(25px, 4vw, 34px); letter-spacing: -.035em; }
.telegram-bot-kicker { color: var(--brand); font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.telegram-bot-status { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 7px; padding: 7px 11px; border-radius: 999px; font-size: 13px; font-weight: 800; }
.telegram-bot-status::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.telegram-bot-status-active { color: #155747; background: #dff4ed; }
.telegram-bot-status-waiting { color: #765019; background: #fff1cf; }
.telegram-bot-status-waiting::before { animation: telegram-bot-status-pulse 1.2s ease-in-out infinite; }
.telegram-bot-status-error { color: #7f2525; background: #fbecec; }
.telegram-bot-description { margin: -10px 0 0; color: var(--muted); }
.telegram-bot-identity { display: grid; grid-template-columns: minmax(120px, auto) 1fr; gap: 3px 18px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); }
.telegram-bot-identity span { color: var(--muted); font-size: 13px; }
.telegram-bot-identity a, .telegram-bot-identity strong { overflow-wrap: anywhere; font-size: 18px; font-weight: 800; }
.telegram-bot-steps { display: grid; gap: 12px; }
.telegram-bot-steps > div { display: grid; grid-template-columns: 34px 1fr; align-items: center; gap: 12px; }
.telegram-bot-steps span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: #fff; background: var(--brand); font-weight: 800; }
.telegram-bot-steps p { margin: 0; }
.telegram-bot-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.telegram-bot-actions [hidden] { display: none !important; }
.telegram-bot-note { margin: 0; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }

@keyframes telegram-bot-status-pulse {
    0%, 100% { opacity: .35; transform: scale(.8); }
    50% { opacity: 1; transform: scale(1.2); }
}

@media (prefers-reduced-motion: reduce) {
    .telegram-bot-status-waiting::before { animation: none; }
}

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.toolbar-actions, .filters, .comment-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.toolbar form, .comment-actions form { margin: 0; }
.chip { padding: 7px 11px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: var(--surface); }
.chip-active { color: #fff; border-color: var(--brand); background: var(--brand); }

.table-card { padding: 0; overflow: hidden; }
.table-wrap { overflow-x: auto; }
.upload-title-link { color: var(--text); font-weight: 700; }
.upload-title-link:hover { color: var(--brand); }
.person-links { max-width: 280px; }
.person-links a { display: inline-block; margin: 0 7px 4px 0; padding: 3px 7px; border-radius: 999px; background: var(--surface-soft); white-space: nowrap; }
.active-list-filter { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 16px; padding: 13px 15px; border: 1px solid #b9d8d2; border-radius: 12px; background: #eaf6f3; }
.active-list-filter div { display: grid; gap: 2px; }
.active-list-filter span { color: var(--muted); font-size: 12px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--muted); background: #f8fafb; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
tbody tr:last-child td { border-bottom: 0; }
.empty { padding: 36px; color: var(--muted); text-align: center; }
.status { display: inline-flex; padding: 4px 8px; border-radius: 999px; color: #765019; background: #fff1cf; font-size: 12px; font-weight: 750; white-space: nowrap; }
.status-1 { color: #155747; background: #dff4ed; }
.status-0 { color: #765019; background: #fff1cf; }
.status-upload-pending { color: #765019; background: #fff1cf; }
.status-upload-approved { color: #155747; background: #dff4ed; }
.status-upload-published { color: #174f85; background: #e5f1ff; }
.status-upload-rejected, .status-upload-error { color: #7f2525; background: #fbecec; }

.detail-grid { display: grid; gap: 18px; }
.meta-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.meta-grid div { display: grid; gap: 4px; }
.meta-grid span { color: var(--muted); font-size: 12px; text-transform: uppercase; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.section-picker { min-width: 0; margin: 2px 0 0; padding: 0; border: 0; }
.section-picker-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 10px; padding: 0 2px; }
.section-picker-head div { display: grid; gap: 3px; }
.section-picker-head strong { color: #27343d; font-size: 15px; }
.section-picker-head small { color: var(--muted); font-weight: 500; }
.section-counter { flex: 0 0 auto; padding: 4px 9px; border-radius: 999px; color: var(--brand); background: rgba(20, 92, 82, .09); font-size: 12px; font-weight: 800; }
.section-options { overflow: hidden; border-radius: 16px; background: #f2f5f6; }
.section-option { position: relative; display: flex; min-height: 58px; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 14px 12px 16px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.section-option + .section-option::before { content: ''; position: absolute; top: 0; right: 16px; left: 16px; height: 1px; background: rgba(101, 117, 128, .16); }
.section-option-title { color: #27343d; font-size: 15px; font-weight: 700; }
.section-toggle-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.section-toggle { position: relative; width: 51px; height: 31px; flex: 0 0 51px; border-radius: 999px; background: #c7ced2; box-shadow: inset 0 0 0 1px rgba(29, 43, 52, .04); transition: background .2s ease; }
.section-toggle::after { content: ''; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(20, 35, 44, .24); transition: transform .2s cubic-bezier(.25, .8, .25, 1); }
.section-toggle-input:checked + .section-toggle { background: #34c759; }
.section-toggle-input:checked + .section-toggle::after { transform: translateX(20px); }
.section-toggle-input:focus-visible + .section-toggle { box-shadow: 0 0 0 4px rgba(20, 92, 82, .18); }
.section-option:active .section-toggle { transform: scale(.97); }
.form-card h2 { margin: 0; }
.upload-state-note { margin-top: 18px; padding: 11px 13px; border-radius: 10px; font-size: 13px; }
.upload-state-approved { color: #155747; background: #e9f7f2; }
.upload-state-rejected, .upload-state-error { color: #7f2525; background: #fbecec; }
.upload-form-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 6px; }
.upload-form-actions > div { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.taxonomy-select-field > small { color: var(--muted); font-size: 12px; font-weight: 500; }
.taxonomy-select-field .select2-container { width: 100% !important; }
.taxonomy-select-field .select2-container--default .select2-selection--multiple { min-height: 46px; padding: 4px 7px; border: 1px solid #cbd5dc; border-radius: 10px; background: #fff; }
.taxonomy-select-field .select2-container--default.select2-container--focus .select2-selection--multiple { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(20, 92, 82, .12); }
.taxonomy-select-field .select2-container--default .select2-selection--multiple .select2-selection__choice { margin-top: 4px; padding: 3px 8px 3px 22px; border: 0; border-radius: 999px; color: #194c45; background: #dff1ed; }
.taxonomy-select-field .select2-container--default .select2-selection--multiple .select2-selection__choice__remove { height: 100%; padding: 0 6px; border: 0; color: #47645f; }
.taxonomy-select-field .select2-search--inline .select2-search__field { min-height: 30px; margin-top: 3px; padding: 3px; border: 0; box-shadow: none; }
.taxonomy-select-field .select2-dropdown { z-index: 1100; overflow: hidden; border-color: #cbd5dc; border-radius: 10px; box-shadow: 0 12px 30px rgba(26, 39, 50, .14); }
.taxonomy-select-field .select2-results__option { padding: 9px 11px; }
.taxonomy-select-field .select2-container--default .select2-results__option--highlighted[aria-selected] { background: var(--brand); }

.comment-list { display: grid; gap: 12px; }
.comment-card { padding: 18px; }
.comment-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.comment-head div { display: grid; gap: 2px; }
.comment-head div span { color: var(--muted); font-size: 12px; }
.comment-text { margin: 16px 0; overflow-wrap: anywhere; }
.comment-card .comment-attachment { --comment-media-size: 320px; display: block; width: fit-content; max-width: min(100%, var(--comment-media-size)); margin: 16px 0; }
.comment-card .comment-attachment--gif { --comment-media-size: 220px; }
.comment-card .comment-attachment img { display: block; width: auto; height: auto; max-width: 100%; max-height: var(--comment-media-size); border-radius: 12px; object-fit: contain; }
@media (max-width: 600px) {
    .comment-card .comment-attachment { --comment-media-size: 260px; }
    .comment-card .comment-attachment--gif { --comment-media-size: 180px; }
}
.dating-photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 16px 0; }
.dating-photo-link { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); }
.dating-photo-link img { width: 100%; height: 180px; display: block; object-fit: cover; transition: transform .18s ease; }
.dating-photo-link video { width: 100%; height: 180px; display: block; object-fit: contain; background: #000; }

.dating-photo-link:hover img { transform: scale(1.025); }
.archive-meta { margin: -5px 0 16px; padding: 10px 12px; border-radius: 9px; color: #765019; background: #fff7e6; font-size: 13px; }
.toolbar-wrap { flex-wrap: wrap; }
.moderation-form { width: min(620px, 100%); display: grid; grid-template-columns: minmax(220px, 1fr) auto; align-items: end; gap: 10px; }
.moderation-form label { font-size: 12px; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 18px; }
.pagination a, .pagination span { min-width: 42px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 9px; text-align: center; background: var(--surface); }
.error-card { max-width: 680px; }
.error-code { color: var(--danger); font-size: 52px; font-weight: 850; letter-spacing: -.06em; }
code { padding: 2px 6px; border-radius: 6px; background: var(--surface-soft); }

.upload-gallery { min-width: 0; }
.upload-gallery-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.upload-gallery-head h2 { margin: 0; }
.upload-gallery-head p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.upload-gallery-head > span { flex: 0 0 auto; padding: 5px 9px; border-radius: 999px; color: var(--brand); background: rgba(20, 92, 82, .09); font-size: 12px; font-weight: 800; }
.upload-carousel { display: grid; grid-template-columns: 52px minmax(0, 1fr) 52px; align-items: center; gap: 10px; }
.upload-carousel-arrow { width: 48px; height: 64px; padding: 0; border: 0; border-radius: 14px; color: #fff; background: var(--brand); font-size: 42px; line-height: 1; }
.upload-carousel-arrow:hover { background: var(--brand-dark); }
.upload-carousel-arrow:focus-visible { outline: 3px solid rgba(20, 92, 82, .25); outline-offset: 3px; }
.upload-carousel .upload-cover:only-child { grid-column: 1 / -1; }
.upload-cover { position: relative; width: 100%; min-height: 260px; max-height: 70vh; display: grid; place-items: center; overflow: hidden; padding: 0; border: 0; border-radius: 14px; color: #fff; background: #15201f; }
.upload-cover img { width: 100%; height: 100%; max-height: 70vh; display: block; object-fit: contain; }
.upload-cover > span { position: absolute; right: 12px; bottom: 12px; padding: 6px 10px; border-radius: 999px; background: rgba(0, 0, 0, .68); font-size: 12px; font-weight: 750; }
.upload-cover:focus-visible, .upload-thumbnail:focus-visible, .upload-lightbox button:focus-visible { outline: 3px solid #61c8b8; outline-offset: 3px; }
.upload-thumbnails { display: grid; grid-auto-flow: column; grid-auto-columns: 112px; gap: 10px; margin-top: 12px; padding: 2px 2px 8px; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-width: thin; scroll-snap-type: inline proximity; }
.upload-thumbnails-single { display: none; }
.upload-thumbnail { position: relative; height: 86px; overflow: hidden; padding: 0; border: 2px solid transparent; border-radius: 10px; background: var(--surface-soft); scroll-snap-align: start; }
.upload-thumbnail.is-current { border-color: var(--brand); }
.upload-thumbnail img { width: 100%; height: 100%; display: block; object-fit: cover; }
.upload-thumbnail span { position: absolute; right: 5px; bottom: 5px; min-width: 22px; padding: 2px 5px; border-radius: 999px; color: #fff; background: rgba(0, 0, 0, .7); font-size: 11px; font-weight: 800; }
.gallery-open { overflow: hidden; }
.upload-lightbox[hidden] { display: none; }
.upload-lightbox { position: fixed; z-index: 1000; inset: 0; display: grid; grid-template-columns: minmax(48px, 9vw) minmax(0, 1fr) minmax(48px, 9vw); align-items: center; padding: max(18px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left)); background: rgba(5, 10, 10, .94); }
.upload-lightbox-figure { min-width: 0; height: 100%; display: grid; grid-template-rows: minmax(0, 1fr) auto; place-items: center; margin: 0; touch-action: pan-y pinch-zoom; user-select: none; }
.upload-lightbox-figure img { max-width: 100%; max-height: calc(100dvh - 76px); display: block; object-fit: contain; }
.upload-lightbox-figure figcaption { padding-top: 12px; color: #fff; font-weight: 750; }
.upload-lightbox button { border: 0; color: #fff; background: rgba(255, 255, 255, .12); }
.upload-lightbox-close { position: absolute; z-index: 2; top: max(12px, env(safe-area-inset-top)); right: max(12px, env(safe-area-inset-right)); width: 44px; height: 44px; border-radius: 50%; font-size: 30px; line-height: 1; }
.upload-lightbox-arrow { width: 48px; height: 64px; justify-self: center; border-radius: 14px; font-size: 42px; line-height: 1; }
.upload-lightbox-prev { grid-column: 1; }
.upload-lightbox-next { grid-column: 3; }
.upload-lightbox-figure { grid-column: 2; grid-row: 1; }
.modal-open { overflow: hidden; }
.moderation-modal[hidden] { display: none; }
.moderation-modal { position: fixed; z-index: 1200; inset: 0; display: grid; place-items: center; padding: max(18px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left)); background: rgba(9, 20, 19, .72); }
.moderation-modal-card { width: min(560px, 100%); max-height: calc(100dvh - 36px); overflow-y: auto; padding: 24px; border-radius: 16px; background: var(--surface); box-shadow: 0 24px 80px rgba(0, 0, 0, .28); }
.moderation-modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.moderation-modal-head h2 { margin: 3px 0 0; }
.moderation-modal-close { width: 40px; height: 40px; flex: 0 0 40px; padding: 0; border: 0; border-radius: 50%; color: var(--text); background: var(--surface-soft); font-size: 27px; line-height: 1; }
.moderation-modal select { width: 100%; padding: 11px 36px 11px 12px; border: 1px solid #cbd5dc; border-radius: 10px; color: var(--text); background: #fff; }
.moderation-modal select:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px rgba(20, 92, 82, .12); }
.moderation-modal-note { margin: 0; color: var(--muted); font-size: 13px; }
.moderation-modal-actions { display: flex; justify-content: flex-end; gap: 8px; }
.upload-idle-modal[hidden] { display: none; }
.upload-idle-modal { position: fixed; z-index: 1400; inset: 0; display: grid; place-items: center; padding: 18px; background: rgba(45, 5, 5, .76); }
.upload-idle-modal-card { width: min(560px, 100%); padding: 28px; border: 2px solid #d94848; border-radius: 18px; color: #6f1d1d; background: #fff2f2; box-shadow: 0 28px 90px rgba(70, 0, 0, .42); text-align: center; }
.upload-idle-modal-card h2 { margin: 10px 0 8px; color: #9c2020; }
.upload-idle-modal-card p { margin: 0 auto 22px; max-width: 470px; line-height: 1.55; }
.upload-idle-icon { width: 54px; height: 54px; display: grid; place-items: center; margin: 0 auto; border-radius: 50%; color: #fff; background: #c92f2f; font-size: 34px; font-weight: 900; }
.upload-idle-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }

.board-move { width: min(620px, 100%); }
.board-move summary { width: fit-content; padding: 9px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); cursor: pointer; font-weight: 750; }
.board-move summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.board-move[open] summary { margin-bottom: 12px; }
.board-move select { width: 100%; min-width: 0; padding: 11px 12px; border: 1px solid #cbd5dc; border-radius: 10px; color: var(--text); background: #fff; }
.board-move select:focus { outline: 2px solid var(--brand); outline-offset: 1px; }


@media (max-width: 900px) {
    .app-shell { grid-template-columns: 1fr; }
    .sidebar { position: relative; z-index: 20; height: auto; padding: 12px 18px; }
    .sidebar-header { width: 100%; }
    .sidebar .brand { display: none; }
    .mobile-menu-toggle { width: 100%; min-height: 46px; display: flex; align-items: center; justify-content: space-between; padding: 9px 12px; border: 1px solid rgba(255,255,255,.14); border-radius: 11px; color: #fff; background: rgba(255,255,255,.08); font-size: 18px; font-weight: 750; }
    .mobile-menu-chevron { font-size: 24px; line-height: 1; transition: transform .2s ease; }
    .mobile-menu-toggle[aria-expanded="true"] .mobile-menu-chevron { transform: rotate(180deg); }
    .sidebar-menu-panel { display: none; }
    .sidebar.mobile-menu-open .sidebar-menu-panel { display: grid; }
    .nav { grid-template-columns: repeat(3, 1fr); margin-top: 12px; }
    .sidebar-footer { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; margin-top: 18px; }
    .sidebar-footer form { grid-column: 2; grid-row: 1 / 3; }
    .main { padding: 26px 18px 48px; }
    .stats-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
    .nav { grid-template-columns: 1fr; }
    .topbar, .toolbar, .comment-head { align-items: stretch; flex-direction: column; }
    .site-link { align-self: flex-start; }
    .meta-grid, .field-row, .section-options { grid-template-columns: 1fr; }
    .toolbar-actions { width: 100%; }
    .toolbar-actions form, .toolbar-actions .button { width: 100%; }
    .moderation-form { grid-template-columns: 1fr; }
    .upload-form-actions { align-items: stretch; flex-direction: column; }
    .upload-form-actions > div { display: grid; grid-template-columns: 1fr; }
    .upload-form-actions .button { width: 100%; }
    .moderation-modal-card { padding: 18px; }
    .moderation-modal-actions { display: grid; grid-template-columns: 1fr; }
    .upload-idle-actions { display: grid; grid-template-columns: 1fr; }
    .active-list-filter { align-items: stretch; flex-direction: column; }
    .telegram-bot-card-head { align-items: stretch; flex-direction: column; }
    .telegram-bot-status { align-self: flex-start; }
    .telegram-bot-identity { grid-template-columns: 1fr; }
    .telegram-bot-actions { display: grid; grid-template-columns: 1fr; }
    .card.upload-gallery { padding: 14px; }
    .upload-carousel { position: relative; grid-template-columns: minmax(0, 1fr); gap: 0; }
    .upload-carousel .upload-cover { grid-column: 1; grid-row: 1; }
    .upload-carousel-arrow { position: absolute; z-index: 2; width: 42px; height: 56px; background: rgba(0, 0, 0, .58); }
    .upload-carousel-arrow:first-child { left: 8px; }
    .upload-carousel-arrow:last-child { right: 8px; }
    .upload-cover { min-height: 210px; max-height: 62vh; border-radius: 11px; }
    .upload-cover img { max-height: 62vh; }
    .upload-thumbnails { grid-auto-columns: 86px; gap: 8px; }
    .upload-thumbnail { height: 68px; }
    .upload-lightbox { grid-template-columns: 54px minmax(0, 1fr) 54px; padding-right: 0; padding-left: 0; }
    .upload-lightbox-arrow { width: 44px; height: 58px; border-radius: 12px; }
}
