@font-face {
  font-family: "Oxanium";
  src: url("../fonts/Oxanium-VariableFont_wght.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "Open Sans Custom";
  src: url("../fonts/opensans-variable.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "Google Sans Code";
  src: url("../fonts/GoogleSansCode-VariableFont_wght.ttf") format("truetype");
  font-display: swap;
}

:root {
  --bg: #09111a;
  --bg-soft: rgba(8, 18, 28, 0.7);
  --panel: rgba(12, 26, 39, 0.82);
  --panel-strong: rgba(16, 31, 47, 0.96);
  --text: #edf2f7;
  --text-soft: #d6e1ea;
  --muted: #a6b7c5;
  --line: rgba(174, 202, 220, 0.14);
  --accent: #ff8c42;
  --accent-soft: rgba(255, 140, 66, 0.16);
  --accent-alt: #d8b06b;
  --nav-active-text: #fff7ef;
  --button-text: #1e0e04;
  --danger: #ef5d60;
  --success: #51d88a;
  --shadow: 0 18px 44px rgba(2, 7, 13, 0.28);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f4efe8;
  --bg-soft: rgba(250, 246, 240, 0.82);
  --panel: rgba(255, 252, 248, 0.9);
  --panel-strong: rgba(255, 255, 255, 0.98);
  --text: #1a2631;
  --text-soft: #334454;
  --muted: #5d6d7b;
  --line: rgba(30, 43, 58, 0.12);
  --accent: #d26b27;
  --accent-soft: rgba(210, 107, 39, 0.12);
  --accent-alt: #8a5b2c;
  --nav-active-text: #54290f;
  --button-text: #2a1406;
  --shadow: 0 16px 32px rgba(36, 29, 19, 0.12);
}

html[data-theme="dark"] {
  color-scheme: dark;
}

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

body {
  margin: 0;
  font-family: "Open Sans Custom", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top right, rgba(255, 140, 66, 0.12), transparent 28%),
    radial-gradient(circle at 10% 20%, rgba(216, 176, 107, 0.12), transparent 34%),
    linear-gradient(180deg, #09111a 0%, #050a11 100%);
  min-height: 100vh;
}

html[data-theme="light"] body {
  background:
    radial-gradient(circle at top right, rgba(210, 107, 39, 0.1), transparent 30%),
    radial-gradient(circle at 10% 20%, rgba(138, 91, 44, 0.08), transparent 34%),
    linear-gradient(180deg, #f7f1e9 0%, #efe5d9 100%);
}

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

img,
video {
  max-width: 100%;
  display: block;
}

button,
input,
textarea,
select {
  font: inherit;
}

pre,
code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Monaco, monospace;
  font-variant-ligatures: none;
  font-feature-settings: "liga" 0, "calt" 0;
}

.site-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(130deg, rgba(255, 140, 66, 0.12), transparent 30%),
    linear-gradient(320deg, rgba(216, 176, 107, 0.1), transparent 24%);
  opacity: 0.72;
}

.site-shell {
  position: relative;
  z-index: 1;
  width: min(1200px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.25rem 0 3rem;
}

.site-shell--admin {
  width: min(1280px, calc(100% - 2rem));
}

.site-header,
.admin-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-soft);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  position: sticky;
  top: 1.25rem;
  z-index: 20;
  transition: transform 220ms ease, opacity 220ms ease;
}

.site-header.is-header-hidden,
.admin-header.is-header-hidden {
  transform: translateY(calc(-100% - 1.25rem));
  opacity: 0;
}

.site-brand {
  display: inline-flex;
  flex-direction: column;
  gap: 0.1rem;
  margin-inline-start: 1rem;
}

.site-brand__label,
h1,
h2,
h3,
.eyebrow,
.stat-card strong {
  font-family: "Oxanium", sans-serif;
}

