:root {
    --ink: #f4e6c8;
    --muted: #b5a48a;
    --paper: #1c150f;
    --paper-2: #2a1f16;
    --line: #6b5430;
    --brand: #d4b06a;
    --brand-deep: #8f6b32;
    --danger: #c45648;
    --shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
    --font-display: "Cinzel", serif;
    --font-body: "Source Serif 4", Palatino, serif;
    --paper-top: #140f0b;
    --paper-bottom: #0d0a07;
    --header-bg: rgba(20, 15, 11, 0.94);
    --glow: rgba(212, 176, 106, 0.16);
    --glow-2: rgba(92, 36, 24, 0.32);
    --cta-text: #1a1208;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    font-family: var(--font-body);
    color: var(--ink);
    /* Header chrome sits on a solid page shell; page art lives in .site-surface below the menu. */
    background-color: var(--paper-top);
    background-image: none;
    line-height: 1.55;
}

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand); filter: brightness(1.15); }

.shell {
    width: min(1100px, calc(100% - 2rem));
    margin-inline: auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    flex: 0 0 auto;
    /* Opaque bar — page background starts in .site-surface underneath, not through the menu. */
    background-color: var(--paper-top);
    background-image: linear-gradient(var(--header-bg), var(--header-bg));
    border-bottom: 1px solid var(--line);
}

.site-surface {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 0;
    background-color: var(--paper);
    background-image:
        radial-gradient(1200px 600px at 10% -10%, var(--glow), transparent 55%),
        radial-gradient(900px 500px at 100% 0%, var(--glow-2), transparent 50%),
        linear-gradient(
            180deg,
            color-mix(in srgb, var(--paper-top) calc(var(--page-bg-overlay, 100%)), transparent) 0%,
            color-mix(in srgb, var(--paper) calc(var(--page-bg-overlay, 100%)), transparent) 40%,
            color-mix(in srgb, var(--paper-bottom) calc(var(--page-bg-overlay, 100%)), transparent) 100%
        ),
        var(--page-bg-image, none);
    background-size: auto, auto, auto, var(--page-bg-size, cover);
    background-position: center, center, center, var(--page-bg-position, center);
    background-repeat: no-repeat;
    background-attachment: scroll, scroll, scroll, var(--page-bg-attachment, scroll);
}

.nav-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0.65rem 1rem;
    box-sizing: border-box;
}

.brand {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    margin: 0;
    margin-right: auto;
    padding: 0;
    color: inherit;
    line-height: 0;
}

.brand:hover {
    filter: none;
    opacity: 0.92;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: var(--brand-logo-size, 8vh);
    height: var(--brand-logo-size, 8vh);
    border: 1px solid var(--brand);
    color: var(--brand);
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: 0.04em;
    font-size: 0.85rem;
}

.brand-logo {
    display: block;
    object-fit: contain;
}

.brand-logo--thumbnail {
    width: var(--brand-logo-size, 8vh);
    height: var(--brand-logo-size, 8vh);
}

.brand-logo--banner {
    width: auto;
    height: var(--brand-logo-size, 8vh);
    max-height: var(--brand-logo-size, 8vh);
    max-width: min(100%, 72vw);
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
    justify-content: flex-end;
    margin-left: auto;
}

/* Compact top bar: hide logo so the menu can stay one text line (esp. small screens). */
html.nav-compact .site-header .brand {
    display: none !important;
}

html.nav-compact .nav-wrap {
    padding-top: 0.35rem;
    padding-bottom: 0.35rem;
    gap: 0.5rem;
    flex-wrap: nowrap;
    align-items: center;
}

html.nav-compact .nav-links {
    width: auto;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    flex: 1 1 auto;
    justify-content: flex-start;
}

html.nav-compact .nav-wrap.nav-layout-logo-left,
html.nav-compact .nav-wrap.nav-layout-logo-right,
html.nav-compact .nav-wrap.nav-layout-group-left,
html.nav-compact .nav-wrap.nav-layout-group-center,
html.nav-compact .nav-wrap.nav-layout-group-right,
html.nav-compact .nav-wrap.nav-layout-stack-center,
html.nav-compact .nav-wrap.nav-layout-stack-center-reverse,
html.nav-compact .nav-wrap.nav-layout-logo-center-buttons-right,
html.nav-compact .nav-wrap.nav-layout-logo-center-buttons-left {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
}

html.nav-compact .nav-wrap.nav-layout-stack-center .nav-links,
html.nav-compact .nav-wrap.nav-layout-stack-center-reverse .nav-links,
html.nav-compact .nav-wrap.nav-layout-logo-center-buttons-right .nav-links,
html.nav-compact .nav-wrap.nav-layout-logo-center-buttons-left .nav-links,
html.nav-compact .nav-wrap.nav-layout-group-center .nav-links,
html.nav-compact .nav-wrap.nav-layout-group-right .nav-links {
    width: auto;
    justify-content: flex-start;
    justify-self: auto;
    grid-column: auto;
}

.nav-compact-toggle {
    cursor: pointer;
    font: inherit;
    font-family: inherit;
}

/* Top menu layouts (Studio → Top menu) */
.nav-wrap.nav-layout-logo-left {
    justify-content: space-between;
}

.nav-wrap.nav-layout-logo-left .brand {
    margin-right: auto;
    margin-left: 0;
}

.nav-wrap.nav-layout-logo-left .nav-links {
    margin-left: auto;
    margin-right: 0;
    justify-content: flex-end;
}

.nav-wrap.nav-layout-logo-right {
    flex-direction: row-reverse;
    justify-content: space-between;
}

.nav-wrap.nav-layout-logo-right .brand {
    margin-left: auto;
    margin-right: 0;
}

.nav-wrap.nav-layout-logo-right .nav-links {
    margin-right: auto;
    margin-left: 0;
    justify-content: flex-start;
}

.nav-wrap.nav-layout-group-left,
.nav-wrap.nav-layout-group-center,
.nav-wrap.nav-layout-group-right {
    gap: 0.85rem;
}

.nav-wrap.nav-layout-group-left {
    justify-content: flex-start;
}

.nav-wrap.nav-layout-group-center {
    justify-content: center;
}

.nav-wrap.nav-layout-group-right {
    justify-content: flex-end;
}

.nav-wrap.nav-layout-group-left .brand,
.nav-wrap.nav-layout-group-center .brand,
.nav-wrap.nav-layout-group-right .brand,
.nav-wrap.nav-layout-group-left .nav-links,
.nav-wrap.nav-layout-group-center .nav-links,
.nav-wrap.nav-layout-group-right .nav-links {
    margin-left: 0;
    margin-right: 0;
}

.nav-wrap.nav-layout-group-left .nav-links,
.nav-wrap.nav-layout-group-center .nav-links,
.nav-wrap.nav-layout-group-right .nav-links {
    justify-content: flex-start;
}

/* Stacked: logo and buttons centered on separate rows */
.nav-wrap.nav-layout-stack-center,
.nav-wrap.nav-layout-stack-center-reverse {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.nav-wrap.nav-layout-stack-center-reverse {
    flex-direction: column-reverse;
}

.nav-wrap.nav-layout-stack-center .brand,
.nav-wrap.nav-layout-stack-center-reverse .brand,
.nav-wrap.nav-layout-stack-center .nav-links,
.nav-wrap.nav-layout-stack-center-reverse .nav-links {
    margin-left: 0;
    margin-right: 0;
}

.nav-wrap.nav-layout-stack-center .nav-links,
.nav-wrap.nav-layout-stack-center-reverse .nav-links {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
}

/* Logo dead-center; buttons pinned left or right (3-column grid) */
.nav-wrap.nav-layout-logo-center-buttons-right,
.nav-wrap.nav-layout-logo-center-buttons-left {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 0.75rem 1rem;
}

.nav-wrap.nav-layout-logo-center-buttons-right .brand,
.nav-wrap.nav-layout-logo-center-buttons-left .brand {
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
    margin: 0;
}

.nav-wrap.nav-layout-logo-center-buttons-right .nav-links {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    margin: 0;
    justify-content: flex-end;
}

.nav-wrap.nav-layout-logo-center-buttons-left .nav-links {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    margin: 0;
    justify-content: flex-start;
}

/* Button position. Top, center, and bottom keep the buttons where the layout
   places them and pin them to that edge of a tall logo. Left* sits them beside
   the logo. Center* puts the row in the middle of the bar. */
.nav-wrap.nav-buttons-top,
.nav-wrap.nav-buttons-left-top,
.nav-wrap.nav-buttons-center-top {
    align-items: flex-start;
}

.nav-wrap.nav-buttons-center,
.nav-wrap.nav-buttons-left-center {
    align-items: center;
}

.nav-wrap.nav-buttons-bottom,
.nav-wrap.nav-buttons-left-bottom,
.nav-wrap.nav-buttons-center-bottom {
    align-items: flex-end;
}

.nav-wrap.nav-buttons-left-top,
.nav-wrap.nav-buttons-left-center,
.nav-wrap.nav-buttons-left-bottom {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
}

.nav-wrap.nav-buttons-left-top .brand,
.nav-wrap.nav-buttons-left-center .brand,
.nav-wrap.nav-buttons-left-bottom .brand {
    grid-column: auto;
    grid-row: auto;
    justify-self: auto;
    margin-left: 0;
    margin-right: 0.85rem;
}

.nav-wrap.nav-buttons-left-top .nav-links,
.nav-wrap.nav-buttons-left-center .nav-links,
.nav-wrap.nav-buttons-left-bottom .nav-links {
    position: static;
    grid-column: auto;
    grid-row: auto;
    justify-self: auto;
    width: auto;
    margin: 0;
    justify-content: flex-start;
}

.nav-wrap.nav-buttons-center-top,
.nav-wrap.nav-buttons-center-bottom {
    position: relative;
}

.nav-wrap.nav-buttons-center-top .nav-links,
.nav-wrap.nav-buttons-center-bottom .nav-links {
    position: absolute;
    left: 0;
    right: 0;
    z-index: 2;
    width: auto;
    margin: 0;
    justify-content: center;
    pointer-events: none;
}

.nav-wrap.nav-buttons-center-top .nav-links > *,
.nav-wrap.nav-buttons-center-bottom .nav-links > * {
    pointer-events: auto;
}

.nav-wrap.nav-buttons-center-top .nav-links {
    top: 0.65rem;
}

.nav-wrap.nav-buttons-center-bottom .nav-links {
    bottom: 0.65rem;
}

html.nav-compact .nav-wrap.nav-buttons-top,
html.nav-compact .nav-wrap.nav-buttons-center,
html.nav-compact .nav-wrap.nav-buttons-bottom,
html.nav-compact .nav-wrap.nav-buttons-left-top,
html.nav-compact .nav-wrap.nav-buttons-left-center,
html.nav-compact .nav-wrap.nav-buttons-left-bottom,
html.nav-compact .nav-wrap.nav-buttons-center-top,
html.nav-compact .nav-wrap.nav-buttons-center-bottom {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
}

html.nav-compact .nav-wrap.nav-buttons-center-top .nav-links,
html.nav-compact .nav-wrap.nav-buttons-center-bottom .nav-links,
html.nav-compact .nav-wrap.nav-buttons-left-top .nav-links,
html.nav-compact .nav-wrap.nav-buttons-left-center .nav-links,
html.nav-compact .nav-wrap.nav-buttons-left-bottom .nav-links {
    position: static;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    width: auto;
    margin: 0;
    pointer-events: auto;
    justify-content: flex-start;
}

.nav-links > a.nav-pill,
.nav-links > button.nav-pill,
.nav-links .nav-command-toggle,
.nav-links > a:not(.nav-avatar) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.42rem 1rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--paper-2) 88%, transparent);
    color: var(--ink);
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.2;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.nav-links > a.nav-pill:hover,
.nav-links > button.nav-pill:hover,
.nav-links .nav-command-toggle:hover,
.nav-links > a:not(.nav-avatar):hover {
    border-color: var(--brand);
    color: var(--ink);
    filter: none;
    background: color-mix(in srgb, var(--brand) 14%, var(--paper-2));
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--brand) 35%, transparent);
}

