:root {
    --paper: #f4f1ea;
    --paper-deep: #ebe6dc;
    --ink: #18201d;
    --ink-soft: #5f6762;
    --line: rgba(24, 32, 29, 0.13);
    --card: rgba(255, 255, 255, 0.76);
    --white: #ffffff;
    --green: #1f5948;
    --green-bright: #2d765f;
    --green-pale: #dce9e1;
    --danger: #ad3d35;
    --danger-pale: #f5e1de;
    --shadow: 0 20px 60px rgba(39, 42, 35, 0.10);
    --shadow-soft: 0 12px 32px rgba(39, 42, 35, 0.08);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-sm: 10px;
    --content: 1320px;
    --font-sans: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, -apple-system, sans-serif;
    --font-display: "Songti SC", "STSong", "SimSun", serif;
}

* {
    box-sizing: border-box;
}

html {
    color-scheme: light;
    background: var(--paper);
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-width: 320px;
    min-height: 100vh;
    color: var(--ink);
    background:
        radial-gradient(circle at 18% 8%, rgba(255, 255, 255, 0.9), transparent 25rem),
        linear-gradient(180deg, var(--paper) 0%, #f7f5f0 100%);
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
}

body::before {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    content: "";
    opacity: 0.28;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 140 140' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.055'/%3E%3C/svg%3E");
}

button,
input {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

a {
    color: inherit;
}

button {
    color: inherit;
}

svg {
    display: block;
    width: 1.25rem;
    height: 1.25rem;
    fill: currentColor;
}

.site-header,
.admin-header {
    width: min(calc(100% - 48px), var(--content));
    margin: 0 auto;
    min-height: 94px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    border-bottom: 1px solid var(--line);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    color: var(--paper);
    background: var(--ink);
    border-radius: 13px;
    box-shadow: 0 8px 20px rgba(24, 32, 29, 0.16);
}

.brand-mark svg {
    width: 22px;
    height: 22px;
}

.brand > span:last-child {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand strong {
    font-size: 18px;
    letter-spacing: 0.12em;
}

.brand small {
    margin-top: 5px;
    color: var(--ink-soft);
    font-size: 11px;
    letter-spacing: 0.12em;
}

.header-actions,
.admin-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.admin-nav form {
    margin: 0;
}

.preview-badge {
    display: inline-flex;
    align-items: center;
    height: 28px;
    padding: 0 11px;
    color: var(--green);
    border: 1px solid rgba(31, 89, 72, 0.25);
    background: var(--green-pale);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.text-link,
.button-link {
    color: var(--ink-soft);
    font-size: 14px;
    font-weight: 650;
    text-decoration: none;
    transition: color 180ms ease;
}

.button-link {
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.text-link:hover,
.text-link:focus-visible,
.button-link:hover,
.button-link:focus-visible {
    color: var(--green);
}

.public-page main,
.admin-main {
    width: min(calc(100% - 48px), var(--content));
    margin: 0 auto;
}

.intro {
    min-height: 380px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 56px;
    padding: 82px 0 68px;
}

.eyebrow {
    margin: 0 0 18px;
    color: var(--green);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.24em;
}

.intro h1,
.login-copy h1 {
    margin: 0;
    max-width: 820px;
    font-family: var(--font-display);
    font-size: clamp(42px, 6vw, 76px);
    font-weight: 500;
    line-height: 1.16;
    letter-spacing: -0.035em;
}

.intro-meta {
    min-width: 160px;
    padding: 0 0 6px 24px;
    border-left: 1px solid var(--line);
}

.count-number {
    display: block;
    font-family: var(--font-display);
    font-size: 46px;
    line-height: 1;
}

.count-label {
    display: block;
    margin-top: 7px;
    color: var(--ink);
    font-size: 13px;
    font-weight: 700;
}

.intro-meta p {
    margin: 20px 0 0;
    max-width: 150px;
    color: var(--ink-soft);
    font-size: 12px;
    line-height: 1.7;
}

.gallery-grid,
.admin-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
    padding-bottom: 84px;
}

.gallery-card,
.admin-card {
    min-width: 0;
    overflow: hidden;
    background: var(--card);
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
}

.gallery-card {
    opacity: 0;
    transform: translateY(16px);
    animation: card-arrive 520ms cubic-bezier(.2, .7, .2, 1) forwards;
    animation-delay: var(--delay, 0ms);
}

@keyframes card-arrive {
    to { opacity: 1; transform: translateY(0); }
}

.gallery-image-button {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    display: block;
    overflow: hidden;
    padding: 0;
    border: 0;
    background: var(--paper-deep);
    cursor: zoom-in;
}

.gallery-image-button img,
.admin-card-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform 480ms cubic-bezier(.2, .7, .2, 1), filter 300ms ease;
}

.image-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 55%, rgba(10, 16, 14, 0.34));
    opacity: 0;
    transition: opacity 250ms ease;
}

.view-pill {
    position: absolute;
    right: 16px;
    bottom: 16px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 11px;
    color: var(--white);
    background: rgba(17, 27, 23, 0.68);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    backdrop-filter: blur(12px);
    font-size: 12px;
    font-weight: 700;
    opacity: 0;
    transform: translateY(7px);
    transition: opacity 230ms ease, transform 230ms ease;
}

.view-pill svg {
    width: 16px;
    height: 16px;
}

.gallery-image-button:hover img,
.gallery-image-button:focus-visible img {
    transform: scale(1.035);
    filter: saturate(1.04);
}

.gallery-image-button:hover .image-shade,
.gallery-image-button:focus-visible .image-shade,
.gallery-image-button:hover .view-pill,
.gallery-image-button:focus-visible .view-pill {
    opacity: 1;
}

.gallery-image-button:hover .view-pill,
.gallery-image-button:focus-visible .view-pill {
    transform: translateY(0);
}

.gallery-card-body {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 21px 22px;
}

.gallery-card-body h2,
.admin-card-body h2 {
    min-width: 0;
    margin: 0;
    overflow: hidden;
    font-size: 17px;
    font-weight: 750;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gallery-card-body time,
.admin-card-body time {
    flex: none;
    color: var(--ink-soft);
    font-size: 11px;
}

.empty-state,
.admin-empty {
    min-height: 330px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 84px;
    padding: 48px 24px;
    text-align: center;
    border: 1px dashed rgba(24, 32, 29, 0.22);
    background: rgba(255, 255, 255, 0.34);
    border-radius: var(--radius-xl);
}

.empty-icon {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    margin-bottom: 20px;
    color: var(--green);
    background: var(--green-pale);
    border-radius: 18px;
    font-size: 22px;
    font-weight: 800;
}

.empty-icon svg {
    width: 27px;
    height: 27px;
}

.empty-state h2,
.admin-empty h2 {
    margin: 0 0 10px;
    font-family: var(--font-display);
    font-size: 27px;
    font-weight: 600;
}

.empty-state p,
.admin-empty p {
    margin: 0 0 24px;
    color: var(--ink-soft);
    font-size: 14px;
    line-height: 1.7;
}

.error-state .empty-icon {
    color: var(--danger);
    background: var(--danger-pale);
}

.site-footer {
    width: min(calc(100% - 48px), var(--content));
    min-height: 92px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--ink-soft);
    border-top: 1px solid var(--line);
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 750;
    text-decoration: none;
    cursor: pointer;
    transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

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

.button:active {
    transform: translateY(0);
}

.button:disabled {
    cursor: wait;
    opacity: 0.62;
}

.button svg {
    width: 18px;
    height: 18px;
}

.button-primary {
    color: var(--white);
    background: var(--green);
    box-shadow: 0 10px 24px rgba(31, 89, 72, 0.2);
}

.button-primary:hover {
    background: var(--green-bright);
    box-shadow: 0 12px 28px rgba(31, 89, 72, 0.26);
}

.button-secondary {
    color: var(--ink);
    background: transparent;
    border-color: var(--line);
}

.button-secondary:hover {
    background: var(--paper);
    border-color: rgba(24, 32, 29, 0.24);
}

.button-danger {
    color: var(--white);
    background: var(--danger);
    box-shadow: 0 10px 24px rgba(173, 61, 53, 0.2);
}

.button-danger:hover {
    background: #92322c;
}

.button-large {
    min-height: 50px;
    padding: 0 21px;
}

.button-block {
    width: 100%;
}

/* 图片大图预览 */

.image-viewer {
    width: min(96vw, 1440px);
    max-width: none;
    height: min(92dvh, 980px);
    max-height: 92dvh;
    margin: auto;
    padding: 0;
    overflow: hidden;
    display: grid;
    grid-template-rows: minmax(0, 1fr);
    color: var(--white);
    background: #111713;
    border: 0;
    border-radius: 24px;
    box-shadow: 0 32px 100px rgba(0, 0, 0, 0.42);
}

.image-viewer:not([open]) {
    display: none;
}

.image-viewer::backdrop,
.app-dialog::backdrop {
    background: rgba(10, 14, 12, 0.72);
    backdrop-filter: blur(7px);
}

.viewer-stage {
    width: 100%;
    min-width: 0;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 18px;
    background: #0d110f;
}

.viewer-stage img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
}


.viewer-close,
.dialog-close,
.icon-button {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    padding: 0;
    color: inherit;
    border: 0;
    border-radius: 12px;
    cursor: pointer;
}

.viewer-close {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 2;
    color: var(--white);
    background: rgba(20, 25, 23, 0.68);
    backdrop-filter: blur(12px);
}

.viewer-close:hover {
    background: rgba(20, 25, 23, 0.9);
}

/* 登录 */

.login-page {
    overflow-x: hidden;
    background: #18201d;
}

.login-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(380px, 0.9fr) minmax(520px, 1.1fr);
}

