/* Mahadev Sena — mobile-first stylesheet. Theme colours come from logo.jpg. */
:root {
    --saffron: #e8762b;
    --saffron-dark: #c25a14;
    --saffron-soft: #fdebd9;
    --maroon: #6e1f12;
    --ink: #2a1d17;
    --muted: #6f6259;
    --cream: #fff8f0;
    --line: #ecdccb;
    --white: #fff;
    --ok: #1a7f37;
    --bad: #c62828;
    --radius: 12px;
    --shadow: 0 2px 10px rgba(42, 29, 23, 0.08);
    --font: "Noto Sans", "Noto Sans Devanagari", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--cream);
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--saffron-dark);
}

h1,
h2,
h3 {
    line-height: 1.25;
    margin: 0 0 .5em;
    color: var(--maroon);
}

h1 {
    font-size: 1.75rem;
}

h2 {
    font-size: 1.4rem;
}

h3 {
    font-size: 1.1rem;
}

p {
    margin: 0 0 1em;
}

.muted {
    color: var(--muted);
}

.container {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 16px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* Buttons */
.btn {
    display: inline-block;
    border: 2px solid transparent;
    border-radius: 999px;
    padding: 12px 24px;
    font: inherit;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    min-height: 44px;
}

.btn-primary {
    background: var(--saffron);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--saffron-dark);
}

.btn-ghost {
    background: transparent;
    color: var(--saffron-dark);
    border-color: var(--saffron);
}

.btn-ghost:hover {
    background: var(--saffron-soft);
}

.btn-light {
    background: var(--white);
    color: var(--maroon);
}

.btn-sm {
    padding: 8px 18px;
    min-height: 40px;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn[disabled] {
    opacity: .5;
    cursor: not-allowed;
}

:focus-visible {
    outline: 3px solid var(--maroon);
    outline-offset: 2px;
}

/* Brand + nav toggle */
.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--maroon);
    text-decoration: none;
}

.brand img {
    border-radius: 50%;
}

.nav-toggle {
    background: none;
    border: 0;
    padding: 10px;
    cursor: pointer;
    border-radius: 8px;
}

.nav-toggle .bars,
.nav-toggle .bars::before,
.nav-toggle .bars::after {
    display: block;
    width: 24px;
    height: 3px;
    background: var(--maroon);
    border-radius: 2px;
    content: "";
}

.nav-toggle .bars {
    position: relative;
}

.nav-toggle .bars::before {
    position: absolute;
    top: -8px;
}

.nav-toggle .bars::after {
    position: absolute;
    top: 8px;
}

.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 2px 6px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--white);
    color: var(--muted);
    font-weight: 600;
}

.lang-switch a {
    padding: 4px 8px;
    border-radius: 999px;
    text-decoration: none;
    color: var(--muted);
}

.lang-switch a[aria-current="true"] {
    background: var(--saffron);
    color: var(--white);
}

.lang-switch a:not([aria-current]):hover {
    color: var(--maroon);
}

.lang-sep {
    color: var(--line);
}

/* Public header */
.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 10;
}

.header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
    flex-wrap: wrap;
}

.site-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    padding: 8px 0 16px;
    gap: 2px;
}

.site-nav.open {
    display: flex;
}

.site-nav>a {
    padding: 10px 4px;
    color: var(--ink);
    text-decoration: none;
    font-weight: 600;
    border-radius: 8px;
}

.site-nav>a[aria-current="page"] {
    color: var(--saffron-dark);
}

.nav-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    padding-top: 8px;
}

/* Hero */
.hero {
    background: linear-gradient(160deg, var(--saffron) 0%, var(--saffron-dark) 60%, var(--maroon) 100%);
    color: var(--white);
    padding: 48px 0 56px;
    text-align: center;
}

.hero h1 {
    color: var(--white);
    font-size: 2rem;
}

.hero p {
    max-width: 560px;
    margin: 0 auto 1.5em;
    font-size: 1.1rem;
    opacity: .95;
}

.hero-logo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, .6);
    margin-bottom: 16px;
}

