:root {
    color-scheme: light dark;
    --bg: #ffffff;
    --bg-muted: #fafafa;
    --bg-elevated: #ffffff;
    --text: #222222;
    --text-muted: #555555;
    --text-soft: #666666;
    --text-faint: #777777;
    --border: #ececec;
    --border-strong: #e0e0e0;
    --accent: #8066ff;
    --accent-hover: #5b3bfc;
    --accent-soft: #cfc4ff;
    --callout-bg: #faf8ff;
    --callout-border: #e8e4ff;
    --callout-heading: #5b3bfc;
    --link: #5b3bfc;
    --link-hover: #3d28c4;
    --shadow: rgba(0, 0, 0, 0.08);
    --input-bg: #ffffff;
    --photo-bg: #f4f4f4;
    --hover-bg: #f4f4f4;
    --success-bg: #e8f5e9;
    --success-text: #2e7d32;
    --error-bg: #ffebee;
    --error-text: #c62828;
    --news: coral;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #121212;
        --bg-muted: #1a1a1a;
        --bg-elevated: #1e1e1e;
        --text: #ececec;
        --text-muted: #b8b8b8;
        --text-soft: #9a9a9a;
        --text-faint: #888888;
        --border: #2e2e2e;
        --border-strong: #3a3a3a;
        --accent: #9b87ff;
        --accent-hover: #b29fff;
        --accent-soft: #4a3d80;
        --callout-bg: #1f1a2e;
        --callout-border: #3d3558;
        --callout-heading: #b29fff;
        --link: #b29fff;
        --link-hover: #d0c4ff;
        --shadow: rgba(0, 0, 0, 0.35);
        --input-bg: #1e1e1e;
        --photo-bg: #2a2a2a;
        --hover-bg: #2a2a2a;
        --success-bg: #1b2e1c;
        --success-text: #81c784;
        --error-bg: #2e1b1b;
        --error-text: #ef9a9a;
        --news: #ff8a65;
    }
}

html {
    overflow-x: clip;
    max-width: 100%;
}

body {
    width: 100%;
    height: 100%;
    margin: 0;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    font-family: "Cabin", sans-serif;
    background: var(--bg);
    color: var(--text);
}

/* Motion polish */
@keyframes ld-fade-up {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes ld-fade-down {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes ld-fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes ld-scale-in {
    from {
        opacity: 0;
        transform: scale(0.96) translateY(10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes ld-slide-down {
    from {
        opacity: 0;
        transform: translateY(-100%);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }

    body:not(.admin-page) nav {
        animation: ld-fade-down 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
    }

    body:not(.admin-page) main,
    body:not(.admin-page) .goal-page,
    body:not(.admin-page) .maintext {
        animation: ld-fade-up 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.05s both;
    }

    body:not(.admin-page) img#topimg {
        animation: ld-fade-in 0.55s ease 0.08s both;
    }

    body:not(.admin-page) #gallery {
        animation: ld-fade-up 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
    }

    body:not(.admin-page) .site-footer {
        animation: ld-fade-up 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.14s both;
    }

    body:not(.admin-page) .goal-section {
        animation: ld-fade-up 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
    }

    body:not(.admin-page) .goal-section:nth-of-type(2) {
        animation-delay: 0.06s;
    }

    body:not(.admin-page) .goal-section:nth-of-type(3) {
        animation-delay: 0.12s;
    }

    body:not(.admin-page) .goal-section:nth-of-type(4) {
        animation-delay: 0.18s;
    }

    body:not(.admin-page) .goal-section:nth-of-type(n+5) {
        animation-delay: 0.24s;
    }

    body:not(.admin-page) .section {
        animation: ld-fade-up 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
    }

    body:not(.admin-page) .section + .section {
        animation-delay: 0.08s;
    }

    .puppy-empty:not([hidden]) {
        animation: ld-fade-up 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
    }

    .site-announcement {
        transform: translateY(-100%);
        animation: ld-slide-down 0.4s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
    }

    .review-card {
        animation: ld-fade-up 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
    }

    .reviews-list .review-card:nth-child(1) { animation-delay: 0.02s; }
    .reviews-list .review-card:nth-child(2) { animation-delay: 0.07s; }
    .reviews-list .review-card:nth-child(3) { animation-delay: 0.12s; }
    .reviews-list .review-card:nth-child(4) { animation-delay: 0.17s; }
    .reviews-list .review-card:nth-child(n+5) { animation-delay: 0.22s; }

    .contact-status:not([hidden]) {
        animation: ld-fade-up 0.35s ease both;
    }

    .contact-upload-status:not([hidden]) {
        animation: ld-fade-in 0.3s ease both;
    }

    .modal-backdrop.is-open {
        animation: ld-fade-in 0.38s ease both;
    }

    .modal-backdrop.is-open .modal {
        animation: ld-scale-in 0.48s cubic-bezier(0.22, 1, 0.36, 1) both;
    }

    .card .photo img {
        transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    }

    .card:hover .photo img,
    .card:focus-visible .photo img {
        transform: scale(1.04);
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

/* Mobile base styles */
@media (max-width: 768px) {
    html {
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }
}

/* Navigation - Responsive */
nav {
    display: flex;
    justify-content: center;
    gap: 28px;
    padding: 22px 16px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    position: relative;
    background: var(--bg);
}

nav a {
    position: relative;
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 0.2px;
    white-space: nowrap;
    transition: color 0.2s ease;
}

nav a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -4px;
    height: 2px;
    border-radius: 999px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

nav a:hover,
nav a:focus-visible {
    color: var(--text);
}

nav a:hover::after,
nav a:focus-visible::after {
    transform: scaleX(1);
}

nav a.nav-admin {
    color: var(--accent);
    font-weight: 650;
}

nav a.nav-admin:hover,
nav a.nav-admin:focus-visible {
    color: var(--accent-hover);
}

nav a.nav-admin[aria-current="page"] {
    color: var(--text);
}

nav a.nav-admin[aria-current="page"]::after {
    transform: scaleX(1);
}

/* Mobile Navigation */
@media (max-width: 768px) {
    nav {
        gap: 12px;
        padding: 16px 10px;
        justify-content: center;
    }
    
    nav a {
        font-size: 15px;
        padding: 6px 10px;
    }
}

.site-announcement {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 16px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(90deg, var(--accent), var(--accent-hover));
    border-bottom: 1px solid var(--accent-soft);
    position: relative;
    z-index: 20;
}

@media (max-width: 768px) {
    .site-announcement {
        font-size: 13px;
        padding: 9px 12px;
    }
}

@media (max-width: 600px) {
    nav {
        gap: 10px;
        padding: 14px 8px;
        justify-content: center;
    }
    
    nav a {
        font-size: 14px;
        padding: 4px 8px;
    }
}

@media (max-width: 480px) {
    nav {
        flex-direction: column;
        gap: 6px;
        padding: 12px 8px;
        align-items: center;
        justify-content: center;
    }
    
    nav a {
        font-size: 13px;
        padding: 4px 6px;
        text-align: center;
    }
}

img#topimg {
    width: 30%;
    margin-left: 35%;
    margin-top: 20px;
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 30px;
}

@media (max-width: 768px) {
    img#topimg {
        width: 50%;
        margin-left: 25%;
    }
}

@media (max-width: 600px) {
    img#topimg {
        width: 55%;
        margin-left: 22.5%;
    }
}

@media (max-width: 480px) {
    img#topimg {
        width: 60%;
        margin-left: 20%;
    }
}

.maintext {
    text-align: center;
    align-content: center;
    align-items: center;
    width: 80%;
    margin-left: 10%;
    padding: 0 16px;
}

@media (max-width: 768px) {
    .maintext {
        width: 90%;
        margin-left: 5%;
        padding: 0 12px;
    }
}

@media (max-width: 480px) {
    .maintext {
        width: 95%;
        margin-left: 2.5%;
        padding: 0 8px;
    }
}

/* Gallery - Responsive */
#gallery {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    position: relative;
    padding: 30px 0;
    min-height: 140px;
    mask-image: linear-gradient(
        to right,
        transparent 0%,
        black 12%,
        black 88%,
        transparent 100%
    );
    -webkit-mask-image: linear-gradient(
        to right,
        transparent 0%,
        black 12%,
        black 88%,
        transparent 100%
    );
}

