
        :root {
            --page-bg: #f7faef;
            --ink: #173821;
            --muted: rgba(23, 56, 33, 0.72);
            --panel: rgba(255, 255, 255, 0.78);
            --panel-strong: rgba(255, 255, 255, 0.96);
            --line: rgba(33, 79, 48, 0.16);
            --accent: #1f5534;
            --accent-2: #86a96d;
            --soft: #eef5e8;
            --shadow: 0 18px 60px rgba(31, 85, 52, 0.16);
            --radius-xl: 34px;
            --radius-lg: 24px;
            --radius-md: 16px;
            --font-title: "Segoe UI", Arial, sans-serif;
            --font-ui: "Segoe UI", Arial, sans-serif;
            --hero-overlay: linear-gradient(transparent, transparent);
            --media-card-size: 290px;
        }

        body.theme-countryside {
            --page-bg: #f7faef;
            --ink: #173821;
            --muted: rgba(23, 56, 33, 0.72);
            --panel: rgba(255, 255, 255, 0.78);
            --panel-strong: rgba(255, 255, 255, 0.96);
            --line: rgba(33, 79, 48, 0.16);
            --accent: #1f5534;
            --accent-2: #86a96d;
            --soft: #eef5e8;
            --hero-overlay: linear-gradient(transparent, transparent);
        }

        body.theme-heritage {
            --page-bg: #fbf4e8;
            --ink: #372519;
            --muted: rgba(55, 37, 25, 0.72);
            --panel: rgba(255, 255, 255, 0.78);
            --panel-strong: rgba(255, 255, 255, 0.96);
            --line: rgba(132, 89, 43, 0.20);
            --accent: #7b542c;
            --accent-2: #caa06a;
            --soft: #f6ebdc;
            --hero-overlay: linear-gradient(transparent, transparent);
        }

        body.theme-celebration {
            --page-bg: #eef9fa;
            --ink: #123949;
            --muted: rgba(18, 57, 73, 0.72);
            --panel: rgba(255, 255, 255, 0.78);
            --panel-strong: rgba(255, 255, 255, 0.96);
            --line: rgba(27, 104, 133, 0.20);
            --accent: #15647b;
            --accent-2: #70b7c3;
            --soft: #e3f3f6;
            --hero-overlay: linear-gradient(transparent, transparent);
        }

        body.theme-winter {
            --page-bg: #f1fbff;
            --ink: #123044;
            --muted: rgba(18, 48, 68, 0.72);
            --panel: rgba(255, 255, 255, 0.80);
            --panel-strong: rgba(255, 255, 255, 0.97);
            --line: rgba(59, 126, 162, 0.22);
            --accent: #2f769a;
            --accent-2: #85c5e2;
            --soft: #e6f6fd;
            --hero-overlay: linear-gradient(transparent, transparent);
        }

        body.theme-beach {
            --page-bg: #f3fff0;
            --ink: #173721;
            --muted: rgba(23, 55, 33, 0.72);
            --panel: rgba(255, 255, 255, 0.80);
            --panel-strong: rgba(255, 255, 255, 0.97);
            --line: rgba(74, 132, 82, 0.22);
            --accent: #4f8b55;
            --accent-2: #9ec985;
            --soft: #e8f8e1;
            --hero-overlay: linear-gradient(transparent, transparent);
        }

        * {
            box-sizing: border-box;
        }

        html {
            scroll-behavior: smooth;
        }

        body {
            margin: 0;
            min-height: 100vh;
            color: var(--ink);
            background:
                radial-gradient(circle at 8% 18%, color-mix(in srgb, var(--accent-2) 22%, transparent), transparent 34%),
                radial-gradient(circle at 88% 5%, color-mix(in srgb, var(--accent) 13%, transparent), transparent 30%),
                linear-gradient(135deg, var(--page-bg), #fff 54%, var(--soft));
            font-family: var(--font-ui);
        }

        a {
            color: inherit;
            text-decoration: none;
        }

        button,
        select,
        input {
            font: inherit;
        }

        #background-layer {
            display: none;
        }

        .page-shell {
            width: min(100%, 1440px);
            margin: 0 auto;
            position: relative;
            z-index: 1;
        }

        .site-header {
            position: sticky;
            top: 0;
            z-index: 10000;
            display: grid;
            grid-template-columns: minmax(0, 1fr) auto;
            grid-template-areas: "brand controls" "nav nav";
            align-items: center;
            gap: 12px 24px;
            padding: 22px clamp(18px, 4vw, 58px) 14px;
            background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(247, 250, 239, 0.88));
            border-bottom: 1px solid var(--line);
            box-shadow: 0 10px 36px rgba(31, 85, 52, 0.08);
            backdrop-filter: blur(14px);
        }

        .family-brand {
            grid-area: brand;
            display: flex;
            align-items: center;
            gap: 16px;
            min-width: 0;
        }

        .family-logo,
        .family-logo-fallback {
            width: 120px;
            height: 80px;
            object-fit: contain;
            flex: 0 0 120px;
            border: 0;
            box-shadow: none;
            background: transparent;
        }

        .family-logo-fallback {
            display: grid;
            place-items: center;
            font-family: var(--font-title);
            font-size: 36px;
            font-weight: 800;
            color: var(--accent);
        }

        .brand-kicker {
            display: none;
        }

        .brand-name {
            display: block;
            margin: 0;
            font-family: Georgia, "Times New Roman", serif;
            font-size: clamp(46px, 6vw, 82px);
            line-height: .9;
            font-weight: 500;
            letter-spacing: .01em;
            color: var(--accent);
        }

        .top-actions {
            grid-area: controls;
            display: flex;
            justify-content: flex-end;
            align-items: center;
            gap: 6px;
            position: relative;
            z-index: 10020;
            align-self: start;
        }

        .theme-form {
            margin: 0;
        }

        .support-control {
            height: 30px;
            border: 1px solid var(--line);
            border-radius: 10px;
            background: rgba(255, 255, 255, 0.86);
            color: var(--ink);
            box-shadow: 0 6px 14px rgba(31, 85, 52, 0.06);
            cursor: pointer;
        }

        .theme-dropdown,
        .lang-dropdown {
            position: relative;
            display: inline-flex;
            z-index: 10030;
        }

        .theme-current {
            width: 36px;
            padding: 0;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 18px;
            line-height: 1;
        }

        .theme-current::after,
        .flag-current::after {
            content: "⌄";
            margin-left: 2px;
            font-size: 9px;
            font-weight: 800;
            color: var(--accent);
            line-height: 1;
        }

        .theme-symbol {
            width: 20px;
            height: 20px;
            display: inline-grid;
            place-items: center;
            font-size: 17px;
            line-height: 1;
            flex: 0 0 auto;
        }

        .theme-icon {
            width: 32px;
            height: 32px;
            display: inline-grid;
            place-items: center;
            border-radius: 10px;
            background: #ffffff;
            border: 1px solid rgba(0, 0, 0, .12);
            box-shadow: 0 4px 10px rgba(0, 0, 0, .08);
            font-size: 20px;
            line-height: 1;
            flex: 0 0 auto;
        }

        .theme-name {
            flex: 1 1 auto;
            min-width: 0;
            font-size: 14px;
            font-weight: 900;
            line-height: 1.15;
            color: #173821;
            text-align: left;
            white-space: nowrap;
        }

        .theme-check {
            width: 18px;
            text-align: center;
            font-size: 15px;
            font-weight: 900;
            color: #136b35;
            opacity: 0;
        }

        .theme-menu,
        .flag-menu {
            display: none;
            position: absolute;
            right: 0;
            top: calc(100% + 6px);
            padding: 6px;
            border-radius: 14px;
            background: #ffffff;
            border: 1px solid rgba(0, 0, 0, .12);
            box-shadow: 0 18px 55px rgba(0, 0, 0, .18);
        }

        .theme-menu {
            min-width: 220px;
            padding: 8px;
        }

        .theme-dropdown.open .theme-menu {
            display: grid;
            gap: 6px;
        }

        .theme-menu a {
            min-height: 46px;
            display: flex;
            align-items: center;
            justify-content: flex-start;
            gap: 12px;
            border-radius: 12px;
            padding: 7px 10px;
            border: 1px solid rgba(0, 0, 0, .08);
            background: #ffffff;
        }

        .theme-menu a:hover {
            background: #eef7f1;
            border-color: rgba(19, 107, 53, .35);
        }

        .theme-menu a.active {
            background: #e8f4eb;
            border-color: rgba(19, 107, 53, .60);
        }

        .theme-menu a.active .theme-check {
            opacity: 1;
        }

        .flag-current {
            width: 44px;
            padding: 0;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .flag-current img,
        .flag-menu img {
            width: 24px;
            height: 16px;
            object-fit: cover;
            border-radius: 3px;
            box-shadow: 0 0 0 1px rgba(0, 0, 0, .08);
            display: block;
        }

        .flag-menu {
            min-width: 44px;
        }

        .lang-dropdown.open .flag-menu {
            display: grid;
            gap: 5px;
        }

        .flag-menu a {
            width: 34px;
            height: 28px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 9px;
        }

        .flag-menu a:hover,
        .flag-menu a.active {
            background: var(--soft);
        }

        .mobile-menu-button {
            display: none;
            border: 0;
            width: 48px;
            height: 44px;
            border-radius: 14px;
            background: var(--accent);
            color: #fff;
            font-size: 25px;
            line-height: 1;
            box-shadow: 0 10px 24px rgba(31, 85, 52, .22);
        }

        .main-menu {
            grid-area: nav;
            display: flex;
            align-items: center;
            justify-content: flex-end;
            gap: 28px;
            flex-wrap: wrap;
            padding-top: 10px;
        }

        .main-menu a,
        .main-menu button,
        .inline-form button {
            border: 0;
            background: transparent;
            color: var(--ink);
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: .02em;
            padding: 11px 0;
            cursor: pointer;
        }

        .main-menu a::before {
            display: inline-block;
            min-width: 18px;
            margin-right: 4px;
            color: var(--accent);
            font-size: 18px;
            vertical-align: -1px;
        }

        .main-menu a[href="#pictures"]::before {
            content: "▣";
        }

        .main-menu a[href="#videos"]::before {
            content: "▶";
        }

        .main-menu a[href="#youtube"]::before {
            content: "▶";
            color: #ff0000;
        }

        .main-menu a.family-tree-link::before {
            content: "⌕";
            font-size: 28px;
            vertical-align: -5px;
        }

        .main-menu a:hover {
            color: var(--accent);
        }

        .main-menu .admin-control {
            margin-left: auto;
        }

        .main-menu button,
        .inline-form button,
        .admin-button {
            padding: 12px 24px;
            border-radius: 16px;
            background: var(--accent);
            color: #fff;
        }

        .inline-form {
            display: inline;
            margin: 0;
        }

        .message-panel {
            margin: 18px clamp(18px, 4vw, 58px);
        }

        .message {
            padding: 12px 14px;
            border-radius: 14px;
            background: var(--panel-strong);
            border: 1px solid var(--line);
        }

        .message.error {
            border-color: rgba(176, 42, 42, .35);
        }

        main {
            overflow: hidden;
        }

        .hero {
            position: relative;
            min-height: 430px;
            display: grid;
            place-items: center;
            padding: 70px clamp(18px, 7vw, 110px);
            background-size: cover;
            background-position: center;
            border-bottom: 1px solid var(--line);
        }

        .hero-card {
            max-width: 620px;
            text-align: center;
            background: transparent;
            border: 0;
            box-shadow: none;
            padding: 0;
        }

        .eyebrow {
            margin: 0 0 10px;
            color: var(--accent);
            font-weight: 800;
            letter-spacing: .12em;
            text-transform: uppercase;
            font-size: 12px;
        }

        .hero h2 {
            margin: 0;
            font-family: var(--font-title);
            color: var(--accent);
            font-size: clamp(36px, 5vw, 60px);
            line-height: 1.04;
        }

        .hero h2::after {
            content: "";
            display: block;
            width: 260px;
            max-width: 70%;
            height: 1px;
            margin: 18px auto 8px;
            background: linear-gradient(90deg, transparent, var(--accent), transparent);
        }

        .hero-text {
            margin: 12px auto 0;
            max-width: 520px;
            font-family: var(--font-title);
            font-style: italic;
            font-size: clamp(18px, 2vw, 25px);
            line-height: 1.42;
            color: var(--ink);
        }

        .hero-links {
            margin-top: 24px;
            display: flex;
            justify-content: center;
            gap: 12px;
            flex-wrap: wrap;
        }

        .hero-link {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-height: 42px;
            padding: 0 22px;
            border-radius: 999px;
            background: var(--accent);
            color: #fff;
            font-weight: 800;
            box-shadow: 0 12px 24px rgba(31, 85, 52, .18);
        }

        .hero-link+.hero-link {
            background: rgba(255, 255, 255, .82);
            color: var(--accent);
            border: 1px solid var(--line);
        }

        .memory-card {
            display: none;
        }

        .media-section {
            position: relative;
            padding: 46px clamp(18px, 5vw, 82px) 54px;
            background: linear-gradient(180deg, rgba(255, 255, 255, .72), rgba(255, 255, 255, .55));
        }

        .media-section::before,
        .media-section::after {
            content: "";
            position: absolute;
            width: 220px;
            height: 220px;
            background: radial-gradient(ellipse at center, color-mix(in srgb, var(--accent-2) 24%, transparent), transparent 65%);
            opacity: .42;
            pointer-events: none;
        }

        .media-section::before {
            left: -75px;
            top: 40px;
        }

        .media-section::after {
            right: -75px;
            top: 80px;
        }

        .section-heading {
            position: relative;
            z-index: 1;
            text-align: center;
            display: block;
            margin: 0 auto 26px;
        }

        .section-heading h2 {
            margin: 0;
            font-family: var(--font-title);
            font-size: clamp(34px, 4vw, 48px);
            color: var(--accent);
        }

        .section-heading>p {
            color: var(--muted);
            font-weight: 700;
            margin: 12px 0 0;
        }

        .section-heading h2::after {
            content: "♡";
            display: block;
            font-size: 22px;
            line-height: 1.8;
            font-family: var(--font-ui);
            color: var(--accent-2);
        }

        .video-grid,
        .gallery {
            position: relative;
            z-index: 1;
            display: grid;
            grid-template-columns: repeat(4, minmax(0, var(--media-card-size)));
            justify-content: center;
            gap: 18px;
            max-width: 1240px;
            margin: 0 auto;
        }

        .picture-card,
        .video-card {
            overflow: hidden;
            border-radius: 18px;
            background: var(--panel-strong);
            border: 1px solid var(--line);
            box-shadow: 0 14px 34px rgba(31, 85, 52, .14);
            width: 100%;
            min-width: 0;
        }

        .picture-card img,
        .video-card video {
            display: block;
            width: 100%;
            aspect-ratio: 4/3;
            height: auto;
            object-fit: cover;
            background: var(--soft);
        }

        .thumb {
            cursor: zoom-in;
            transition: transform .22s ease;
        }

        .thumb:hover {
            transform: scale(1.025);
        }

        .media-data-edit-row {
            display: flex;
            gap: 10px;
            align-items: center;
            width: 100%;
        }

        .media-order-input {
            width: 92px;
            max-width: 92px;
            padding: 8px 9px;
            border-radius: 10px;
            border: 1px solid rgba(255, 255, 255, .28);
            background: rgba(255, 255, 255, .88);
            font-weight: 700;
        }

        .media-order-label {
            font-size: .82rem;
            font-weight: 800;
            opacity: .9;
            white-space: nowrap;
        }

        .media-filename {
            padding: 10px 12px;
            font-size: 13px;
            font-weight: 800;
            color: var(--muted);
            overflow: visible;
            text-overflow: clip;
            white-space: pre-line;
            overflow-wrap: anywhere;
            word-break: normal;
            line-height: 1.45;
        }

        .delete-media-button,
        .danger-button {
            margin: 0 12px 12px;
            border: 0;
            border-radius: 12px;
            padding: 9px 14px;
            background: #9b2f2f;
            color: #fff;
            cursor: pointer;
        }

        .empty-note {
            grid-column: 1/-1;
            padding: 26px;
            border-radius: 18px;
            background: var(--panel-strong);
            border: 1px solid var(--line);
            text-align: center;
            color: var(--muted);
        }

        .modal-help {
            margin: 0 0 14px;
            color: var(--muted);
            font-weight: 700;
        }

        .youtube-input-block {
            margin-top: 18px;
            padding-top: 16px;
            border-top: 1px solid var(--line);
        }

        .media-card-actions,
        .youtube-card-actions {
            display: flex;
            flex-direction: row;
            flex-wrap: nowrap;
            gap: 10px;
            align-items: flex-start;
            margin-top: 10px;
        }

        .media-delete-form,
        .media-edit-form,
        .youtube-delete-form,
        .youtube-edit-form {
            margin: 0;
        }

        .youtube-edit-panel {
            margin: 0;
        }

        .media-edit-panel {
            display: block;
            width: 100%;
            margin: 0;
        }

        .media-edit-panel summary,
        .youtube-edit-panel summary {
            display: inline-block;
            cursor: pointer;
            padding: 9px 14px;
            border-radius: 10px;
            border: 1px solid var(--line);
            background: var(--panel-strong);
            color: var(--text);
            font-weight: 800;
        }

        .media-edit-form textarea,
        .youtube-edit-form textarea {
            width: 100%;
            margin: 10px 0 8px;
            resize: vertical;
        }

        .upload-limit-note {
            margin-top: 8px;
            font-size: 13px;
            color: var(--muted);
            font-weight: 700;
        }

        .upload-limit-note.error {
            color: #9b1c1c;
        }

        .upload-wait-panel {
            position: relative;
            display: none;
            align-items: center;
            gap: 12px;
            margin-top: 16px;
            padding: 13px 14px;
            border-radius: 14px;
            background: var(--soft);
            color: var(--ink);
            font-weight: 700;
        }

        .upload-wait-panel.active {
            display: flex;
        }

        .upload-wait-panel.done .video-processing-ring,
        .upload-wait-panel.error .video-processing-ring,
        .upload-wait-panel.done .upload-progress-bar,
        .upload-wait-panel.error .upload-progress-bar {
            animation: none;
        }

        .upload-wait-panel.done .upload-progress-bar {
            width: 100%;
            transform: none;
        }

        .upload-wait-panel.error .upload-progress-track {
            display: none;
        }

        .upload-spinner {
            width: 28px;
            height: 28px;
            border-radius: 999px;
            border: 4px solid color-mix(in srgb, var(--accent-2) 38%, transparent);
            border-top-color: var(--accent);
            animation: spin .8s linear infinite;
            flex: 0 0 auto;
        }

        @keyframes spin {
            to {
                transform: rotate(360deg);
            }
        }

        .video-processing-indicator {
            position: relative;
            width: 54px;
            height: 54px;
            flex: 0 0 54px;
            display: grid;
            place-items: center;
        }

        .video-processing-ring {
            position: absolute;
            inset: 0;
            border: 4px solid rgba(148, 163, 184, .34);
            border-top-color: #3b82f6;
            border-right-color: #64748b;
            border-radius: 50%;
            animation: videoProcessingSpin 1s linear infinite;
        }

        .video-camera-icon {
            position: relative;
            width: 27px;
            height: 20px;
            display: block;
        }

        .video-camera-body {
            position: absolute;
            left: 1px;
            top: 4px;
            width: 18px;
            height: 13px;
            border-radius: 3px;
            background: #475569;
        }

        .video-camera-lens {
            position: absolute;
            right: 0;
            top: 6px;
            width: 8px;
            height: 10px;
            background: #64748b;
            clip-path: polygon(0 25%, 100% 0, 100% 100%, 0 75%);
        }

        .upload-status-copy {
            min-width: 0;
            flex: 1 1 auto;
            display: flex;
            flex-direction: column;
            gap: 3px;
        }

        .upload-status-copy strong {
            font-size: .98rem;
            line-height: 1.2;
        }

        .upload-status-copy span {
            font-size: .86rem;
            opacity: .78;
        }

        .upload-progress-track {
            position: absolute;
            left: 16px;
            right: 16px;
            bottom: 5px;
            height: 4px;
            overflow: hidden;
            border-radius: 999px;
            background: rgba(148, 163, 184, .28);
        }

        .upload-progress-bar {
            display: block;
            width: 38%;
            height: 100%;
            border-radius: inherit;
            background: currentColor;
            opacity: .62;
            animation: uploadProgressSweep 1.3s ease-in-out infinite;
        }

        .upload-wait-panel.progress-known .upload-progress-bar {
            animation: none;
            transform: none;
            transition: width .18s linear;
        }

        .upload-retry-actions {
            display: none;
            gap: 8px;
            margin-top: 9px;
            flex-wrap: wrap;
        }

        .upload-retry-actions.active {
            display: flex;
        }

        .upload-retry-actions button {
            border: 1px solid rgba(71, 85, 105, .28);
            border-radius: 8px;
            padding: 7px 11px;
            font: inherit;
            font-size: .82rem;
            font-weight: 800;
            cursor: pointer;
        }

        @keyframes videoProcessingSpin {
            to { transform: rotate(360deg); }
        }

        @keyframes uploadProgressSweep {
            0% { transform: translateX(-120%); }
            55% { transform: translateX(150%); }
            100% { transform: translateX(320%); }
        }

        /* Keep the rounded outer shell separate from the scrolling content. */
        .admin-modal-box {
            overflow: hidden;
        }

        #uploadModal .admin-modal-box {
            max-height: min(88vh, 760px);
            overflow: hidden;
            padding: 0;
        }

        #uploadModal .admin-modal-scroll {
            max-height: min(88vh, 760px);
            overflow-y: auto;
            overscroll-behavior: contain;
            scrollbar-gutter: stable;
            padding: 24px;
            box-sizing: border-box;
        }

        body.upload-busy {
            cursor: progress;
        }

        /* Do not disable pointer events on the modal while processing.
           The user must always be able to scroll and press Cancel. */

        /* v2.0.43 media upload modal: initial workflow mirrors the Personal site. */
        #uploadModal .admin-modal-box {
            width: min(440px, 100%);
            max-height: min(88vh, 760px);
            border-radius: 18px;
        }

        #uploadModal .admin-modal-scroll {
            max-height: min(88vh, 760px);
            padding: 22px 24px 20px;
        }

        #uploadModal h2 {
            margin: 0 0 16px;
            font-size: 1.35rem;
            line-height: 1.15;
        }

        #uploadModal .upload-media-section {
            margin: 0;
            padding: 0;
        }

        #uploadModal .upload-youtube-section {
            margin-top: 14px;
            padding-top: 0;
            border-top: 0;
        }

        #uploadModal .admin-modal-scroll > section > label,
        #uploadModal .upload-compact-grid label {
            margin: 0 0 5px;
            font-size: .82rem;
            line-height: 1.2;
            font-weight: 700;
        }

        #uploadModal input,
        #uploadModal textarea {
            padding: 8px 10px;
            border-radius: 8px;
        }

        #uploadModal textarea {
            min-height: 56px;
            max-height: 120px;
        }

        #uploadModal .upload-optional-details {
            margin-top: 8px;
            border: 0;
        }

        #uploadModal .upload-optional-details > summary {
            cursor: pointer;
            font-size: .76rem;
            line-height: 1.25;
            color: var(--muted);
            user-select: none;
        }

        #uploadModal .upload-optional-details[open] > summary {
            margin-bottom: 8px;
        }

        #uploadModal .upload-compact-grid {
            display: grid;
            grid-template-columns: minmax(0, 1fr) 92px;
            gap: 12px;
            align-items: end;
        }

        #uploadModal .upload-order-field .media-order-input {
            width: 100%;
            min-width: 0;
        }

        #uploadModal .upload-limit-note {
            margin-top: 7px;
            font-size: .74rem;
            line-height: 1.25;
            color: var(--muted);
        }

        #uploadModal .youtube-help-note {
            font-weight: 600;
        }

        #uploadModal .upload-wait-panel {
            display: none;
            position: relative;
            margin-top: 14px;
            padding: 18px 16px 15px;
            border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line));
            border-radius: 14px;
            background: color-mix(in srgb, var(--soft) 88%, transparent);
            text-align: center;
        }

        #uploadModal .upload-wait-panel.active {
            display: block;
        }

        #uploadModal .video-processing-indicator {
            width: 76px;
            height: 76px;
            margin: 0 auto 10px;
        }

        #uploadModal .video-processing-ring {
            border-width: 6px;
        }

        #uploadModal .video-camera-icon {
            transform: scale(1.18);
        }

        #uploadModal .upload-status-copy {
            display: block;
            text-align: center;
        }

        #uploadModal .upload-status-copy strong {
            display: block;
            font-size: 1.18rem;
            line-height: 1.18;
        }

        #uploadModal .upload-status-copy > span {
            display: block;
            margin-top: 4px;
            font-size: .94rem;
            line-height: 1.3;
            opacity: .86;
        }

        #uploadModal .upload-progress-track {
            position: relative;
            left: auto;
            right: auto;
            bottom: auto;
            width: 100%;
            height: 6px;
            margin-top: 18px;
        }

        #uploadModal .upload-retry-actions {
            justify-content: center;
            margin-top: 12px;
        }

        #uploadModal .upload-retry-actions button {
            padding: 8px 12px;
            font-size: .86rem;
        }

        #uploadModal .upload-modal-actions {
            position: static;
            margin: 16px 0 0;
            padding: 0;
            border-top: 0;
            background: transparent;
            box-shadow: none;
            justify-content: flex-end;
            gap: 10px;
        }

        #uploadModal .upload-modal-actions button {
            padding: 9px 14px;
            border-radius: 8px;
            font-size: .88rem;
        }

        @media (max-width: 540px) {
            #uploadModal .admin-modal-scroll {
                padding: 18px;
            }
            #uploadModal .upload-compact-grid {
                grid-template-columns: minmax(0, 1fr) 82px;
                gap: 9px;
            }
            #uploadModal .upload-modal-actions {
                gap: 8px;
            }
        }

        .visit-counter {
            position: fixed;
            right: 12px;
            bottom: 12px;
            z-index: 9000;
            padding: 7px 10px;
            border-radius: 999px;
            background: rgba(0, 0, 0, .55);
            color: #fff;
            font-size: 12px;
            text-decoration: none;
        }

        .visit-counter-link:hover {
            text-decoration: underline;
        }

        .admin-modal-backdrop {
            display: none;
            position: fixed;
            inset: 0;
            z-index: 20000;
            background: rgba(0, 0, 0, .55);
            place-items: center;
            padding: 18px;
        }

        .admin-modal-backdrop.open {
            display: grid;
        }

        .admin-modal-box {
            width: min(480px, 100%);
            border-radius: 22px;
            padding: 24px;
            background: var(--panel-strong);
            color: var(--ink);
            border: 1px solid var(--line);
            box-shadow: var(--shadow);
        }

        .admin-modal-box h2 {
            margin-top: 0;
            color: var(--accent);
            font-family: var(--font-title);
        }

        .admin-modal-box label {
            display: block;
            margin: 14px 0 6px;
            font-weight: 700;
        }

        .admin-modal-box input,
        .admin-modal-box textarea {
            width: 100%;
            padding: 12px;
            border-radius: 12px;
            border: 1px solid var(--line);
            font: inherit;
        }

        .admin-modal-box textarea {
            resize: vertical;
        }

        .modal-actions {
            display: flex;
            justify-content: flex-end;
            gap: 10px;
            margin-top: 18px;
        }

        .modal-actions button {
            border: 0;
            border-radius: 12px;
            padding: 10px 16px;
            background: var(--accent);
            color: #fff;
            cursor: pointer;
        }

        .delete-preview-frame img,
        .delete-preview-frame video {
            width: 100%;
            max-height: 320px;
            object-fit: contain;
            border-radius: 14px;
            background: #000;
        }

        .delete-preview-name {
            margin: 8px 0 12px;
            color: var(--muted);
            word-break: break-word;
        }

        .modal {
            display: none;
            position: fixed;
            inset: 0;
            z-index: 19000;
            background: rgba(0, 0, 0, .88);
        }

        .modal img {
            max-width: 90vw;
            max-height: 86vh;
            position: absolute;
            left: 50%;
            top: 50%;
            transform: translate(-50%, -50%);
            border-radius: 16px;
            opacity: 0;
            transition: opacity .2s ease;
        }

        .modal img.show {
            opacity: 1;
        }

        .close,
        .nav {
            position: absolute;
            z-index: 1;
            color: #fff;
            cursor: pointer;
            user-select: none;
        }

        .close {
            right: 24px;
            top: 18px;
            font-size: 42px;
        }

        .nav {
            top: 50%;
            transform: translateY(-50%);
            font-size: 48px;
            padding: 14px;
        }

        .prev {
            left: 18px;
        }

        .next {
            right: 18px;
        }

        @media (max-width: 1120px) {

            .video-grid,
            .gallery {
                grid-template-columns: repeat(3, minmax(0, var(--media-card-size)));
            }

            .site-header {
                grid-template-columns: minmax(0, 1fr) auto;
                padding-inline: 28px;
            }

            .main-menu {
                gap: 18px;
            }
        }

        @media (max-width: 920px) {

            .video-grid,
            .gallery {
                grid-template-columns: repeat(2, minmax(0, var(--media-card-size)));
            }

            .site-header {
                grid-template-columns: 1fr auto;
                grid-template-areas: "brand controls" "nav nav";
                padding: 14px 18px;
            }

            .family-logo,
            .family-logo-fallback {
                width: 82px;
                height: 56px;
                flex-basis: 82px;
            }

            .brand-name {
                display: block;
                font-size: 34px;
            }

            .mobile-menu-button {
                display: inline-grid;
                place-items: center;
            }

            .main-menu {
                display: none;
                justify-content: flex-start;
                align-items: stretch;
                flex-direction: column;
                gap: 0;
                margin-top: 10px;
                padding: 18px;
                border-radius: 24px;
                background: var(--accent);
                color: #fff;
                box-shadow: var(--shadow);
            }

            .main-menu.open {
                display: flex;
            }

            .main-menu a,
            .main-menu button,
            .inline-form button {
                color: #fff;
                width: 100%;
                text-align: left;
                padding: 14px 10px;
                border-radius: 10px;
                background: transparent;
            }

            .main-menu a::before {
                color: #fff;
            }

            .main-menu .admin-control {
                margin-left: 0;
            }

            .hero {
                min-height: 380px;
                place-items: end center;
                padding: 70px 18px 34px;
            }
        }

        @media (max-width: 640px) {
            .site-header {
                grid-template-columns: 1fr;
                grid-template-areas: "controls" "brand" "nav";
            }

            .top-actions {
                justify-content: flex-end;
            }

            .support-control {
                height: 28px;
                border-radius: 9px;
            }

            .theme-current {
                width: 40px;
            }

            .flag-current {
                width: 42px;
            }

            .flag-current img,
            .flag-menu img {
                width: 23px;
                height: 15px;
            }

            .family-brand {
                justify-content: flex-start;
            }

            .brand-name {
                font-size: 32px;
            }

            .hero h2 {
                font-size: 34px;
            }

            .hero-text {
                font-size: 18px;
            }

            .video-grid,
            .gallery {
                grid-template-columns: minmax(0, var(--media-card-size));
            }
        }

        @media (max-width: 420px) {
            .site-header {
                padding: 10px;
            }

            .family-logo,
            .family-logo-fallback {
                width: 68px;
                height: 48px;
                flex-basis: 68px;
            }

            .brand-name {
                font-size: 28px;
            }

            .media-section {
                padding-inline: 12px;
            }
        }

        /* readable opened menu */
        .theme-menu,
        .theme-options,
        .theme-selector__menu,
        .theme-dropdown-menu {
            width: 238px !important;
            min-width: 238px !important;
            max-width: 238px !important;
            padding: 8px !important;
        }

        .theme-menu button,
        .theme-options button,
        .theme-selector__menu button,
        .theme-dropdown-menu button {
            display: flex !important;
            align-items: center !important;
            gap: 10px !important;
            min-height: 40px !important;
            padding: 8px 12px !important;
            border-radius: 10px !important;
            background: #fff !important;
            color: #173d22 !important;
            font-weight: 700 !important;
        }

        .theme-menu button+button,
        .theme-options button+button,
        .theme-selector__menu button+button,
        .theme-dropdown-menu button+button {
            margin-top: 4px !important;
        }

        .theme-menu,
        .theme-options,
        .theme-selector__menu,
        .theme-dropdown-menu {
            position: absolute;
            top: calc(100% + 8px);
            left: 0;
            width: 250px;
            min-width: 250px;
            padding: 8px;
            border-radius: 14px;
            background: rgba(255, 255, 255, 0.98);
            box-shadow: 0 18px 44px rgba(20, 35, 25, 0.18);
            border: 1px solid rgba(20, 60, 35, 0.10);
            z-index: 1000;
        }

        .theme-menu button,
        .theme-options button,
        .theme-selector__menu button,
        .theme-dropdown-menu button,
        .theme-option,
        .theme-choice {
            width: 100%;
            min-height: 42px;
            padding: 8px 12px;
            display: flex;
            align-items: center;
            gap: 10px;
            border: 0;
            border-radius: 10px;
            background: #ffffff;
            color: #173d22;
            font-size: 15px;
            font-weight: 700;
            text-align: left;
            cursor: pointer;
            box-shadow: none;
        }

        .theme-menu button:hover,
        .theme-options button:hover,
        .theme-selector__menu button:hover,
        .theme-dropdown-menu button:hover,
        .theme-option:hover,
        .theme-choice:hover {
            background: #f1f7f2;
        }

        .theme-menu button[aria-selected="true"],
        .theme-options button[aria-selected="true"],
        .theme-selector__menu button[aria-selected="true"],
        .theme-dropdown-menu button[aria-selected="true"],
        .theme-option.is-active,
        .theme-choice.is-active,
        .theme-option.active,
        .theme-choice.active {
            background: #eaf5ed;
            outline: 1px solid rgba(42, 111, 64, 0.35);
        }

        .theme-menu button+button,
        .theme-options button+button,
        .theme-selector__menu button+button,
        .theme-dropdown-menu button+button {
            margin-top: 4px;
        }

        .theme-menu .theme-check,
        .theme-options .theme-check,
        .theme-selector__menu .theme-check,
        .theme-dropdown-menu .theme-check {
            margin-left: auto;
            color: #2a6f40;
            font-size: 16px;
            font-weight: 800;
        }

        /* fam_1.0.27: right-align theme dropdown with trigger */
        .theme-picker,
        .theme-control,
        .theme-selector,
        .theme-dropdown {
            position: relative !important;
        }

        .theme-menu,
        .theme-options,
        .theme-selector__menu,
        .theme-dropdown-menu {
            left: auto !important;
            right: 0 !important;
        }
    
        .media-edit-form {
            width: 100%;
            max-width: 100%;
        }

        .media-edit-form textarea {
            display: block;
            width: 100%;
            box-sizing: border-box;
            min-height: 74px;
            margin: 10px 0 12px;
            padding: 10px 12px;
            border-radius: 10px;
            border: 1px solid var(--line);
            background: var(--panel);
            color: var(--text);
            font: inherit;
            resize: vertical;
        }

        .media-edit-save-button {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            margin: 0 0 4px 0;
            padding: 9px 16px;
            border: 0;
            border-radius: 10px;
            background: var(--accent);
            color: white;
            font-weight: 800;
            cursor: pointer;
            box-shadow: 0 8px 18px rgba(0, 0, 0, .12);
        }

        .media-edit-save-button:hover {
            filter: brightness(.96);
        }

        .media-card-actions .media-edit-panel[open] {
            flex-basis: 100%;
        }

        .media-card-actions:has(.media-edit-panel[open]) {
            flex-wrap: wrap;
        }

        /* fam_2.0.7 media card edit layout */

        .media-card-actions {
            display: flex;
            flex-direction: column;
            align-items: stretch;
            gap: 12px;
            margin-top: 14px;
            width: 100%;
        }

        .media-card-action-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            width: 100%;
        }

        .media-card-actions .delete-media-button {
            margin-left: auto;
        }

        .media-edit-panel {
            display: block;
            width: 100%;
            margin: 0;
        }

        .media-edit-panel summary {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            padding: 9px 14px;
            border-radius: 10px;
            border: 1px solid var(--line);
            background: var(--panel-strong);
            color: var(--text);
            font-weight: 800;
            list-style: none;
        }

        .media-edit-panel summary::-webkit-details-marker {
            display: none;
        }

        .media-edit-form {
            width: 100%;
            max-width: 100%;
            margin: 12px 0 0;
        }

        .media-edit-form textarea {
            display: block;
            width: 100%;
            box-sizing: border-box;
            min-height: 82px;
            margin: 0 0 12px;
            padding: 10px 12px;
            border-radius: 10px;
            border: 1px solid var(--line);
            background: var(--panel);
            color: var(--text);
            font: inherit;
            resize: vertical;
        }

        .media-edit-save-row {
            display: flex;
            justify-content: flex-start;
            width: 100%;
        }

        .media-edit-save-button {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            margin: 0;
            padding: 10px 17px;
            border: 0;
            border-radius: 10px;
            background: var(--accent);
            color: white;
            font-weight: 800;
            cursor: pointer;
            box-shadow: 0 8px 18px rgba(0, 0, 0, .12);
        }

        .media-edit-save-button:hover {
            filter: brightness(.96);
        }

        /* fam_2.0.8 video-card editor layout */
        .video-card .media-card-actions.video-card-actions {
            display: block;
            width: 100%;
            margin-top: 14px;
        }

        .video-card .video-action-top-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 14px;
            width: 100%;
            margin-bottom: 12px;
        }

        .video-card .video-edit-panel {
            width: 100%;
            margin: 0;
        }

        .video-card .video-edit-panel summary {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 64px;
            padding: 10px 15px;
            border-radius: 10px;
            border: 1px solid var(--line);
            background: var(--panel-strong);
            color: var(--text);
            font-weight: 800;
            cursor: pointer;
            list-style: none;
        }

        .video-card .video-edit-panel summary::-webkit-details-marker {
            display: none;
        }

        .video-card .video-edit-form {
            display: none;
            width: 100%;
            margin: 0;
        }

        .video-card .video-card-actions:has(.video-edit-panel[open]) .video-edit-form {
            display: block;
        }

        .video-card .video-edit-form textarea {
            display: block;
            width: 100%;
            box-sizing: border-box;
            min-height: 82px;
            margin: 0 0 12px;
            padding: 10px 12px;
            border-radius: 10px;
            border: 1px solid var(--line);
            background: var(--panel);
            color: var(--text);
            font: inherit;
            resize: vertical;
        }

        .video-card .video-edit-save-button {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 74px;
            margin: 0;
            padding: 10px 17px;
            border: 0;
            border-radius: 10px;
            background: var(--accent);
            color: white;
            font-weight: 800;
            cursor: pointer;
            box-shadow: 0 8px 18px rgba(0, 0, 0, .12);
        }

        .video-card .video-edit-save-button:hover {
            filter: brightness(.96);
        }

        .video-card .video-delete-button {
            flex: 0 0 auto;
            margin: 0;
        }

        /* fam_2.0.10 picture-card editor layout */
        .picture-card .media-card-actions.picture-card-actions {
            display: block;
            width: 100%;
            margin-top: 14px;
        }

        .picture-card .picture-action-top-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 14px;
            width: 100%;
            margin-bottom: 12px;
        }

        .picture-card .picture-edit-panel {
            width: 100%;
            margin: 0;
        }

        .picture-card .picture-edit-panel summary {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 64px;
            padding: 10px 15px;
            border-radius: 10px;
            border: 1px solid var(--line);
            background: var(--panel-strong);
            color: var(--text);
            font-weight: 800;
            cursor: pointer;
            list-style: none;
        }

        .picture-card .picture-edit-panel summary::-webkit-details-marker {
            display: none;
        }

        .picture-card .picture-edit-form {
            display: none;
            width: 100%;
            margin: 0;
        }

        .picture-card .picture-card-actions:has(.picture-edit-panel[open]) .picture-edit-form {
            display: block;
        }

        .picture-card .picture-edit-form textarea {
            display: block;
            width: 100%;
            box-sizing: border-box;
            min-height: 82px;
            margin: 0 0 12px;
            padding: 10px 12px;
            border-radius: 10px;
            border: 1px solid var(--line);
            background: var(--panel);
            color: var(--text);
            font: inherit;
            resize: vertical;
        }

        .picture-card .picture-edit-save-button {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 74px;
            margin: 0;
            padding: 10px 17px;
            border: 0;
            border-radius: 10px;
            background: var(--accent);
            color: white;
            font-weight: 800;
            cursor: pointer;
            box-shadow: 0 8px 18px rgba(0, 0, 0, .12);
        }

        .picture-card .picture-edit-save-button:hover {
            filter: brightness(.96);
        }

        .picture-card .picture-delete-button {
            flex: 0 0 auto;
            margin: 0;
        }

        /* fam_2.0.11 YouTube-card editor layout */
        .video-card .youtube-card-actions {
            display: block;
            width: 100%;
            margin-top: 14px;
        }

        .video-card .youtube-action-top-row {
            display: flex;
            align-items: center;
            justify-content: flex-start;
            gap: 14px;
            width: 100%;
            margin-bottom: 12px;
        }

        .video-card .youtube-edit-panel {
            width: auto;
            margin: 0;
        }

        .video-card .youtube-edit-panel summary {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 64px;
            padding: 10px 15px;
            border-radius: 10px;
            border: 1px solid var(--line);
            background: var(--panel-strong);
            color: var(--text);
            font-weight: 800;
            cursor: pointer;
            list-style: none;
        }

        .video-card .youtube-edit-panel summary::-webkit-details-marker {
            display: none;
        }

        .video-card .youtube-delete-form {
            margin: 0 0 0 auto;
        }

        .video-card .youtube-edit-form {
            display: none;
            width: 100%;
            margin: 0;
        }

        .video-card .youtube-card-actions:has(.youtube-edit-panel[open]) .youtube-edit-form {
            display: block;
        }

        .video-card .youtube-edit-form textarea {
            display: block;
            width: 100%;
            box-sizing: border-box;
            min-height: 82px;
            margin: 0 0 12px;
            padding: 10px 12px;
            border-radius: 10px;
            border: 1px solid var(--line);
            background: var(--panel);
            color: var(--text);
            font: inherit;
            resize: vertical;
        }

        .video-card .youtube-edit-save-button {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 74px;
            margin: 0;
            padding: 10px 17px;
            border: 0;
            border-radius: 10px;
            background: var(--accent);
            color: white;
            font-weight: 800;
            cursor: pointer;
            box-shadow: 0 8px 18px rgba(0, 0, 0, .12);
        }

        .video-card .youtube-edit-save-button:hover {
            filter: brightness(.96);
        }

        /* fam_2.1.1 comment rendering/editor fix
           - Media comments must not be trimmed to one visual line.
           - Stored newline characters are rendered as line breaks.
           - Edit textareas have a real multi-line editing area for pictures, videos and YouTube cards. */
        .picture-card .media-filename,
        .video-card .media-filename,
        .media-comment-text {
            font-weight: 800;
            white-space: pre-line;
            overflow: visible;
            text-overflow: clip;
            overflow-wrap: anywhere;
            line-height: 1.45;
        }

        .media-edit-form textarea,
        .video-card .video-edit-form textarea,
        .picture-card .picture-edit-form textarea,
        .video-card .youtube-edit-form textarea {
            display: block;
            width: 100%;
            min-height: 112px;
            box-sizing: border-box;
            line-height: 1.45;
            white-space: pre-wrap;
            overflow-y: auto;
            font-weight: 800;
        }

        /* fam_2.1.10 media editor visual upgrade
           - Adds interior card padding for admin controls.
           - Gives every control a pronounced edge.
           - Aligns Edit/Delete and Order/Save rows cleanly.
           - Keeps the comment textarea away from rounded card corners. */
        .picture-card,
        .video-card {
            overflow: hidden;
        }

        .picture-card .media-card-actions.picture-card-actions,
        .video-card .media-card-actions.video-card-actions,
        .video-card .youtube-card-actions {
            box-sizing: border-box;
            padding: 0 12px 14px;
            margin-top: 14px;
        }

        .picture-card .picture-action-top-row,
        .video-card .video-action-top-row,
        .video-card .youtube-action-top-row {
            box-sizing: border-box;
            padding: 0;
            margin-bottom: 14px;
            align-items: center;
        }

        .picture-card .picture-edit-panel,
        .video-card .video-edit-panel,
        .video-card .youtube-edit-panel {
            width: auto;
            flex: 0 0 auto;
        }

        .picture-card .picture-edit-panel summary,
        .video-card .video-edit-panel summary,
        .video-card .youtube-edit-panel summary {
            min-width: 78px;
            min-height: 42px;
            padding: 10px 16px;
            border-radius: 11px;
            border: 1px solid rgba(31, 85, 52, .38);
            background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,252,247,.94));
            color: var(--accent);
            box-shadow:
                0 1px 0 rgba(255,255,255,.85) inset,
                0 2px 0 rgba(31, 85, 52, .10),
                0 8px 18px rgba(31, 85, 52, .10);
        }

        .picture-card .picture-edit-panel summary::before,
        .video-card .video-edit-panel summary::before,
        .video-card .youtube-edit-panel summary::before {
            content: "✎";
            margin-right: 8px;
            font-size: 18px;
            line-height: 1;
        }

        .picture-card .picture-edit-panel summary:hover,
        .video-card .video-edit-panel summary:hover,
        .video-card .youtube-edit-panel summary:hover {
            border-color: rgba(31, 85, 52, .62);
            transform: translateY(-1px);
        }

        .picture-card .picture-delete-button,
        .video-card .video-delete-button,
        .video-card .youtube-delete-form .video-delete-button {
            min-width: 88px;
            min-height: 42px;
            padding: 10px 16px;
            border-radius: 11px;
            border: 1px solid rgba(155, 47, 47, .48);
            background: linear-gradient(180deg, #b33a3a, #942828);
            color: #fff;
            font-weight: 800;
            box-shadow:
                0 1px 0 rgba(255,255,255,.20) inset,
                0 2px 0 rgba(90, 20, 20, .18),
                0 8px 18px rgba(155, 47, 47, .18);
        }

        .picture-card .picture-delete-button::before,
        .video-card .video-delete-button::before,
        .video-card .youtube-delete-form .video-delete-button::before {
            content: "🗑";
            margin-right: 7px;
            font-size: 15px;
        }

        .picture-card .picture-delete-button:hover,
        .video-card .video-delete-button:hover,
        .video-card .youtube-delete-form .video-delete-button:hover {
            filter: brightness(.97);
            transform: translateY(-1px);
        }

        .picture-card .picture-edit-form,
        .video-card .video-edit-form,
        .video-card .youtube-edit-form {
            box-sizing: border-box;
            padding: 0;
            margin-top: 0;
        }

        .picture-card .picture-edit-form textarea,
        .video-card .video-edit-form textarea,
        .video-card .youtube-edit-form textarea {
            width: 100%;
            min-height: 112px;
            box-sizing: border-box;
            margin: 0 0 14px;
            padding: 14px 16px;
            border-radius: 14px;
            border: 1px solid rgba(31, 85, 52, .26);
            background: rgba(255, 255, 255, .96);
            color: var(--ink);
            font-weight: 700;
            line-height: 1.45;
            box-shadow:
                0 1px 0 rgba(255,255,255,.88) inset,
                0 0 0 3px rgba(31, 85, 52, .035),
                0 10px 22px rgba(31, 85, 52, .08);
        }

        .picture-card .picture-edit-form textarea:focus,
        .video-card .video-edit-form textarea:focus,
        .video-card .youtube-edit-form textarea:focus,
        .media-order-input:focus {
            outline: none;
            border-color: rgba(31, 85, 52, .72);
            box-shadow:
                0 1px 0 rgba(255,255,255,.88) inset,
                0 0 0 4px rgba(31, 85, 52, .12),
                0 10px 22px rgba(31, 85, 52, .10);
        }

        .media-data-edit-row {
            display: flex;
            align-items: flex-end;
            justify-content: space-between;
            gap: 14px;
            width: 100%;
        }

        .media-order-label {
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            gap: 7px;
            margin: 0;
            color: var(--accent);
            font-size: .88rem;
            font-weight: 900;
            opacity: 1;
            white-space: nowrap;
        }

        .media-order-input {
            width: 112px;
            max-width: 112px;
            height: 42px;
            box-sizing: border-box;
            padding: 8px 10px;
            border-radius: 11px;
            border: 1px solid rgba(31, 85, 52, .34);
            background: rgba(255, 255, 255, .98);
            color: var(--ink);
            font-size: 16px;
            font-weight: 800;
            box-shadow:
                0 1px 0 rgba(255,255,255,.88) inset,
                0 2px 0 rgba(31, 85, 52, .08),
                0 8px 16px rgba(31, 85, 52, .08);
        }

        .picture-card .picture-edit-save-button,
        .video-card .video-edit-save-button,
        .video-card .youtube-edit-save-button {
            min-width: 92px;
            min-height: 44px;
            padding: 11px 18px;
            border-radius: 12px;
            border: 1px solid rgba(12, 62, 33, .42);
            background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 92%, white), var(--accent));
            box-shadow:
                0 1px 0 rgba(255,255,255,.24) inset,
                0 2px 0 rgba(12, 62, 33, .20),
                0 10px 22px rgba(31, 85, 52, .24);
        }

        .picture-card .picture-edit-save-button::before,
        .video-card .video-edit-save-button::before,
        .video-card .youtube-edit-save-button::before {
            content: "💾";
            margin-right: 8px;
            font-size: 16px;
        }

        .picture-card .picture-edit-save-button:hover,
        .video-card .video-edit-save-button:hover,
        .video-card .youtube-edit-save-button:hover {
            transform: translateY(-1px);
        }

        @media (max-width: 520px) {
            .media-data-edit-row {
                align-items: stretch;
                flex-direction: column;
            }

            .media-order-input,
            .picture-card .picture-edit-save-button,
            .video-card .video-edit-save-button,
            .video-card .youtube-edit-save-button {
                width: 100%;
                max-width: 100%;
            }
        }

        .contact-form {
            display: grid;
            gap: 14px;
        }

        .contact-row {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 14px;
        }

        .contact-field {
            display: grid;
            gap: 7px;
            color: var(--accent);
            font-weight: 900;
        }

        .contact-field input,
        .contact-field textarea {
            width: 100%;
            box-sizing: border-box;
            border: 1px solid rgba(31, 85, 52, .30);
            border-radius: 13px;
            background: rgba(255, 255, 255, .96);
            color: var(--ink);
            padding: 12px 14px;
            font: inherit;
            font-weight: 700;
            box-shadow:
                0 1px 0 rgba(255,255,255,.88) inset,
                0 0 0 3px rgba(31, 85, 52, .035),
                0 10px 20px rgba(31, 85, 52, .06);
        }

        .contact-field textarea {
            min-height: 150px;
            resize: vertical;
            line-height: 1.45;
        }

        .contact-field input:focus,
        .contact-field textarea:focus {
            outline: none;
            border-color: rgba(31, 85, 52, .72);
            box-shadow:
                0 1px 0 rgba(255,255,255,.88) inset,
                0 0 0 4px rgba(31, 85, 52, .12),
                0 10px 22px rgba(31, 85, 52, .10);
        }

        .contact-hp {
            position: absolute !important;
            left: -10000px !important;
            width: 1px !important;
            height: 1px !important;
            overflow: hidden !important;
        }

        .contact-submit-row {
            display: flex;
            justify-content: flex-end;
            margin-top: 4px;
        }

        .contact-submit {
            min-width: 150px;
            min-height: 46px;
            border: 1px solid rgba(12, 62, 33, .42);
            border-radius: 14px;
            background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 92%, white), var(--accent));
            color: #fff;
            font-weight: 900;
            cursor: pointer;
            box-shadow:
                0 1px 0 rgba(255,255,255,.24) inset,
                0 2px 0 rgba(12, 62, 33, .20),
                0 10px 22px rgba(31, 85, 52, .24);
        }

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

        @media (max-width: 680px) {
            .contact-row {
                grid-template-columns: 1fr;
            }
        }

        /* fam_2.1.12 contact sending overlay */
        .contact-send-overlay {
            display: none;
            position: fixed;
            inset: 0;
            z-index: 9999;
            align-items: center;
            justify-content: center;
            background: rgba(247, 250, 239, .76);
            backdrop-filter: blur(3px);
        }

        .contact-send-overlay.active {
            display: flex;
        }

        .contact-send-box {
            display: grid;
            justify-items: center;
            gap: 14px;
            min-width: 240px;
            padding: 26px 30px;
            border-radius: 22px;
            border: 1px solid rgba(31, 85, 52, .28);
            background: var(--panel-strong);
            box-shadow: 0 22px 70px rgba(31, 85, 52, .24);
            color: var(--accent);
            font-weight: 900;
            text-align: center;
        }

        .contact-mail-spinner {
            position: relative;
            width: 72px;
            height: 72px;
            display: grid;
            place-items: center;
        }

        .contact-mail-spinner-ring {
            position: absolute;
            inset: 0;
            border: 6px solid rgba(31, 85, 52, .16);
            border-top-color: var(--accent);
            border-right-color: rgba(31, 85, 52, .52);
            border-radius: 50%;
            animation: contactMailSpin .9s linear infinite;
        }

        .contact-mail-icon {
            position: relative;
            width: 34px;
            height: 34px;
            color: var(--accent);
        }

        @keyframes contactMailSpin {
            to {
                transform: rotate(360deg);
            }
        }

        body.contact-sending {
            cursor: wait;
        }

        body.contact-sending .contact-submit {
            pointer-events: none;
            opacity: .70;
        }