.site-brand__label {
  font-size: 1.15rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-brand__meta,
.content-card__meta,
.table-subline,
.meta-list dt,
.eyebrow {
  color: var(--muted);
  font-size: 0.9rem;
}

.site-nav,
.admin-nav,
.footer-nav,
.button-row,
.tag-row,
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.site-nav--panel,
.admin-nav--panel {
  display: none;
  gap: 0.4rem;
}

.site-nav a,
.admin-nav a {
  padding: 0.7rem 1rem;
  border-radius: 999px;
  transition: background-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.site-nav a:hover,
.site-nav a.is-active,
.admin-nav a:hover {
  background: var(--accent-soft);
  color: var(--nav-active-text);
}

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}

.menu-toggle:hover,
.menu-toggle[aria-expanded="true"] {
  background: var(--accent-soft);
  border-color: rgba(255, 140, 66, 0.38);
  color: var(--nav-active-text);
}

.menu-panel {
  position: absolute;
  top: calc(100% + 0.85rem);
  right: 0;
  width: min(320px, 100%);
  padding: 1rem;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--panel), var(--panel-strong));
  box-shadow: var(--shadow);
}

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

html:not(.is-mobile-menu) .menu-panel {
  display: none !important;
}

.menu-panel .theme-switcher {
  margin-top: 1rem;
}

.menu-panel--admin {
  right: 12rem;
}

.page-content {
  padding-top: 2rem;
}

.hero + .panel,
.hero + .prose-card {
  margin-top: 1.5rem;
}

.hero,
.panel,
.prose-card,
.content-card,
.album-card,
.profile-card,
.media-card,
.stat-card,
.auth-card {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--panel), var(--panel-strong));
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  content-visibility: auto;
  contain-intrinsic-size: 1px 320px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.9fr);
  gap: 1.5rem;
  padding: 2rem;
  border-radius: var(--radius-xl);
}

.hero--compact {
  grid-template-columns: 1fr;
}

.hero__copy h1,
.admin-hero h1 {
  font-size: clamp(2.2rem, 6vw, 4.4rem);
  line-height: 0.95;
  margin: 0.6rem 0 1rem;
}

.lead {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-soft);
}

.eyebrow {
  display: inline-block;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  justify-content: center;
  padding: 0.9rem 1.25rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 140, 66, 0.46);
  background: linear-gradient(135deg, var(--accent), #ffb368);
  color: var(--button-text);
  font-weight: 700;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.button::after {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: inherit;
  pointer-events: none;
  transition: border-color 180ms ease, opacity 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 140, 66, 0.9);
}

.button:hover::after {
  border-color: rgba(255, 255, 255, 0.42);
}

.button--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}

.button--ghost::after {
  border-color: rgba(255, 140, 66, 0.16);
}

.button--ghost:hover {
  background: var(--accent-soft);
  border-color: rgba(255, 140, 66, 0.42);
}

.button--danger {
  background: rgba(239, 93, 96, 0.16);
  color: #ffe7e8;
  border-color: rgba(239, 93, 96, 0.35);
}

.button--danger::after {
  border-color: rgba(255, 255, 255, 0.12);
}

.button--small {
  padding: 0.55rem 0.9rem;
  font-size: 0.9rem;
}

.button__icon {
  width: 1.1rem;
  height: 1.1rem;
}

.profile-card {
  padding: 1.5rem;
  border-radius: var(--radius-lg);
}

.profile-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 24px;
  margin-bottom: 1rem;
}

.button--hero,
.button--hero.button--ghost {
  border-color: transparent;
}

.button--hero::after {
  display: none;
}

.button--hero.button--ghost {
  background: rgba(255, 255, 255, 0.08);
}

.button--hero:hover,
.button--hero.button--ghost:hover {
  border-color: transparent;
}

.meta-list {
  display: grid;
  gap: 0.9rem;
  margin: 1.25rem 0 0;
}

.meta-list dd {
  margin: 0;
}

.meta-list div {
  display: grid;
  gap: 0.25rem;
}