#gallery ul {
    list-style: none;
    display: flex;
    gap: 20px;
    padding: 0;
    margin: 0;
    width: max-content;
    animation: gallery-scroll var(--gallery-duration, 18s) linear infinite;
    scrollbar-width: none;
    -ms-overflow-style: none;
    will-change: transform;
}

@media (max-width: 768px) {
    #gallery {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    #gallery ul {
        animation: none;
        overflow-x: auto;
        width: 100%;
        scroll-snap-type: x proximity;
        -webkit-overflow-scrolling: touch;
        padding: 0 16px;
        will-change: auto;
    }

    #gallery ul li {
        scroll-snap-align: center;
    }
}

#gallery ul::-webkit-scrollbar {
    display: none;
}

#gallery ul li {
    flex: 0 0 28vw;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 18px;
    opacity: 0.5;
    transform: scale(0.85);
    filter: blur(0px);
    transition: transform 0.4s ease, opacity 0.4s ease;
}

#gallery ul li img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

#gallery ul li:hover {
    transform: scale(1);
    opacity: 1;
    z-index: 2;
}

.gallery-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 20px;
}

.puppy-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 28px 16px 8px;
    text-align: center;
    color: var(--text-muted);
}

.puppy-empty[hidden] {
    display: none;
}

.puppy-empty-icon {
    width: 56px;
    height: 56px;
    object-fit: contain;
    opacity: 0.85;
}

.puppy-empty p {
    margin: 0;
    font-size: 16px;
}

.error-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 50vh;
    padding: 48px 16px 64px;
    text-align: center;
    max-width: 520px;
    margin: 0 auto;
}

.error-page-icon {
    width: 88px;
    height: 88px;
    object-fit: contain;
    opacity: 0.9;
}

.error-page-code {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
}

.error-page h1 {
    margin: 0;
    font-size: 30px;
    font-weight: 700;
    color: var(--text);
}

.error-page-message {
    margin: 0 0 8px;
    font-size: 16px;
    line-height: 1.55;
    color: var(--text-muted);
}

@media (max-width: 480px) {
    .error-page h1 {
        font-size: 24px;
    }

    .error-page-icon {
        width: 72px;
        height: 72px;
    }
}

@keyframes gallery-scroll {
    0% {
        transform: translate3d(0, 0, 0);
    }

    100% {
        transform: translate3d(-50%, 0, 0);
    }
}

main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 26px 16px 56px;
}

@media (max-width: 768px) {
    main {
        padding: 20px 12px 40px;
    }
}

@media (max-width: 480px) {
    main {
        padding: 16px 8px 32px;
    }
}

h1 {
    margin: 10px 0 6px;
    font-size: 34px;
    font-weight: 700;
    letter-spacing: -0.2px;
    text-align: center;
}

@media (max-width: 768px) {
    h1 {
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 24px;
    }
}

.subtitle {
    margin: 0 0 22px;
    text-align: center;
    color: var(--text-muted);
    line-height: 1.55;
}

@media (max-width: 768px) {
    .subtitle {
        font-size: 15px;
    }
}

.section {
    margin-top: 40px;
}

.section-heading {
    margin: 0 0 16px;
    font-size: 24px;
    font-weight: 650;
    letter-spacing: -0.1px;
}

@media (max-width: 768px) {
    .section-heading {
        font-size: 20px;
    }
}