.hero-cta {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero .btn-ghost {
    color: var(--white);
    border-color: var(--white);
}

.hero .btn-ghost:hover {
    background: rgba(255, 255, 255, .15);
}

/* Sections + cards */
.section {
    padding: 40px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 24px;
}

.grid {
    display: grid;
    gap: 16px;
}

.card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

.pillar {
    text-align: center;
}

.pillar .icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 12px;
    border-radius: 50%;
    background: var(--saffron-soft);
    color: var(--saffron-dark);
    display: grid;
    place-items: center;
    font-size: 1.6rem;
}

.step-no {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--saffron);
    color: var(--white);
    display: inline-grid;
    place-items: center;
    font-weight: 700;
    margin-bottom: 8px;
}

.band {
    background: var(--saffron-soft);
}

/* Forms */
.auth-wrap {
    max-width: 480px;
    margin: 0 auto;
    padding: 24px 16px 48px;
}

.auth-head {
    text-align: center;
    margin-bottom: 16px;
}

.auth-head img {
    border-radius: 50%;
    margin-bottom: 8px;
}

.field {
    margin-bottom: 16px;
}

.field label {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
}

.req {
    color: var(--bad);
}

.field input,
.field select,
.field textarea {
    width: 100%;
    min-height: 48px;
    padding: 10px 14px;
    font: inherit;
    color: var(--ink);
    background: var(--white);
    border: 1.5px solid var(--line);
    border-radius: 10px;
}

.field input:focus,
.field select:focus {
    border-color: var(--saffron);
    outline: none;
    box-shadow: 0 0 0 3px var(--saffron-soft);
}

.hint {
    margin: 4px 0 0;
    font-size: .875rem;
    color: var(--muted);
}

.check-result {
    margin: 6px 0 0;
    font-weight: 600;
    min-height: 1.5em;
}

.check-result.ok {
    color: var(--ok);
}

.check-result.bad {
    color: var(--bad);
}

.check-result.wait {
    color: var(--muted);
    font-weight: 400;
}

.more {
    margin: 8px 0 20px;
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    background: var(--white);
}

.more summary {
    cursor: pointer;
    padding: 12px 16px;
    font-weight: 600;
    color: var(--maroon);
}

.more-body {
    padding: 4px 16px 0;
    display: grid;
    gap: 0 16px;
}

.alert {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-weight: 600;
}

.alert-error {
    background: #fde8e8;
    color: var(--bad);
}

.alert-success {
    background: #e6f4ea;
    color: var(--ok);
}

.alert-info {
    background: var(--saffron-soft);
    color: var(--maroon);
}

.switch-line {
    text-align: center;
    margin-top: 16px;
}

/* Footer */
.site-footer {
    background: #2a1d17;
    color: #e9ddd2;
    padding: 32px 0 0;
    margin-top: 24px;
}

.site-footer h3,
.site-footer .brand {
    color: var(--white);
}

.site-footer a {
    color: #ffc89b;
}

.footer-grid {
    display: grid;
    gap: 24px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .12);
    margin-top: 24px;
    padding: 16px;
    font-size: .875rem;
}

/* Logged-in app */
body.app {
    background: #fbf4ec;
}

.app-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 10;
}

.app-bar-right {
    margin-left: auto;
}

.app-shell {
    display: block;
}

.app-nav {
    display: none;
    flex-direction: column;
    gap: 2px;
    padding: 12px;
    background: var(--white);
    border-bottom: 1px solid var(--line);
}

.app-nav.open {
    display: flex;
}

.app-nav a {
    padding: 10px 14px;
    border-radius: 10px;
    color: var(--ink);
    text-decoration: none;
    font-weight: 600;
}

.app-nav a:hover {
    background: var(--saffron-soft);
}

.app-nav a[aria-current="page"] {
    background: var(--saffron);
    color: var(--white);
}

.app-user {
    padding: 8px 14px 12px;
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid var(--line);
    margin-bottom: 8px;
}

.nav-heading {
    margin: 12px 14px 4px;
    font-size: .75rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted);
}

.nav-logout {
    margin-top: 8px;
    color: var(--bad) !important;
}

.app-main {
    padding: 16px;
}

.app-main form {
    max-width: 500px;
}