.feature-grid,
.card-grid,
.stats-grid,
.panel-grid {
  display: grid;
  gap: 1.2rem;
  margin-top: 1.5rem;
}

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

.feature-card,
.stat-card {
  padding: 1.25rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: rgba(8, 19, 29, 0.52);
}

html[data-theme="light"] .feature-card,
html[data-theme="light"] .stat-card {
  background: rgba(255, 255, 255, 0.72);
}

.feature-card__index {
  color: var(--accent);
  font-family: "Oxanium", sans-serif;
  font-size: 0.95rem;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.9fr);
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.stack {
  display: grid;
  gap: 1.5rem;
}

.prose-card,
.panel,
.media-card,
.auth-card,
.content-card,
.album-card,
.stat-card {
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  min-width: 0;
}

.prose-card :first-child,
.panel :first-child {
  margin-top: 0;
}

.prose-card :last-child,
.panel :last-child {
  margin-bottom: 0;
}

.prose-card p,
.prose-card li,
.content-card p,
.album-card p,
.panel p,
.mini-card p {
  color: var(--muted);
  line-height: 1.8;
}

.prose-card h2,
.prose-card h3 {
  margin-top: 1.5rem;
}

.prose-card a,
.panel a,
.mini-card a {
  color: var(--accent-alt);
}

.prose-card pre {
  max-width: 100%;
  min-width: 0;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-md);
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  background: #111827;
}

.prose-card pre code {
  display: block;
  min-width: max-content;
  padding: 0;
  margin: 0;
}

.hljs {
  background: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
}

html[data-theme="light"] .prose-card pre {
  background: #f3ede4;
  color: #22303d;
  border: 1px solid rgba(30, 43, 58, 0.12);
}

html[data-theme="light"] .prose-card pre code,
html[data-theme="light"] .hljs {
  color: #22303d !important;
}

html[data-theme="light"] .hljs-comment,
html[data-theme="light"] .hljs-quote {
  color: #7b8792 !important;
}

html[data-theme="light"] .hljs-keyword,
html[data-theme="light"] .hljs-selector-tag,
html[data-theme="light"] .hljs-subst {
  color: #9d3f0e !important;
}

html[data-theme="light"] .hljs-string,
html[data-theme="light"] .hljs-title,
html[data-theme="light"] .hljs-section,
html[data-theme="light"] .hljs-attribute,
html[data-theme="light"] .hljs-literal,
html[data-theme="light"] .hljs-template-tag,
html[data-theme="light"] .hljs-template-variable,
html[data-theme="light"] .hljs-addition {
  color: #176d63 !important;
}

html[data-theme="light"] .hljs-number,
html[data-theme="light"] .hljs-symbol,
html[data-theme="light"] .hljs-bullet,
html[data-theme="light"] .hljs-variable,
html[data-theme="light"] .hljs-meta,
html[data-theme="light"] .hljs-link {
  color: #7e4c1c !important;
}

.mini-list {
  display: grid;
  gap: 1rem;
}

.mini-card {
  display: grid;
  gap: 0.35rem;
  padding: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(5, 13, 21, 0.4);
  transition: transform 180ms ease, border-color 180ms ease;
}

.mini-card:hover,
.album-preview:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 140, 66, 0.32);
}

html[data-theme="light"] .mini-card,
html[data-theme="light"] .album-preview,
html[data-theme="light"] .gallery-tile,
html[data-theme="light"] .upload-queue__item,
html[data-theme="light"] .theme-switcher {
  background: rgba(255, 255, 255, 0.74);
}

.album-preview-grid {
  display: grid;
  gap: 1rem;
}

.album-preview {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 0.9rem;
  padding: 0.75rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(5, 13, 21, 0.4);
  transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.album-preview img,
.admin-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 14px;
}

.admin-thumb--large {
  max-width: 240px;
}

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

.card-grid--compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.content-card,
.album-card {
  display: grid;
  gap: 0.8rem;
}