.nav-links > a.nav-pill.active,
.nav-links > button.nav-pill.active,
.nav-links .nav-command-toggle.active,
.nav-links .nav-command.is-open .nav-command-toggle,
.nav-links > a:not(.nav-avatar).active {
    background: var(--brand);
    border-color: var(--brand);
    color: var(--cta-text);
    box-shadow: 0 8px 18px color-mix(in srgb, var(--brand) 28%, transparent);
}

.nav-command {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.nav-command-toggle {
    cursor: pointer;
    font: inherit;
    font-family: inherit;
    gap: 0.4rem;
    margin: 0;
    appearance: none;
    -webkit-appearance: none;
}

.nav-command-caret {
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    opacity: 0.7;
    flex-shrink: 0;
}

.nav-command.is-open .nav-command-caret {
    transform: rotate(180deg);
}

.nav-command-menu {
    position: absolute;
    top: calc(100% + 0.4rem);
    right: 0;
    min-width: 12rem;
    padding: 0.4rem;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--paper-2) 94%, var(--paper));
    box-shadow: 0 10px 24px color-mix(in srgb, var(--ink) 14%, transparent);
    z-index: 40;
    display: grid;
    gap: 0.3rem;
}

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

.nav-command-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.42rem 1rem;
    border-radius: 999px;
    border: 1px solid transparent;
    color: var(--ink);
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.2;
    text-decoration: none;
    background: transparent;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.nav-command-item:hover {
    border-color: var(--brand);
    color: var(--ink);
    filter: none;
    background: color-mix(in srgb, var(--brand) 14%, var(--paper-2));
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--brand) 35%, transparent);
}

.nav-command-item.active {
    background: var(--brand);
    border-color: var(--brand);
    color: var(--cta-text);
    box-shadow: 0 8px 18px color-mix(in srgb, var(--brand) 28%, transparent);
}

.nav-command-item.active:hover {
    color: var(--cta-text);
    filter: brightness(1.05);
}

.rank-perm-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.rank-perm-table th,
.rank-perm-table td {
    padding: 0.45rem 0.55rem;
    border-bottom: 1px solid var(--line);
    text-align: center;
    vertical-align: middle;
}

.rank-perm-table th:first-child,
.rank-perm-table td:first-child {
    text-align: left;
    white-space: nowrap;
    font-weight: 600;
}

.rank-perm-table thead th {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--muted);
}

.broadcast-queue .broadcast-card {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0.85rem 1rem;
    margin: 0 0 0.75rem;
    background: color-mix(in srgb, var(--paper-2) 70%, transparent);
}

.broadcast-card-head {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.75rem;
    align-items: baseline;
    margin-bottom: 0.35rem;
}

.broadcast-status {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
}

.broadcast-status.is-pending { color: #b45309; }
.broadcast-status.is-approved { color: #047857; }
.broadcast-status.is-rejected { color: #b91c1c; }
.broadcast-status.is-sent { color: var(--brand); }

.broadcast-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.65rem;
}

.section-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
    margin: 0 0 0.65rem;
    font-size: 0.95rem;
    color: var(--muted);
}

.section-breadcrumb a {
    color: var(--muted);
    font-weight: 600;
}

.section-breadcrumb a:hover {
    color: var(--brand);
    filter: none;
}

.section-breadcrumb .crumb-sep {
    opacity: 0.55;
    user-select: none;
}

.section-breadcrumb [aria-current="page"] {
    color: var(--ink);
    font-weight: 700;
}

.section-children {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
    margin: 0 0 1.35rem;
    padding: 0 0 0.85rem;
    border-bottom: 1px solid var(--line);
}

.section-children a {
    display: inline-flex;
    align-items: baseline;
    gap: 0.35rem;
    color: var(--ink);
    font-weight: 600;
    font-size: 0.98rem;
    line-height: 1.45;
    text-decoration: none;
}

.section-children a:hover {
    color: var(--brand);
    filter: none;
}

.section-children .child-sep {
    color: var(--muted);
    font-weight: 500;
    user-select: none;
}

.nav-order-item.is-child {
    margin-left: 1.25rem;
    border-left: 2px solid color-mix(in srgb, var(--brand) 40%, var(--line));
    padding-left: 0.75rem;
}

.nav-order-item.is-child.depth-2 { margin-left: 2.5rem; }
.nav-order-item.is-child.depth-3 { margin-left: 3.75rem; }
.nav-order-item.is-child.depth-4 { margin-left: 5rem; }
.nav-order-item.is-child.depth-5 { margin-left: 6.25rem; }

.page-list-btn.is-child {
    padding-left: 1.35rem;
}

.page-list-btn.is-child.depth-2 { padding-left: 2.1rem; }
.page-list-btn.is-child.depth-3 { padding-left: 2.85rem; }
.page-list-btn.is-child.depth-4 { padding-left: 3.6rem; }
.page-list-btn.is-child.depth-5 { padding-left: 4.35rem; }

.page-list-btn .nest-mark {
    opacity: 0.55;
    margin-right: 0.25rem;
}

.nav-links > a.nav-pill.active:hover,
.nav-links .nav-command-toggle.active:hover,
.nav-links .nav-command.is-open .nav-command-toggle:hover,
.nav-links > a:not(.nav-avatar).active:hover {
    color: var(--cta-text);
    filter: brightness(1.05);
}

.nav-links > a.cta {
    background: var(--brand);
    border-color: var(--brand);
    color: var(--cta-text);
}

.nav-links > a.cta:hover {
    color: var(--cta-text);
    filter: brightness(1.08);
}

.nav-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 0.15rem;
    padding: 0;
    border: 0;
    background: transparent;
    border-radius: 999px;
    line-height: 0;
}

.nav-avatar:hover {
    filter: none;
}

.nav-avatar-circle {
    display: grid;
    place-items: center;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 999px;
    background: linear-gradient(145deg, var(--brand), var(--brand-deep));
    color: var(--cta-text);
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 0.03em;
    border: 2px solid color-mix(in srgb, var(--paper) 55%, var(--ink));
    box-shadow: 0 0 0 1px var(--line);
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.nav-avatar:hover .nav-avatar-circle {
    transform: translateY(-1px);
    box-shadow: 0 0 0 2px var(--brand);
}

.nav-avatar.active .nav-avatar-circle {
    box-shadow: 0 0 0 2px var(--brand), 0 8px 18px color-mix(in srgb, var(--brand) 30%, transparent);
}

.hero {
    padding: 4.5rem 0 3rem;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.9fr;
    gap: 2rem;
    align-items: stretch;
}

.eyebrow {
    font-family: var(--font-display);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--brand);
    font-size: 0.78rem;
    margin: 0 0 1rem;
}

.hero h1,
.auth-shell h1 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: 0.02em;
    margin: 0 0 1rem;
    font-size: clamp(1.7rem, 3.4vw, 2.7rem);
}

.lede {
    color: var(--muted);
    max-width: 42rem;
    margin: 0 0 1.5rem;
    font-size: 1.08rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    padding: 0.7rem 1.15rem;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.btn-primary {
    background: var(--brand);
    color: var(--cta-text);
}

.btn-primary:hover { filter: brightness(1.12); }

.btn-ghost {
    background: transparent;
    border-color: var(--line);
    color: var(--ink);
}

.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }

.btn-danger {
    background: color-mix(in srgb, var(--danger) 18%, var(--paper-2));
    border-color: color-mix(in srgb, var(--danger) 55%, var(--line));
    color: var(--danger);
}

.btn-danger:hover {
    border-color: var(--danger);
    filter: brightness(1.08);
}

.bug-report-form {
    margin-top: 0.75rem;
}