.points-card {
    background: linear-gradient(135deg, var(--saffron), var(--saffron-dark));
    color: var(--white);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow);
}

.points-card h1 {
    color: var(--white);
    font-size: 1.4rem;
    margin-bottom: 16px;
}

.points-label {
    opacity: .9;
    font-size: .95rem;
}

.points-value {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.1;
}

.points-value span {
    font-size: 80%;
    font-weight: 600;
    opacity: .9;
}

.points-meta {
    margin-top: 16px;
    font-size: .9rem;
    opacity: .9;
}

.points-card .btn {
    margin-top: 16px;
}

/* Wider screens */
@media (min-width: 700px) {
    h1 {
        font-size: 2.1rem;
    }

    .hero {
        padding: 72px 0 80px;
    }

    .hero h1 {
        font-size: 2.8rem;
    }

    .grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }

    .more-body {
        grid-template-columns: 1fr 1fr;
    }

    .more-body .full {
        grid-column: 1 / -1;
    }

    .footer-grid {
        grid-template-columns: 2fr 1fr;
    }
}

@media (min-width: 900px) {
    .nav-toggle {
        display: none;
    }

    .site-nav {
        display: flex;
        flex-direction: row;
        align-items: center;
        width: auto;
        padding: 0;
        gap: 4px;
    }

    .nav-actions {
        padding: 0 0 0 12px;
    }

    .header-row {
        flex-wrap: nowrap;
    }

    .app-bar .nav-toggle {
        display: none;
    }

    .app-shell {
        display: grid;
        grid-template-columns: 240px 1fr;
        min-height: calc(100vh - 53px);
    }

    .app-nav {
        display: flex;
        border-bottom: 0;
        border-right: 1px solid var(--line);
    }

    .app-main {
        padding: 24px;
        width: 100%;
    }
}

/* Admin data tables */
.search-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 12px 0 4px;
}

.search-bar input {
    flex: 1 1 220px;
    min-height: 40px;
    padding: 8px 14px;
    font: inherit;
    border: 1.5px solid var(--line);
    border-radius: 999px;
    background: var(--white);
}

.table-count,
.page-info {
    margin: 4px 0 12px;
    font-size: .9rem;
}

.page-info {
    text-align: center;
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .9rem;
}

.data-table th,
.data-table td {
    padding: 10px 12px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--line);
}

.data-table th {
    background: var(--saffron-soft);
    color: var(--maroon);
    white-space: nowrap;
    position: sticky;
    top: 0;
}

.data-table tbody tr:last-child td {
    border-bottom: 0;
}

.data-table tbody tr:hover {
    background: #fffaf4;
}

.data-table .num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.data-table .pos {
    color: var(--ok);
    font-weight: 600;
}

.data-table .neg {
    color: var(--bad);
    font-weight: 600;
}

.nowrap {
    white-space: nowrap;
}

.pagination {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    margin-top: 16px;
}

.pagination a,
.pagination span {
    min-width: 40px;
    min-height: 40px;
    padding: 6px 12px;
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--white);
    text-decoration: none;
    color: var(--ink);
}

.pagination span {
    border: 0;
    background: none;
}

.pagination a[aria-current="page"] {
    background: var(--saffron);
    border-color: var(--saffron);
    color: var(--white);
    font-weight: 700;
}

/* Field errors */
.field.has-error input,
.field.has-error select {
    border-color: var(--bad);
}

.field-error {
    margin: 4px 0 0;
    font-size: .875rem;
    color: var(--bad);
    font-weight: 600;
}

.always-open {
    margin-bottom: 8px;
}

.field input[readonly],
.field input:disabled {
    background: #f4ece3;
    color: var(--muted);
}

.page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.page-head h1 {
    margin: 0;
}

.card.narrow {
    max-width: 480px;
}

/* Gallery: always 2 per row, every tile in the 16:9 YouTube aspect ratio */
.gallery-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, 1fr);
}