.content-card--clickable,
.album-card {
  position: relative;
  transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.content-card--clickable:hover,
.album-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 140, 66, 0.36);
}

.card-link {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
}

.card-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.content-card > *:not(.card-link),
.album-card > *:not(.card-link) {
  position: relative;
  z-index: 2;
}

.content-card > *:not(.card-link) {
  pointer-events: none;
}

.album-card > *:not(.card-link) {
  pointer-events: none;
}

.content-card__meta {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.tag-row {
  align-items: center;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(216, 176, 107, 0.14);
  border: 1px solid rgba(216, 176, 107, 0.28);
  color: #f9e7c8;
  font-size: 0.9rem;
}

.tag--soft {
  background: rgba(255, 140, 66, 0.12);
  border-color: rgba(255, 140, 66, 0.24);
  color: #ffe0c7;
}

.tag--active {
  background: rgba(255, 140, 66, 0.2);
  border-color: rgba(255, 140, 66, 0.5);
}

html[data-theme="light"] .tag {
  background: rgba(138, 91, 44, 0.09);
  border-color: rgba(138, 91, 44, 0.22);
  color: #6d4620;
}

html[data-theme="light"] .tag--soft {
  background: rgba(210, 107, 39, 0.1);
  border-color: rgba(210, 107, 39, 0.2);
  color: #87441a;
}

html[data-theme="light"] .tag--active {
  background: rgba(210, 107, 39, 0.16);
  border-color: rgba(210, 107, 39, 0.38);
  color: #6e3411;
}

.filter-group {
  display: grid;
  gap: 1rem;
}

.filter-block strong {
  display: block;
  margin-bottom: 0.85rem;
}

.article-shell {
  display: grid;
  gap: 1.5rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  width: fit-content;
  padding: 0.7rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  transition: transform 180ms ease, border-color 180ms ease, color 180ms ease;
}

.back-link:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 140, 66, 0.42);
  color: var(--text);
}

.article-header {
  padding: 1.5rem 0;
}

.article-header__meta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  color: var(--muted);
}

.article-cover {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  max-height: 420px;
  object-fit: cover;
  width: 100%;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.gallery-tile {
  margin: 0;
  padding: 0.75rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(5, 13, 21, 0.52);
}

.gallery-tile__button {
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.gallery-tile img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 14px;
}

.gallery-tile figcaption {
  display: grid;
  gap: 0.25rem;
  margin-top: 0.75rem;
  color: var(--muted);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 1rem 4.75rem;
  background: rgba(4, 8, 13, 0.92);
  color: #f5f7fb;
}

.lightbox__content {
  display: grid;
  gap: 1rem;
  justify-items: center;
  width: min(100%, 1200px);
  margin: 0 auto;
}

.lightbox__viewport {
  width: 100%;
  height: 78vh;
  overflow: hidden;
}

.lightbox__viewport.is-zoomed {
  overflow: hidden;
}

.lightbox__track {
  display: flex;
  width: 300%;
  transform: translate3d(-33.3333%, 0, 0);
  transition: transform 220ms ease;
  will-change: transform;
}

.lightbox__slide {
  flex: 0 0 33.3333%;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 78vh;
  min-width: 0;
  padding: 0 0.5rem;
}

.lightbox__slide img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: var(--radius-md);
  transform-origin: center center;
  transition: transform 180ms ease;
  will-change: transform;
  touch-action: none;
}

.lightbox__track.is-swiping {
  transition: none;
}

.lightbox__track.is-swipe-animating {
  transition: transform 220ms ease;
}

.lightbox__slide img.is-zoomed {
  transition: none;
  cursor: grab;
}

.lightbox__caption {
  text-align: center;
}

.lightbox__caption[hidden] {
  display: none;
}

.lightbox__nav,
.lightbox__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
  color: white;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox__nav--prev {
  left: 1rem;
}

.lightbox__nav--next {
  right: 1rem;
}

.lightbox__nav svg {
  width: 1.2rem;
  height: 1.2rem;
  display: block;
  flex: 0 0 auto;
}