.login-aside {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    padding: 48px clamp(38px, 6vw, 96px);
    color: var(--white);
    background:
        radial-gradient(circle at 20% 20%, rgba(84, 143, 119, 0.38), transparent 28rem),
        linear-gradient(140deg, #1e322a 0%, #101714 100%);
}

.login-aside::after {
    position: absolute;
    right: -170px;
    bottom: -200px;
    width: 520px;
    height: 520px;
    content: "";
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 46% 54% 62% 38%;
    transform: rotate(18deg);
}

.brand-light {
    position: relative;
    z-index: 1;
}

.brand-light .brand-mark {
    color: var(--ink);
    background: var(--paper);
}

.brand-light small {
    color: rgba(255, 255, 255, 0.6);
}

.login-copy {
    position: relative;
    z-index: 1;
    max-width: 610px;
    padding: 80px 0;
}

.login-copy .eyebrow {
    color: #93c6ad;
}

.login-copy h1 {
    font-size: clamp(40px, 4.6vw, 67px);
}

.login-copy > p:last-child {
    max-width: 470px;
    margin: 30px 0 0;
    color: rgba(255, 255, 255, 0.62);
    font-size: 15px;
    line-height: 1.9;
}

.login-footnote {
    position: relative;
    z-index: 1;
    margin: 0;
    color: rgba(255, 255, 255, 0.38);
    font-size: 11px;
    letter-spacing: 0.16em;
}

.login-panel {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 54px;
    background: var(--paper);
}

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

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 66px;
    color: var(--ink-soft);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.back-link svg {
    width: 18px;
    height: 18px;
}

.form-heading {
    margin-bottom: 34px;
}

.form-heading h2 {
    margin: 0 0 8px;
    font-family: var(--font-display);
    font-size: 38px;
    font-weight: 600;
}

.form-heading p {
    margin: 0;
    color: var(--ink-soft);
    font-size: 14px;
}

.mobile-logo {
    display: none;
}

.stack-form,
.field-stack {
    display: grid;
    gap: 20px;
}

.field {
    display: grid;
    gap: 9px;
}

.field > span {
    font-size: 13px;
    font-weight: 700;
}

.field input {
    width: 100%;
    height: 50px;
    padding: 0 15px;
    color: var(--ink);
    outline: none;
    border: 1px solid rgba(24, 32, 29, 0.15);
    background: rgba(255, 255, 255, 0.65);
    border-radius: 12px;
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.field input::placeholder {
    color: #9b9f9c;
}

.field input:focus {
    border-color: var(--green-bright);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(45, 118, 95, 0.11);
}

.inline-notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 22px;
    padding: 13px 15px;
    border-radius: 11px;
    font-size: 13px;
    line-height: 1.5;
}

.inline-notice > span {
    width: 19px;
    height: 19px;
    flex: none;
    display: grid;
    place-items: center;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 800;
}

.notice-error {
    color: #7d2f2a;
    background: var(--danger-pale);
    border: 1px solid rgba(173, 61, 53, 0.12);
}

.notice-error > span {
    color: var(--white);
    background: var(--danger);
}

.security-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin: 23px 0 0;
    color: #858b87;
    font-size: 11px;
}

