:root {
    --bg: #f7f9fc;
    --surface: #ffffff;
    --surface-soft: #f1f5fb;
    --text: #172033;
    --text-muted: #667085;
    --border: #dfe6ef;
    --border-strong: #cbd6e4;
    --primary: #3867e8;
    --primary-dark: #2852ca;
    --primary-soft: #eaf0ff;
    --danger: #d63e4f;
    --danger-dark: #b72d3d;
    --danger-soft: #fff0f2;
    --success: #238463;
    --success-soft: #e8f7f1;
    --warning: #a96b11;
    --warning-soft: #fff5df;
    --shadow-sm: 0 1px 2px rgba(19, 33, 58, .04), 0 8px 24px rgba(28, 48, 84, .06);
    --shadow-md: 0 18px 55px rgba(34, 54, 88, .11);
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --container: 1200px;
    color-scheme: light;
}

/* Blog V2.5 */
.blog-section, .article-section { padding-top: 42px; }
.blog-heading { margin-bottom: 26px; }
.blog-heading h1 { margin-bottom: 10px; }
.blog-heading > div > p:last-child { max-width: 660px; margin-bottom: 0; color: var(--text-muted); }
.blog-list { display: grid; gap: 20px; }
.blog-card { min-width: 0; display: grid; grid-template-columns: 230px minmax(0, 1fr); overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); }
.blog-card-no-cover { grid-template-columns: 1fr; }
.blog-card-cover { min-height: 210px; display: block; overflow: hidden; background: var(--surface-soft); }
.blog-card-cover img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform .22s ease; }
.blog-card:hover .blog-card-cover img { transform: scale(1.015); }
.blog-card-content { min-width: 0; padding: 26px 28px; }
.blog-card-content h2 { margin: 12px 0 10px; overflow-wrap: anywhere; font-size: clamp(1.35rem, 3vw, 1.75rem); }
.blog-card-content h2 a { color: var(--text); }
.blog-card-content h2 a:hover { color: var(--primary-dark); }
.blog-card-content > p { margin-bottom: 16px; color: var(--text-muted); }
.article-meta-line { display: flex; align-items: center; gap: 11px; color: var(--text-muted); font-size: .8rem; }
.article-type-badge { display: inline-flex; padding: 4px 9px; border-radius: 99px; background: var(--primary-soft); color: var(--primary-dark); font-size: .72rem; font-weight: 750; }
.article-card { overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); }
.article-header { padding: 42px 48px 32px; }
.article-header h1 { margin: 17px 0 15px; overflow-wrap: anywhere; font-size: clamp(2rem, 5vw, 3.35rem); }
.article-excerpt { max-width: 700px; margin-bottom: 0; color: var(--text-muted); font-size: 1.08rem; }
.article-cover { margin: 0; overflow: hidden; background: var(--surface-soft); }
.article-cover img { width: 100%; max-height: 620px; display: block; object-fit: contain; }
.article-body { padding: 38px 48px 18px; font-size: 1.02rem; }
.article-body h2, .article-body h3, .article-body h4 { margin: 1.8em 0 .65em; overflow-wrap: anywhere; }
.article-body h2 { font-size: 1.7rem; }
.article-body h3 { font-size: 1.35rem; }
.article-body h4 { font-size: 1.12rem; }
.article-body p, .article-body ul, .article-body ol, .article-body blockquote { margin: 0 0 1.15em; }
.article-body ul, .article-body ol { padding-left: 1.5em; }
.article-body li + li { margin-top: .35em; }
.article-body blockquote { padding: 17px 20px; border-left: 4px solid var(--primary); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; background: var(--surface-soft); color: #4c596f; }
.article-body blockquote p { margin: 0; }
.article-body code { padding: 2px 6px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface-soft); font: .9em ui-monospace, SFMono-Regular, Consolas, monospace; overflow-wrap: anywhere; }
.article-body img { max-height: 720px; display: block; margin: 24px auto; border-radius: var(--radius-md); object-fit: contain; }
.article-footer { padding: 20px 48px 42px; }
.latest-articles-section { padding: 26px 0 72px; }
.latest-articles-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.latest-articles-heading h2 { margin: 0; }
.latest-articles-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.latest-article-card { min-width: 0; display: flex; flex-direction: column; padding: 22px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-sm); }
.latest-article-card h3 { margin: 13px 0 9px; overflow-wrap: anywhere; font-size: 1.12rem; }
.latest-article-card h3 a { color: var(--text); }
.latest-article-card > p { flex: 1; margin-bottom: 14px; color: var(--text-muted); font-size: .9rem; }
.admin-article-filters { display: grid; grid-template-columns: minmax(240px, 1fr) minmax(170px, .35fr) auto; align-items: end; gap: 14px; margin-bottom: 20px; padding: 18px; }
.table-article-title { max-width: 420px; display: block; margin-bottom: 5px; overflow-wrap: anywhere; }
.article-table-actions { min-width: 260px; }
.article-editor { display: grid; grid-template-columns: minmax(0, 1fr) 330px; align-items: start; gap: 22px; }
.article-editor-main, .article-editor-secondary { min-width: 0; padding: 26px; }
.article-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.form-field { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.form-field-wide { grid-column: 1 / -1; }
.form-field label { color: #46536a; font-size: .84rem; font-weight: 700; }
.form-field small { color: var(--text-muted); font-size: .77rem; }
.form-field .field-error { color: var(--danger-dark); font-weight: 650; }
.article-content-input { min-height: 430px; resize: vertical; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .9rem; line-height: 1.6; }
.markdown-help { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 3px; padding: 12px; border-radius: 9px; background: var(--surface-soft); color: var(--text-muted); font-size: .77rem; }
.markdown-help strong, .markdown-help span { flex-basis: 100%; }
.markdown-help code { padding: 2px 5px; border-radius: 5px; background: #fff; color: #46536a; }
.article-editor-secondary { display: grid; gap: 26px; }
.article-editor-secondary section + section { padding-top: 24px; border-top: 1px solid var(--border); }
.article-editor-secondary h2 { margin-bottom: 7px; font-size: 1.2rem; }
.article-editor-secondary section > p { color: var(--text-muted); font-size: .82rem; }
.article-editor-secondary .form-field + .form-field { margin-top: 16px; }
.article-cover-preview { width: 100%; max-height: 190px; display: block; margin-bottom: 12px; border-radius: 11px; background: var(--surface-soft); object-fit: contain; }
.article-editor-secondary input[type="file"] { width: 100%; max-width: 100%; }
.checkbox-row { display: flex; align-items: center; gap: 9px; margin: 10px 0 14px; color: #4c596f; font-size: .84rem; }
.checkbox-row input { width: 17px; height: 17px; }
.form-summary-error { display: flex; flex-direction: column; margin-bottom: 18px; padding: 14px 17px; border: 1px solid #f0d5d9; border-radius: var(--radius-sm); background: var(--danger-soft); color: var(--danger-dark); }
.form-summary-error span { font-size: .86rem; }

@media (max-width: 980px) {
    .article-editor { grid-template-columns: 1fr; }
    .article-editor-secondary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .article-editor-secondary > .button-row { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
    .blog-card { grid-template-columns: 1fr; }
    .blog-card-cover { min-height: 180px; max-height: 260px; }
    .latest-articles-grid { grid-template-columns: 1fr; }
    .article-header { padding: 30px 24px 24px; }
    .article-body { padding: 28px 24px 12px; }
    .article-footer { padding: 18px 24px 30px; }
    .admin-article-filters { grid-template-columns: 1fr; }
    .article-form-grid, .article-editor-secondary { grid-template-columns: minmax(0, 1fr); }
    .article-editor-secondary > .button-row { grid-column: auto; }
}

@media (max-width: 520px) {
    .latest-articles-heading { align-items: flex-start; flex-direction: column; }
    .latest-articles-heading .button { width: 100%; }
    .blog-card-content { padding: 22px 20px; }
    .article-header, .article-body, .article-footer { padding-left: 19px; padding-right: 19px; }
    .article-editor-main, .article-editor-secondary { padding: 19px; }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}
body > main, .admin-shell { flex: 1 0 auto; }
img { max-width: 100%; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.025em; }
h1 { font-size: clamp(2rem, 4vw, 3.75rem); }
h2 { font-size: clamp(1.4rem, 2vw, 2rem); }

:focus-visible { outline: 3px solid rgba(56, 103, 232, .25); outline-offset: 3px; }
.container { width: min(100% - 40px, var(--container)); margin-inline: auto; }
.narrow-container { max-width: 1040px; }
.form-container { max-width: 680px; }
.content-container { max-width: 840px; }
.login-container { max-width: 460px; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.eyebrow { margin-bottom: 10px; color: var(--primary); font-size: .78rem; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }

.site-header { position: relative; z-index: 20; border-bottom: 1px solid rgba(203, 214, 228, .75); background: rgba(247, 249, 252, .92); backdrop-filter: blur(14px); }
.header-inner { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--text); font-size: 1.05rem; font-weight: 780; letter-spacing: -.02em; }
.brand:hover { color: var(--text); }
.brand-mark { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; background: var(--primary); color: #fff; box-shadow: 0 8px 20px rgba(56, 103, 232, .22); }
.brand-mark svg { width: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a { padding: 9px 14px; border-radius: 9px; color: #505d73; font-size: .92rem; font-weight: 600; }
.main-nav a:hover, .main-nav a.is-active { background: #fff; color: var(--text); box-shadow: 0 1px 4px rgba(20, 36, 64, .07); }
.header-admin { display: flex; align-items: center; gap: 14px; }
.header-admin form { margin: 0; }
.admin-identity { color: var(--text-muted); font-size: .9rem; }

.button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border: 1px solid transparent; border-radius: var(--radius-sm); cursor: pointer; font-weight: 700; line-height: 1.2; text-align: center; transition: transform .16s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease; }
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.button-primary { background: var(--primary); color: #fff; box-shadow: 0 8px 22px rgba(56, 103, 232, .18); }
.button-primary:hover { background: var(--primary-dark); color: #fff; }
.button-secondary { border-color: var(--border); background: #fff; color: var(--text); }
.button-secondary:hover { border-color: var(--border-strong); background: var(--surface-soft); color: var(--text); }
.button-ghost { min-height: 38px; background: transparent; color: #55627a; }
.button-ghost:hover { background: var(--surface-soft); color: var(--text); }
.button-danger { background: var(--danger); color: #fff; }
.button-danger:hover { background: var(--danger-dark); color: #fff; }
.button-danger-soft { background: var(--danger-soft); color: var(--danger); }
.button-danger-soft:hover { background: #ffe1e5; color: var(--danger-dark); }
.button-wide { width: 100%; }
.button-small { min-height: 36px; padding: 7px 12px; font-size: .84rem; }
.button-link { padding: 0; border: 0; background: none; color: var(--primary); cursor: pointer; font-weight: 650; }
.muted-link { color: var(--text-muted); }
.button-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.hero-section { position: relative; overflow: hidden; padding: 72px 0 36px; }
.hero-section::before { content: ""; position: absolute; inset: -200px auto auto 50%; width: 780px; height: 430px; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(circle, rgba(91, 131, 238, .12), rgba(247, 249, 252, 0) 70%); pointer-events: none; }
.hero-container { position: relative; max-width: 920px; }
.hero-copy { max-width: 760px; margin: 0 auto 34px; text-align: center; }
.hero-copy h1 { margin-bottom: 18px; }
.hero-copy > p:last-child { max-width: 670px; margin: 0 auto; color: var(--text-muted); font-size: 1.13rem; }
.upload-card { padding: 16px; border: 1px solid rgba(203, 214, 228, .9); border-radius: 28px; background: var(--surface); box-shadow: var(--shadow-md); }
.drop-zone { min-height: 365px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 42px; border: 2px dashed #c9d6e8; border-radius: 18px; background: linear-gradient(180deg, #fbfdff, #f7faff); text-align: center; cursor: pointer; transition: border-color .18s ease, background .18s ease, transform .18s ease; }
.drop-zone:hover, .drop-zone.is-dragging { border-color: var(--primary); background: var(--primary-soft); }
.drop-zone.is-dragging { transform: scale(.995); }
.drop-zone.has-file, .drop-zone.has-files { min-height: 220px; }
.upload-icon { width: 68px; height: 68px; display: grid; place-items: center; margin-bottom: 20px; border-radius: 20px; background: var(--primary-soft); color: var(--primary); }
.upload-icon svg { width: 34px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.drop-zone h2 { margin-bottom: 9px; font-size: 1.5rem; }
.drop-zone > p { margin-bottom: 22px; color: var(--text-muted); }
.drop-zone .upload-help { margin: 18px 0 0; font-size: .83rem; }
.file-preview { display: grid; grid-template-columns: 104px 1fr; gap: 18px; align-items: center; margin-top: 14px; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-soft); }
.file-preview[hidden], .upload-progress[hidden], .form-error[hidden] { display: none; }
.preview-frame { width: 104px; height: 76px; overflow: hidden; border-radius: 11px; background: #e7edf6; }
.preview-frame img { width: 100%; height: 100%; display: block; object-fit: cover; }
.preview-details { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.preview-details strong { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview-details span { color: var(--text-muted); font-size: .88rem; }
.preview-details .button-link { margin-top: 5px; font-size: .88rem; }
.file-queue { display: grid; gap: 12px; margin-top: 14px; padding: 15px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-soft); }
.file-queue[hidden] { display: none; }
.file-queue-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.file-queue-heading > div { min-width: 0; display: flex; flex-direction: column; }
.file-queue-heading strong { font-size: .93rem; }
.file-queue-heading span { color: var(--text-muted); font-size: .8rem; }
.file-queue-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.file-queue-item { min-width: 0; display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; align-items: center; gap: 11px; padding: 8px; border: 1px solid var(--border); border-radius: 11px; background: #fff; }
.file-queue-item img { width: 58px; height: 46px; display: block; object-fit: cover; border-radius: 8px; background: #e7edf6; }
.file-queue-details { min-width: 0; display: flex; flex-direction: column; }
.file-queue-details strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .85rem; }
.file-queue-details small { color: var(--text-muted); font-size: .75rem; }
.file-queue-remove { min-height: 34px; padding: 6px 8px; border: 0; border-radius: 8px; background: transparent; color: var(--danger); cursor: pointer; font-size: .76rem; font-weight: 700; }
.file-queue-remove:hover { background: var(--danger-soft); color: var(--danger-dark); }
.file-queue-remove:focus-visible { outline-color: rgba(214, 62, 79, .28); }
.upload-submit { margin-top: 14px; }
.upload-progress { margin-top: 16px; }
.progress-meta { display: flex; justify-content: space-between; margin-bottom: 7px; font-size: .88rem; }
.progress-track { height: 8px; overflow: hidden; border-radius: 99px; background: #e6ebf3; }
.progress-track span { width: 0; height: 100%; display: block; border-radius: inherit; background: var(--primary); transition: width .15s linear; }
.form-error { margin: 14px 0 0; padding: 11px 13px; border-radius: 9px; background: var(--danger-soft); color: var(--danger-dark); font-size: .9rem; }
.trust-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 30px; }
.trust-row > div { display: flex; align-items: center; gap: 12px; padding: 0 10px; }
.trust-row span:last-child { display: flex; flex-direction: column; }
.trust-row strong { font-size: .9rem; }
.trust-row small { color: var(--text-muted); font-size: .78rem; }
.trust-icon { width: 38px; height: 38px; flex: 0 0 auto; display: grid !important; place-items: center; border: 1px solid var(--border); border-radius: 11px; background: #fff; color: var(--primary); }
.trust-icon svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.page-section { padding: 48px 0 72px; }
.centered-section { min-height: 68vh; display: grid; align-items: center; }
.panel, .image-card, .share-card, .delete-access-card { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); }
.image-section { padding-top: 30px; }
.image-card { overflow: hidden; }
.image-stage { min-height: 300px; display: grid; place-items: center; overflow: hidden; background: #eef2f7; }
.image-full-link { max-width: 100%; display: block; line-height: 0; cursor: zoom-in; }
.image-full-link:focus-visible { outline-color: var(--primary); outline-offset: -4px; }
.image-stage img { width: auto; height: auto; max-width: 100%; max-height: 72vh; display: block; object-fit: contain; background-color: #eef2f7; background-image: linear-gradient(45deg, rgba(148, 163, 184, .16) 25%, transparent 25%), linear-gradient(-45deg, rgba(148, 163, 184, .16) 25%, transparent 25%), linear-gradient(45deg, transparent 75%, rgba(148, 163, 184, .16) 75%), linear-gradient(-45deg, transparent 75%, rgba(148, 163, 184, .16) 75%); background-size: 24px 24px; background-position: 0 0, 0 12px, 12px -12px, -12px 0; }
.image-info { display: grid; grid-template-columns: 1fr auto; gap: 28px; padding: 27px 30px; }
.image-info h1 { max-width: 620px; margin-bottom: 0; overflow-wrap: anywhere; font-size: clamp(1.35rem, 3vw, 2rem); }
.image-meta { display: flex; align-items: center; gap: 28px; margin: 0; }
.image-meta div { display: flex; flex-direction: column; }
.image-meta dt { color: var(--text-muted); font-size: .75rem; }
.image-meta dd { margin: 2px 0 0; font-size: .9rem; font-weight: 700; white-space: nowrap; }
.share-card { margin-top: 22px; padding: 28px 30px 30px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.section-heading h2 { margin: 0; }
.status-badge { display: inline-flex; padding: 5px 10px; border-radius: 99px; background: var(--success-soft); color: var(--success); font-size: .75rem; font-weight: 750; }
.status-warning { background: var(--warning-soft); color: var(--warning); }
.share-list { display: grid; gap: 17px; }
.share-row label { display: block; margin-bottom: 6px; color: #47546a; font-size: .83rem; font-weight: 650; }
.copy-control { display: flex; gap: 9px; }
.copy-control input { min-width: 0; flex: 1; }
.copy-button svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.social-share { margin-top: 28px; padding: 24px; border: 1px solid #d7e4f7; border-radius: var(--radius-md); background: linear-gradient(135deg, #f3f7ff 0%, #f8fbff 100%); }
.social-share-heading { margin-bottom: 17px; }
.social-share-heading h3 { margin-bottom: 6px; font-size: 1.22rem; }
.social-share-heading p { margin-bottom: 0; color: var(--text-muted); font-size: .9rem; }
.social-share-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: 10px; }
.social-share-button { min-height: 50px; width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 11px 14px; border: 1px solid #d7e1ef; border-radius: 11px; background: rgba(255, 255, 255, .88); color: #46536a; box-shadow: 0 1px 2px rgba(22, 37, 64, .04); cursor: pointer; font: inherit; font-size: .84rem; font-weight: 700; line-height: 1.2; text-align: center; transition: background .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease, transform .16s ease; }
.social-share-button:hover { border-color: #c5d4e8; background: #fff; color: var(--text); box-shadow: 0 7px 18px rgba(35, 57, 94, .08); transform: translateY(-1px); }
.social-share-button:active { box-shadow: 0 1px 2px rgba(22, 37, 64, .04); transform: translateY(0); }
.social-share-button:focus-visible { border-color: var(--primary); outline: 3px solid rgba(56, 103, 232, .24); outline-offset: 2px; }
.social-share-button svg { width: 21px; height: 21px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.social-telegram { border-color: #d5eaf6; background: #f4faff; color: #167eaf; }
.social-telegram svg path:first-child, .social-vk svg path { fill: currentColor; stroke: none; }
.social-vk { border-color: #d9e6fa; background: #f4f8ff; color: #2877d3; }
.social-ok { border-color: #f2e1ca; background: #fff9f1; color: #c56a0b; }
.social-whatsapp { border-color: #d5ebde; background: #f3fbf6; color: #168044; }
.social-x { border-color: #dfe3e8; background: #f7f8f9; color: #202633; }
.social-copy, .social-native { border-color: #d6e1f5; background: #f7f9ff; color: var(--primary-dark); }
.social-telegram:hover { color: #13749f; }
.social-vk:hover { color: #226bc0; }
.social-ok:hover { color: #ad5b06; }
.social-whatsapp:hover { color: #126e3a; }
.social-x:hover { color: #111827; }
.social-copy:hover, .social-native:hover { color: var(--primary-dark); }
.native-share-button[hidden] { display: none; }
.delete-access-card { display: grid; grid-template-columns: auto 1fr; gap: 18px; margin-top: 22px; padding: 24px 28px; border-color: #dce5f5; background: #f9fbff; }
.delete-access-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 13px; background: var(--primary-soft); color: var(--primary); }
.delete-access-icon svg { width: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.delete-access-content h2 { margin-bottom: 7px; font-size: 1.14rem; }
.delete-access-content p { margin-bottom: 15px; color: var(--text-muted); font-size: .9rem; }
.page-actions { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 24px; }
.button-icon { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.batch-result-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.batch-result-heading h1 { margin-bottom: 9px; font-size: clamp(2rem, 5vw, 3rem); }
.batch-result-heading p:last-child { margin-bottom: 0; color: var(--text-muted); }
.batch-result-heading > .button { flex: 0 0 auto; }
.batch-success-list { display: grid; gap: 18px; }
.batch-image-card { overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); }
.batch-image-summary { min-width: 0; display: grid; grid-template-columns: 104px minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.batch-thumbnail { width: 104px; height: 78px; display: block; overflow: hidden; border-radius: 11px; background: #e7edf6; }
.batch-thumbnail img { width: 100%; height: 100%; display: block; object-fit: cover; }
.batch-image-summary > div { min-width: 0; }
.batch-image-summary h2 { margin-bottom: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 1.12rem; }
.batch-image-summary p { margin: 0; color: var(--text-muted); font-size: .84rem; }
.batch-link-list { display: grid; gap: 13px; padding: 18px; }
.batch-link-row label { display: block; margin-bottom: 5px; color: #47546a; font-size: .79rem; font-weight: 650; }
.batch-link-row input { min-height: 40px; font-size: .84rem; }
.batch-delete-action { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 15px 18px; border-top: 1px solid #f0d5d9; background: var(--danger-soft); }
.batch-delete-action > div:first-child { min-width: 0; display: flex; flex-direction: column; }
.batch-delete-action strong { color: var(--danger-dark); font-size: .86rem; }
.batch-delete-action span { color: #84535a; font-size: .76rem; }
.batch-delete-action .button-row { justify-content: flex-end; }
.batch-failed-panel { margin-top: 22px; padding: 24px; border: 1px solid #f0d5d9; border-radius: var(--radius-lg); background: #fffafb; box-shadow: var(--shadow-sm); }
.batch-failed-panel .section-heading { margin-bottom: 16px; }
.batch-failed-list { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.batch-failed-list li { min-width: 0; display: grid; grid-template-columns: minmax(160px, .45fr) 1fr; gap: 16px; padding: 12px 14px; border-radius: 10px; background: var(--danger-soft); }
.batch-failed-list strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .85rem; }
.batch-failed-list span { color: #76515a; font-size: .84rem; }
.batch-empty-success { padding: 32px; text-align: center; }
.batch-empty-success h2 { margin-bottom: 7px; font-size: 1.3rem; }
.batch-empty-success p { margin: 0; color: var(--text-muted); }
.batch-result-actions { display: flex; justify-content: flex-end; margin-top: 24px; }

input[type="text"], input[type="password"], input[type="search"], input[type="number"], select, textarea { width: 100%; min-height: 44px; padding: 10px 13px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: #fff; color: var(--text); transition: border-color .15s, box-shadow .15s; }
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px rgba(56, 103, 232, .12); }
.form-panel, .confirmation-panel, .login-panel, .error-panel { padding: clamp(28px, 5vw, 46px); }
.panel-heading { margin-bottom: 24px; }
.panel-heading h1, .confirmation-panel h1, .login-panel h1, .error-panel h1 { margin-bottom: 12px; font-size: clamp(1.8rem, 4vw, 2.5rem); }
.panel-heading > p:last-child, .confirmation-panel > p, .login-panel > p, .error-panel > p { color: var(--text-muted); }
.field-label { display: flex; justify-content: space-between; gap: 10px; margin: 17px 0 6px; color: #3d495d; font-size: .86rem; font-weight: 700; }
.field-label span { color: var(--text-muted); font-size: .76rem; font-weight: 500; }
.report-image-summary, .delete-preview { display: flex; align-items: center; gap: 13px; padding: 11px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-soft); }
.report-image-summary img, .delete-preview img { width: 68px; height: 52px; object-fit: cover; border-radius: 8px; }
.delete-preview { margin: 24px 0; text-align: left; }
.delete-preview span { min-width: 0; display: flex; flex-direction: column; }
.delete-preview strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.delete-preview small { color: var(--text-muted); }
.radio-group { display: grid; gap: 8px; margin: 22px 0 0; padding: 0; border: 0; }
.radio-group legend { margin-bottom: 9px; font-size: .86rem; font-weight: 700; }
.radio-group label { display: flex; align-items: flex-start; gap: 11px; padding: 13px; border: 1px solid var(--border); border-radius: 11px; cursor: pointer; }
.radio-group label:hover { border-color: var(--border-strong); background: var(--surface-soft); }
.radio-group input { margin-top: 4px; accent-color: var(--primary); }
.radio-group span { display: flex; flex-direction: column; }
.radio-group small { color: var(--text-muted); }
.form-panel form > .button-row { justify-content: flex-end; margin-top: 24px; }
.confirmation-panel, .error-panel { text-align: center; }
.confirmation-panel > .button, .error-panel > .button { margin-top: 10px; }
.confirmation-panel .button-row { justify-content: center; }
.warning-icon, .success-icon, .login-mark { width: 60px; height: 60px; display: grid; place-items: center; margin: 0 auto 20px; border-radius: 18px; }
.warning-icon { background: var(--danger-soft); color: var(--danger); }
.success-icon { background: var(--success-soft); color: var(--success); }
.login-mark { background: var(--primary-soft); color: var(--primary); }
.warning-icon svg, .success-icon svg, .login-mark svg { width: 30px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.login-panel { text-align: center; }
.login-panel form { margin-top: 26px; text-align: left; }
.login-panel form .button { margin-top: 22px; }
.centered-buttons { justify-content: center; margin-top: 24px; }
.error-code { display: block; margin-bottom: 10px; color: #dfe5ef; font-size: clamp(4rem, 12vw, 7rem); font-weight: 850; line-height: .9; letter-spacing: -.08em; }

.content-section { padding-top: 54px; }
.prose { padding: clamp(28px, 6vw, 58px); }
.prose h1 { margin-bottom: 18px; overflow-wrap: anywhere; font-size: clamp(2rem, 5vw, 3.1rem); }
.prose .lead { margin-bottom: 38px; color: #536078; font-size: 1.12rem; }
.prose h2 { margin: 32px 0 10px; font-size: 1.28rem; }
.prose p, .prose li { color: #4f5d73; }
.prose li + li { margin-top: 8px; }
.contact-card { display: flex; align-items: center; gap: 15px; margin: 28px 0; padding: 18px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-soft); }
.contact-icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 13px; background: #fff; color: var(--primary); }
.contact-icon svg { width: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.contact-card > span:last-child { display: flex; flex-direction: column; }
.contact-card small { color: var(--text-muted); }
.contact-card a { font-weight: 750; }

.ad-slot { width: 100%; margin-top: 22px; overflow: hidden; border-radius: var(--radius-md); }
.ad-slot-placeholder { min-height: clamp(72px, 10vw, 96px); display: grid; place-items: center; padding: 16px; border: 1px dashed var(--border-strong); background: rgba(255, 255, 255, .52); color: #8793a8; font-size: .75rem; letter-spacing: .06em; text-align: center; text-transform: uppercase; }
.ad-slot-content { min-height: 0; overflow: visible; }
.ad-slot-content > * { max-width: 100%; }
.test-ad { width: 100%; min-height: clamp(76px, 10vw, 104px); display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 3px; padding: 16px; border: 1px solid #cfd9e8; border-radius: var(--radius-md); background: linear-gradient(135deg, #f5f7fa, #edf2f8); color: #667085; text-align: center; }
.test-ad-label { color: #3f4b5f; font-size: .82rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.test-ad-placement { font-size: .78rem; }

.admin-shell { width: min(100% - 40px, 1380px); display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 30px; margin: 30px auto 72px; }
.admin-sidebar { align-self: start; position: sticky; top: 22px; padding: 10px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-sm); }
.admin-sidebar nav { display: grid; gap: 4px; }
.admin-sidebar a { min-height: 43px; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: #526078; font-size: .9rem; font-weight: 650; }
.admin-sidebar a:hover, .admin-sidebar a.is-active { background: var(--primary-soft); color: var(--primary-dark); }
.admin-sidebar svg { width: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.admin-main { min-width: 0; }
.admin-page-heading { min-height: 80px; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin: 4px 0 24px; }
.admin-page-heading h1 { margin-bottom: 8px; font-size: clamp(2rem, 4vw, 2.7rem); }
.admin-page-heading p:last-child { margin-bottom: 0; color: var(--text-muted); }
.heading-with-actions { align-items: flex-end; }
.search-form { width: min(100%, 440px); display: flex; gap: 8px; }
.admin-image-filters { display: grid; grid-template-columns: minmax(260px, 2fr) minmax(150px, .85fr) minmax(170px, .95fr) auto; align-items: end; gap: 12px; margin-bottom: 18px; padding: 18px; }
.admin-filter-field { min-width: 0; }
.admin-filter-field label { display: block; margin-bottom: 6px; color: #4c596f; font-size: .78rem; font-weight: 700; }
.admin-filter-field input, .admin-filter-field select { width: 100%; }
.admin-filter-actions { display: flex; gap: 8px; }
.admin-filter-actions .button { min-width: 92px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; }
.stat-card { min-height: 150px; display: flex; flex-direction: column; padding: 21px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-sm); }
.stat-card > span { color: var(--text-muted); font-size: .82rem; }
.stat-card > strong { margin: auto 0 4px; font-size: clamp(1.55rem, 3vw, 2.1rem); line-height: 1.1; letter-spacing: -.04em; }
.stat-card small, .stat-card a { color: var(--text-muted); font-size: .76rem; }
.stat-card a { color: var(--primary); font-weight: 700; }
.stat-card-alert { border-color: #f2d6a6; background: #fffcf5; }
.storage-panel { margin-top: 18px; padding: 25px; }
.storage-panel-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.storage-panel-heading h2 { margin: 0; font-size: 1.35rem; }
.storage-panel-heading > p { max-width: 520px; margin: 0; color: var(--text-muted); font-size: .84rem; text-align: right; }
.storage-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-soft); }
.storage-metrics article { min-width: 0; padding: 18px; border-right: 1px solid var(--border); }
.storage-metrics article:last-child { border-right: 0; }
.storage-metrics span, .format-statistics-grid span { display: block; color: var(--text-muted); font-size: .76rem; }
.storage-metrics strong { display: block; margin-top: 8px; font-size: clamp(1.15rem, 2vw, 1.55rem); letter-spacing: -.025em; }
.storage-note { margin: 11px 0 0; color: var(--text-muted); font-size: .78rem; }
.storage-empty { padding: 20px; border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); background: var(--surface-soft); }
.storage-empty strong { font-size: 1.05rem; }
.storage-empty p { margin: 5px 0 0; color: var(--text-muted); font-size: .85rem; }
.admin-notice { margin-top: 16px; padding: 13px 15px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: .84rem; }
.admin-notice-warning { border-color: #f2d6a6; background: #fffcf5; color: #7b5316; }
.format-statistics { margin-top: 24px; }
.format-statistics-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; margin-bottom: 12px; }
.format-statistics-heading h3 { margin: 0; font-size: 1rem; }
.format-statistics-heading p { margin: 0; color: var(--text-muted); font-size: .78rem; }
.format-statistics-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 9px; }
.format-statistics-grid article { min-width: 0; padding: 14px; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.format-statistics-grid strong { display: block; margin: 5px 0 2px; font-size: 1.15rem; }
.format-statistics-grid small { color: var(--text-muted); font-size: .72rem; }
.quick-panel { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 18px; padding: 24px; }
.quick-panel h2 { margin-bottom: 5px; font-size: 1.15rem; }
.quick-panel p { margin-bottom: 0; color: var(--text-muted); }
.table-panel { overflow: hidden; border-radius: var(--radius-md); }
.table-scroll { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.data-table th { padding: 13px 15px; background: var(--surface-soft); color: #657188; font-size: .72rem; letter-spacing: .04em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.data-table td { padding: 13px 15px; border-top: 1px solid var(--border); vertical-align: middle; }
.data-table td > strong, .data-table td > span, .data-table td > small, .data-table td > code { display: block; }
.data-table code { margin-top: 3px; color: var(--text-muted); font-size: .72rem; }
.data-table small { color: var(--text-muted); }
.admin-thumb { width: 70px; height: 52px; display: block; overflow: hidden; border-radius: 8px; background: #e8edf4; }
.admin-thumb img { width: 100%; height: 100%; object-fit: cover; }
.table-filename { max-width: 240px; }
.format-badge { display: inline-flex !important; padding: 5px 8px; border-radius: 8px; background: var(--primary-soft); color: #2d53b3; font-size: .75rem; font-weight: 750; white-space: nowrap; }
.admin-images-table td:nth-child(4) small { margin-top: 5px; }
.actions-column { text-align: right !important; }
.table-actions { text-align: right; white-space: nowrap; }
.table-actions form, .table-actions .button { display: inline-flex; margin: 2px; }
.empty-state { padding: 56px 24px; text-align: center; }
.empty-state h2 { margin-bottom: 8px; font-size: 1.35rem; }
.empty-state p { margin-bottom: 0; color: var(--text-muted); }
.pagination { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; margin-top: 20px; color: var(--text-muted); font-size: .85rem; }
.pagination > :last-child { justify-self: end; }
.reports-list { display: grid; gap: 13px; }
.report-card { display: grid; grid-template-columns: 128px 1fr; gap: 20px; padding: 18px; }
.report-open { border-left: 4px solid #e8aa42; }
.report-thumb { width: 128px; height: 100px; overflow: hidden; border-radius: 11px; background: #e8edf4; }
.report-thumb img { width: 100%; height: 100%; object-fit: cover; }
.report-content { min-width: 0; }
.report-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.report-title-row h2 { margin: 7px 0 0; font-size: 1.12rem; }
.report-title-row time { color: var(--text-muted); font-size: .77rem; white-space: nowrap; }
.report-file { margin: 8px 0; color: var(--text-muted); font-size: .82rem; }
.report-details { margin: 10px 0 14px; padding: 11px 13px; border-radius: 9px; background: var(--surface-soft); color: #4c596f; font-size: .88rem; }
.report-card .button-row { margin-top: 12px; }

.settings-notice { margin-bottom: 16px; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: #4f5d73; font-size: .9rem; }
.settings-notice-warning { border-color: #f2d6a6; background: #fffcf5; color: #7b5316; }
.settings-panel { overflow: hidden; }
.settings-panel-secondary { margin-top: 18px; }
.settings-form { display: grid; }
.settings-group-heading { padding: 25px 26px 20px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--surface-soft); }
.settings-group-heading-first { border-top: 0; }
.settings-group-heading .eyebrow { margin-bottom: 7px; }
.settings-group-heading h2 { margin-bottom: 7px; font-size: 1.3rem; }
.settings-group-heading > p:last-child { max-width: 760px; margin-bottom: 0; color: var(--text-muted); font-size: .88rem; }
.setting-row { min-height: 112px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(180px, 260px); align-items: center; gap: 32px; padding: 23px 26px; border-bottom: 1px solid var(--border); }
.setting-row > div > label { display: block; margin-bottom: 5px; font-weight: 750; }
.setting-row p { max-width: 700px; margin: 0; color: var(--text-muted); font-size: .86rem; }
.setting-row-field > input, .setting-row-field > select { justify-self: end; }
.switch-control { justify-self: end; position: relative; cursor: pointer; }
.switch-control input { position: absolute; opacity: 0; pointer-events: none; }
.switch-control > span[aria-hidden] { width: 52px; height: 30px; display: block; position: relative; border-radius: 99px; background: #cbd6e4; transition: background .16s ease; }
.switch-control > span[aria-hidden]::after { content: ""; width: 24px; height: 24px; position: absolute; top: 3px; left: 3px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(18, 32, 55, .2); transition: transform .16s ease; }
.switch-control input:checked + span { background: var(--primary); }
.switch-control input:checked + span::after { transform: translateX(22px); }
.switch-control input:focus-visible + span { outline: 3px solid rgba(56, 103, 232, .25); outline-offset: 3px; }
.range-control { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) 46px; align-items: center; gap: 12px; }
.range-control input { width: 100%; accent-color: var(--primary); cursor: pointer; }
.range-control output { min-width: 42px; padding: 5px 7px; border-radius: 8px; background: var(--surface-soft); color: var(--text); font-size: .82rem; font-weight: 750; text-align: center; }
.settings-capabilities { display: flex; gap: 20px; padding: 16px 26px; background: var(--surface-soft); color: var(--text-muted); font-size: .82rem; }
.settings-capabilities strong { color: var(--text); }
.settings-actions { justify-content: flex-end; padding: 20px 26px; }
.ad-code-helper { display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 18px 26px; border-bottom: 1px solid var(--border); background: #fbfcfe; }
.ad-code-helper strong { display: block; margin-bottom: 3px; font-size: .92rem; }
.ad-code-helper p { max-width: 700px; margin: 0; color: var(--text-muted); font-size: .84rem; }
.setting-row-code { grid-template-columns: 1fr; gap: 12px; align-items: stretch; }
.setting-row-code code { padding: 2px 5px; border-radius: 5px; background: var(--surface-soft); color: #46546b; font-size: .8rem; }
.code-textarea { min-height: 116px; font-family: "Cascadia Code", "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: .82rem; line-height: 1.5; tab-size: 4; }
.settings-code-warning { margin: 18px 26px 0; padding: 13px 15px; border: 1px solid #f2d6a6; border-radius: var(--radius-sm); background: #fffcf5; color: #7b5316; font-size: .84rem; }

.site-footer { flex: 0 0 auto; border-top: 1px solid var(--border); background: #fff; }
.footer-inner { min-height: 80px; display: flex; align-items: center; justify-content: space-between; gap: 20px; color: var(--text-muted); font-size: .82rem; }
.footer-inner p { margin: 0; }
.footer-inner nav { display: flex; gap: 20px; }
.footer-inner a { color: var(--text-muted); }
.footer-inner a:hover { color: var(--text); }
.toast-region { position: fixed; z-index: 100; right: 22px; bottom: 22px; display: grid; gap: 9px; pointer-events: none; }
.toast { max-width: 360px; padding: 13px 17px; border: 1px solid #cce7dc; border-radius: 12px; background: #fff; color: var(--text); box-shadow: 0 16px 45px rgba(18, 32, 55, .18); opacity: 0; transform: translateY(10px); transition: opacity .2s, transform .2s; }
.toast::before { content: ""; width: 8px; height: 8px; display: inline-block; margin-right: 9px; border-radius: 50%; background: var(--success); }
.toast-error { border-color: #f1ced3; }
.toast-error::before { background: var(--danger); }
.toast-info::before { background: var(--primary); }
.toast.is-visible { opacity: 1; transform: translateY(0); }

@media (max-width: 1040px) {
    .image-info { grid-template-columns: 1fr; }
    .image-meta { justify-content: flex-start; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .admin-image-filters { grid-template-columns: minmax(240px, 2fr) repeat(2, minmax(150px, 1fr)); }
    .admin-filter-actions { grid-column: 1 / -1; justify-content: flex-end; }
    .storage-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .storage-metrics article:nth-child(2) { border-right: 0; }
    .storage-metrics article:nth-child(-n + 2) { border-bottom: 1px solid var(--border); }
    .format-statistics-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
    .hero-section { padding-top: 52px; }
    .trust-row { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; }
    .admin-shell { grid-template-columns: 1fr; }
    .admin-sidebar { position: static; overflow-x: auto; }
    .admin-sidebar nav { display: flex; min-width: max-content; }
    .heading-with-actions { flex-direction: column; align-items: stretch; }
    .search-form { width: 100%; }
    .admin-image-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .admin-filter-search { grid-column: 1 / -1; }
    .storage-panel-heading { align-items: flex-start; flex-direction: column; gap: 8px; }
    .storage-panel-heading > p { text-align: left; }
    .quick-panel { align-items: flex-start; flex-direction: column; }
    .file-queue-list { grid-template-columns: 1fr; }
    .batch-result-heading { align-items: stretch; flex-direction: column; }
    .batch-result-heading > .button { align-self: flex-start; }
    .batch-delete-action { grid-template-columns: 1fr; }
    .batch-delete-action .button-row { justify-content: flex-start; }
}

@media (max-width: 640px) {
    .container, .admin-shell { width: min(100% - 24px, var(--container)); }
    .header-inner { min-height: auto; padding: 13px 0; align-items: flex-start; flex-direction: column; gap: 10px; }
    .brand-mark { width: 32px; height: 32px; }
    .main-nav { width: 100%; overflow-x: auto; }
    .main-nav a { flex: 0 0 auto; padding: 7px 10px; font-size: .82rem; }
    .header-admin { width: 100%; justify-content: space-between; }
    .hero-section { padding: 38px 0 24px; }
    .hero-copy { margin-bottom: 24px; }
    .hero-copy > p:last-child { font-size: 1rem; }
    .upload-card { padding: 9px; border-radius: 20px; }
    .drop-zone { min-height: 300px; padding: 28px 16px; border-radius: 14px; }
    .drop-zone h2 { font-size: 1.25rem; }
    .upload-icon { width: 58px; height: 58px; border-radius: 17px; }
    .file-preview { grid-template-columns: 82px 1fr; }
    .preview-frame { width: 82px; height: 66px; }
    .file-queue { padding: 11px; }
    .file-queue-heading { align-items: stretch; flex-direction: column; gap: 10px; }
    .file-queue-heading .button { width: 100%; }
    .file-queue-item { grid-template-columns: 52px minmax(0, 1fr) auto; gap: 9px; }
    .file-queue-item img { width: 52px; height: 42px; }
    .file-queue-remove { min-height: 42px; }
    .page-section { padding: 28px 0 50px; }
    .image-section { padding-top: 16px; }
    .image-stage { min-height: 220px; }
    .image-info, .share-card { padding: 20px; }
    .image-meta { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
    .section-heading { align-items: flex-start; }
    .copy-control { align-items: stretch; flex-direction: column; }
    .copy-control .button { width: 100%; }
    .social-share { padding: 20px; }
    .social-share-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .delete-access-card { grid-template-columns: 1fr; padding: 20px; }
    .page-actions { align-items: stretch; flex-direction: column-reverse; text-align: center; }
    .page-actions .button { width: 100%; }
    .batch-image-summary { grid-template-columns: 72px minmax(0, 1fr); gap: 12px; padding: 13px; }
    .batch-thumbnail { width: 72px; height: 58px; }
    .batch-image-summary > .button { grid-column: 1 / -1; width: 100%; }
    .batch-image-card .button { min-height: 44px; }
    .batch-link-list { padding: 14px 13px; }
    .batch-delete-action { padding: 14px 13px; }
    .batch-delete-action .button-row { align-items: stretch; flex-direction: column; }
    .batch-delete-action .button { width: 100%; }
    .batch-failed-panel { padding: 18px 14px; }
    .batch-failed-list li { grid-template-columns: 1fr; gap: 4px; }
    .batch-result-actions .button { width: 100%; }
    .form-panel, .confirmation-panel, .login-panel, .error-panel, .prose { padding: 25px 20px; }
    .field-label { flex-direction: column; gap: 1px; }
    .form-panel form > .button-row, .confirmation-panel .button-row { align-items: stretch; flex-direction: column-reverse; }
    .form-panel .button-row .button, .confirmation-panel .button-row .button { width: 100%; }
    .stats-grid { grid-template-columns: 1fr; }
    .stat-card { min-height: 128px; }
    .admin-shell { margin-top: 18px; gap: 20px; }
    .admin-page-heading { min-height: 0; align-items: stretch; flex-direction: column; }
    .admin-page-heading > .button { width: 100%; }
    .setting-row { grid-template-columns: 1fr; gap: 15px; padding: 20px; }
    .settings-group-heading { padding: 22px 20px 18px; }
    .setting-row-field > input, .setting-row-field > select, .switch-control { width: 100%; justify-self: stretch; }
    .switch-control > span[aria-hidden] { width: 52px; }
    .settings-capabilities { align-items: flex-start; flex-direction: column; gap: 5px; padding: 15px 20px; }
    .settings-actions { padding: 18px 20px; }
    .settings-actions .button { width: 100%; }
    .ad-code-helper { align-items: stretch; flex-direction: column; padding: 18px 20px; }
    .ad-code-helper .button { width: 100%; }
    .setting-row-code { gap: 11px; }
    .settings-code-warning { margin: 16px 20px 0; }
    .search-form { flex-direction: column; }
    .admin-image-filters { grid-template-columns: 1fr; padding: 14px; }
    .admin-filter-search, .admin-filter-actions { grid-column: auto; }
    .admin-filter-actions { align-items: stretch; flex-direction: column; }
    .admin-filter-actions .button { width: 100%; }
    .storage-panel { padding: 20px; }
    .storage-metrics { grid-template-columns: 1fr; }
    .storage-metrics article { border-right: 0; border-bottom: 1px solid var(--border); }
    .storage-metrics article:nth-child(2) { border-right: 0; }
    .storage-metrics article:nth-child(-n + 2) { border-bottom: 1px solid var(--border); }
    .storage-metrics article:last-child { border-bottom: 0; }
    .format-statistics-heading { align-items: flex-start; flex-direction: column; gap: 4px; }
    .format-statistics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .report-card { grid-template-columns: 74px 1fr; gap: 13px; padding: 13px; }
    .report-thumb { width: 74px; height: 68px; }
    .report-title-row { flex-direction: column; gap: 6px; }
    .report-card .button-row { align-items: stretch; flex-direction: column; }
    .report-card .button-row .button, .report-card .button-row form { width: 100%; }
    .footer-inner { padding: 24px 0; align-items: flex-start; flex-direction: column; }
    .footer-inner nav { gap: 10px; flex-direction: column; }
    .toast-region { right: 12px; bottom: 12px; left: 12px; }
    .toast { max-width: none; }
}

@media (max-width: 420px) {
    .social-share-actions { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