.section-note {
    margin: -8px 0 16px;
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

.card-sub {
    margin: 6px 0 0;
    font-size: 14px;
    color: #666;
}

.card-badge-not-for-sale {
    color: var(--text-soft, #666);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

/* Filters - Mobile */
.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
    padding: 14px;
    border: 1px solid #ececec;
    border-radius: 14px;
    background: #fafafa;
}

@media (max-width: 768px) {
    .filters {
        gap: 8px;
        padding: 10px;
    }
}

@media (max-width: 600px) {
    .filters {
        gap: 6px;
        padding: 8px;
    }
}

.filter {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 140px;
    flex: 1 1 140px;
}

@media (max-width: 768px) {
    .filter {
        min-width: 100px;
        flex: 1 1 100px;
    }
}

@media (max-width: 600px) {
    .filter {
        min-width: 90px;
        flex: 1 1 90px;
    }
}

@media (max-width: 480px) {
    .filter {
        min-width: 80px;
        flex: 1 1 80px;
    }
}

.filter label {
    font-size: 12px;
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

@media (max-width: 768px) {
    .filter label {
        font-size: 11px;
    }
}

.filter select {
    font-family: inherit;
    font-size: 14px;
    padding: 8px 10px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    background: #fff;
    color: #222;
}

@media (max-width: 768px) {
    .filter select {
        font-size: 13px;
        padding: 6px 8px;
    }
}

@media (max-width: 480px) {
    .filter select {
        font-size: 12px;
        padding: 4px 6px;
    }
}

/* Grid - Mobile */
.grid {
    --grid-gap: 18px;
    --grid-min: 220px;
    --grid-cols: 3;
    container-type: inline-size;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(var(--grid-min), var(--grid-min)));
    justify-content: center;
    gap: var(--grid-gap);
}

@media (max-width: 768px) {
    .grid {
        --grid-gap: 14px;
        --grid-min: 160px;
    }
}

@media (max-width: 480px) {
    .grid {
        --grid-gap: 10px;
        --grid-min: 140px;
    }
}

/* Better mobile grid for smaller screens */
@media (max-width: 600px) {
    .grid {
        --grid-cols: 2;
        --grid-min: 120px;
    }
}

@media (max-width: 400px) {
    .grid {
        --grid-cols: 1;
        --grid-min: min(220px, 100%);
        grid-template-columns: minmax(0, var(--grid-min));
    }
}

.card {
    width: 100%;
    border: 1px solid #ececec;
    border-radius: 18px;
    overflow: hidden;
    background: #fff;
    transform: translateY(0);
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
    cursor: pointer;
}

@media (max-width: 700px) {
    .card {
        max-width: min(
            100%,
            calc((100cqw - (var(--grid-cols) - 1) * var(--grid-gap)) / var(--grid-cols))
        );
        max-height: calc(
            (100cqw - (var(--grid-cols) - 1) * var(--grid-gap)) / var(--grid-cols) * 3 / 4 + 72px
        );
        justify-self: center;
    }

    .photo {
        max-height: calc(
            (100cqw - (var(--grid-cols) - 1) * var(--grid-gap)) / var(--grid-cols) * 3 / 4
        );
    }
}

.card:hover,
.card:focus-visible {
    transform: translateY(-3px);
    border-color: #e2e2e2;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

.card:focus {
    outline: none;
}

.card:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.photo {
    width: 100%;
    aspect-ratio: 4 / 3;
    background: #f4f4f4;
}

.photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.photo-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--photo-bg), var(--border));
}

.meta {
    padding: 14px 14px 16px;
}

@media (max-width: 480px) {
    .meta {
        padding: 10px 10px 12px;
    }
}

.name {
    font-size: 18px;
    font-weight: 650;
    margin: 0;
}

@media (max-width: 768px) {
    .name {
        font-size: 16px;
    }
}

.status {
    margin-top: 10px;
    padding: 14px;
    border: 1px dashed #e0e0e0;
    border-radius: 14px;
    color: #666;
    background: #fafafa;
}

@media (max-width: 768px) {
    .status {
        padding: 10px;
    }
}

/* Modal - Mobile */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    padding: 16px;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.modal-backdrop.is-open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.modal {
    width: min(520px, 92vw);
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.18);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    overflow-y: auto;
    will-change: transform, opacity;
}

@media (max-width: 480px) {
    .modal {
        max-height: 95vh;
    }
}

.modal-top {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
}

.modal-photo {
    background: #f4f4f4;
}

.modal-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.modal-main {
    padding: 18px 20px;
}

@media (max-width: 480px) {
    .modal-main {
        padding: 14px 16px;
    }
}

.modal-name {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 700;
}

@media (max-width: 768px) {
    .modal-name {
        font-size: 18px;
    }
}

.modal-detail {
    margin: 4px 0;
    font-size: 14px;
    color: #444;
}

@media (max-width: 480px) {
    .modal-detail {
        font-size: 13px;
    }
}

.modal-detail strong {
    font-weight: 600;
}

.modal-description {
    margin: 10px 0 0;
    font-size: 14px;
    color: #555;
    line-height: 1.4;
}

@media (max-width: 480px) {
    .modal-description {
        font-size: 13px;
    }
}

.modal-related {
    padding: 14px 16px 16px;
    border-top: 1px solid #eee;
}

.modal-related[hidden] {
    display: none;
}

.modal-related-heading {
    margin: 0 0 10px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #666;
}

.modal-related-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.modal-related-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px 6px 6px;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    background: #fafafa;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    color: #222;
    text-align: left;
    transition: background 150ms ease, border-color 150ms ease, transform 150ms ease;
}

@media (max-width: 480px) {
    .modal-related-card {
        font-size: 13px;
        padding: 4px 10px 4px 4px;
    }
}

.modal-related-card:hover {
    background: #f0f0f0;
    border-color: #ddd;
    transform: translateY(-1px);
}

.modal-related-card img {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px 14px;
    border-top: 1px solid #eee;
    gap: 10px;
}

.modal-footer-text {
    font-size: 13px;
    color: var(--text-faint);
}

@media (max-width: 480px) {
    .modal-footer {
        padding: 10px 12px 12px;
        flex-direction: column;
        align-items: stretch;
    }
}

.modal-buttons {
    display: flex;
    gap: 8px;
}

@media (max-width: 480px) {
    .modal-buttons {
        gap: 6px;
    }
}

.btn {
    border-radius: 999px;
    padding: 8px 16px;
    border: 1px solid #e0e0e0;
    background: #fff;
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease,
        transform 0.15s ease,
        box-shadow 0.2s ease;
}