.gallery-item {
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.gallery-media {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    aspect-ratio: 16 / 9;
    background: #000;
    overflow: hidden;
}

.gallery-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-item figcaption {
    padding: 8px 12px;
    font-size: .9rem;
    display: flex;
    gap: 8px;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.gallery-item figcaption form {
    margin: 0;
}

.yt {
    cursor: pointer;
}

.yt-play {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(232, 118, 43, .92);
    color: var(--white);
    font-size: 1.3rem;
    pointer-events: none;
}

.list-title {
    margin-top: 32px;
}

.admin-gallery-forms {
    margin-bottom: 8px;
}

.admin-item {
    flex-direction: column;
    align-items: stretch !important;
}

.admin-item-caption {
    font-weight: 600;
    min-height: 1.4em;
}

.check-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    margin: 4px 0 12px;
    cursor: pointer;
}

.check-row input {
    width: 20px;
    height: 20px;
    accent-color: var(--saffron);
}

.admin-item .check-row {
    margin: 0;
}

.btn-danger {
    color: var(--bad);
    border-color: var(--bad);
}

.btn-danger:hover {
    background: #fde8e8;
}

.prose {
    max-width: 720px;
}

/* Connect with us (mission page) */
.connect-us {
    margin: 0 0 32px;
}

.connect-us h2 {
    margin-bottom: 8px;
}

.social-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    list-style: none;
    margin: 16px 0 0;
    padding: 0;
}

.social-cards a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px 10px 12px;
    min-height: 48px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--maroon);
    font-weight: 700;
    text-decoration: none;
    box-shadow: var(--shadow);
}

.social-cards a:hover {
    border-color: var(--saffron);
    background: var(--saffron-soft);
}

.social-cards .social-icon {
    flex: none;
    padding: 8px;
    box-sizing: content-box;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--saffron);
    color: var(--white);
}

/* About + missions: a full-width section per row */
.about-us {
    margin: 0 0 32px;
}

.about-us h2 {
    margin-bottom: 8px;
}

.mission-section {
    margin-bottom: 20px;
    padding: 20px;
}

.mission-head {
    display: flex;
    gap: 14px;
    align-items: center;
}

.mission-head h2 {
    margin: 0;
    font-size: 1.3rem;
}

.mission-head .step-no {
    flex: none;
    margin: 0;
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
}

.mission-label {
    margin: 0;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--saffron-dark);
}

.mission-content {
    margin-top: 16px;
}

.mission-content img {
    display: block;
    width: 100%;
    max-width: 546px;
    height: auto;
    border-radius: var(--radius);
    border: 1px solid var(--line);
}

@media (min-width: 700px) {
    .admin-gallery-forms {
        grid-template-columns: 1fr 1fr;
    }

    .mission-head h2 {
        font-size: 1.6rem;
    }
}

/* Home gallery carousel: shows 2 slides at a time. It is a native horizontal scroller (swipe, trackpad, mouse drag,
   prev/next buttons) that JS also auto-advances and wraps endlessly using 3 identical copies of the slide list. */
.carousel-section {
    padding-bottom: 32px;
}

.carousel-wrap {
    position: relative;
    container-type: inline-size;
}

.carousel {
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius);
    cursor: grab;
}

.carousel::-webkit-scrollbar {
    display: none;
}

.carousel.is-dragging {
    cursor: grabbing;
    user-select: none;
}