/* v2.0.45 shared footer, contact modal, and support page */
.main-menu a[href="support.php"]::before {
    content: "✚";
    font-size: 17px;
    font-weight: 900;
}

.site-footer {
    padding: 28px clamp(18px, 5vw, 72px) 30px;
    border-top: 1px solid var(--line);
    background: var(--panel-strong);
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 26px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--accent);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.footer-links a:hover { text-decoration: underline; }
.footer-note { margin: 14px 0 0; color: var(--muted); font-weight: 700; }
.footer-copyright { margin: 8px 0 0; color: var(--muted); font-size: 13px; }

.contact-modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9000;
    align-items: center;
    justify-content: center;
    padding: 22px;
    background: rgba(17, 43, 27, .52);
    backdrop-filter: blur(4px);
}

.contact-modal-backdrop.active { display: flex; }
.contact-modal-box {
    position: relative;
    width: min(820px, 100%);
    max-height: calc(100vh - 44px);
    overflow-y: auto;
    padding: clamp(22px, 4vw, 38px);
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--panel-strong);
    box-shadow: 0 24px 80px rgba(17, 43, 27, .30);
}
.contact-modal-box h2 {
    margin: 0 42px 8px 0;
    font-family: var(--font-title);
    color: var(--accent);
    font-size: clamp(28px, 4vw, 42px);
}
.contact-modal-close {
    position: absolute;
    top: 14px;
    right: 16px;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: var(--soft);
    color: var(--accent);
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
}
body.contact-modal-open { overflow: hidden; }