.publish-card {
    max-width: 38rem;
    margin-top: 1.15rem;
    padding: 1.2rem 1.3rem 1.3rem;
    border: 1px solid color-mix(in srgb, #e0a15a 42%, var(--line));
    border-left: 3px solid #e0a15a;
    border-radius: 0.8rem;
    background: color-mix(in srgb, #e0a15a 8%, var(--paper-2));
}

.publish-card h3 {
    margin: 0;
    font-size: 1.15rem;
    letter-spacing: 0.01em;
}

.publish-warning {
    margin: 0.55rem 0 0;
    color: var(--ink);
    line-height: 1.45;
}

.publish-versions {
    display: grid;
    gap: 0.35rem;
    margin-top: 1rem;
}

.publish-version,
.publish-status {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.publish-version:empty,
.publish-status:empty {
    display: none;
}

.publish-status {
    margin-top: 0.85rem;
    color: var(--ink);
}

.publish-card .auth-form {
    margin-top: 0.85rem;
}

.btn-publish {
    background: #8d4e16;
    border-color: #e0a15a;
    color: #fff6ea;
    letter-spacing: 0.02em;
    box-shadow: inset 0 1px 0 rgba(255, 226, 186, 0.28);
}

.btn-publish:hover:not(:disabled) {
    background: #a85e1c;
    border-color: #f0c27a;
    filter: none;
}

.btn-publish:disabled,
.btn-publish:disabled:hover {
    opacity: 0.48;
    cursor: not-allowed;
    filter: none;
    box-shadow: none;
}

.deploy-card {
    max-width: 38rem;
    margin-top: 1.25rem;
    padding: 1.2rem 1.3rem 1.3rem;
    border: 1px solid color-mix(in srgb, var(--brand) 45%, var(--line));
    border-left: 3px solid var(--brand);
    border-radius: 0.8rem;
    background: color-mix(in srgb, var(--brand) 8%, var(--paper-2));
}

.deploy-card h3 {
    margin: 0;
    font-size: 1.15rem;
    letter-spacing: 0.01em;
}

.deploy-warning {
    margin: 0.55rem 0 0;
    color: var(--ink);
    line-height: 1.45;
}

.deploy-card .auth-form {
    margin-top: 0.85rem;
}

.btn-deploy {
    background: var(--brand-deep);
    border-color: var(--brand);
    color: var(--cta-text);
    letter-spacing: 0.02em;
}

.btn-deploy:hover:not(:disabled) {
    filter: brightness(1.08);
}

.btn-deploy:disabled,
.btn-deploy:disabled:hover {
    opacity: 0.48;
    cursor: not-allowed;
    filter: none;
}

.publish-log {
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 18rem;
    overflow: auto;
    margin: 0.9rem 0 0;
    padding: 0.75rem 1rem;
    border: 1px solid color-mix(in srgb, #e0a15a 30%, var(--line));
    border-radius: 0.55rem;
    background: var(--highlight-panel-bg, var(--paper-2));
    color: var(--highlight-panel-fg, var(--ink));
    font: 0.85rem/1.45 ui-monospace, monospace;
}

.mail-pref-stack {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 9rem;
}

.mail-pref-stack .checkbox-row {
    margin: 0;
    font-size: 0.82rem;
    white-space: nowrap;
}

.user-table .user-actions {
    white-space: nowrap;
}

.user-table .user-actions .btn {
    margin: 0.15rem 0.15rem 0.15rem 0;
    width: auto;
    padding: 0.35rem 0.7rem;
}

.resource-meters {
    display: grid;
    gap: 1rem;
    margin: 1rem 0 0.75rem;
}

.resource-meter-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.35rem;
    font-size: 0.92rem;
}

.resource-meter-track {
    height: 0.7rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--paper-2) 70%, var(--line));
    border: 1px solid var(--line);
    overflow: hidden;
}

.resource-meter-fill {
    height: 100%;
    width: 0;
    background: var(--brand);
    transition: width 0.35s ease, background 0.2s ease;
}

.resource-meter-fill.is-warn {
    background: #d4a017;
}

.resource-meter-fill.is-critical {
    background: var(--danger);
}

.table-wrap {
    overflow-x: auto;
}

.health-pill {
    display: inline-block;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.health-pill.is-critical { color: var(--danger); }
.health-pill.is-warning { color: #d4a017; }
.health-pill.is-info { color: var(--brand); }

.hero-panel {
    background: var(--highlight-panel-bg, linear-gradient(160deg, rgba(26, 34, 22, 0.95), rgba(18, 22, 15, 0.9)));
    border: 1px solid var(--highlight-panel-border, var(--line));
    box-shadow: var(--highlight-panel-shadow, var(--shadow));
    padding: 1.5rem;
    color: var(--highlight-panel-fg, var(--muted));
    font-family: var(--highlight-panel-font, var(--font-body));
    font-size: var(--highlight-panel-font-size, 1rem);
}

.hero-panel h2 {
    font-family: inherit;
    font-size: 1.05em;
    margin: 0 0 1rem;
    color: var(--highlight-panel-fg, var(--ink));
}

.hero-panel ul {
    margin: 0;
    padding-left: 1.1rem;
    color: inherit;
}

.hero-panel li + li { margin-top: 0.55rem; }

.section {
    padding: 2.5rem 0;
    border-top: 1px solid var(--line);
}

.section h2 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    margin: 0 0 0.85rem;
}

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

.project-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1.25rem;
    align-items: stretch;
}

.project-list.project-list--three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-list article,
.project-list .info-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    border-top: 2px solid var(--brand-deep);
    padding-top: 0.85rem;
    min-height: 0;
}

.info-card .card-media {
    margin: 0 0 0.75rem;
    --card-media-height: 220px;
    flex-shrink: 0;
}

/* Media under text: pin to the bottom of the card so sibling images share a baseline. */
.info-card .card-media.is-after,
.info-card .card-media:last-child {
    margin: 0;
    margin-top: auto;
    padding-top: 0.75rem;
}

.info-card .card-media.size-sm { --card-media-height: 120px; }
.info-card .card-media.size-md { --card-media-height: 220px; }
.info-card .card-media.size-lg { --card-media-height: 320px; }
.info-card .card-media.size-xl { --card-media-height: 420px; }

.info-card .card-media img,
.info-card .card-media video {
    display: block;
    width: 100%;
    border: 1px solid var(--line);
    background: var(--paper-2);
}

.info-card .card-media.fit-cover img,
.info-card .card-media.fit-cover video {
    height: var(--card-media-height);
    object-fit: cover;
    object-position: center;
}

.info-card .card-media.fit-contain img,
.info-card .card-media.fit-contain video {
    height: var(--card-media-height);
    object-fit: contain;
    object-position: center;
    background: transparent;
    border-color: transparent;
}

.info-card .card-media.fit-fill img,
.info-card .card-media.fit-fill video {
    height: var(--card-media-height);
    object-fit: fill;
}

.info-card .card-media.fit-natural img,
.info-card .card-media.fit-natural video {
    height: auto;
    max-height: var(--card-media-height);
    width: 100%;
    object-fit: contain;
    background: transparent;
    border-color: transparent;
}

.info-card .card-media audio {
    width: 100%;
}

.info-card .card-media-link {
    display: block;
    color: inherit;
}

.info-card .card-media-link:hover {
    filter: brightness(1.05);
}

.info-card .card-media-open {
    display: inline-block;
    margin-top: 0.45rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.project-list h3 {
    font-family: var(--font-display);
    font-size: 1rem;
    margin: 0 0 0.45rem;
}

.project-list p {
    margin: 0;
    color: var(--muted);
}

.outreach-block {
    margin-top: 2.5rem;
    padding-top: 1.75rem;
    border-top: 1px solid var(--line);
}

.outreach-block h2 {
    font-family: var(--font-display);
    font-size: clamp(1.35rem, 2.4vw, 1.75rem);
    margin: 0 0 0.55rem;
}

.outreach-lede {
    margin: 0 0 1.25rem;
    max-width: 42rem;
}

.outreach-form {
    max-width: 40rem;
}

.outreach-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem 1rem;
}

body.is-coming-soon {
    min-height: 100vh;
}

.coming-soon-page {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    display: grid;
    place-items: center;
    padding: 2.5rem 1.25rem;
    background:
        linear-gradient(
            color-mix(in srgb, var(--paper) var(--coming-soon-overlay, 55%), transparent),
            color-mix(in srgb, var(--paper) var(--coming-soon-overlay, 55%), transparent)
        ),
        var(--coming-soon-image, none) center / var(--coming-soon-bg-size, cover) no-repeat,
        var(--coming-soon-bg, linear-gradient(165deg, var(--paper-top), var(--paper-bottom)));
    color: var(--ink);
}

.coming-soon-veil {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse at 30% 20%, var(--glow, transparent), transparent 55%),
        radial-gradient(ellipse at 80% 70%, var(--glow-2, transparent), transparent 50%);
}

.coming-soon-inner {
    position: relative;
    z-index: 1;
    width: min(100%, 40rem);
    text-align: center;
}

.coming-soon-graphic {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: contain;
    object-position: center;
    margin: 0;
    pointer-events: none;
    transform: scale(calc(var(--coming-soon-image-scale, 100) / 100));
    transform-origin: center center;
}

.coming-soon-page:has(.coming-soon-graphic) {
    place-items: start center;
    padding-top: 4.5rem;
}

.coming-soon-page:has(.coming-soon-graphic) .coming-soon-veil {
    display: none;
}

.coming-soon-brand {
    margin: 0 0 1.5rem;
}

.coming-soon-logo {
    max-width: min(100%, 280px);
    height: auto;
    margin: 0 auto;
}

.coming-soon-brand-name {
    margin: 0 0 1.25rem;
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 4vw, 2.6rem);
    font-weight: 700;
    letter-spacing: 0.02em;
}

.coming-soon-eyebrow {
    margin-bottom: 0.75rem;
}

.coming-soon-title {
    margin: 0 0 0.85rem;
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.25rem);
    line-height: 1.1;
}

.coming-soon-body {
    margin: 0 auto 1.5rem;
    max-width: 34rem;
}

.coming-soon-actions {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
}

.coming-soon-preview-note {
    margin: 1.5rem 0 0;
    font-size: 0.85rem;
    color: var(--muted);
}

.site-footer {
    margin-top: auto;
    border-top: 1px solid var(--line);
    color: var(--muted);
}

.footer-inner {
    padding: 1.25rem 0 2rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1.25rem;
}

.footer-inner > p {
    margin: 0;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.1rem;
    align-items: center;
}

