: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;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    min-height: 100vh;
    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;
}
main { 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 { 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; }
.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; padding: 24px; background: #eef2f7; background-image: linear-gradient(45deg, rgba(148, 163, 184, .08) 25%, transparent 25%), linear-gradient(-45deg, rgba(148, 163, 184, .08) 25%, transparent 25%), linear-gradient(45deg, transparent 75%, rgba(148, 163, 184, .08) 75%), linear-gradient(-45deg, transparent 75%, rgba(148, 163, 184, .08) 75%); background-size: 24px 24px; background-position: 0 0, 0 12px, 12px -12px, -12px 0; }
.image-stage img { width: auto; height: auto; max-height: 72vh; display: block; border-radius: 7px; box-shadow: 0 10px 32px rgba(27, 38, 57, .16); }
.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; }
.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; }

input[type="text"], input[type="password"], input[type="search"], 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, 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; 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-section { margin-top: 18px; margin-bottom: 18px; }
.ad-slot { min-height: 90px; display: grid; place-items: center; margin: 18px 0; border: 1px dashed var(--border-strong); border-radius: var(--radius-md); background: rgba(255, 255, 255, .45); color: #909bb0; font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; }
.ad-slot:empty { display: none; }
.ad-section:has(.ad-slot:empty) { display: none; }

.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; }
.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; }
.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; }
.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; }

.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); }
}

@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%; }
    .quick-panel { align-items: flex-start; flex-direction: column; }
}

@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; }
    .page-section { padding: 28px 0 50px; }
    .image-section { padding-top: 16px; }
    .image-stage { min-height: 220px; padding: 12px; }
    .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%; }
    .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%; }
    .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; }
    .search-form { flex-direction: column; }
    .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 (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