.lightbox__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
}

.lightbox-open {
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: none;
}

.admin-body .page-content {
  padding-top: 1.5rem;
}

.admin-content {
  display: grid;
  gap: 1.5rem;
}

.admin-hero {
  display: grid;
  gap: 0.45rem;
}

.form-stack,
.form-grid,
.checkbox-panel {
  display: grid;
  gap: 1rem;
}

.form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

label,
fieldset {
  display: grid;
  gap: 0.45rem;
}

label span,
legend {
  color: var(--muted);
  font-size: 0.92rem;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.9rem 1rem;
  background: rgba(4, 11, 18, 0.78);
  color: var(--text);
}

html[data-theme="light"] input,
html[data-theme="light"] textarea,
html[data-theme="light"] select {
  background: rgba(255, 255, 255, 0.88);
}

input[type="file"] {
  padding: 0.55rem;
  background: rgba(4, 11, 18, 0.42);
}

input[type="file"]::file-selector-button {
  margin-right: 0.9rem;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 140, 66, 0.36);
  background: linear-gradient(135deg, var(--accent-soft), rgba(255, 140, 66, 0.22));
  color: var(--text);
  cursor: pointer;
  transition: background-color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

input[type="file"]::file-selector-button:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 140, 66, 0.56);
}

html[data-theme="light"] .button--ghost {
  color: #22303d;
}

.admin-body .button {
  color: var(--button-text);
}

.admin-body .button.button--ghost,
.admin-body .button.button--danger {
  color: inherit;
}

html[data-theme="light"] .button--hero.button--ghost {
  background: rgba(26, 38, 49, 0.06);
}

html[data-theme="light"] .button--danger {
  background: rgba(239, 93, 96, 0.12);
  color: #8e1d26;
}

html[data-theme="light"] .notice--warning {
  color: #8a5a09;
}

html[data-theme="light"] .notice--success {
  color: #17663b;
}

html[data-theme="light"] .notice--error {
  color: #9b2029;
}

textarea {
  resize: vertical;
}

.code-area {
  min-height: 320px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Monaco, monospace;
  font-variant-ligatures: none;
  font-feature-settings: "liga" 0, "calt" 0;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.checkbox input {
  width: auto;
}

.checkbox-panel {
  padding: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
}

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

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

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

.table-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.notice {
  padding: 1rem 1.15rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  line-height: 1.6;
}

.notice ul {
  margin: 0.6rem 0 0;
  padding-left: 1.2rem;
}

.notice--warning {
  background: rgba(255, 196, 87, 0.12);
  border-color: rgba(255, 196, 87, 0.22);
  color: #ffe8b0;
}

.notice--success {
  background: rgba(81, 216, 138, 0.12);
  border-color: rgba(81, 216, 138, 0.22);
  color: #d5ffe6;
}

.notice--error {
  background: rgba(239, 93, 96, 0.12);
  border-color: rgba(239, 93, 96, 0.24);
  color: #ffd6d7;
}

.notice--floating {
  margin-top: 1rem;
}

.auth-shell {
  min-height: calc(100vh - 8rem);
  display: grid;
  place-items: center;
}

.auth-card {
  width: min(540px, 100%);
}

.media-card {
  display: grid;
  align-content: start;
  grid-template-rows: auto auto auto 1fr;
}

.media-card__meta h2 {
  margin-bottom: 0;
}

.media-card__description {
  margin: 0.9rem 0 0;
  min-height: 3.6em;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}

.media-card video {
  border-radius: 18px;
  margin: 1rem 0;
}

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

.music-intro {
  max-width: 72rem;
}

.page-music .panel + .panel {
  margin-top: 1.5rem;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  margin-top: 2rem;
  padding: 1.4rem 1.25rem;
  color: var(--muted);
}

.panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.panel__header h2 {
  margin: 0;
}

.panel__subline {
  margin: 0.45rem 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.theme-switcher {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(5, 13, 21, 0.42);
}

.theme-switcher--desktop {
  display: inline-flex;
}

.theme-switcher--mobile {
  display: none;
}

.theme-switcher__option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  width: 2.7rem;
  height: 2.7rem;
  padding: 0;
  cursor: pointer;
  transition: background-color 180ms ease, color 180ms ease, transform 180ms ease;
}

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

.theme-switcher__option svg {
  width: 1.3rem;
  height: 1.3rem;
}

html[data-theme-preference="auto"] .theme-switcher__option[data-theme-option="auto"],
html[data-theme-preference="light"] .theme-switcher__option[data-theme-option="light"],
html[data-theme-preference="dark"] .theme-switcher__option[data-theme-option="dark"] {
  background: var(--accent-soft);
  color: var(--text);
}

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

.stat-card {
  position: relative;
  overflow: hidden;
  gap: 0.6rem;
}

.stat-card__icon {
  display: inline-flex;
  width: 2.75rem;
  height: 2.75rem;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  background: var(--accent-soft);
  color: var(--accent);
}

.stat-card__icon svg {
  width: 1.45rem;
  height: 1.45rem;
}

.album-card__media {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 18px;
}

.album-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.upload-panel {
  gap: 1rem;
}

.upload-queue {
  display: grid;
  gap: 0.75rem;
}

.upload-queue__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(5, 13, 21, 0.36);
}