.footer-links a,
.footer-link-btn {
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 0.15em;
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    cursor: pointer;
}

.footer-links a:hover,
.footer-link-btn:hover {
    color: var(--ink);
}

.bg-music-dock {
    position: fixed;
    top: 0.7rem;
    right: 0.7rem;
    z-index: 60;
    pointer-events: none;
}

.bg-music-toggle {
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
    padding: 0.4rem 0.7rem 0.4rem 0.55rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: color-mix(in srgb, var(--paper-2) 88%, transparent);
    color: var(--ink);
    font: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

.bg-music-toggle:hover {
    border-color: color-mix(in srgb, var(--brand) 55%, var(--line));
    color: var(--brand);
}

.bg-music-toggle:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

.bg-music-icon {
    width: 1.1rem;
    height: 1.1rem;
    flex: 0 0 auto;
    fill: currentColor;
}

.bg-music-label {
    line-height: 1;
}

@media (max-width: 640px) {
    .bg-music-label {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
    }

    .bg-music-toggle {
        padding: 0.55rem;
        border-radius: 999px;
    }
}

.cookie-consent {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 80;
    padding: 1rem;
    pointer-events: none;
}

.cookie-consent.is-open {
    pointer-events: auto;
}

.cookie-consent-panel {
    width: min(720px, 100%);
    margin: 0 auto;
    padding: 1.1rem 1.2rem 1.2rem;
    border: 1px solid var(--line);
    border-radius: 1rem;
    background: color-mix(in srgb, var(--paper-2) 92%, transparent);
    backdrop-filter: blur(12px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
    color: var(--ink);
}

.cookie-consent-panel h2 {
    margin: 0 0 0.45rem;
    font-family: var(--font-display);
    font-size: 1.15rem;
}

.cookie-consent-panel p {
    margin: 0 0 0.9rem;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.45;
}

.cookie-consent-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.cookie-consent-actions .btn {
    width: auto;
}

.cookie-category-list {
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
    display: grid;
    gap: 0.55rem;
}

.cookie-category {
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--paper) 55%, transparent);
    border-radius: 0.75rem;
    padding: 0.65rem 0.75rem;
}

.cookie-category-label {
    display: flex;
    gap: 0.7rem;
    align-items: flex-start;
    margin: 0;
    cursor: pointer;
    font-weight: 500;
}

.cookie-category-label input {
    margin-top: 0.2rem;
    accent-color: var(--brand);
}

.cookie-category-label span {
    display: grid;
    gap: 0.15rem;
}

.cookie-category-label small {
    color: var(--muted);
    font-weight: 400;
    line-height: 1.35;
}

.rich-content h2 {
    margin: 1.5rem 0 0.55rem;
    font-family: var(--font-display);
    font-size: 1.15rem;
}

.rich-content ul {
    margin: 0.4rem 0 1rem 1.1rem;
    color: var(--muted);
}

.rich-content li {
    margin: 0.25rem 0;
}

.legal-agree {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
    margin-top: 0.75rem;
    font-weight: 500;
    color: var(--muted);
}

.legal-agree input {
    margin-top: 0.2rem;
    accent-color: var(--brand);
}

.legal-agree a {
    color: var(--ink);
    font-weight: 600;
}

.auth-shell {
    padding: 3rem 0 4rem;
    max-width: 520px;
}

.auth-form {
    display: grid;
    gap: 0.55rem;
}

.auth-form[hidden] {
    display: none !important;
}

.auth-form label {
    font-weight: 600;
    margin-top: 0.45rem;
}

.hint {
    font-weight: 400;
    color: var(--muted);
    font-size: 0.9em;
}

.auth-form input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="color"]):not([type="hidden"]):not([type="range"]) {
    width: 100%;
    padding: 0.7rem 0.8rem;
    border: 1px solid var(--line);
    background: var(--paper-2);
    color: var(--ink);
    font: inherit;
}

.auth-form input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="color"]):not([type="hidden"]):not([type="range"]):focus {
    outline: 2px solid color-mix(in srgb, var(--brand) 45%, transparent);
    border-color: var(--brand);
}

.auth-form .btn { margin-top: 0.75rem; width: 100%; }

.mfa-qr {
    width: 192px;
    height: 192px;
    margin: 1rem auto;
    background: #fff;
    padding: 8px;
    border-radius: 12px;
}
.mfa-qr img, .mfa-qr canvas, .mfa-qr svg { width: 100%; height: 100%; }
.mfa-secret { word-break: break-all; font-family: ui-monospace, monospace; font-size: 13px; }
.mfa-backup { margin: 12px 0; }
.mfa-backup summary { cursor: pointer; color: var(--muted); font-weight: 600; }
.mfa-backup-list { list-style: none; padding: 0; display: grid; gap: 6px; }
.mfa-backup-list code { font-size: 1.05rem; }
#mfa-app input#one-time-code,
#mfa-app input#mfa-enroll-code {
    font-size: 1.6rem;
    letter-spacing: 0.28em;
    text-align: center;
    font-variant-numeric: tabular-nums;
}
#mfa-passkey { width: 100%; margin: 0.75rem 0; }
.email-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.email-actions .btn { width: auto; flex: 1; }

.form-message {
    min-height: 1.4em;
    margin-top: 1rem;
    color: var(--brand);
}

.form-message.error { color: var(--danger); }

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

.auth-inline {
    margin-top: 0.75rem;
    text-align: center;
}

.auth-mode-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.35rem;
    margin: 1.25rem 0 1.5rem;
    padding: 0.3rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: color-mix(in srgb, var(--paper-2) 80%, transparent);
}

.auth-mode-btn {
    appearance: none;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.65rem 0.75rem;
    cursor: pointer;
}

.auth-mode-btn.is-active {
    background: var(--brand);
    color: var(--cta-text);
}

.auth-mode-btn:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

.profile-summary {
    display: grid;
    gap: 0.65rem;
    margin: 0 0 1.75rem;
    padding: 1rem 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.profile-summary div {
    display: grid;
    grid-template-columns: 7rem 1fr;
    gap: 0.75rem;
}

.profile-summary dt {
    margin: 0;
    color: var(--muted);
}

.profile-summary dd {
    margin: 0;
    font-weight: 600;
}

.account-card {
    margin: 0 0 1.75rem;
    padding: 1.15rem 1.2rem 1.25rem;
    border: 1px solid var(--line);
    border-radius: 1rem;
    background: color-mix(in srgb, var(--paper-2) 55%, transparent);
}

.account-card h2 {
    margin-top: 0;
}

.account-security-card {
    border-color: color-mix(in srgb, var(--danger) 35%, var(--line));
}

.account-card .auth-form + .auth-form {
    margin-top: 1.25rem;
    padding-top: 1.1rem;
    border-top: 1px solid var(--line);
}

.auth-shell h2 {
    font-family: var(--font-display);
    font-size: 1.05rem;
}

.admin-shell {
    padding: 3rem 0 4rem;
}

.admin-shell h1 {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2.2rem);
}

.instance-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem 1.5rem;
    margin-bottom: 0.5rem;
}

.instance-toolbar h2 {
    margin-bottom: 0.35rem;
}

.instance-start {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.55rem 0.7rem;
    margin: 0;
}

.instance-start label {
    flex: 1 0 100%;
    font-weight: 600;
}

.instance-start input {
    width: 6.5rem;
    padding: 0.7rem 0.8rem;
    border: 1px solid var(--line);
    background: var(--paper-2);
    color: var(--ink);
    font: inherit;
}

.instance-start .btn {
    width: auto;
    margin: 0;
    white-space: nowrap;
}


.art-lab-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.85rem 1rem;
    margin-bottom: 0.85rem;
}

.art-lab-grid label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.art-lab-settings h3 {
    margin-top: 1.25rem;
}

.art-lab-prompt-rows {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 0.75rem 0 1rem;
}

.art-lab-prompt-row {
    display: grid;
    grid-template-columns: minmax(120px, 180px) minmax(0, 1fr) minmax(160px, 220px) auto;
    gap: 0.55rem;
    align-items: start;
}

@media (max-width: 900px) {
    .art-lab-prompt-row {
        grid-template-columns: 1fr;
    }
}