.security-note svg {
    width: 15px;
    height: 15px;
}

/* 管理后台 */

.admin-header {
    min-height: 82px;
}

.admin-main {
    padding: 66px 0 84px;
}

.admin-title-row {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 36px;
    margin-bottom: 42px;
}

.admin-title-row h1 {
    margin: 0 0 10px;
    font-family: var(--font-display);
    font-size: clamp(38px, 5vw, 58px);
    font-weight: 600;
    letter-spacing: -0.03em;
}

.admin-title-row > div > p:last-child {
    margin: 0;
    color: var(--ink-soft);
    font-size: 14px;
}

.icon-button {
    color: var(--ink-soft);
    background: rgba(255, 255, 255, 0.52);
    border: 1px solid var(--line);
}

.icon-button:hover {
    color: var(--danger);
    background: var(--danger-pale);
    border-color: rgba(173, 61, 53, 0.15);
}

.admin-card {
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr);
    min-height: 132px;
}

.admin-card-image {
    min-height: 132px;
    overflow: hidden;
    background: var(--paper-deep);
}

.admin-card-body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 18px;
    padding: 20px;
}

.admin-card-body time {
    display: block;
    margin-top: 8px;
}

.card-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.small-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    color: var(--green);
    border: 0;
    background: transparent;
    font-size: 12px;
    font-weight: 750;
    cursor: pointer;
}