.btn:active:not(:disabled) {
    transform: scale(0.97);
}

@media (max-width: 480px) {
    .btn {
        padding: 6px 12px;
        font-size: 13px;
    }
}

.btn-primary {
    background: #8066ff;
    border-color: #8066ff;
    color: #fff;
}

.btn-primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    box-shadow: 0 6px 18px rgba(128, 102, 255, 0.28);
}

.btn-ghost:hover {
    background: #f4f4f4;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
    min-height: 32px;
    line-height: 1.2;
}

.btn-danger {
    background: #fff;
    border-color: #e57373;
    color: #c62828;
}

.btn-danger:hover {
    background: #ffebee;
    border-color: #ef5350;
}

.btn:disabled,
.btn[disabled] {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

/* Goal Page - Mobile */
.goal-page {
    max-width: 720px;
    margin: 0 auto;
    padding: 32px 20px 64px;
    text-align: left;
    line-height: 1.6;
    font-size: 15px;
}

@media (max-width: 768px) {
    .goal-page {
        padding: 24px 16px 48px;
    }
}

@media (max-width: 600px) {
    .goal-page {
        padding: 20px 12px 40px;
    }
}

@media (max-width: 480px) {
    .goal-page {
        padding: 16px 10px 32px;
    }
}

.goal-page h1 {
    margin: 0 0 8px;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.2px;
    text-align: center;
}

@media (max-width: 768px) {
    .goal-page h1 {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .goal-page h1 {
        font-size: 20px;
    }
}

.goal-lead {
    margin: 0 0 32px;
    text-align: center;
    color: #555;
    font-size: 15px;
}

@media (max-width: 768px) {
    .goal-lead {
        font-size: 15px;
        margin-bottom: 30px;
    }
}

@media (max-width: 480px) {
    .goal-lead {
        font-size: 14px;
        margin-bottom: 24px;
    }
}

.goal-section {
    margin-bottom: 40px;
}

.goal-section h2 {
    margin: 0 0 14px;
    font-size: 18px;
    font-weight: 650;
    letter-spacing: -0.1px;
    color: #222;
}

@media (max-width: 768px) {
    .goal-section h2 {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .goal-section h2 {
        font-size: 16px;
    }
}

.goal-section p {
    margin: 0 0 12px;
    color: #333;
    font-size: 15px;
}

.goal-section p:last-child {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .goal-section p {
        font-size: 15px;
        line-height: 1.6;
    }
}

@media (max-width: 480px) {
    .goal-section p {
        font-size: 14px;
        line-height: 1.5;
    }
}

.goal-divider {
    border: none;
    border-top: 1px solid #ececec;
    margin: 40px 0;
}

@media (max-width: 768px) {
    .goal-divider {
        margin: 30px 0;
    }
}

.goal-callout {
    margin: 0 0 20px;
    padding: 18px 20px;
    border-radius: 14px;
    background: var(--callout-bg);
    border: 1px solid var(--callout-border);
    color: var(--text);
}

@media (max-width: 768px) {
    .goal-callout {
        padding: 14px 16px;
    }
}

.goal-callout h2 {
    margin-top: 0;
    color: var(--callout-heading);
}

.goal-callout a {
    color: var(--link);
}

.goal-callout a:hover {
    color: var(--link-hover);
}

.goal-list {
    margin: 0 0 16px;
    padding-left: 1.25rem;
}

.goal-list li {
    margin-bottom: 10px;
    color: var(--text);
    font-size: 15px;
}

.goal-list li:last-child {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .goal-list li {
        font-size: 15px;
        margin-bottom: 10px;
    }
}

@media (max-width: 480px) {
    .goal-list li {
        font-size: 14px;
        margin-bottom: 8px;
    }
}

.goal-subsection {
    margin-top: 24px;
}

.goal-subsection h3 {
    margin: 0 0 10px;
    font-size: 15px;
    font-weight: 600;
    color: #444;
}

@media (max-width: 768px) {
    .goal-subsection h3 {
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .goal-subsection h3 {
        font-size: 14px;
    }
}

.goal-tips {
    margin: 12px 0 0;
    padding-left: 0;
    list-style: none;
}

.goal-tips li {
    position: relative;
    margin-bottom: 8px;
    padding-left: 1.1rem;
    color: #444;
    font-size: 15px;
}

@media (max-width: 768px) {
    .goal-tips li {
        margin-bottom: 8px;
    }
}

.goal-tips li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #8066ff;
    font-weight: 700;
}

.goal-downloads {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin-top: 16px;
}

.goal-download {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px 18px;
    border: 1px solid var(--callout-border);
    border-radius: 14px;
    background: var(--bg-elevated);
    text-decoration: none;
    color: var(--text);
    transition: background 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.goal-download:hover {
    background: var(--callout-bg);
    border-color: var(--accent-soft);
    transform: translateY(-2px);
    color: var(--text);
}

.goal-download-title {
    font-size: 17px;
    font-weight: 650;
    color: var(--text);
}

.goal-download-meta {
    font-size: 13px;
    color: var(--text-soft);
}

.goal-checklist {
    margin: 0 0 16px;
    padding-left: 1.25rem;
    line-height: 1.6;
}

.goal-checklist li + li {
    margin-top: 8px;
}

.goal-note {
    font-size: 14px;
    color: var(--text-soft);
}

.goal-page a.goal-download,
.goal-page a.goal-download:hover {
    color: var(--text);
}

.goal-page a:not(.goal-download) {
    color: var(--link);
    font-weight: 500;
}

.goal-page a:not(.goal-download):hover {
    color: var(--link-hover);
}

@media (max-width: 768px) {
    .goal-page a:not(.goal-download) {
        font-size: 14px;
    }
}

body.admin-page {
    max-width: none;
    margin: 0;
    padding: 0;
}

.admin-panel {
    max-width: 920px;
    margin: 0 auto;
    padding: 32px 20px 64px;
}

.admin-gate {
    max-width: 420px;
    margin: 48px auto;
    padding: 32px 28px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--bg-elevated);
    box-shadow: 0 12px 36px var(--shadow);
}

.admin-gate h1 {
    margin: 0 0 8px;
    font-size: 28px;
    text-align: center;
}

.admin-gate p {
    margin: 0 0 18px;
    text-align: center;
    color: #666;
    font-size: 14px;
}

.admin-panel[hidden] {
    display: none;
}

.admin-section {
    margin-bottom: 28px;
    padding: 24px 22px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--bg-muted);
}

.admin-section h2 {
    margin: 0 0 18px;
    font-size: 20px;
    font-weight: 650;
}

.admin-form-group {
    margin-bottom: 14px;
}

.admin-form-group label:not(.ld-checkbox) {
    display: block;
    margin-bottom: 4px;
    font-size: 12px;
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.admin-form-group input:not([type="checkbox"]):not([type="radio"]),
.admin-form-group select,
.admin-form-group textarea,
.ld-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    box-sizing: border-box;
    background: var(--input-bg);
    color: var(--text);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.admin-form-group input:not([type="checkbox"]):not([type="radio"]):focus,
.admin-form-group select:focus,
.admin-form-group textarea:focus,
.ld-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(128, 102, 255, 0.18);
}

.admin-form-group textarea {
    min-height: 80px;
    resize: vertical;
}

.admin-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.admin-name-suggest-row {
    display: flex;
    align-items: stretch;
    gap: 8px;
}

.admin-name-suggest-row input {
    flex: 1 1 auto;
    min-width: 0;
}

.admin-name-suggest-row .btn {
    flex: 0 0 auto;
    white-space: nowrap;
}

@media (max-width: 640px) {
    .admin-form-row {
        grid-template-columns: 1fr;
    }

    .admin-name-suggest-row {
        flex-direction: column;
    }
}

.admin-form-group input[type="file"]:not([hidden]) {
    display: block;
    width: 100%;
    padding: 10px 14px;
    border: 2px dashed var(--border-strong);
    border-radius: 10px;
    background: var(--input-bg);
    color: var(--text-soft);
    font-size: 13px;
    cursor: pointer;
    box-sizing: border-box;
}

.admin-form-group input[type="file"]:not([hidden])::file-selector-button {
    margin-right: 12px;
    padding: 8px 14px;
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    background: var(--bg-muted);
    color: var(--text);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.admin-form-group input[type="file"]:not([hidden]):hover::file-selector-button {
    border-color: var(--accent);
    color: var(--accent);
}

.admin-file-label {
    display: block;
    padding: 10px 14px;
    border: 2px dashed #e0e0e0;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    font-size: 13px;
    color: #666;
}

.admin-file-label:hover {
    border-color: #8066ff;
    color: #8066ff;
}

.admin-preview {
    margin-top: 8px;
    max-width: 180px;
    max-height: 180px;
    border-radius: 10px;
    display: none;
}

.admin-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.admin-list li,
.admin-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

.admin-list-main {
    flex: 1;
    min-width: 0;
}

.admin-list-name {
    display: block;
    font-weight: 650;
    color: var(--text);
}

.admin-list-meta {
    display: block;
    margin-top: 2px;
    font-size: 13px;
    color: var(--text-muted);
}

.admin-tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.admin-tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.2px;
    background: var(--callout-bg);
    border: 1px solid var(--callout-border);
    color: var(--callout-heading);
}

.admin-tag-muted {
    background: var(--hover-bg);
    border-color: var(--border-strong);
    color: var(--text-muted);
}

.admin-tag-warn {
    background: #fff8e1;
    border-color: #ffe082;
    color: #f57f17;
}

.admin-tag-price {
    background: var(--success-bg);
    border-color: transparent;
    color: var(--success-text);
}

.admin-list li:last-child {
    border-bottom: none;
}

.admin-list-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-shrink: 0;
}

.admin-form-actions,
.admin-card-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

.admin-card-actions {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.admin-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.admin-flash {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 14px;
    display: none;
}

.admin-flash.success {
    display: block;
    background: #e8f5e9;
    color: #2e7d32;
}

.admin-flash.error {
    display: block;
    background: #ffebee;
    color: #c62828;
}

.admin-message-card {
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--bg-elevated);
    margin-bottom: 12px;
}

.admin-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.admin-card-title h3 {
    margin: 0 0 4px;
    font-size: 17px;
    font-weight: 650;
}

.admin-card-title .admin-message-meta {
    margin: 0;
}

.admin-card-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    flex-shrink: 0;
}