.art-lab-output-hint {
    margin: 0 0 1rem;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: color-mix(in srgb, var(--paper) 92%, var(--accent, #6b8cff) 8%);
}

.art-lab-advanced {
    margin: 1rem 0;
    padding: 0.75rem 0.85rem;
    border: 1px dashed var(--line);
    border-radius: 8px;
}

.art-lab-advanced summary {
    cursor: pointer;
    font-weight: 600;
}

.art-lab-advanced .art-lab-grid {
    margin-top: 0.85rem;
}

.art-lab-event-log {
    max-height: 280px;
    overflow: auto;
    padding: 0.75rem 0.85rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.8rem;
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-word;
}

body.art-lab-modal-open {
    overflow: hidden;
}

.art-lab-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.art-lab-modal[hidden] {
    display: none;
}

.art-lab-modal-backdrop {
    position: absolute;
    inset: 0;
    background: color-mix(in srgb, var(--ink, #0a0a0a) 55%, transparent);
}

.art-lab-modal-panel {
    position: relative;
    z-index: 1;
    width: min(720px, 100%);
    max-height: min(90vh, 900px);
    overflow: auto;
    padding: 1.25rem 1.35rem 1.35rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--paper, #fff);
    box-shadow: 0 18px 48px color-mix(in srgb, var(--ink, #000) 25%, transparent);
}

.art-lab-modal-panel h3 {
    margin: 0 0 0.35rem;
    font-family: var(--font-display);
}

.art-lab-bulk-text {
    width: 100%;
    min-height: 280px;
    margin: 0.75rem 0 0.35rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.92rem;
    line-height: 1.45;
    resize: vertical;
}

.art-lab-panel[hidden] {
    display: none !important;
}

.art-lab-panel.is-active {
    display: block;
}

.art-lab-leonardo-options {
    margin: 1rem 0 1.25rem;
    padding: 0.9rem 1rem;
    border: 1px solid var(--line);
    border-radius: 0.75rem;
    background: color-mix(in srgb, var(--paper-2) 88%, transparent);
}

.art-lab-leonardo-options h3 {
    margin: 0 0 0.35rem;
    font-size: 1.05rem;
}

.art-lab-leonardo-options[hidden] {
    display: none !important;
}

.art-lab-suboptions {
    margin-top: 0.85rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--line);
}

.art-lab-suboptions[hidden] {
    display: none !important;
}

.art-lab-suboptions h4 {
    margin: 0 0 0.45rem;
    font-size: 0.95rem;
}

.art-lab-settings .checkbox-row,
.art-lab-leonardo-options .checkbox-row {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0.15rem 0;
}

.art-lab-gallery {
    display: grid;
    grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
    gap: 1.25rem;
    align-items: start;
}

.art-lab-gallery-sidebar {
    border: 1px solid var(--line);
    border-radius: 0.75rem;
    padding: 0.85rem 0.9rem;
    background: color-mix(in srgb, var(--paper-2) 85%, transparent);
}

.art-lab-gallery-sidebar h3 {
    margin: 0.85rem 0 0.45rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
}

.art-lab-gallery-sidebar h3:first-child {
    margin-top: 0;
}

.art-lab-gallery-cats {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.art-lab-gallery-cat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    width: 100%;
    text-align: left;
    padding: 0.45rem 0.65rem;
    border-radius: 0.55rem;
    border: 1px solid transparent;
    background: transparent;
    color: var(--ink);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.art-lab-gallery-cat:hover {
    border-color: var(--line);
    background: color-mix(in srgb, var(--brand) 10%, transparent);
}

.art-lab-gallery-cat.is-active {
    border-color: var(--brand);
    background: color-mix(in srgb, var(--brand) 16%, transparent);
}

.art-lab-gallery-cat small {
    color: var(--muted);
    font-weight: 500;
}

.art-lab-gallery-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.art-lab-gallery-crumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    align-items: center;
}

.art-lab-gallery-crumbs button {
    border: 0;
    background: transparent;
    color: var(--brand);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    padding: 0.15rem 0.3rem;
    border-radius: 0.35rem;
}

.art-lab-gallery-crumbs button:hover {
    background: color-mix(in srgb, var(--brand) 14%, transparent);
}

.art-lab-gallery-crumbs span {
    color: var(--muted);
}

.art-lab-explorer {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
    gap: 0.85rem;
}

.art-lab-explorer-empty {
    grid-column: 1 / -1;
    color: var(--muted);
    padding: 1.25rem 0.25rem;
}

.art-lab-tile {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    border: 1px solid var(--line);
    border-radius: 0.75rem;
    padding: 0.55rem;
    background: color-mix(in srgb, var(--paper-2) 90%, transparent);
    text-align: left;
    color: inherit;
    font: inherit;
    cursor: pointer;
    min-width: 0;
}

.art-lab-tile:hover {
    border-color: var(--brand);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--brand) 30%, transparent);
}

.art-lab-tile-preview {
    display: grid;
    place-items: center;
    aspect-ratio: 1;
    width: 100%;
    border-radius: 0.5rem;
    overflow: hidden;
    background: color-mix(in srgb, var(--paper) 70%, #000 8%);
}

.art-lab-tile-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.art-lab-tile-folder-icon {
    width: 3rem;
    height: 2.2rem;
    border-radius: 0.25rem 0.25rem 0.35rem 0.35rem;
    background: color-mix(in srgb, var(--brand) 55%, var(--paper-2));
    box-shadow: inset 0 0.55rem 0 -0.15rem color-mix(in srgb, var(--brand) 80%, #fff 10%);
    display: block;
}

.art-lab-tile strong {
    font-size: 0.86rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.art-lab-tile span {
    font-size: 0.78rem;
    color: var(--muted);
}

.art-lab-lightbox {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    padding: 1rem;
}

.art-lab-lightbox[hidden] {
    display: none !important;
}

.art-lab-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 10, 12, 0.72);
}

.art-lab-lightbox-panel {
    position: relative;
    z-index: 1;
    width: min(920px, 100%);
    max-height: min(92vh, 100%);
    overflow: auto;
    border-radius: 0.9rem;
    border: 1px solid var(--line);
    background: var(--paper);
    padding: 1rem 1.1rem 1.15rem;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.art-lab-lightbox-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.art-lab-lightbox-head h3 {
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.art-lab-lightbox-panel img,
.art-lab-lightbox-panel video {
    display: block;
    width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 0.55rem;
    background: color-mix(in srgb, var(--paper-2) 80%, #000 10%);
}

.art-lab-lightbox-panel video[hidden],
.art-lab-lightbox-panel img[hidden] {
    display: none !important;
}

.art-lab-tile-video .art-lab-tile-preview {
    background: color-mix(in srgb, var(--paper-2) 70%, #000 30%);
}

.art-lab-tile-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 860px) {
    .art-lab-gallery {
        grid-template-columns: 1fr;
    }
}

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

.user-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
}

.user-table th,
.user-table td {
    padding: 0.75rem 0.7rem;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
}

.user-table th {
    color: var(--muted);
    font-weight: 600;
    background: rgba(26, 34, 22, 0.8);
}

.user-table select,
.user-table input[type="checkbox"] {
    accent-color: var(--brand);
}

.user-table select {
    background: var(--paper-2);
    color: var(--ink);
    border: 1px solid var(--line);
    padding: 0.4rem 0.5rem;
    font: inherit;
}

.user-table .btn {
    width: auto;
    padding: 0.45rem 0.8rem;
}

.site-banner {
    position: relative;
    min-height: 220px;
    border-bottom: 1px solid var(--line);
    overflow: hidden;
}

.banner-slide {
    display: none;
    position: relative;
    min-height: 220px;
}

.banner-slide.is-active { display: block; }

.banner-media,
.banner-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-size: cover;
    background-position: center;
    opacity: 0.35;
}

.banner-copy {
    position: relative;
    padding: 2.5rem 0;
}

.banner-copy h2 {
    font-family: var(--font-display);
    margin: 0 0 0.5rem;
}

.page-main {
    padding: 3rem 0 4rem;
}

.page-highlights {
    margin: 1.25rem 0 1.5rem;
    padding: 1rem 1.15rem;
    background: var(--highlight-panel-bg, linear-gradient(160deg, rgba(26, 34, 22, 0.95), rgba(18, 22, 15, 0.9)));
    border: 1px solid var(--highlight-panel-border, var(--line));
    box-shadow: var(--highlight-panel-shadow, var(--shadow));
    color: var(--highlight-panel-fg, var(--muted));
    font-family: var(--highlight-panel-font, var(--font-body));
    font-size: var(--highlight-panel-font-size, 1rem);
    border-radius: 0.75rem;
}

.page-highlights ul {
    margin: 0;
    padding-left: 1.15rem;
}

.page-highlights li + li {
    margin-top: 0.45rem;
}

.media-gallery {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    margin-top: 1.5rem;
}

.media-gallery.media-gallery--stack {
    grid-template-columns: 1fr;
    max-width: 48rem;
}

.media-gallery.media-gallery--stack .gallery-item {
    max-width: 100%;
}

.media-gallery img,
.media-gallery video {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    border: 1px solid var(--line);
}

.media-gallery .gallery-media-link {
    display: block;
    color: inherit;
}

.media-gallery .gallery-media-link:hover img {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

.media-gallery figcaption {
    margin-top: 0.45rem;
    font-size: 0.92rem;
    color: var(--muted);
}

.media-gallery figcaption a {
    font-weight: 600;
}

.rich-content {
    margin-top: 1.5rem;
    color: var(--muted);
}

/* Inline body images/videos scale like gallery media on all viewports */
.rich-content img,
.rich-content video {
    max-width: 100%;
    width: auto;
    height: auto;
    display: block;
    margin: 1rem 0;
    border: 1px solid var(--line);
}

.rich-content p > img,
.rich-content p > video,
.rich-content p > a > img {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.rich-content figure {
    margin: 1rem 0;
    max-width: 100%;
}

.rich-content figure img,
.rich-content figure video {
    width: 100%;
}

.studio-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1.25rem 0 1.5rem;
}

body.is-studio .studio-chrome {
    position: sticky;
    top: 0;
    z-index: 50;
    flex: 0 0 auto;
    background-color: var(--paper-top);
    background-image: linear-gradient(var(--header-bg), var(--header-bg));
    border-bottom: 1px solid var(--line);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}

body.is-studio .studio-chrome .site-header {
    position: static;
    top: auto;
    backdrop-filter: none;
    background: transparent;
    border-bottom: 0;
}

body.is-studio .studio-chrome-panel {
    width: min(1100px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 0 0 0.75rem;
}

body.is-studio .studio-chrome-panel .studio-tabs {
    margin: 0.35rem 0 0;
}

body.is-studio .studio-toast {
    min-height: 0;
    margin: 0.35rem 0 0;
    padding: 0;
    border: 0;
    border-radius: 0.65rem;
    background: transparent;
    transition: background 0.2s ease, padding 0.2s ease, border-color 0.2s ease;
}

body.is-studio .studio-toast:not(:empty) {
    margin-top: 0.45rem;
    padding: 0.55rem 0.85rem;
    border: 1px solid color-mix(in srgb, var(--brand) 45%, var(--line));
    background: color-mix(in srgb, var(--brand) 14%, var(--paper-2));
    color: var(--ink);
}

body.is-studio .studio-toast.error:not(:empty) {
    border-color: color-mix(in srgb, var(--danger) 55%, var(--line));
    background: color-mix(in srgb, var(--danger) 16%, var(--paper-2));
    color: var(--danger);
}

body.is-studio .studio-toast.is-flash:not(:empty) {
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 45%, transparent);
}

body.is-studio .studio-main {
    padding-top: 1.25rem;
}

.tab-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.42rem 1rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--studio-tab-bg, color-mix(in srgb, var(--paper-2) 88%, transparent));
    color: var(--studio-tab-fg, var(--muted));
    font-family: var(--studio-tab-font, var(--font-body));
    font-size: var(--studio-tab-font-size, 0.9rem);
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.tab-btn:hover {
    border-color: var(--brand);
    color: var(--studio-tab-fg, var(--ink));
    background: color-mix(in srgb, var(--brand) 14%, var(--studio-tab-bg, var(--paper-2)));
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--brand) 35%, transparent);
}

.tab-btn.is-active {
    background: var(--brand);
    border-color: var(--brand);
    color: var(--cta-text);
    box-shadow: 0 8px 18px color-mix(in srgb, var(--brand) 28%, transparent);
}

.tab-btn.is-active:hover {
    color: var(--cta-text);
    filter: brightness(1.05);
}

.studio-panel { display: none; }
.studio-panel.is-active { display: block; }

body.is-studio .studio-save-dock,
body.is-admin .admin-save-dock {
    position: fixed;
    right: 1rem;
    bottom: 1.1rem;
    z-index: 45;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
    max-width: calc(100vw - 2rem);
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--line);
    border-radius: 0.85rem;
    background: color-mix(in srgb, var(--paper-2) 92%, transparent);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

body.is-studio .studio-save-dock .btn,
body.is-admin .admin-save-dock .btn {
    width: auto;
    margin: 0;
}

body.is-studio #editPageForm,
body.is-studio #navForm {
    padding-bottom: 4.5rem;
}

body.is-admin #settingsForm {
    padding-bottom: 4.5rem;
}

/* Only show the Admin save dock while Global settings is the active tab */
body.is-admin .admin-save-dock {
    display: none;
}

body.is-admin:has(#tab-settings.is-active) .admin-save-dock {
    display: flex;
}

@media (max-width: 800px) {
    body.is-studio .studio-save-dock,
    body.is-admin .admin-save-dock {
        left: 0.75rem;
        right: 0.75rem;
        bottom: 0.75rem;
        justify-content: stretch;
    }

    body.is-studio .studio-save-dock .btn,
    body.is-admin .admin-save-dock .btn {
        flex: 1 1 auto;
    }
}

.studio-split {
    display: grid;
    grid-template-columns: minmax(220px, 0.8fr) 1.4fr;
    gap: 1.5rem;
}

.page-list {
    list-style: none;
    margin: 0 0 1.5rem;
    padding: 0;
}

.page-list-row {
    display: flex;
    align-items: stretch;
    gap: 0.35rem;
    margin-bottom: 0.35rem;
}

.page-list-row .page-list-btn {
    flex: 1 1 auto;
    min-width: 0;
}

.page-list-actions {
    display: inline-flex;
    flex: 0 0 auto;
    gap: 0.2rem;
    align-items: center;
}

.page-list-move {
    width: auto;
    min-width: 2.4rem;
    padding: 0.35rem 0.45rem;
    font-size: 0.78rem;
}

.page-list-btn {
    width: 100%;
    text-align: left;
    background: var(--paper-2);
    border: 1px solid var(--line);
    color: var(--ink);
    padding: 0.55rem 0.7rem;
    margin-bottom: 0.4rem;
    font: inherit;
    cursor: pointer;
}

.page-list-btn.is-active,
.page-list-btn:hover {
    border-color: var(--brand);
}

.checkbox-pair {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 1.5rem;
    margin: 0.35rem 0 0.15rem;
}

.checkbox-row {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0;
    font-weight: 600;
    width: auto;
    max-width: 100%;
}

.checkbox-row input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    margin: 0;
    padding: 0;
    flex: 0 0 auto;
    accent-color: var(--brand);
    border: 1px solid var(--line);
    background: var(--paper-2);
    appearance: auto;
    -webkit-appearance: checkbox;
}