.upload-queue__item span {
  color: var(--muted);
  text-align: right;
}

.upload-queue__item.is-success {
  border-color: rgba(81, 216, 138, 0.35);
}

.upload-queue__item.is-success span {
  color: var(--success);
}

.upload-queue__item.is-error {
  border-color: rgba(239, 93, 96, 0.36);
}

.upload-queue__item.is-error span {
  color: var(--danger);
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 420ms ease, transform 420ms ease;
}

@media (max-width: 980px) {
  html {
    --mobile-header-height: 0px;
  }

  .hero,
  .split-section,
  .media-grid,
  .feature-grid,
  .card-grid,
  .gallery-grid,
  .stats-grid,
  .panel-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .site-header,
  .admin-header {
    border-radius: 28px;
    flex-wrap: wrap;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .site-nav[data-desktop-nav],
  .admin-nav[data-desktop-nav] {
    display: none;
  }

  .menu-panel {
    position: static;
    width: 100%;
  }

  .theme-switcher--desktop {
    display: none;
  }

  .site-nav.is-open,
  .admin-nav.is-open {
    display: grid;
  }

  .site-nav--panel,
  .admin-nav--panel {
    display: none;
  }

  .site-nav--panel.is-open,
  .admin-nav--panel.is-open {
    display: grid;
  }

  .theme-switcher--mobile {
    display: inline-flex;
  }
}

@media (max-width: 720px) {
  .site-shell,
  .site-shell--admin {
    width: min(100% - 1rem, 100%);
  }

  .site-footer,
  .admin-logout,
  .table-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .menu-panel {
    padding: 0.85rem;
  }

  .theme-switcher {
    width: 100%;
    justify-content: space-between;
  }

  .hero__copy h1,
  .admin-hero h1 {
    font-size: clamp(1.8rem, 9vw, 2.6rem);
    line-height: 1.02;
    overflow-wrap: anywhere;
    hyphens: auto;
  }

  .hero .lead,
  .admin-hero .lead {
    font-size: 1rem;
    line-height: 1.65;
    overflow-wrap: anywhere;
    hyphens: auto;
  }

  .prose-card pre {
    padding: 0.65rem 0.75rem;
    font-size: 0.88rem;
  }

  .lightbox {
    padding: 1rem;
  }

  .lightbox__nav {
    position: static;
    top: auto;
    transform: none;
    justify-self: center;
  }
}

.lightbox[hidden] {
  display: none;
}

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

  .reveal,
  .reveal.is-visible {
    opacity: 1;
    transform: none;
  }
}