.support-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 20px clamp(22px, 5vw, 58px);
    border-bottom: 1px solid var(--line);
    background: var(--panel-strong);
}
.support-page-actions { display: flex; align-items: center; gap: 20px; }
.support-page-actions > a { color: var(--accent); font-weight: 900; text-transform: uppercase; }
.support-language-links { display: flex; gap: 6px; flex-wrap: wrap; }
.support-language-links a { padding: 5px; border-radius: 8px; opacity: .65; }
.support-language-links a.active { background: var(--soft); opacity: 1; }
.support-language-links img { display: block; width: 24px; height: 16px; object-fit: cover; border-radius: 3px; }
.support-main { min-height: 60vh; }
.support-intro { padding: clamp(48px, 8vw, 86px) clamp(22px, 7vw, 90px) 36px; text-align: center; }
.support-intro h1 { margin: 4px 0 14px; font-family: var(--font-title); color: var(--accent); font-size: clamp(38px, 6vw, 64px); }
.support-intro > p:last-child { max-width: 720px; margin: 0 auto; color: var(--muted); font-size: 17px; font-weight: 700; line-height: 1.6; }
.support-section { padding: 28px clamp(22px, 7vw, 90px) 58px; }
.support-product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.support-product-card { padding: 26px; border: 1px solid var(--line); border-radius: 22px; background: var(--panel-strong); box-shadow: 0 14px 38px rgba(31, 85, 52, .10); }
.support-product-card h3 { margin: 0 0 10px; font-family: var(--font-title); color: var(--accent); font-size: 28px; }
.support-product-card p { color: var(--muted); line-height: 1.55; font-weight: 700; white-space: pre-line; }
.support-product-meta { display: flex; gap: 12px; flex-wrap: wrap; margin: 18px 0; color: var(--accent); font-size: 13px; font-weight: 900; }
.support-download-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.support-download-button { padding: 11px 16px; border-radius: 12px; background: var(--accent); color: #fff; font-weight: 900; }
.support-download-button.secondary { background: var(--soft); color: var(--accent); }
.support-coming-soon { padding: 9px 13px; border-radius: 999px; background: var(--soft); color: var(--accent); font-weight: 900; }
.support-placeholder-section { border-top: 1px solid var(--line); }
.support-placeholder-section h2 { margin: 4px 0 10px; font-family: var(--font-title); color: var(--accent); font-size: clamp(28px, 4vw, 40px); }
.support-placeholder-section p:last-child { color: var(--muted); font-weight: 700; }

@media (max-width: 760px) {
    .support-page-header { align-items: flex-start; flex-direction: column; }
    .support-page-actions { width: 100%; justify-content: space-between; }
    .support-product-grid { grid-template-columns: 1fr; }
}

/* Authenticated Upload: Media / Apps & Downloads */
.upload-kind-tabs { display:flex; gap:8px; margin:4px 0 18px; padding:5px; border-radius:14px; background:var(--soft); }
.upload-kind-tab { flex:1; border:0; border-radius:10px; padding:10px 12px; background:transparent; color:var(--accent); font-weight:900; cursor:pointer; }
.upload-kind-tab.active { background:var(--panel-strong); box-shadow:0 3px 12px rgba(31,85,52,.12); }
.upload-kind-pane { display:none; }
.upload-kind-pane.active { display:block; }
.app-upload-section label { display:block; margin:11px 0 5px; font-weight:900; color:var(--accent); }
.app-upload-section input[type="text"], .app-upload-section textarea, .app-upload-section select { width:100%; box-sizing:border-box; padding:10px 11px; border:1px solid var(--line); border-radius:10px; background:var(--panel-strong); color:inherit; }
.app-upload-grid { display:grid; grid-template-columns:minmax(0,.8fr) minmax(0,.95fr) minmax(0,1.25fr); gap:10px; align-items:start; }
.app-meta-field { min-width:0; display:flex; flex-direction:column; align-items:stretch; }
.app-upload-section .app-meta-field label { display:block; width:100%; box-sizing:border-box; margin:11px 0 5px; padding:0; text-align:center; white-space:nowrap; line-height:1.2; }
.app-meta-field input, .app-meta-field select { display:block; width:100%; min-width:0; margin:0; }
.app-visible-row { display:inline-flex !important; width:auto !important; max-width:100%; align-items:center; justify-content:flex-start; gap:8px; margin:14px 0 0 !important; padding:0 !important; font-weight:900; line-height:1.25; cursor:pointer; }
.app-visible-row input[type="checkbox"] { appearance:auto; -webkit-appearance:checkbox; display:inline-block; flex:0 0 auto; width:16px !important; height:16px !important; min-width:16px !important; margin:0 !important; padding:0 !important; }
.app-upload-progress { min-height:22px; margin-top:10px; color:var(--accent); font-weight:800; }
.support-checksum { margin-top:14px; color:var(--muted); font-size:12px; }
.support-checksum code { display:block; margin-top:7px; overflow-wrap:anywhere; user-select:all; }
@media (max-width:760px) { .app-upload-grid { grid-template-columns:1fr; } }

/* Apps & Downloads upload progress */
.app-upload-progress-panel { margin-top:14px; padding:14px; border:1px solid var(--line); border-radius:12px; background:var(--soft); }
.app-upload-progress-panel[hidden] { display:none; }
.app-upload-progress-head { display:flex; justify-content:space-between; gap:12px; align-items:center; margin-bottom:9px; color:var(--accent); }
.app-upload-progress-panel .upload-progress-track { display:block; width:100%; height:9px; overflow:hidden; border-radius:999px; background:rgba(31,85,52,.12); }
.app-upload-progress-panel .upload-progress-bar { display:block; width:0; height:100%; border-radius:inherit; background:currentColor; transition:width .18s ease; }
.app-upload-progress-panel .app-upload-progress { min-height:0; margin-top:8px; font-weight:700; font-size:.92rem; }

/* v2.0.50 Apps upload completion state */
.app-upload-progress-panel.complete .upload-progress-bar { transition:none; animation:none !important; width:100% !important; }
.app-upload-progress-panel.complete .app-upload-progress-head { opacity:1; }
.app-upload-progress-panel.error .upload-progress-bar { transition:none; animation:none !important; width:0 !important; }
@media (max-width:600px) { .app-manager-package { grid-template-columns:1fr auto auto; } .app-manager-package-name { grid-column:1/-1; } }

/* SUPPORT admin package controls */
.support-admin-edit,.support-admin-delete{border:0;border-radius:9px;padding:10px 14px;font:600 .9rem "Segoe UI",Arial,sans-serif;cursor:pointer}.support-admin-edit{background:#eef4ea;color:var(--accent)}.support-admin-delete{background:#a52b2b;color:#fff}.support-edit-box label{display:block;margin:10px 0 5px;font-weight:700;color:var(--accent)}.support-edit-box input[type=text],.support-edit-box textarea{width:100%;box-sizing:border-box}.support-edit-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.support-product-card.admin-hidden{opacity:.72}


/* v2.0.63: successful contact-send confirmation */
.contact-sent-confirmation {
    min-height: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-align: center;
    font-family: "Segoe UI", Arial, sans-serif;
    color: var(--deep-green);
}
.contact-sent-check {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border: 3px solid currentColor;
    border-radius: 50%;
    font-size: 34px;
    line-height: 1;
    font-weight: 700;
}


/* v2.0.64: visible Contact failure state */
.contact-send-failure {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 18px;
    padding: 12px 14px;
    border: 1px solid #c95b5b;
    border-radius: 10px;
    background: #fff5f5;
    color: #8d2424;
    font-family: "Segoe UI", Arial, sans-serif;
}
.contact-failure-icon {
    display: inline-grid;
    place-items: center;
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #a93434;
    color: #fff;
    font-weight: 800;
}

/* v2.0.67 Support-page administrator upload control */
.support-admin-upload { display:inline-flex; align-items:center; justify-content:center; padding:9px 14px; border-radius:10px; background:var(--accent); color:#fff !important; font-weight:900; text-transform:uppercase; text-decoration:none; }


/* v2.1.14 photographic hero: photographs stay untouched; one HTML card overlays them. */
.hero {
    min-height: 390px;
    display: grid;
    place-items: center;
    padding: 34px 20px;
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
}
.hero-card {
    width: min(440px, calc(100% - 28px));
    margin: 0 auto;
    padding: 22px 30px 20px;
    border: 1px solid rgba(255,255,255,.78);
    border-radius: 18px;
    background: rgba(255,255,248,.86);
    box-shadow: 0 10px 28px rgba(36,58,40,.12);
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    text-align: center;
}
.hero .eyebrow { margin: 0 0 10px; }
.hero h2 { margin: 0; font-size: clamp(2rem,4vw,3.15rem); line-height: 1.02; }
.hero-text { margin: 14px 0 0; }
.hero-links { display: none !important; }
@media (max-width: 760px) {
  .hero { min-height: 330px; padding: 24px 12px; }
  .hero-card { padding: 18px 18px 16px; }
}


/* v2.1.15: photographic SUPPORT page, using the active theme image intact. */
.support-photo-hero {
    min-height: 330px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 34px 22px;
    background-size: cover;
    background-position: center;
    border-bottom: 1px solid var(--line);
}
.support-intro.support-photo-hero { padding: 34px 22px; }
.support-intro-card {
    width: min(620px, calc(100% - 24px));
    box-sizing: border-box;
    padding: 30px 34px;
    border: 1px solid rgba(255,255,255,.78);
    border-radius: 24px;
    background: rgba(255,255,255,.88);
    box-shadow: 0 18px 46px rgba(24,55,39,.16);
    text-align: center;
}
.support-intro-card h1 { margin: 4px 0 12px; font-family: var(--font-title); color: var(--accent); font-size: clamp(38px,6vw,60px); }
.support-intro-card > p:last-child { max-width: 560px; margin: 0 auto; color: var(--ink); font-size: 16px; font-weight: 700; line-height: 1.6; }
.support-feature-strip {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 18px;
    padding: 28px clamp(22px,7vw,90px) 10px;
}
.support-feature-card {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 100px;
    padding: 18px 20px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--panel-strong);
    box-shadow: 0 10px 28px rgba(31,85,52,.08);
}
.support-feature-icon {
    display: grid;
    place-items: center;
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--soft);
    color: var(--accent);
    font-size: 24px;
    font-weight: 900;
}
.support-feature-card .eyebrow { margin: 0 0 4px; }
.support-feature-card h2 { margin: 0; font-family: var(--font-title); color: var(--accent); font-size: clamp(20px,2.3vw,28px); }
.support-placeholder-section {
    margin: 0 clamp(22px,7vw,90px) 52px;
    padding: 32px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: linear-gradient(135deg,var(--panel-strong),var(--soft));
}
@media (max-width:760px) {
    .support-photo-hero { min-height: 280px; }
    .support-intro-card { padding: 24px 20px; }
    .support-feature-strip { grid-template-columns: 1fr; }
}

/* v2.1.17 SUPPORT refinement */
html { scroll-behavior: smooth; }
.support-photo-hero {
    background-image: url('../images/support-workspace.jpg?v=2.1.23') !important;
    background-position: center center;
}
.support-feature-card { color: inherit; text-decoration: none; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; }
.support-feature-card:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(31,85,52,.13); }
.support-feature-card > div { flex: 1 1 auto; }
.support-feature-arrow { margin-left:auto; color:var(--accent); font-size:34px; line-height:1; font-weight:400; }
#software-downloads, #recommended-links, #contact-support { scroll-margin-top: 24px; }
.support-contact-section { padding-top: 0; }
.support-contact-card { display:flex; align-items:center; gap:18px; padding:26px 30px; border:1px solid var(--line); border-radius:22px; background:linear-gradient(135deg,var(--panel-strong),var(--soft)); }
.support-contact-card > div { flex:1 1 auto; }
.support-contact-card h2 { margin:4px 0 8px; font-family:var(--font-title); color:var(--accent); font-size:clamp(28px,4vw,40px); }
.support-contact-card p:last-child { margin:0; color:var(--muted); font-weight:700; }
.support-contact-button { flex:0 0 auto; padding:11px 18px; border-radius:11px; background:var(--accent); color:#fff; font-weight:900; text-decoration:none; }
@media(max-width:760px){ .support-contact-card{align-items:flex-start;flex-wrap:wrap}.support-contact-button{margin-left:66px} }