.auth-form textarea,
.auth-form select {
    width: 100%;
    padding: 0.7rem 0.8rem;
    border: 1px solid var(--line);
    background: var(--paper-2);
    color: var(--ink);
    font: inherit;
}

.field-hint {
    display: block;
    margin: -0.35rem 0 0.65rem;
    color: var(--muted);
    font-size: 0.85rem;
}

.editor-block {
    margin: 1.25rem 0;
    padding: 1rem;
    border: 1px solid var(--line);
    background: rgba(0, 0, 0, 0.12);
}

.editor-block h3 {
    margin: 0 0 0.35rem;
    font-family: var(--font-display);
    font-size: 1rem;
}

.editor-block > .field-hint {
    margin-bottom: 0.85rem;
}

.repeat-list {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.repeat-card {
    border: 1px solid var(--line);
    background: var(--paper-2);
    padding: 0.85rem;
}

.repeat-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
}

.repeat-card-head strong {
    font-size: 0.9rem;
}

.repeat-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.repeat-actions .btn {
    width: auto;
    padding: 0.3rem 0.55rem;
    font-size: 0.8rem;
}

.theme-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.85rem;
    margin: 1rem 0 1.5rem;
}

.theme-card {
    text-align: left;
    border: 1px solid var(--line);
    background: var(--paper-2);
    color: inherit;
    padding: 0.85rem;
    cursor: pointer;
    font: inherit;
}

.theme-card.is-selected {
    border-color: var(--brand);
    box-shadow: inset 0 0 0 1px var(--brand);
}

.theme-swatch {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    height: 2.4rem;
    margin-bottom: 0.65rem;
    border: 1px solid var(--line);
}

.theme-card h3 {
    margin: 0 0 0.25rem;
    font-size: 0.95rem;
    font-family: var(--font-display);
}

.theme-card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.82rem;
}

.theme-library-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: end;
    margin: 0.75rem 0;
}

.theme-library-actions input[type="text"] {
    min-width: 14rem;
}

.color-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
}

.color-field label {
    display: block;
    margin-bottom: 0.3rem;
}

.color-field input[type="color"] {
    width: 100%;
    height: 2.4rem;
    padding: 0;
    border: 1px solid var(--line);
    background: transparent;
    cursor: pointer;
}

.nav-bg-row {
    display: grid;
    grid-template-columns: minmax(140px, 180px) 1fr;
    gap: 1rem;
    align-items: end;
}

.nav-opacity-field input[type="range"] {
    width: 100%;
}

.nav-order-list {
    display: grid;
    gap: 0.55rem;
}

.nav-order-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--line);
    background: var(--paper-2);
}

.nav-order-item strong {
    font-size: 0.95rem;
}

.email-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 0.85rem;
}

.email-actions .btn {
    width: auto;
}

.inline-upload-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.inline-upload-row input[type="text"],
.inline-upload-row input:not([type]) {
    flex: 1 1 220px;
}

.inline-upload-btn {
    width: auto;
    cursor: pointer;
    margin: 0;
}

.pref-fieldset {
    border: 1px solid var(--line);
    border-radius: 0.75rem;
    padding: 0.85rem 1rem 1rem;
    margin: 0.5rem 0 1rem;
}

.pref-fieldset legend {
    padding: 0 0.35rem;
    font-weight: 600;
}

.media-dropdown-upload {
    cursor: pointer;
    justify-content: center;
    color: var(--brand);
    font-weight: 600;
}

.admin-tabs {
    margin: 1rem 0 1.25rem;
}

@media (max-width: 640px) {
    .nav-bg-row {
        grid-template-columns: 1fr;
    }
}