.admin-card-body {
    margin: 0;
    line-height: 1.55;
    color: var(--text);
}

.admin-message-unread {
    border-color: var(--accent-soft, #cfc4ff);
    background: rgba(128, 102, 255, 0.06);
}

.admin-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    background: var(--accent);
    color: #fff;
    white-space: nowrap;
}

.admin-dashboard-stats {
    list-style: none;
    padding: 0;
    margin: 0 0 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
}

.admin-dashboard-stats li {
    font-size: 15px;
    color: var(--text-muted, #666);
}

.admin-dashboard-stats strong {
    color: var(--text, #222);
    font-size: 18px;
}

.admin-lockdown-message {
    color: var(--text);
    font-size: 16px;
    line-height: 1.5;
    margin: 0 0 12px;
}

.admin-nudge {
    margin-bottom: 14px;
    padding: 12px 14px;
    border-radius: 10px;
    background: rgba(255, 193, 7, 0.14);
    border: 1px solid rgba(255, 193, 7, 0.35);
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
}

.admin-restore-panel {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.admin-restore-panel h3 {
    margin: 0 0 8px;
    font-size: 16px;
}

.admin-docs-list {
    display: grid;
    gap: 12px;
}

.admin-doc-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-elevated, #fafafa);
}

.admin-doc-row label.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin: 0;
    min-height: 38px;
}

.admin-message-reply-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0 12px;
}

.admin-checkbox-label,
.ld-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text);
    text-transform: none;
    letter-spacing: 0;
    font-weight: 500;
    margin-bottom: 0;
    position: relative;
}

.ld-checkbox-face {
    position: relative;
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-strong);
    border-radius: 6px;
    background: var(--input-bg);
    transition: background 0.15s ease, border-color 0.15s ease;
    box-sizing: border-box;
}