.small-action svg {
    width: 15px;
    height: 15px;
}

.danger-action {
    color: var(--danger);
}

.admin-empty {
    min-height: 390px;
    margin: 0;
}

/* 站内弹窗与提示 */

.app-dialog {
    width: min(calc(100% - 32px), 560px);
    max-width: none;
    max-height: min(88vh, 760px);
    margin: auto;
    padding: 0;
    overflow: auto;
    color: var(--ink);
    background: transparent;
    border: 0;
    border-radius: 22px;
}

.compact-dialog {
    width: min(calc(100% - 32px), 480px);
}

.dialog-card {
    overflow: hidden;
    background: #fbfaf7;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 22px;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.3);
}

.dialog-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding: 26px 28px 22px;
    border-bottom: 1px solid var(--line);
}

.dialog-header .eyebrow {
    margin-bottom: 8px;
}

.dialog-header h2,
.confirm-body h2 {
    margin: 0;
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 650;
}

.dialog-close {
    flex: none;
    color: var(--ink-soft);
    background: var(--paper);
}

.dialog-close:hover {
    color: var(--ink);
    background: var(--paper-deep);
}

.dialog-body {
    display: grid;
    gap: 22px;
    padding: 26px 28px 28px;
}

.dialog-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 18px 28px;
    background: var(--paper);
    border-top: 1px solid var(--line);
}

.centered-footer {
    justify-content: center;
}