.theme-preview {
    margin-top: 1rem;
    padding: 1.25rem;
    border: 1px solid var(--line);
    background:
        radial-gradient(600px 240px at 10% -10%, var(--glow, rgba(143,191,74,.18)), transparent 55%),
        linear-gradient(180deg, var(--paper-top, #0c100a), var(--paper, #12160f));
    color: var(--ink);
}

.theme-preview h3 {
    margin: 0 0 0.35rem;
    font-family: var(--font-display);
}

.theme-preview p {
    margin: 0 0 0.85rem;
    color: var(--muted);
}

.theme-preview .btn {
    width: auto;
}

.more-options {
    margin-top: 0.75rem;
}

.more-options summary {
    cursor: pointer;
    color: var(--muted);
    font-weight: 600;
}

.more-options[open] summary {
    margin-bottom: 0.75rem;
    color: var(--ink);
}

.logo-size-row {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.logo-size-row input[type="range"] {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    accent-color: var(--brand);
}

.logo-size-preview {
    flex: 0 0 auto;
    width: var(--brand-logo-size, 8vh);
    height: var(--brand-logo-size, 8vh);
    border: 1px solid var(--line);
    background: var(--paper-2);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.logo-size-preview.is-banner {
    width: auto;
    min-width: var(--brand-logo-size, 8vh);
    max-width: min(100%, 280px);
    aspect-ratio: auto;
}

.media-lib-toolbar select {
    width: auto;
    min-width: 10rem;
}

.media-library-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
}

.media-library-card {
    display: grid;
    gap: 0.35rem;
    text-align: left;
    border: 1px solid var(--line);
    background: var(--paper-2);
    color: inherit;
    padding: 0.55rem;
    font: inherit;
}

.media-library-card:hover {
    border-color: var(--brand);
}

.media-library-body {
    display: grid;
    gap: 0.35rem;
    width: 100%;
    text-align: left;
    border: 0;
    background: transparent;
    color: inherit;
    padding: 0;
    cursor: pointer;
    font: inherit;
}

.media-library-card strong {
    font-size: 0.82rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.media-library-card span {
    color: var(--muted);
    font-size: 0.75rem;
}

.media-library-actions {
    display: flex;
    justify-content: stretch;
}

.media-library-delete {
    width: 100%;
    padding: 0.35rem 0.5rem;
    font-size: 0.8rem;
    color: var(--danger);
    border-color: color-mix(in srgb, var(--danger) 45%, var(--line));
}

.media-library-delete:hover {
    border-color: var(--danger);
}

.media-thumb {
    position: relative;
    aspect-ratio: 1 / 1;
    border: 1px solid var(--line);
    background: rgba(0, 0, 0, 0.2);
    overflow: hidden;
    display: grid;
    place-items: center;
}

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

.media-thumb.is-empty,
.media-thumb.is-audio {
    color: var(--muted);
    font-size: 0.75rem;
    padding: 0.4rem;
    text-align: center;
}

.media-thumb.is-video span {
    position: absolute;
    bottom: 0.3rem;
    left: 0.3rem;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    font-size: 0.7rem;
    padding: 0.1rem 0.35rem;
}

.media-thumb-sm {
    width: 3.25rem;
    height: 3.25rem;
    aspect-ratio: auto;
    flex: 0 0 auto;
}

.media-picker {
    margin: 0.35rem 0 0.65rem;
}

.media-picker-row {
    display: flex;
    gap: 0.65rem;
    align-items: center;
}

.media-picker-select {
    flex: 1 1 auto;
    min-width: 0;
}

.media-picker-preview {
    flex: 0 0 auto;
}

.media-dropdown {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
}

.media-dropdown-toggle {
    width: 100%;
    text-align: left;
    background: var(--paper-2);
    border: 1px solid var(--line);
    color: var(--ink);
    padding: 0.65rem 0.8rem;
    font: inherit;
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.media-dropdown-toggle:hover,
.media-dropdown-toggle[aria-expanded="true"] {
    border-color: var(--brand);
}

.media-dropdown-menu {
    position: absolute;
    z-index: 20;
    top: calc(100% + 0.25rem);
    left: 0;
    right: 0;
    max-height: 16rem;
    overflow: auto;
    border: 1px solid var(--line);
    background: var(--paper-2);
    box-shadow: var(--shadow);
}

.media-dropdown-option {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    text-align: left;
    border: 0;
    border-bottom: 1px solid var(--line);
    background: transparent;
    color: inherit;
    padding: 0.55rem 0.65rem;
    font: inherit;
    cursor: pointer;
}

.media-dropdown-option:hover,
.media-dropdown-option.is-selected {
    background: rgba(143, 191, 74, 0.12);
}

.media-dropdown-meta {
    display: grid;
    gap: 0.15rem;
    min-width: 0;
}

.media-dropdown-meta strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.9rem;
}

.media-dropdown-meta small {
    color: var(--muted);
}

.media-dropdown-empty,
.media-dropdown-clear {
    color: var(--muted);
    font-size: 0.85rem;
}

.media-dropdown-clear {
    justify-content: center;
}

@media (max-width: 800px) {
    .hero-grid,
    .project-list,
    .project-list.project-list--three,
    .studio-split {
        grid-template-columns: 1fr;
    }

    .outreach-grid {
        grid-template-columns: 1fr;
    }

    .nav-wrap {
        flex-wrap: wrap;
        align-items: center;
    }

    .nav-links {
        width: 100%;
        justify-content: flex-start;
    }

    html.nav-compact .nav-wrap {
        flex-wrap: nowrap;
    }

    html.nav-compact .nav-links {
        width: auto;
        flex: 1 1 auto;
        flex-wrap: wrap;
    }

    .nav-wrap.nav-layout-logo-right {
        flex-direction: row;
    }

    .nav-wrap.nav-layout-logo-right .brand {
        margin-left: 0;
        margin-right: auto;
    }

    .nav-wrap.nav-layout-logo-right .nav-links,
    .nav-wrap.nav-layout-group-center .nav-links,
    .nav-wrap.nav-layout-group-right .nav-links,
    .nav-wrap.nav-layout-logo-left .nav-links {
        margin-left: 0;
        margin-right: 0;
        justify-content: flex-start;
    }

    .nav-wrap.nav-layout-group-center,
    .nav-wrap.nav-layout-group-right {
        justify-content: flex-start;
    }

    .nav-wrap.nav-layout-stack-center,
    .nav-wrap.nav-layout-stack-center-reverse {
        flex-direction: column;
        align-items: center;
    }

    .nav-wrap.nav-layout-stack-center-reverse {
        flex-direction: column-reverse;
    }

    .nav-wrap.nav-layout-stack-center .nav-links,
    .nav-wrap.nav-layout-stack-center-reverse .nav-links {
        justify-content: center;
    }

    .nav-wrap.nav-layout-logo-center-buttons-right,
    .nav-wrap.nav-layout-logo-center-buttons-left {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .nav-wrap.nav-layout-logo-center-buttons-right .brand,
    .nav-wrap.nav-layout-logo-center-buttons-left .brand,
    .nav-wrap.nav-layout-logo-center-buttons-right .nav-links,
    .nav-wrap.nav-layout-logo-center-buttons-left .nav-links {
        grid-column: auto;
        justify-self: center;
        width: 100%;
        margin: 0;
        justify-content: center;
    }
}

.community-shell {
    max-width: none;
}

.community-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1rem;
    margin: 0 0 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--line);
}

.community-nav a {
    font-weight: 600;
}

.community-nav a.active {
    color: var(--ink);
}

.community-list {
    display: grid;
    gap: 0.9rem;
}

.community-meta {
    color: var(--muted);
    margin: 0.2rem 0 0;
}

.community-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.85rem;
}

.community-actions .btn,
.community-shell .auth-form .btn {
    width: auto;
    margin-top: 0;
}

.community-host {
    max-width: 32rem;
}

.community-shell .auth-form select {
    width: 100%;
    padding: 0.7rem 0.8rem;
    border: 1px solid var(--line);
    background: var(--paper-2);
    color: var(--ink);
    font: inherit;
}

.discussion-board {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--line);
}

.discussion-guidelines {
    margin: 0.5rem 0 1.25rem;
}

.discussion-list {
    display: grid;
    gap: 0.9rem;
}

.discussion-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem 0.7rem;
    color: var(--muted);
}

.discussion-meta form {
    margin-left: auto;
}

.discussion-avatar {
    display: inline-grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    background: var(--paper-2);
    color: var(--ink);
    font-size: 0.75rem;
    font-weight: 700;
}