.ld-checkbox-face::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 1px;
    width: 5px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0);
    transition: transform 0.12s ease;
}

.ld-checkbox input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: 0;
    padding: 0;
    border: 0;
    appearance: none;
    -webkit-appearance: none;
    pointer-events: none;
}

.ld-checkbox input:checked + .ld-checkbox-face {
    background: var(--accent);
    border-color: var(--accent);
}

.ld-checkbox input:checked + .ld-checkbox-face::after {
    transform: rotate(45deg) scale(1);
}

.ld-checkbox input:focus-visible + .ld-checkbox-face {
    box-shadow: 0 0 0 3px rgba(128, 102, 255, 0.22);
}

.ld-checkbox-text {
    line-height: 1.4;
}

.admin-note-input {
    width: 100%;
    min-height: 56px;
    resize: vertical;
}

.admin-gallery-list {
    list-style: none;
    padding: 0;
    margin: 16px 0;
    display: grid;
    gap: 12px;
}

.admin-gallery-item {
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg-elevated);
}

.admin-gallery-item img {
    width: 96px;
    height: 72px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
    background: var(--photo-bg);
}

.admin-gallery-meta {
    flex: 1;
    min-width: 0;
}

.admin-gallery-src {
    display: block;
    font-size: 12px;
    color: var(--text-soft);
    margin-bottom: 8px;
    word-break: break-all;
}

.admin-gallery-empty {
    color: var(--text-soft);
    font-size: 14px;
}

.admin-seo-page {
    padding: 14px 0;
    border-top: 1px solid var(--border);
}

.admin-seo-page:first-child {
    border-top: none;
    padding-top: 0;
}

.admin-seo-page h3 {
    margin: 0 0 10px;
    font-size: 16px;
}

.admin-list-sold {
    opacity: 0.72;
}

.admin-list-sold span:first-child {
    color: var(--text-soft);
}