.upload-dropzone {
    min-height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 25px;
    text-align: center;
    border: 1px dashed rgba(31, 89, 72, 0.36);
    background: rgba(220, 233, 225, 0.34);
    border-radius: 16px;
    cursor: pointer;
    transition: background 160ms ease, border-color 160ms ease;
}

.upload-dropzone:hover {
    border-color: var(--green);
    background: rgba(220, 233, 225, 0.68);
}

.upload-dropzone input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.upload-icon {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    margin-bottom: 4px;
    color: var(--white);
    background: var(--green);
    border-radius: 14px;
}

.upload-icon svg {
    width: 23px;
    height: 23px;
}

.upload-dropzone strong {
    max-width: 100%;
    overflow: hidden;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.upload-dropzone > span:last-child {
    color: var(--ink-soft);
    font-size: 11px;
}

.form-error {
    min-height: 18px;
    margin: -7px 0 0;
    color: var(--danger);
    font-size: 12px;
    line-height: 1.5;
}

.form-error:empty {
    display: none;
}

.confirm-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 36px 34px 29px;
    text-align: center;
}

.confirm-icon {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    margin-bottom: 20px;
    color: var(--danger);
    background: var(--danger-pale);
    border-radius: 18px;
}

.confirm-icon svg {
    width: 28px;
    height: 28px;
}

.confirm-body > p:not(.form-error) {
    margin: 13px 0 0;
    color: var(--ink-soft);
    font-size: 13px;
    line-height: 1.7;
}

.confirm-body .form-error {
    margin-top: 14px;
}

.toast-region {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 1000;
    display: grid;
    gap: 10px;
    pointer-events: none;
}

.toast {
    min-width: min(340px, calc(100vw - 32px));
    max-width: 420px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    color: var(--white);
    background: #18201d;
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 13px;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
    font-size: 13px;
    animation: toast-in 240ms ease both;
}

.toast-error {
    background: #792e29;
}

.toast-mark {
    width: 22px;
    height: 22px;
    flex: none;
    display: grid;
    place-items: center;
    color: var(--ink);
    background: var(--green-pale);
    border-radius: 50%;
    font-weight: 800;
}

.toast-error .toast-mark {
    color: var(--danger);
    background: var(--danger-pale);
}

.toast-leaving {
    animation: toast-out 220ms ease both;
}

@keyframes toast-in {
    from { opacity: 0; transform: translateY(10px) scale(.98); }
}

@keyframes toast-out {
    to { opacity: 0; transform: translateY(8px) scale(.98); }
}

/* 平板 */

@media (max-width: 1024px) {
    .gallery-grid,
    .admin-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .intro {
        min-height: 320px;
        padding: 62px 0 54px;
    }

    .login-shell {
        grid-template-columns: minmax(340px, 0.8fr) minmax(440px, 1.2fr);
    }

    .login-aside {
        padding: 42px;
    }

    .admin-card {
        grid-template-columns: 118px minmax(0, 1fr);
    }
}

/* 手机 */