.discussion-rank,
.discussion-badge {
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.discussion-body {
    white-space: pre-wrap;
}

.discussion-reply {
    margin-top: 0.8rem;
    padding-top: 0.8rem;
    border-top: 1px solid var(--line);
}

.discussion-compose,
.discussion-reply-form {
    max-width: 40rem;
}

.discussion-compose {
    margin-top: 1.25rem;
}

.community-results {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.65rem;
}

.community-results li {
    padding-top: 0.65rem;
    border-top: 1px solid var(--line);
}

.lobby-chat {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 30;
    width: min(24rem, calc(100vw - 2rem));
    pointer-events: none;
}

.lobby-chat-window {
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    height: auto;
    border: 1px solid color-mix(in srgb, var(--brand) 70%, #000);
    background:
        linear-gradient(180deg, rgba(143, 191, 74, 0.08), transparent 2.2rem),
        #070a06;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55), inset 0 0 0 1px rgba(0, 0, 0, 0.65);
    color: var(--ink);
    font-size: 0.92rem;
}

.lobby-chat[data-gate="ok"] .lobby-chat-window {
    height: min(24rem, calc(100vh - 6rem));
}

.lobby-chat-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 2.2rem;
    padding: 0.3rem 0.45rem 0.3rem 0.7rem;
    background: #10160d;
    border-bottom: 1px solid color-mix(in srgb, var(--brand) 45%, #000);
}

.lobby-chat-mark {
    flex: 0 0 auto;
    font-family: var(--font-display);
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--brand);
}

.lobby-chat-rooms {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
}

.lobby-chat-rooms-toggle,
.lobby-chat-collapse,
.lobby-chat-room-form button,
.lobby-chat-form button,
.lobby-chat-room,
.lobby-chat-action {
    font: inherit;
    color: var(--ink);
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
}

.lobby-chat-rooms-toggle {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    max-width: 100%;
    padding: 0.15rem 0.45rem;
    color: var(--ink);
    background: #182114;
    border-color: var(--line);
}

.lobby-chat-rooms-toggle span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lobby-chat-rooms-toggle::after {
    content: "▾";
    color: var(--brand);
    font-size: 0.75rem;
}

.lobby-chat-collapse {
    flex: 0 0 auto;
    padding: 0.15rem 0.4rem;
    color: var(--muted);
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.lobby-chat-new {
    flex: 0 0 auto;
}

.lobby-chat-new {
    padding: 0.05rem 0.4rem;
    background: var(--brand);
    color: var(--cta-text);
    font-family: var(--font-display);
    font-size: 0.62rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.lobby-chat-host-note {
    margin: 0.35rem 0 0;
    color: var(--muted);
    font-size: 0.78rem;
}

@keyframes lobby-chat-flash {
    0%, 100% {
        border-color: color-mix(in srgb, var(--brand) 35%, #000);
        box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
    }
    50% {
        border-color: var(--brand);
        box-shadow: 0 0 22px 2px rgba(143, 191, 74, 0.85);
    }
}

.lobby-chat.is-flashing .lobby-chat-window {
    animation: lobby-chat-flash 0.9s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
    .lobby-chat.is-flashing .lobby-chat-window {
        animation: none;
        border-color: var(--brand);
    }
}

.lobby-chat-room-menu {
    position: absolute;
    top: calc(100% + 0.35rem);
    left: 0;
    right: 0;
    z-index: 2;
    max-height: 18rem;
    overflow: auto;
    padding: 0.3rem;
    background: #10160d;
    border: 1px solid color-mix(in srgb, var(--brand) 55%, #000);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}

.lobby-chat-room-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.lobby-chat-room {
    display: block;
    width: 100%;
    padding: 0.35rem 0.45rem;
    text-align: left;
}

.lobby-chat-room:hover,
.lobby-chat-room.is-active,
.lobby-chat-room.is-unread {
    background: rgba(143, 191, 74, 0.14);
    color: var(--brand);
}

.lobby-chat-room-form {
    display: flex;
    gap: 0.35rem;
    margin-top: 0.35rem;
    padding-top: 0.35rem;
    border-top: 1px solid var(--line);
}

.lobby-chat-messages {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    margin: 0;
    padding: 0.45rem 0.65rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    background:
        linear-gradient(rgba(143, 191, 74, 0.04) 1px, transparent 1px) 0 0 / 100% 1.35rem,
        #070a06;
}

.lobby-chat-line {
    line-height: 1.35;
}

.lobby-chat-time,
.lobby-chat-name,
.lobby-chat-text,
.lobby-chat-action {
    display: inline;
}

.lobby-chat-time {
    margin-right: 0.35rem;
    color: var(--muted);
    font-size: 0.75rem;
}

.lobby-chat-name {
    color: #d7e2cf;
    font-weight: 700;
}

.lobby-chat-name.is-mine {
    color: var(--brand);
}

.lobby-chat-name::after {
    content: ":";
    margin-right: 0.3rem;
}

.lobby-chat-text {
    color: #e7eee2;
}

.lobby-chat-action {
    margin-left: 0.45rem;
    padding: 0;
    color: var(--muted);
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    opacity: 0;
}

.lobby-chat-line:hover .lobby-chat-action,
.lobby-chat-action:focus {
    opacity: 1;
}

.lobby-chat-report:hover {
    color: var(--danger);
}

button.lobby-chat-name {
    padding: 0;
    border: 0;
    background: transparent;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.lobby-chat-filters {
    display: flex;
    gap: 0.35rem;
    align-items: center;
    padding: 0.35rem 0.4rem;
    border-bottom: 1px solid var(--line);
    background: #0c100b;
}

.lobby-chat-filters select,
.lobby-chat-filters input {
    margin: 0;
    padding: 0.25rem 0.35rem;
    border: 1px solid #2a3824;
    border-radius: 0;
    background: #050705;
    color: var(--ink);
    font: inherit;
    font-size: 0.78rem;
}

.lobby-chat-filters select {
    flex: 0 0 auto;
}

.lobby-chat-filters input {
    flex: 1 1 auto;
    min-width: 0;
}

.lobby-chat-blocks {
    max-height: 4.5rem;
    overflow: auto;
    padding: 0.25rem 0.55rem;
    background: #10160d;
    border-bottom: 1px solid var(--line);
}

.lobby-chat-block {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    margin: 0.15rem 0;
    color: var(--muted);
    font-size: 0.78rem;
}

.lobby-chat-block .lobby-chat-action {
    opacity: 1;
}

.lobby-chat-empty {
    margin: 0;
    padding: 0.35rem 0.65rem 0;
    color: var(--muted);
    font-size: 0.75rem;
}

.lobby-chat-line.is-filtered {
    display: none;
}

.lobby-chat-form,
.lobby-chat-room-form {
    display: flex;
    gap: 0.35rem;
}

.lobby-chat-form {
    padding: 0.4rem;
    border-top: 1px solid var(--line);
    background: #0c100b;
}

.lobby-chat-form input,
.lobby-chat-room-form input {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    padding: 0.4rem 0.5rem;
    border: 1px solid #2a3824;
    border-radius: 0;
    background: #050705;
    color: var(--ink);
    font: inherit;
}

.lobby-chat-form input:focus,
.lobby-chat-room-form input:focus {
    outline: 1px solid var(--brand);
    border-color: var(--brand);
}

.lobby-chat-form button,
.lobby-chat-room-form button {
    flex: 0 0 auto;
    padding: 0.35rem 0.65rem;
    background: var(--brand);
    color: var(--cta-text);
    font-family: var(--font-display);
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.lobby-chat-status,
.lobby-chat-legal,
.lobby-chat-locked {
    margin: 0;
    padding: 0.15rem 0.65rem 0.4rem;
    color: var(--muted);
    font-size: 0.75rem;
}

.lobby-chat-status:empty {
    display: none;
}

.lobby-chat.is-collapsed .lobby-chat-window {
    height: auto;
}

.lobby-chat.is-collapsed .lobby-chat-messages,
.lobby-chat.is-collapsed .lobby-chat-form,
.lobby-chat.is-collapsed .lobby-chat-status,
.lobby-chat.is-collapsed .lobby-chat-legal,
.lobby-chat.is-collapsed .lobby-chat-room-menu,
.lobby-chat.is-collapsed .lobby-chat-filters,
.lobby-chat.is-collapsed .lobby-chat-blocks,
.lobby-chat.is-collapsed .lobby-chat-empty {
    display: none;
}

@media (max-width: 700px) {
    .lobby-chat {
        left: 0.5rem;
        right: 0.5rem;
        bottom: 0.5rem;
        width: auto;
    }

    .community-shell:has(.lobby-chat) {
        padding-bottom: 16rem;
    }
}

.table-scene {
    position: relative;
    height: 17.5rem;
    margin: 0.35rem 0 0.6rem;
}

.table-top {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 1;
    width: 6.6rem;
    height: 6.6rem;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.05rem;
    padding: 0.7rem;
    text-align: center;
    color: #f8ecd4;
    background:
        radial-gradient(circle at 50% 42%, #e0b56a 0 18%, transparent 19%),
        radial-gradient(circle at 50% 46%, #c98448 0%, #8d5528 46%, #5a3418 78%);
    border-radius: 50%;
    box-shadow:
        inset 0 0 0 0.38rem #3a2412,
        inset 0 0 0 0.55rem #e6c48a,
        0 0.45rem 0 #2a180c,
        0 0.8rem 1rem rgba(0, 0, 0, 0.4);
}

.table-top::after {
    content: "";
    position: absolute;
    top: 0.72rem;
    width: 0.28rem;
    height: 0.42rem;
    border-radius: 0.14rem 0.14rem 0.05rem 0.05rem;
    background: #f4e2a8;
    box-shadow: 0 -0.18rem 0 0.04rem #f6d56a, 0 0 0.45rem 0.12rem rgba(246, 196, 90, 0.85);
}

.table-top-count,
.table-top-title,
.table-top-map {
    margin: 0;
    max-width: 4.6rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.table-top-count {
    font-family: var(--font-display);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
}

.table-top-title {
    font-size: 0.82rem;
}

.table-top-map {
    color: #f3e0c0;
    font-size: 0.62rem;
}

.table-seats {
    list-style: none;
    margin: 0;
    padding: 0;
}

.table-seat {
    --angle: calc((360deg / var(--seat-count)) * var(--i) - 90deg);
    position: absolute;
    left: 50%;
    top: 50%;
    width: 4.2rem;
    margin-left: -2.1rem;
    text-align: center;
    transform: rotate(var(--angle)) translateY(-6.35rem);
}

.table-seat-chair {
    display: block;
    position: relative;
    width: 1.45rem;
    height: 1.7rem;
    margin: 0 auto 0.15rem;
}

.table-seat-chair::before,
.table-seat-chair::after {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.table-seat-chair::before {
    top: 0;
    width: 1.15rem;
    height: 0.95rem;
    border-radius: 0.45rem 0.45rem 0.08rem 0.08rem;
    background:
        linear-gradient(#c9a06a, #c9a06a) 0.28rem 0.22rem / 0.16rem 0.62rem no-repeat,
        linear-gradient(#c9a06a, #c9a06a) 0.7rem 0.22rem / 0.16rem 0.62rem no-repeat,
        linear-gradient(#8d5a30, #5c3a1e);
    box-shadow: inset 0 0 0 1px #3a2414;
}

.table-seat-chair::after {
    bottom: 0.05rem;
    width: 1.45rem;
    height: 0.42rem;
    border-radius: 0.12rem;
    background: linear-gradient(#a86b3a, #6b4122);
    box-shadow:
        0 0.28rem 0 -0.02rem #3d2616,
        -0.42rem 0.28rem 0 -0.08rem #3d2616,
        0.42rem 0.28rem 0 -0.08rem #3d2616;
}

.table-seat.is-open .table-seat-chair::before {
    background:
        linear-gradient(rgba(143, 191, 74, 0.7), rgba(143, 191, 74, 0.7)) 0.28rem 0.22rem / 0.16rem 0.62rem no-repeat,
        linear-gradient(rgba(143, 191, 74, 0.7), rgba(143, 191, 74, 0.7)) 0.7rem 0.22rem / 0.16rem 0.62rem no-repeat,
        transparent;
    box-shadow: inset 0 0 0 1.5px var(--brand);
}

.table-seat.is-open .table-seat-chair::after {
    background: transparent;
    box-shadow:
        inset 0 0 0 1.5px var(--brand),
        0 0.28rem 0 -0.02rem rgba(143, 191, 74, 0.8);
}

.table-seat.is-host .table-seat-chair::before {
    box-shadow: inset 0 0 0 1px #3a2414, inset 0 0 0 2px #e6c36a;
}

.table-seat-name {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #f3e6cf;
    font-size: 0.66rem;
    transform: rotate(calc(var(--angle) * -1));
}

.table-seat.is-open .table-seat-name {
    color: var(--brand);
}

@media (max-width: 700px) {
    .table-scene {
        height: 16rem;
    }

    .table-seat {
        transform: rotate(var(--angle)) translateY(-5.7rem);
    }
}

.info-shell {
    padding: 2.5rem 0 4rem;
}

.info-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.1rem;
    margin: 0 0 1.25rem;
}

.info-nav a.active {
    color: var(--brand);
}

.info-unit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
    gap: 0.8rem;
    margin: 0.5rem 0 1.5rem;
}

.info-unit-card {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.75rem;
    border: 1px solid var(--line);
    border-radius: 0.8rem;
    background: color-mix(in srgb, var(--paper-2) 55%, transparent);
    color: inherit;
    text-decoration: none;
}

.info-unit-card img,
.info-unit-hero {
    width: 100%;
    max-width: 12rem;
    aspect-ratio: 1;
    object-fit: contain;
    background: color-mix(in srgb, var(--paper) 80%, #000);
    border-radius: 0.5rem;
}

.info-unit-hero {
    display: block;
    margin: 0 0 1rem;
}

.info-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
    gap: 0.7rem 1rem;
    margin: 0;
}

.info-stats div {
    margin: 0;
}

.info-stats dt {
    color: var(--muted);
    font-size: 0.85rem;
}

.info-stats dd {
    margin: 0.15rem 0 0;
    font-weight: 600;
}

.info-rules {
    margin: 0 0 1rem;
    padding-left: 1.2rem;
}

.info-rules li + li {
    margin-top: 0.35rem;
}

.info-body {
    white-space: pre-wrap;
}

.info-note-list {
    display: grid;
    gap: 0.8rem;
}

.info-note-card h2 {
    font-size: 1.15rem;
}

.info-note-card p {
    margin: 0.25rem 0 0;
}