.contact-upload-status {
    margin: 8px 0 0;
    font-size: 14px;
    color: var(--accent, #8066ff);
}

.card-price {
    font-weight: 600;
    color: var(--accent, #8066ff);
}

.admin-message-card h3 {
    margin: 0 0 6px;
    font-size: 16px;
}

.admin-message-meta {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
}

.contact-form {
    width: 100%;
}

.goal-form-group {
    margin-bottom: 16px;
}

.goal-form-label,
.goal-form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #444;
}

.goal-form-group input,
.goal-form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 15px;
    box-sizing: border-box;
    background: var(--bg-elevated, #fff);
    color: inherit;
}

.goal-form-group textarea {
    min-height: 96px;
    resize: vertical;
    line-height: 1.5;
}

.goal-file-label {
    display: block;
    padding: 10px 14px;
    border: 1px dashed #d8d8d8;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    font-size: 14px;
    color: #666;
}

.goal-file-label:hover {
    border-color: var(--accent-soft, #8066ff);
    color: var(--accent, #8066ff);
}

.reviews-list {
    display: grid;
    gap: 16px;
    margin-bottom: 28px;
}

.reviews-empty {
    color: #666;
    font-size: 14px;
}

.review-card {
    background: var(--bg-elevated, #fff);
    border: 1px solid var(--border, #e8e8e8);
    border-radius: 12px;
    padding: 18px 20px;
}

.review-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.review-card-name {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 650;
}

.review-card-meta {
    margin: 0;
    font-size: 13px;
    color: #666;
}

.review-card-stars {
    margin: 0;
    color: #c9a227;
    font-size: 16px;
    letter-spacing: 1px;
    white-space: nowrap;
}

.review-card-body {
    margin: 0 0 12px;
    line-height: 1.6;
    white-space: pre-wrap;
}

.review-card-image {
    display: block;
    width: 100%;
    max-width: 420px;
    max-height: 320px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 12px;
}

.review-delete-btn {
    margin-top: 4px;
}

.review-form {
    margin-top: 8px;
}

.goal-form-label {
    margin-bottom: 8px;
}

.review-stars-input {
    display: flex;
    gap: 2px;
}

.review-stars-input label {
    cursor: pointer;
    color: #ccc;
    font-size: 22px;
    line-height: 1;
}

.review-stars-input label input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.review-stars-input label:hover,
.review-stars-input label:has(~ label:hover) {
    color: #c9a227;
}

.review-stars-input label:has(input:checked),
.review-stars-input label:has(~ label input:checked) {
    color: #c9a227;
}

.review-body-input {
    min-height: 120px;
}

.review-image-preview {
    display: block;
    margin-top: 12px;
    max-width: 220px;
    max-height: 220px;
    border-radius: 8px;
    object-fit: cover;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.contact-status {
    margin-top: 12px;
    font-size: 14px;
    color: #666;
}

.contact-status.success {
    color: #2e7d32;
}

.contact-status.error {
    color: var(--error-text);
}

.news-highlight {
    color: var(--news);
    font-weight: 800;
    text-wrap: pretty;
}

@media (prefers-color-scheme: dark) {
    .subtitle,
    .goal-lead,
    .card-sub,
    .goal-section p,
    .goal-tips li,
    .goal-subsection h3,
    .contact-status,
    .admin-message-meta,
    .admin-gate p,
    .modal-footer-text,
    .filter label,
    .section-note,
    .reviews-empty,
    .review-card-meta {
        color: var(--text-soft);
    }

    .goal-section h2,
    .section-heading,
    .goal-page h1,
    h1 {
        color: var(--text);
    }

    .filters,
    .admin-section,
    .admin-gate,
    .status {
        background: var(--bg-muted);
        border-color: var(--border);
    }

    .card,
    .modal,
    .admin-message-card,
    .admin-file-label,
    .review-card {
        background: var(--bg-elevated);
        border-color: var(--border);
    }

    .card:hover {
        border-color: var(--accent-soft);
        box-shadow: 0 12px 30px var(--shadow);
    }

    .goal-download:hover {
        border-color: var(--accent-soft);
        box-shadow: 0 12px 30px var(--shadow);
    }

    .photo,
    .modal-photo,
    .admin-preview {
        background: var(--photo-bg);
    }

    .filter select,
    .btn,
    .goal-form-group input,
    .goal-form-group textarea {
        background: var(--bg-elevated);
        border-color: var(--border);
        color: var(--text);
    }

    .goal-file-label {
        background: var(--bg-elevated);
        border-color: var(--border);
        color: var(--text-soft);
    }

    .admin-form-group input:not([type="checkbox"]):not([type="radio"]),
    .admin-form-group select,
    .admin-form-group textarea {
        background: var(--input-bg);
        border-color: var(--border-strong);
        color: var(--text);
    }

    .btn-ghost:hover {
        background: var(--hover-bg);
    }

    .goal-page a:not(.goal-download) {
        color: var(--link);
    }

    .goal-page a:not(.goal-download):hover {
        color: var(--link-hover);
    }

    .goal-divider {
        border-top-color: var(--border);
    }

    .admin-flash.success {
        background: var(--success-bg);
        color: var(--success-text);
    }

    .admin-flash.error,
    .contact-status.error {
        background: var(--error-bg);
        color: var(--error-text);
    }

    .contact-status.success {
        color: var(--success-text);
    }

    .modal-backdrop {
        background: rgba(0, 0, 0, 0.65);
    }

    .modal-detail,
    .modal-description,
    .modal-name,
    .name {
        color: var(--text);
    }

    .modal-footer,
    .modal-related,
    .admin-list li {
        border-color: var(--border);
    }

    .modal-related-card {
        background: var(--bg-muted);
        border-color: var(--border);
        color: var(--text);
    }

    .modal-related-card:hover {
        background: var(--hover-bg);
        border-color: var(--border-strong);
    }

    .modal-related-heading {
        color: var(--text-soft);
    }

    .admin-file-label:hover {
        border-color: var(--accent);
        color: var(--accent);
    }
}

/* ----------------------------------------------------------------------- */
/* Editable content blocks (public) */
/* ----------------------------------------------------------------------- */
.content-text {
    margin: 0 0 14px;
    line-height: 1.6;
}

.content-text:last-child {
    margin-bottom: 0;
}

.content-image {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 12px auto;
}

.content-button {
    display: inline-block;
    margin: 8px 0;
}

.content-spacer {
    width: 100%;
}

/* ----------------------------------------------------------------------- */
/* Visual editor (admin only) */
/* ----------------------------------------------------------------------- */
body.ld-editing,
body.ld-previewing {
    padding-bottom: var(--ld-toolbar-height, 56px);
}

body.ld-previewing .ld-toolbar .ld-toolbar-group:first-child {
    display: none;
}

.ld-edit-region {
    position: relative;
    border: 2px dashed var(--accent-soft, #cfc4ff);
    border-radius: 12px;
    padding: 30px 14px 14px;
    margin: 16px 0;
    background: rgba(128, 102, 255, 0.04);
}

footer.ld-edit-region {
    text-align: center;
}

.ld-region-label {
    position: absolute;
    top: 6px;
    left: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--accent, #8066ff);
}

.ld-edit-block {
    position: relative;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 8px 8px 8px 10px;
    margin-bottom: 6px;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.ld-edit-block:hover {
    border-color: var(--border-strong, #e0e0e0);
    background: var(--bg-elevated, #fff);
}

.ld-block-controls {
    position: absolute;
    top: -12px;
    right: 8px;
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.15s ease;
    z-index: 2;
}

.ld-edit-block:hover .ld-block-controls,
.ld-edit-block:focus-within .ld-block-controls {
    opacity: 1;
}

.ld-ctrl-btn {
    width: 26px;
    height: 26px;
    border: 1px solid var(--border-strong, #e0e0e0);
    border-radius: 6px;
    background: var(--bg-elevated, #fff);
    color: var(--text, #222);
    cursor: pointer;
    font-size: 13px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px var(--shadow, rgba(0, 0, 0, 0.12));
}

.ld-ctrl-btn:hover {
    border-color: var(--accent, #8066ff);
    color: var(--accent, #8066ff);
}

.ld-editable {
    outline: none;
    min-height: 1.2em;
    cursor: text;
}

.ld-editable:focus {
    box-shadow: 0 0 0 2px var(--accent-soft, #cfc4ff);
    border-radius: 6px;
}

.ld-image-block {
    text-align: center;
}

.ld-image-block.ld-image-empty img {
    min-height: 120px;
    width: 100%;
    background: var(--bg-muted, #fafafa) repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(128, 102, 255, 0.08) 10px,
        rgba(128, 102, 255, 0.08) 20px
    );
    border: 1px solid var(--border, #ececec);
    border-radius: 12px;
}

.ld-image-tools,
.ld-button-block,
.ld-spacer-block {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 10px;
}

.ld-button-block {
    flex-direction: column;
    align-items: stretch;
}

.ld-button-preview {
    align-self: flex-start;
}

.ld-input {
    padding: 8px 10px;
    border: 1px solid var(--border-strong, #e0e0e0);
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    width: 100%;
    box-sizing: border-box;
    background: var(--input-bg, #fff);
    color: var(--text, #222);
}

.ld-mini-btn {
    padding: 7px 12px;
    border: 1px solid var(--border-strong, #e0e0e0);
    border-radius: 8px;
    background: var(--bg-elevated, #fff);
    color: var(--text, #222);
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
}

.ld-mini-btn:hover {
    border-color: var(--accent, #8066ff);
    color: var(--accent, #8066ff);
}

.ld-size-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-soft, #666);
}

.ld-add-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed var(--border-strong, #e0e0e0);
}

.ld-toolbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
    background: var(--bg-elevated, #fff);
    border-top: 1px solid var(--border-strong, #e0e0e0);
    box-shadow: 0 -4px 16px var(--shadow, rgba(0, 0, 0, 0.12));
}

.ld-toolbar-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.ld-toolbar-title {
    font-weight: 700;
    color: var(--accent, #8066ff);
    margin-right: 6px;
    font-size: 14px;
}

.ld-tool-btn {
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border: 1px solid var(--border-strong, #e0e0e0);
    border-radius: 6px;
    background: var(--bg-elevated, #fff);
    color: var(--text, #222);
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
}

.ld-tool-btn:hover {
    border-color: var(--accent, #8066ff);
    color: var(--accent, #8066ff);
}

.ld-tool-color {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    border: 1px solid var(--border-strong, #e0e0e0);
    border-radius: 6px;
    background: var(--bg-elevated, #fff);
    color: var(--text, #222);
    cursor: pointer;
    font-weight: 700;
}

.ld-tool-color input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.ld-tool-select {
    height: 32px;
    border: 1px solid var(--border-strong, #e0e0e0);
    border-radius: 6px;
    background: var(--bg-elevated, #fff);
    color: var(--text, #222);
    font-family: inherit;
    font-size: 13px;
    padding: 0 6px;
    cursor: pointer;
}

.ld-toolbar-status {
    font-size: 13px;
    color: var(--text-soft, #666);
}

.ld-toolbar-status.success {
    color: var(--success-text, #2e7d32);
}

.ld-toolbar-status.error {
    color: var(--error-text, #c62828);
}

.ld-save-btn {
    padding: 8px 16px;
}

@media (max-width: 600px) {
    .ld-toolbar {
        justify-content: center;
    }

    .ld-toolbar-title {
        width: 100%;
        text-align: center;
    }
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 16px;
    z-index: 100;
    padding: 10px 14px;
    border-radius: 8px;
    background: var(--accent);
    color: #fff;
    font-weight: 600;
    text-decoration: none;
}

.skip-link:focus {
    top: 16px;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.site-footer {
    margin-top: 48px;
    padding: 28px 16px 36px;
    border-top: 1px solid var(--border);
    background: var(--bg-muted);
    text-align: center;
    color: var(--text-muted);
}

.site-footer p {
    margin: 0 0 8px;
    line-height: 1.5;
}

.site-footer-brand {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
}

.site-footer-tagline {
    font-size: 14px;
}

.site-footer-contact a {
    color: var(--link);
    text-decoration: none;
    font-weight: 600;
}

.site-footer-contact a:hover {
    color: var(--link-hover);
    text-decoration: underline;
}

.admin-badge-approved {
    background: var(--success-bg);
    color: var(--success-text);
}

.admin-badge-pin {
    background: var(--callout-bg);
    color: var(--callout-heading);
    border: 1px solid var(--callout-border);
}

.admin-message-pinned {
    border-color: var(--accent-soft);
    background: var(--callout-bg);
}

.admin-message-file-actions {
    margin: 10px 0 4px;
}

.admin-message-preview {
    margin: 12px 0;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg-muted);
    overflow: auto;
}

.admin-message-preview-image {
    display: block;
    max-width: 100%;
    max-height: 360px;
    margin: 0 auto;
    border-radius: 8px;
    object-fit: contain;
}

.admin-message-preview-pdf {
    display: block;
    width: 100%;
    min-height: 420px;
    border: none;
    border-radius: 8px;
    background: var(--bg-elevated);
}

.admin-message-preview-doc {
    font-size: 14px;
    line-height: 1.55;
    color: var(--text);
}

.admin-message-preview-doc p {
    margin: 0 0 10px;
}

.admin-message-preview-doc table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
}

.admin-message-preview-doc td,
.admin-message-preview-doc th {
    border: 1px solid var(--border);
    padding: 6px 8px;
    vertical-align: top;
}

.admin-message-preview-text {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
    font-family: inherit;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text);
}

.ld-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.admin-review-image {
    display: block;
    max-width: 220px;
    max-height: 160px;
    object-fit: cover;
    border-radius: 10px;
    margin: 10px 0;
    border: 1px solid var(--border);
}

@media (max-width: 768px) {
    .site-footer {
        margin-top: 36px;
        padding: 22px 12px 28px;
    }

    .admin-card-header {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-card-badges {
        justify-content: flex-start;
    }

    .admin-list-item {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-list-actions {
        justify-content: flex-start;
    }
}

/* Custom admin controls */
.ld-native-select {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.ld-select {
    position: relative;
    width: 100%;
}

.ld-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 36px 10px 12px;
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    background: var(--input-bg);
    color: var(--text);
    font-family: inherit;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ld-select-trigger::after {
    content: "";
    position: absolute;
    right: 14px;
    top: 50%;
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--text-muted);
    border-bottom: 2px solid var(--text-muted);
    transform: translateY(-65%) rotate(45deg);
    pointer-events: none;
}

.ld-select-trigger:hover {
    border-color: var(--accent-soft);
}

.ld-select.is-open .ld-select-trigger,
.ld-select-trigger:focus-visible {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(128, 102, 255, 0.18);
    outline: none;
}

.ld-select-menu {
    display: none;
    position: absolute;
    z-index: 30;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    max-height: 240px;
    overflow-y: auto;
    padding: 6px;
    border: 1px solid var(--border-strong);
    border-radius: 12px;
    background: var(--bg-elevated);
    box-shadow: 0 16px 40px var(--shadow);
}

.ld-select.is-open .ld-select-menu {
    display: block;
}

.ld-select-option {
    display: block;
    width: 100%;
    padding: 9px 10px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text);
    font-family: inherit;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
}

.ld-select-option:hover {
    background: var(--hover-bg);
}

.ld-select-option.is-selected {
    background: var(--callout-bg);
    color: var(--callout-heading);
    font-weight: 600;
}

.ld-select-option:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.ld-dialog-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(0, 0, 0, 0.45);
}

.ld-dialog-backdrop[hidden] {
    display: none;
}

.ld-dialog {
    width: min(420px, 100%);
    padding: 22px 20px 18px;
    border-radius: 18px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    box-shadow: 0 24px 48px var(--shadow);
}

.ld-dialog-title {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 650;
}

.ld-dialog-message {
    margin: 0 0 18px;
    color: var(--text-muted);
    line-height: 1.5;
    font-size: 14px;
}

.ld-dialog-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
}

input[type="date"].ld-input {
    appearance: none;
    min-height: 42px;
}

input[type="date"].ld-input::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.7;
}