.carousel-track {
    display: flex;
    width: max-content;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* slide = (window - 12px gap) / 2, so exactly two fit; the fixed width is only a fallback for old browsers */
.carousel li {
    position: relative;
    flex: 0 0 auto;
    width: 280px;
    margin-right: 12px;
}

@supports (width: 1cqw) {
    .carousel li {
        width: calc(50cqw - 6px);
    }
}

.carousel img {
    -webkit-user-drag: none;
    user-select: none;
}

/* A slide = clickable media box (16:9) + caption underneath. Photos are links, videos are buttons that open the modal. */
.carousel li a,
.carousel li .carousel-open {
    display: block;
    width: 100%;
    color: inherit;
    text-decoration: none;
}

.carousel li .carousel-open {
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.carousel-media {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius);
    overflow: hidden;
    background: #000;
    box-shadow: var(--shadow);
}

.carousel li img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* up to two lines of caption under the slide; the box is always two lines tall so every slide lines up */
.carousel-caption {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    margin-top: 8px;
    min-height: calc(2 * 1.4em);
    font-size: 0.9rem;
    line-height: 1.4;
    font-weight: 600;
    color: var(--maroon);
}

.carousel li a:hover .carousel-caption,
.carousel li .carousel-open:hover .carousel-caption,
.carousel li a:focus-visible .carousel-caption,
.carousel li .carousel-open:focus-visible .carousel-caption {
    color: var(--saffron-dark);
}

.carousel .yt-play {
    width: 44px;
    height: 44px;
    font-size: 1.1rem;
}

/* Prev / next buttons, vertically centred on the media box (media height = slide width * 9/16) */
.carousel-nav {
    position: absolute;
    top: calc((50cqw - 6px) * 9 / 32);
    z-index: 2;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-top: -22px;
    padding: 0 0 4px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: var(--maroon);
    font-size: 2rem;
    line-height: 1;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    cursor: pointer;
}

.carousel-nav[hidden] {
    display: none;
}

.carousel-nav:hover,
.carousel-nav:focus-visible {
    background: var(--saffron);
    color: var(--white);
}

.carousel-prev {
    left: 8px;
}

.carousel-next {
    right: 8px;
}

@media (min-width: 700px) {
    .carousel-caption {
        font-size: 1rem;
    }

    .carousel .yt-play {
        width: 64px;
        height: 64px;
        font-size: 1.6rem;
    }

    .carousel-nav {
        width: 48px;
        height: 48px;
        margin-top: -24px;
    }

    .carousel-prev {
        left: 12px;
    }

    .carousel-next {
        right: 12px;
    }
}

.carousel-cta {
    text-align: center;
    margin: 24px 0 0;
}

/* Footer social icons */
.social-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    list-style: none;
    margin: 12px 0 0;
    padding: 0;
}

.social-links a {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .1);
    color: #fff;
    transition: background .15s;
}

.social-links a:hover {
    background: var(--saffron);
}

/* Logout is a POST form styled like a nav link */
.logout-form {
    margin: 8px 0 0;
}

.app-nav .nav-logout {
    width: 100%;
    text-align: left;
    padding: 10px 14px;
    border: 0;
    border-radius: 10px;
    background: none;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    color: var(--bad);
}

.app-nav .nav-logout:hover {
    background: #fde8e8;
}

/* Show/Hide password */
.input-wrap {
    position: relative;
}

.input-wrap input {
    padding-right: 84px;
}

.pw-toggle {
    position: absolute;
    top: 50%;
    right: 6px;
    transform: translateY(-50%);
    min-height: 40px;
    padding: 0 12px;
    border: 0;
    border-radius: 8px;
    background: none;
    font: inherit;
    font-size: .9rem;
    font-weight: 700;
    color: var(--saffron-dark);
    cursor: pointer;
}

.pw-toggle:hover {
    background: var(--saffron-soft);
}

/* Media modal viewer (photos + videos) */
.media-modal {
    width: min(94vw, 960px);
    max-width: none;
    margin: auto;
    padding: 0;
    border: 0;
    background: transparent;
    overflow: visible;
    color: #fff;
}

.media-modal::backdrop {
    background: rgba(20, 12, 8, .85);
}

.media-modal-frame {
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: var(--radius);
    overflow: hidden;
}

.media-modal-frame iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

.media-modal.is-photo .media-modal-frame {
    aspect-ratio: auto;
    height: min(78vh, 760px);
}

.media-modal-photo {
    width: 100%;
    height: 100%;
    background: #000 center / contain no-repeat;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

.media-modal-caption {
    margin: 12px 4px 0;
    font-weight: 600;
}

.media-modal-caption:empty {
    display: none;
}

.media-modal-close {
    position: absolute;
    top: -46px;
    right: 0;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .18);
    color: #fff;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
}

.media-modal-close:hover {
    background: var(--saffron);
}

/* Photos are CSS backgrounds (set from data-bg by app.js, lazily), never <img>: no "open image in new tab" / "save image as" */
.bg-image {
    display: block;
    width: 100%;
    height: 100%;
    background: #2a1d17 center / cover no-repeat;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

.photo-tile {
    padding: 0;
    border: 0;
    cursor: zoom-in;
}

body:has(dialog[open]) {
    overflow: hidden;
}