@media (max-width: 740px) {
    .site-header,
    .admin-header,
    .public-page main,
    .admin-main,
    .site-footer {
        width: min(calc(100% - 32px), var(--content));
    }

    .site-header,
    .admin-header {
        min-height: 74px;
    }

    .brand-mark {
        width: 38px;
        height: 38px;
        border-radius: 12px;
    }

    .brand strong {
        font-size: 16px;
    }

    .brand small {
        font-size: 9px;
    }

    .preview-badge,
    .admin-nav > .text-link,
    .admin-nav > .button-link {
        display: none;
    }

    .header-actions {
        gap: 0;
    }

    .intro {
        min-height: auto;
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 54px 0 45px;
    }

    .intro h1 {
        font-size: clamp(36px, 11vw, 53px);
        line-height: 1.18;
    }

    .intro-meta {
        display: grid;
        grid-template-columns: auto 1fr;
        align-items: end;
        column-gap: 10px;
        padding: 0;
        border: 0;
    }

    .count-number {
        grid-row: 1 / 3;
        font-size: 42px;
    }

    .count-label {
        margin: 0 0 4px;
    }

    .intro-meta p {
        margin: 0;
        max-width: none;
    }

    .gallery-grid,
    .admin-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding-bottom: 60px;
    }

    .gallery-card-body {
        padding: 17px 18px 19px;
    }

    .image-shade,
    .view-pill {
        opacity: 1;
    }

    .view-pill {
        transform: translateY(0);
    }

    .site-footer {
        min-height: 76px;
    }

    .image-viewer {
        position: fixed;
        inset: 0;
        width: var(--viewer-width, 100vw);
        max-width: var(--viewer-width, 100vw);
        height: var(--viewer-height, 100dvh);
        max-height: var(--viewer-height, 100dvh);
        margin: 0;
        padding: 0;
        border-radius: 0;
        grid-template-rows: 1fr;
        overflow: hidden;
    }

    .viewer-stage {
        position: absolute;
        inset: 0;
        box-sizing: border-box;
        width: 100%;
        height: 100%;
        min-width: 0;
        min-height: 0;
        display: block;
        padding:
            max(12px, env(safe-area-inset-top))
            max(12px, env(safe-area-inset-right))
            max(12px, env(safe-area-inset-bottom))
            max(12px, env(safe-area-inset-left));
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-y: contain;
        touch-action: pan-y;
        text-align: center;
    }

    .viewer-stage img {
        display: block;
        width: auto;
        height: auto;
        max-width: none;
        max-height: none;
        margin: 0 auto;
        object-fit: contain;
        object-position: top center;
        user-select: none;
        -webkit-user-drag: none;
    }


    .viewer-close {
        top: max(12px, env(safe-area-inset-top));
        right: max(12px, env(safe-area-inset-right));
    }

    .login-shell {
        display: block;
    }

    .login-aside {
        display: none;
    }

    .login-panel {
        min-height: 100dvh;
        padding: 26px 24px 44px;
    }

    .login-form-wrap {
        align-self: start;
        margin-top: 4px;
    }

    .back-link {
        margin-bottom: 54px;
    }

    .mobile-logo {
        display: inline-flex;
        margin-bottom: 20px;
        color: var(--green);
        font-size: 13px;
        font-weight: 800;
        letter-spacing: 0.18em;
    }

    .form-heading h2 {
        font-size: 35px;
    }

    .admin-main {
        padding: 48px 0 64px;
    }

    .admin-title-row {
        align-items: stretch;
        flex-direction: column;
        gap: 24px;
        margin-bottom: 30px;
    }

    .admin-title-row .button {
        width: 100%;
    }

    .admin-card {
        grid-template-columns: 112px minmax(0, 1fr);
    }

    .admin-card-body {
        padding: 17px;
    }

    .toast-region {
        right: 16px;
        bottom: 16px;
        left: 16px;
    }

    .toast {
        min-width: 0;
        max-width: none;
    }

    .app-dialog {
        width: calc(100% - 22px);
        max-height: calc(100dvh - 22px);
    }

    .dialog-header,
    .dialog-body {
        padding-right: 21px;
        padding-left: 21px;
    }

    .dialog-footer {
        padding: 15px 21px;
    }

    .dialog-footer .button {
        flex: 1;
    }
}

@media (max-width: 420px) {
    .gallery-card-body time {
        display: none;
    }

    .admin-card {
        grid-template-columns: 96px minmax(0, 1fr);
    }

    .admin-card-image {
        min-height: 126px;
    }

    .admin-card-body {
        padding: 15px;
    }

    .card-actions {
        gap: 12px;
    }

    .dialog-footer {
        flex-direction: column-reverse;
    }

    .dialog-footer .button {
        width: 100%;
    }
}

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

:focus-visible {
    outline: 3px solid rgba(45, 118, 95, 0.34);
    outline-offset: 3px;
}
