/* Color system
   Change these variables first when you want to retune the whole site. */
:root {
  --color-bg: #ffffff;
  --color-bg-soft: #fafafa;
  --color-surface: #ffffff;
  --color-surface-soft: #f5f5f3;
  --color-surface-muted: #eeeeeb;
  --color-surface-strong: #e7e6e2;
  --color-text: #2f2f2c;
  --color-muted: #6f6f69;
  --color-subtle: #96968f;
  --color-accent: #8a775b;
  --color-accent-strong: #77654c;
  --color-accent-soft: #eee9e1;
  --color-line: rgba(45, 45, 42, 0.12);
  --color-line-strong: rgba(45, 45, 42, 0.18);
  --color-shadow: rgba(30, 30, 28, 0.06);
  --color-success: #5f7561;
  --color-success-soft: #eef3ef;
  --color-danger: #8b635d;
  --color-danger-soft: #f6efee;
  --radius-card: 18px;
  --radius-soft: 12px;
  --content-width: 1080px;
  --reading-width: 760px;
  --font-heading: "Noto Serif JP", "Yu Mincho", "Hiragino Mincho ProN", serif;
  --font-body: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  --shadow-soft: 0 10px 28px rgba(30, 30, 28, 0.04);
  --shadow-lift: 0 12px 28px rgba(30, 30, 28, 0.07);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  line-height: 1.9;
  letter-spacing: 0.02em;
  text-rendering: optimizeLegibility;
}

body.home-page {
  position: relative;
  background-color: var(--color-bg);
  background-image: none;
}

body.home-page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: url("/static/images/top-background.webp");
  background-size: 92% auto;
  background-position: center bottom;
  background-repeat: no-repeat;
}

body.detail-page-bg {
  min-height: 100vh;
  background-color: var(--color-bg);
  background-image: url("/static/images/detail-background.webp");
  background-size: contain;
  background-position: center top;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

::selection {
  background: rgba(138, 119, 91, 0.18);
  color: var(--color-text);
}

img {
  display: block;
  max-width: 100%;
}

.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;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

textarea {
  resize: vertical;
}

.site-shell {
  position: relative;
  z-index: 1;
  width: min(calc(100% - 32px), var(--content-width));
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 2px 12px;
  border-bottom: 1px solid var(--color-line);
  background-color: rgba(255, 255, 255, 0.92);
}

body.home-page .site-header {
  background-color: rgba(255, 255, 255, 0.4);
}

.brand-group {
  min-width: 0;
}

.brand {
  display: inline-block;
  color: var(--color-text);
}

.brand-logo {
  display: block;
  width: clamp(110px, 12vw, 160px);
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.brand-note,
.eyebrow,
.meta-line,
.support-note,
.tag,
.metric-label,
.preview-title {
  color: var(--color-muted);
  font-size: 0.84rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-note {
  margin: 6px 0 0;
  text-transform: lowercase;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.site-nav a,
.ghost-button {
  color: var(--color-muted);
  transition:
    color 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    opacity 180ms ease;
}

.site-nav a {
  padding: 5px 0;
  border-bottom: 1px solid transparent;
}

.site-nav a:hover,
.site-nav a.is-active,
.ghost-button:hover {
  color: var(--color-text);
}

.site-nav a:hover,
.site-nav a.is-active {
  border-color: rgba(138, 119, 91, 0.28);
}

.nav-toggle {
  display: none;
  border: 1px solid var(--color-line);
  border-radius: 999px;
  padding: 10px 14px;
  background-color: var(--color-surface);
  color: var(--color-text);
  box-shadow: 0 2px 8px var(--color-shadow);
}

.site-main {
  padding: 34px 0 72px;
}

body.home-page .site-main {
  padding-top: 12px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 28px 4px 42px;
  border-top: 1px solid var(--color-line);
  color: var(--color-muted);
  background-color: transparent;
  font-size: 0.92rem;
}

body.home-page .site-footer {
  background-color: rgba(255, 255, 255, 0.72);
}

.flash-stack {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.flash-message {
  padding: 14px 16px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-soft);
  background-color: var(--color-surface);
  box-shadow: 0 4px 12px var(--color-shadow);
}

.flash-message--success {
  border-color: rgba(96, 121, 86, 0.22);
  color: var(--color-success);
  background-color: var(--color-success-soft);
}

.flash-message--error {
  border-color: rgba(143, 97, 88, 0.22);
  color: var(--color-danger);
  background-color: var(--color-danger-soft);
}

.page-intro,
.reading-grid,
.auth-card,
.metric-card,
.admin-shortcut,
.admin-table-wrap,
.admin-form,
.archive-card,
.reading-card,
.compact-card {
  position: relative;
  border: 1px solid var(--color-line);
  background-color: var(--color-surface);
  box-shadow: var(--shadow-soft);
}

.page-intro,
.auth-card,
.admin-table-wrap,
.admin-form {
  border-radius: 28px;
}

.page-intro h1,
.detail-hero h1,
.auth-card h1,
.admin-page-head h1,
.home-hero h1 {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 500;
  line-height: 1.25;
  color: var(--color-text);
}

.page-intro p,
.detail-summary,
.reading-card p,
.auth-card p,
.admin-page-head p,
.metric-card p {
  max-width: 42rem;
  color: rgba(47, 47, 44, 0.84);
}

.page-intro .music-ai-note {
  margin-top: 12px;
  color: var(--color-muted);
  font-size: 0.85rem;
  line-height: 1.7;
}

.hero-links,
.form-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.home-hero {
  min-height: 72vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  max-width: 920px;
  margin: 0 auto;
  padding: clamp(56px, 8vh, 90px) 24px clamp(64px, 8vh, 96px);
}

.home-kicker {
  margin: 0 0 18px;
  color: var(--color-muted);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.home-logo {
  display: block;
  width: min(70%, 602px);
  max-width: 100%;
  height: auto;
  margin-left: auto;
  margin-right: auto;
  object-fit: contain;
}

.home-copy {
  margin: 28px 0 0;
  color: var(--color-text);
  font-family: var(--font-heading);
  font-size: clamp(1.25rem, 2.8vw, 2.1rem);
  line-height: 1.6;
  letter-spacing: 0.03em;
}

.home-lead {
  max-width: 620px;
  margin: 28px 0 0;
  color: rgba(47, 47, 44, 0.78);
  font-size: 1rem;
  line-height: 2;
}

.home-hero h1,
.home-copy,
.home-lead {
  text-shadow: 0 1px 10px rgba(255, 255, 255, 0.3);
}

.home-links {
  margin-top: 28px;
}

.home-section {
  padding: 28px;
  border-radius: 26px;
  border: 1px solid rgba(45, 45, 42, 0.08);
  background-color: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-soft);
}

.home-section .section-heading {
  margin-bottom: 24px;
  padding: 0 4px 14px;
  border-bottom-color: var(--color-line);
}

.home-ai-notice {
  margin-top: 38px;
  padding: 20px 22px;
  border: 1px solid var(--color-line);
  border-radius: 8px;
  background-color: var(--color-bg-soft);
  color: var(--color-muted);
  font-size: 0.86rem;
  line-height: 1.9;
}

.home-ai-notice h2 {
  margin-bottom: 10px;
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.home-ai-notice p + p {
  margin-top: 8px;
}

.music-shelf {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 4px 2px 16px;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: rgba(138, 119, 91, 0.32) transparent;
}

.music-shelf-item {
  flex: 0 0 148px;
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--color-text);
  padding: 0;
  cursor: pointer;
  text-align: left;
  scroll-snap-align: start;
}

.music-shelf-item:focus-visible {
  outline: 2px solid rgba(138, 119, 91, 0.36);
  outline-offset: 6px;
  border-radius: 10px;
}

.music-shelf-cover {
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 1px solid var(--color-line);
  border-radius: 10px;
  background-color: var(--color-surface-soft);
}

.music-shelf-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.music-shelf-cover-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 12px;
  color: var(--color-muted);
  font-size: 0.88rem;
}

.music-shelf-title {
  display: block;
  margin-top: 10px;
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--color-text);
}

.music-shelf-item.is-active .music-shelf-cover {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 2px rgba(138, 119, 91, 0.16);
}

.music-feature-player {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 20px;
  margin-top: 22px;
  padding: 20px;
  border-radius: 14px;
  background-color: #1f2328;
  color: #f5f5f3;
}

.music-feature-cover {
  width: 96px;
  height: 96px;
  border-radius: 8px;
  overflow: hidden;
  background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.music-feature-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.music-feature-cover-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: rgba(245, 245, 243, 0.72);
  font-size: 0.88rem;
}

.music-feature-body {
  display: grid;
  gap: 10px;
  align-content: start;
}

.music-feature-meta {
  margin: 0;
  color: #b9b9b3;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.music-feature-title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(1.4rem, 1.1rem + 1vw, 1.95rem);
  font-weight: 500;
  line-height: 1.25;
}

.music-feature-title a,
.music-feature-detail {
  color: #f5f5f3;
}

.music-feature-description {
  margin: 0;
  color: #d5d4cf;
  line-height: 1.8;
}

.music-feature-audio-wrap {
  display: grid;
  gap: 10px;
}

.music-feature-audio {
  width: 100%;
}

.music-feature-audio-note {
  margin: 0;
  color: #b9b9b3;
}

.music-feature-detail {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  margin-top: 4px;
}

.music-archive-grid,
.notes-grid {
  display: grid;
  gap: 22px;
}

.music-archive-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.music-archive-tile {
  min-width: 0;
}

.music-archive-cover {
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 1px solid var(--color-line);
  border-radius: 10px;
  background-color: var(--color-surface-soft);
  box-shadow: 0 8px 20px var(--color-shadow);
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.music-archive-cover:hover,
.music-archive-cover:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(138, 119, 91, 0.28);
  box-shadow: 0 10px 24px rgba(30, 30, 28, 0.08);
}

.music-archive-cover:focus-visible {
  outline: none;
}

.music-archive-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.music-archive-meta {
  padding: 14px 2px 0;
}

.music-archive-meta time {
  display: block;
  color: var(--color-subtle);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
}

.music-archive-meta h2 {
  margin: 8px 0 0;
  color: var(--color-text);
  font-family: var(--font-heading);
  font-size: 1.12rem;
  font-weight: 500;
  line-height: 1.45;
}

.music-archive-meta h2 a {
  color: var(--color-text);
}

.music-archive-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.music-archive-tags .tag {
  padding: 4px 8px;
  font-size: 0.72rem;
}

.music-archive-link {
  display: inline-block;
  margin-top: 12px;
  color: var(--color-accent);
  font-size: 0.86rem;
}

.notes-grid--home {
  grid-template-columns: repeat(auto-fill, minmax(180px, 180px));
  justify-content: start;
}

.notes-grid--archive {
  grid-template-columns: repeat(auto-fill, minmax(190px, 230px));
  justify-content: start;
}

.note-tile {
  display: block;
  color: var(--color-text);
  text-decoration: none;
}

.note-tile-media {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 1px solid var(--color-line);
  border-radius: 10px;
  background-color: var(--color-surface-soft);
  box-shadow: 0 8px 20px var(--color-shadow);
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.note-tile:hover .note-tile-media,
.note-tile:focus-visible .note-tile-media {
  transform: translateY(-2px);
  border-color: rgba(138, 119, 91, 0.28);
  box-shadow: 0 10px 24px rgba(30, 30, 28, 0.08);
}

.note-tile:focus-visible {
  outline: none;
}

.note-tile-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.note-tile-label {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  padding: 13px 14px 12px;
  border: 1px solid rgba(45, 45, 42, 0.1);
  border-radius: 6px;
  background-color: rgba(255, 255, 255, 0.92);
}

.note-tile-category {
  display: block;
  margin-bottom: 5px;
  color: var(--color-muted);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.note-tile h3 {
  margin: 0;
  color: var(--color-text);
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.45;
}

.note-tile time {
  display: block;
  margin-top: 7px;
  color: var(--color-subtle);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.note-tile-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 24px;
  background-color: var(--color-surface-soft);
  color: var(--color-muted);
  text-align: center;
  line-height: 1.8;
}

body.home-page .archive-card {
  background-color: rgba(255, 255, 255, 0.95);
  border-color: rgba(45, 45, 42, 0.1);
  box-shadow: var(--shadow-soft);
}

body.home-page .archive-card--note::before {
  background-color: rgba(138, 119, 91, 0.14);
}

body.home-page .empty-state {
  padding: 10px 0 4px;
}

.section-block {
  margin-top: 68px;
}

body.home-page .section-block {
  margin-top: 38px;
}

.section-heading,
.admin-page-head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  margin-bottom: 22px;
  padding: 0 4px 10px;
  border-bottom: 1px solid var(--color-line);
}

.section-heading h2,
.detail-section h2,
.reading-card h2 {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 500;
  color: var(--color-text);
}

.page-intro,
.auth-card,
.admin-form,
.admin-table-wrap {
  padding: 28px;
}

.page-intro {
  margin-bottom: 28px;
}

.page-intro--music,
.page-intro--notes,
.page-intro--tale {
  overflow: hidden;
}

.page-intro--music::after,
.page-intro--notes::after,
.page-intro--tale::after {
  content: "";
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 18px;
  height: 1px;
  background-color: rgba(138, 119, 91, 0.14);
}

.archive-grid {
  display: grid;
  gap: 22px;
}

.archive-grid--music,
.archive-grid--notes {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.archive-card,
.reading-card,
.compact-card,
.admin-shortcut,
.metric-card {
  border-radius: var(--radius-card);
}

.archive-card {
  overflow: hidden;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.archive-card:hover,
.compact-card:hover,
.admin-shortcut:hover {
  transform: translateY(-2px);
  border-color: rgba(138, 119, 91, 0.28);
  box-shadow: var(--shadow-lift);
}

.archive-card--music {
  background-color: var(--color-surface);
}

.archive-card--note {
  background-color: var(--color-surface);
}

.archive-card--note::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 20px;
  bottom: 20px;
  width: 2px;
  background-color: rgba(138, 119, 91, 0.12);
}

.preview-image {
  display: block;
  width: 100%;
  height: auto;
}

.card-body {
  position: relative;
  z-index: 1;
  padding: 22px;
}

.list-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.list-card-image-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid var(--color-line);
  background-color: var(--color-surface-soft);
}

.list-card-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.list-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.list-card-link {
  margin-top: auto;
  align-self: flex-start;
}

.archive-card--note .card-body {
  padding-left: 28px;
}

.card-body h2,
.card-body h3 {
  margin: 6px 0 10px;
  font-family: var(--font-heading);
  font-weight: 500;
  color: var(--color-text);
}

.card-body p {
  margin: 0 0 14px;
  color: rgba(47, 47, 44, 0.78);
}

.tag-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(138, 119, 91, 0.16);
  background-color: var(--color-accent-soft);
  color: #5f5448;
  text-transform: none;
}

.text-link,
.soft-link {
  color: var(--color-accent);
}

.text-link:hover,
.soft-link:hover {
  color: var(--color-accent-strong);
}

.detail-page {
  display: block;
  max-width: 1180px;
  margin: 0 auto;
  padding:
    clamp(48px, 7vw, 96px)
    clamp(16px, 4vw, 40px)
    clamp(72px, 10vw, 140px);
  background: transparent;
}

.detail-panel {
  overflow: hidden;
  border: 1px solid var(--color-line);
  border-radius: 18px;
  background-color: var(--color-surface);
  box-shadow: var(--shadow-soft);
}

.detail-hero {
  display: grid;
  gap: 14px;
  padding: clamp(32px, 5vw, 58px);
  background-color: var(--color-surface-soft);
  border-bottom: 1px solid var(--color-line);
}

.detail-meta {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.detail-hero h1 {
  font-size: clamp(2.2rem, 5vw, 4.3rem);
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1.16;
}

.detail-summary,
.detail-lead {
  margin: 0;
  max-width: 46rem;
  color: rgba(47, 47, 44, 0.78);
  line-height: 1.9;
}

.detail-body {
  padding: clamp(24px, 4vw, 36px);
  background-color: var(--color-surface);
}

.detail-body-inner,
.detail-stack {
  display: grid;
  gap: 24px;
}

.detail-body-inner {
  max-width: var(--reading-width);
  margin: 0 auto;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(0, 1.3fr);
  gap: 28px;
  align-items: start;
}

.detail-layout--note {
  grid-template-columns: 1fr;
}

.detail-image-frame {
  width: 100%;
  padding: 0;
  border: 1px solid var(--color-line);
  border-radius: 12px;
  background-color: var(--color-surface-soft);
}

.detail-image-frame--wide {
  margin-bottom: 24px;
}

.detail-image {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 720px;
  margin: 0 auto;
  border-radius: 12px;
}

.detail-media,
.detail-content {
  display: grid;
  gap: 28px;
}

.detail-section,
.audio-panel,
.reading-card,
.compact-card,
.preview-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid var(--color-line);
  background-color: var(--color-bg-soft);
}

.audio-panel h2,
.detail-section h2 {
  margin-bottom: 0;
}

.detail-page--tale .detail-body-inner {
  max-width: 920px;
}

.detail-panel .detail-section {
  padding: 0;
  border: 0;
  border-radius: 0;
  background-color: transparent;
}

.detail-panel .detail-section + .detail-section {
  padding-top: 28px;
  border-top: 1px solid var(--color-line);
}

.detail-panel .audio-panel {
  padding: 20px;
  border-radius: 14px;
  background-color: var(--color-surface-soft);
}

.detail-panel .compact-card {
  border-radius: 14px;
  background-color: var(--color-bg-soft);
}

.audio-player {
  width: 100%;
  accent-color: var(--color-accent);
}

.prose-block {
  color: rgba(47, 47, 44, 0.9);
  line-height: 2;
}

.creator-name {
  color: var(--color-text);
  font-family: var(--font-heading);
  font-size: 1.18rem;
  letter-spacing: 0.04em;
}

.preline {
  white-space: pre-line;
}

.compact-list {
  display: grid;
  gap: 14px;
}

.compact-card {
  display: grid;
  gap: 8px;
}

.reading-grid {
  display: grid;
  gap: 22px;
  padding: 22px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.reading-card {
  min-height: 100%;
}

.empty-state,
.empty-cell {
  color: var(--color-muted);
}

.media-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 40px 16px;
  color: var(--color-muted);
}

.auth-section {
  display: grid;
  place-items: center;
  min-height: 62vh;
}

.auth-card {
  width: min(100%, 540px);
}

.admin-page-head {
  margin-bottom: 24px;
}

.metric-grid,
.admin-shortcuts {
  display: grid;
  gap: 20px;
}

.metric-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 24px;
}

.metric-card strong {
  display: block;
  margin-top: 8px;
  font-size: clamp(2rem, 1.6rem + 1vw, 3rem);
  font-family: var(--font-heading);
  font-weight: 500;
  color: var(--color-text);
}

.admin-shortcuts {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-shortcut {
  display: grid;
  gap: 6px;
  padding: 22px;
}

.admin-table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

.admin-table th,
.admin-table td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--color-line);
  text-align: left;
  vertical-align: top;
}

.admin-table tbody tr:hover {
  background-color: var(--color-bg-soft);
}

.admin-table th {
  color: var(--color-muted);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--color-line);
  color: var(--color-muted);
  background-color: var(--color-bg-soft);
}

.status-badge--live {
  border-color: rgba(96, 121, 86, 0.22);
  color: var(--color-success);
  background-color: var(--color-success-soft);
}

.admin-form {
  display: grid;
  gap: 24px;
}

.admin-form--wide {
  width: 100%;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.form-field {
  display: grid;
  gap: 8px;
}

.form-field--full {
  grid-column: 1 / -1;
}

.form-field--checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  align-self: end;
}

.form-field span {
  color: rgba(47, 47, 44, 0.92);
}

.form-field input[type="text"],
.form-field input[type="password"],
.form-field input[type="datetime-local"],
.form-field textarea,
.form-field select {
  width: 100%;
  border: 1px solid rgba(45, 45, 42, 0.14);
  border-radius: 14px;
  padding: 12px 14px;
  background-color: rgba(255, 255, 255, 0.96);
  color: var(--color-text);
}

.form-field input[type="text"]:focus,
.form-field input[type="password"]:focus,
.form-field input[type="datetime-local"]:focus,
.form-field textarea:focus,
.form-field select:focus {
  outline: none;
  border-color: rgba(138, 119, 91, 0.36);
  box-shadow: 0 0 0 3px rgba(138, 119, 91, 0.1);
}

.form-field input[type="file"] {
  color: var(--color-muted);
}

.file-upload {
  min-width: 0;
  align-content: start;
}

.file-upload [hidden] {
  display: none !important;
}

.file-upload-choose {
  justify-self: start;
  min-height: 44px;
  cursor: pointer;
}

.file-drop-zone {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 4px;
  width: 100%;
  max-width: 280px;
  min-height: 112px;
  padding: 12px;
  border: 1px dashed var(--color-accent);
  border-radius: 8px;
  background-color: var(--color-bg-soft);
  font-size: 0.85rem;
  text-align: center;
  overflow-wrap: anywhere;
  cursor: default;
}

.file-drop-zone.is-dragging {
  border-style: solid;
  background-color: var(--color-accent-soft);
}

.file-upload-icon {
  width: 28px;
  height: 35px;
  color: var(--color-accent-strong);
}

.file-upload-name {
  max-width: 100%;
}

.file-upload-status {
  margin: 0;
  font-size: 0.85rem;
  overflow-wrap: anywhere;
}

.form-field small {
  color: var(--color-muted);
}

.primary-button,
.danger-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
}

.primary-button {
  background-color: var(--color-accent);
  border-color: var(--color-accent);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(30, 30, 28, 0.05);
}

.primary-button:hover {
  background-color: var(--color-accent-strong);
  border-color: var(--color-accent-strong);
}

.danger-button {
  background-color: transparent;
  border-color: rgba(143, 97, 88, 0.24);
  color: var(--color-danger);
}

.danger-button:hover {
  background-color: rgba(143, 97, 88, 0.08);
}

.ghost-button {
  background-color: transparent;
  border-color: var(--color-line);
  color: var(--color-muted);
}

.ghost-button:hover {
  background-color: rgba(245, 245, 243, 0.9);
}

.inline-form {
  display: inline-flex;
}

.preview-panel {
  display: grid;
  gap: 12px;
}

.preview-image {
  max-width: 360px;
  max-height: 260px;
  border-radius: 16px;
  border: 1px solid var(--color-line);
}

.admin-theme .site-main {
  padding-top: 28px;
}

body.detail-page-bg .site-main,
body.detail-page-bg .detail-page,
body.detail-page-bg .detail-layout,
body.detail-page-bg .detail-body-inner,
body.detail-page-bg .detail-stack {
  background: transparent;
}

@media (max-width: 900px) {
  .archive-grid--music,
  .reading-grid,
  .metric-grid,
  .admin-shortcuts,
  .form-grid,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .music-archive-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .notes-grid--archive {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    justify-content: stretch;
  }

  .detail-layout--note {
    grid-template-columns: 1fr;
  }

  .site-footer,
  .section-heading,
  .admin-page-head {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 760px) {
  body.home-page::before {
    background-image: url("/static/images/top-background-mobile.webp");
    background-size: 100% auto;
    background-position: center 5rem;
  }

  body.detail-page-bg {
    background-image: url("/static/images/detail-background-mobile.webp");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center top;
    background-attachment: scroll;
  }

  .detail-page {
    padding:
      28px
      0
      72px;
  }

  .site-shell {
    width: min(calc(100% - 24px), var(--content-width));
  }

  .site-header {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    padding: 14px 0 4px;
  }

  .site-nav.is-open {
    display: flex;
  }

  .page-intro,
  .auth-card,
  .admin-form,
  .admin-table-wrap {
    padding: 22px;
    border-radius: 22px;
  }

  .detail-hero,
  .detail-body {
    padding: 22px;
  }

  .detail-panel {
    border-radius: 16px;
  }

  .home-hero {
    min-height: 64vh;
    padding: 48px 6px 56px;
  }

  .home-copy {
    margin-top: 22px;
    font-size: clamp(1.12rem, 5.8vw, 1.65rem);
  }

  .home-lead {
    margin-top: 22px;
    font-size: 0.95rem;
    line-height: 1.95;
  }

  .home-section {
    padding: 22px;
    border-radius: 22px;
  }

  .home-ai-notice {
    padding: 18px;
    font-size: 0.82rem;
    line-height: 1.85;
  }

  .music-shelf {
    gap: 14px;
    padding-bottom: 14px;
  }

  .music-shelf-item {
    flex-basis: 120px;
  }

  .music-feature-player {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .music-feature-cover {
    width: 112px;
    height: 112px;
  }

  .music-archive-grid,
  .notes-grid--archive,
  .notes-grid--home {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .music-archive-meta h2 {
    font-size: 1rem;
  }

  .music-archive-link {
    font-size: 0.8rem;
  }

  .note-tile-label {
    left: 9px;
    right: 9px;
    bottom: 9px;
    padding: 10px;
  }

  .note-tile h3 {
    font-size: 0.88rem;
  }

  .note-tile time {
    font-size: 0.7rem;
  }

  .brand-logo {
    width: min(120px, 34vw);
  }

  .home-logo {
    width: min(70%, 364px);
  }

  .card-body,
  .archive-card--note .card-body {
    padding: 20px;
  }

  .archive-card--note::before {
    left: 14px;
  }

  .site-main {
    padding-bottom: 56px;
  }
}

/* The Midnight Castle. Public overrides are scoped so the admin remains neutral. */
:root {
  --bg-main: #0B0A0F;
  --bg-secondary: #121018;
  --bg-elevated: #191622;
  --text-main: #F1EEF4;
  --text-sub: #AAA4B2;
  --accent-purple: #8D72C7;
  --accent-purple-light: #B9A7DF;
  --accent-pink: #B86F91;
  --border-dark: #292431;
}
body.theme-midnight {
  --color-bg: var(--bg-main);
  --color-bg-soft: var(--bg-secondary);
  --color-surface: rgba(18, 16, 24, .92);
  --color-surface-soft: var(--bg-elevated);
  --color-surface-muted: var(--bg-elevated);
  --color-text: var(--text-main);
  --color-muted: var(--text-sub);
  --color-subtle: var(--text-sub);
  --color-accent: var(--accent-purple-light);
  --color-accent-strong: var(--text-main);
  --color-accent-soft: #231e30;
  --color-line: var(--border-dark);
  --color-line-strong: #494151;
  --shadow-soft: none;
  --page-overlay-opacity: .55;
  --page-background: none;
  --content-width: 1160px;
  background: var(--bg-main);
  color: var(--text-main);
  color-scheme: dark;
  overflow-wrap: anywhere;
}
body.theme-midnight.home-page::before { content: none; }
.theme-midnight.page-home { --page-background: url('../images/backgrounds/bg_top_desktop.webp'); --page-overlay-opacity: .40; }
.theme-midnight.page-music { --page-background: url('../images/backgrounds/bg_music_desktop.webp'); --page-overlay-opacity: .54; }
.theme-midnight.page-notes { --page-background: url('../images/backgrounds/bg_notes_desktop.webp'); --page-overlay-opacity: .57; }
.theme-midnight.page-about { --page-background: url('../images/backgrounds/bg_about_desktop.webp'); --page-overlay-opacity: .48; }
.theme-midnight.page-youtube { --page-background: url('../images/backgrounds/bg_youtube_desktop.webp'); --page-overlay-opacity: .52; }
.theme-midnight.page-contact { --page-background: url('../images/backgrounds/bg_contact_desktop.webp'); --page-overlay-opacity: .48; }
.page-background { position: fixed; inset: 0; pointer-events: none; z-index: 0; background: var(--page-background) center / cover no-repeat; }
.page-background::before { content: ''; position: absolute; inset: 0; background: rgba(7, 6, 11, var(--page-overlay-opacity)); }
.theme-midnight .site-shell { width: min(calc(100% - 64px), var(--content-width)); }
.theme-midnight .site-header { padding: 18px 24px; margin-top: 22px; background: rgba(8, 7, 12, .80); border: 1px solid #393340; border-radius: 4px; gap: 24px; }
@supports (backdrop-filter: blur(6px)) { .theme-midnight .site-header { backdrop-filter: blur(6px); } }
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-wordmark { font-family: var(--font-heading); font-size: 1.14rem; letter-spacing: .04em; }
.brand .brand-logo { width: 46px; height: auto; padding: 3px; background: #fff; border-radius: 3px; }
.theme-midnight .brand-note { font-size: .65rem; letter-spacing: .14em; margin: 4px 0 0 58px; }
.theme-midnight .site-nav { gap: 22px; flex-wrap: nowrap; }
.theme-midnight .site-nav a { min-height: 44px; display: flex; align-items: center; font-size: .84rem; letter-spacing: .05em; color: var(--text-sub); }
.theme-midnight .site-nav a:is(:hover, .is-active) { color: var(--accent-purple-light); border-color: var(--accent-purple); }
.theme-midnight .nav-toggle { color: var(--text-main); background: var(--bg-elevated); border-radius: 4px; min-height: 44px; }
.theme-midnight .site-main { min-height: 68vh; padding-top: 42px; padding-bottom: 80px; }
.theme-midnight.page-home .site-main { padding-top: 0; }
.theme-midnight .home-hero { min-height: 680px; min-height: 78svh; max-width: none; padding: 90px 28px 100px; margin: 0; }
.theme-midnight .home-kicker { color: var(--accent-purple-light); letter-spacing: .28em; font-size: .75rem; }
.theme-midnight .home-hero h1 { font-family: Georgia, 'Yu Mincho', serif; font-size: clamp(3.4rem, 6.4vw, 6rem); line-height: 1.08; letter-spacing: -.035em; font-weight: 400; text-shadow: 0 2px 20px rgba(0, 0, 0, .65); }
.hero-period { color: var(--accent-purple-light); }
.theme-midnight .home-lead { color: var(--text-main); font-size: .93rem; line-height: 2.1; text-shadow: 0 2px 10px #000; }
.theme-midnight .home-links { margin-top: 32px; gap: 28px; }
.theme-midnight .primary-button { background: #6c5397; border: 1px solid var(--accent-purple); color: #fff; border-radius: 3px; gap: 20px; min-height: 48px; padding: 10px 22px; }
.theme-midnight .primary-button:hover { background: #7c62aa; }
.theme-midnight .home-section { padding: 32px; margin-bottom: 42px; border: 1px solid var(--border-dark); border-radius: 5px; background: rgba(11, 10, 15, .91); }
.theme-midnight .section-heading { margin-bottom: 26px; gap: 16px; }
.theme-midnight .section-heading h2 { font-size: clamp(1.55rem, 2.7vw, 2rem); letter-spacing: .03em; }
.theme-midnight .eyebrow { color: var(--accent-purple-light); font-size: .7rem; letter-spacing: .18em; }
.theme-midnight .page-intro { padding: 42px 36px; border-radius: 4px; background: rgba(12, 10, 17, .86); border-color: var(--border-dark); margin-bottom: 32px; }
.theme-midnight .page-intro h1 { font-family: Georgia, 'Yu Mincho', serif; font-size: clamp(2.6rem, 5vw, 4.4rem); }
.theme-midnight .page-intro::after { display: none; }
.theme-midnight :is(.page-intro p, .detail-lead, .detail-summary, .card-body p, .reading-card p) { color: var(--text-sub); }
.theme-midnight :is(.page-intro .eyebrow) { color: var(--accent-purple-light); }
.content-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.content-card { min-width: 0; border: 1px solid var(--border-dark); border-radius: 4px; background: rgba(18, 16, 24, .96); overflow: hidden; transition: border-color 180ms ease; }
.content-card:hover, .content-card:focus-within { border-color: var(--accent-purple); }
.card-media { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg-elevated); border-bottom: 1px solid var(--border-dark); }
.card-media--music { aspect-ratio: 1; }
.card-media img { width: 100%; height: 100%; object-fit: contain; transition: filter 180ms ease; }
.content-card:hover .card-media img { filter: brightness(1.06); }
.content-card-body { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 20px; }
.content-card h3, .card-title { margin: 0; color: var(--text-main); font-family: var(--font-heading); font-weight: 500; font-size: 1.15rem; line-height: 1.6; transition: color 180ms ease; }
.content-card:hover :is(h3, .card-title) { color: var(--accent-purple-light); }
.content-card-body p { margin: 0; color: var(--text-sub); font-size: .86rem; line-height: 1.85; }
.card-date { color: var(--text-sub); font-size: .72rem; letter-spacing: .1em; }
.theme-midnight .tag { color: var(--text-sub); background: var(--bg-elevated); border: 1px solid #393241; padding: 3px 8px; font-size: .7rem; border-radius: 3px; }
.theme-midnight .text-link, .text-button { display: inline-flex; gap: 12px; align-items: center; min-height: 44px; font-size: .83rem; color: var(--accent-purple-light); }
.text-button { background: transparent; border: 0; padding: 0; text-align: left; }
.text-button[aria-pressed='true'] { text-decoration: underline; text-underline-offset: 6px; }
.theme-midnight .text-link:hover, .text-button:hover { color: var(--text-main); }
.video-card-link { display: block; height: 100%; }
.video-play-mark { position: absolute; right: 14px; bottom: 12px; display: grid; place-items: center; width: 40px; height: 32px; border: 1px solid #857c96; background: rgba(8, 7, 12, .85); color: #fff; border-radius: 4px; font-size: 1.35rem; }
.theme-midnight .empty-state { grid-column: 1 / -1; padding: 26px; background: rgba(18, 16, 24, .94); border: 1px solid var(--border-dark); }
.theme-midnight .music-feature-player { background: var(--bg-elevated); border: 1px solid var(--border-dark); border-radius: 4px; }
.theme-midnight .music-feature-description { color: var(--text-sub); }
.theme-midnight .detail-page { padding: 16px 0 40px; }
.theme-midnight .detail-panel { border-radius: 4px; background: rgba(12, 10, 17, .92); }
.theme-midnight .detail-hero { background: rgba(25, 22, 34, .75); }
.theme-midnight .detail-body { background: transparent; }
.theme-midnight .detail-hero h1 { font-size: clamp(2rem, 4.2vw, 3.8rem); line-height: 1.4; }
.theme-midnight .prose-block { color: var(--text-main); }
.theme-midnight .detail-section h2 { font-size: 1.2rem; }
.theme-midnight .detail-image-frame, .theme-midnight .detail-image { border-radius: 3px; }
.theme-midnight .compact-card:hover { transform: none; border-color: var(--accent-purple); }
.theme-midnight .home-ai-notice { background: rgba(12, 10, 17, .90); border-radius: 4px; }
.theme-midnight .site-footer { align-items: center; flex-wrap: wrap; padding: 30px 24px; background: rgba(8, 7, 12, .85); border: 1px solid var(--border-dark); margin-bottom: 24px; font-size: .76rem; }
.social-links { display: flex; gap: 6px; }
.social-links a { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; color: var(--text-sub); }
.social-links a:hover { color: var(--accent-purple-light); }
.social-links svg { width: 20px; height: 20px; }
.contact-panel { width: min(100%, 720px); margin: 40px auto 60px; padding: clamp(26px, 5vw, 60px); background: rgba(12, 10, 17, .86); border: 1px solid var(--border-dark); border-radius: 5px; }
.contact-panel h1 { margin: 0 0 28px; font: 400 clamp(2.8rem, 5vw, 4rem)/1.2 Georgia, serif; }
.contact-lead { color: var(--text-main); }
.contact-address { display: flex; flex-direction: column; gap: 12px; border-block: 1px solid #393241; padding: 24px 0; margin: 30px 0; overflow-wrap: anywhere; }
.contact-address span { color: var(--text-sub); font-size: .8rem; letter-spacing: .1em; }
.contact-address a { color: var(--accent-purple-light); text-decoration: underline; text-underline-offset: 5px; }
.contact-guidance { margin-top: 38px; color: var(--text-sub); font-size: .88rem; }
.contact-guidance h2 { color: var(--text-main); font-size: 1rem; font-weight: 500; }
.featured-video { margin-bottom: 26px; }
.featured-video-caption { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 12px 0; }
.featured-video-caption h3 { margin: 8px 0; font-size: 1.1rem; font-weight: 500; }
.youtube-player { width: 100%; min-height: 200px; aspect-ratio: 16 / 9; background: #08070c; }
.youtube-player iframe { display: block; width: 100%; height: 100%; min-height: 200px; border: 0; }
.video-dialog { width: min(960px, calc(100% - 32px)); max-height: calc(100dvh - 32px); padding: 24px; color: var(--text-main); background: var(--bg-secondary); border: 1px solid #494151; border-radius: 5px; overflow: auto; }
.video-dialog::backdrop { background: rgba(0, 0, 0, .84); }
.video-dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.video-dialog-header h2 { margin: 6px 0; font-size: 1.1rem; font-weight: 500; }
.dialog-close { flex-shrink: 0; min-height: 44px; padding: 8px 14px; border: 1px solid #494151; border-radius: 3px; background: var(--bg-elevated); color: var(--text-main); }
.video-dialog-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-top: 12px; }
.video-dialog-footer p { color: var(--text-sub); font-size: .8rem; }
body.modal-open { overflow: hidden; }
:focus-visible { outline: 2px solid #8D72C7; outline-offset: 4px; }
.theme-midnight :focus-visible { outline-color: var(--accent-purple-light); }
.skip-link { position: fixed; left: 16px; top: -100px; padding: 12px 20px; z-index: 100; background: #191622; color: #F1EEF4; }
.skip-link:focus { top: 12px; }
.home-checkbox { padding: 14px; border: 1px solid #c0b0db; background: #f3eff9; border-radius: 8px; }
.home-checkbox input, .form-field--checkbox input { width: 20px; height: 20px; flex-shrink: 0; }
.admin-theme .form-field input:is([type='url'], [type='number']) { width: 100%; border: 1px solid #ccc; border-radius: 14px; padding: 12px 14px; background: #fff; color: #2f2f2c; }
.admin-theme .form-field small { overflow-wrap: anywhere; }
@media (max-width: 1024px) {
  .theme-midnight .site-nav { gap: 14px; }
  .theme-midnight .brand-wordmark { font-size: 1rem; }
  .content-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  .theme-midnight.page-home { --page-background: url('../images/backgrounds/bg_top_mobile.webp'); --page-overlay-opacity: .48; }
  .theme-midnight.page-music { --page-background: url('../images/backgrounds/bg_music_mobile.webp'); }
  .theme-midnight.page-notes { --page-background: url('../images/backgrounds/bg_notes_mobile.webp'); }
  .theme-midnight.page-about { --page-background: url('../images/backgrounds/bg_about_mobile.webp'); }
  .theme-midnight.page-youtube { --page-background: url('../images/backgrounds/bg_youtube_mobile.webp'); }
  .theme-midnight.page-contact { --page-background: url('../images/backgrounds/bg_contact_mobile.webp'); }
  .theme-midnight .site-shell { width: calc(100% - 28px); }
  .theme-midnight .site-header { margin-top: 14px; padding: 14px; flex-wrap: wrap; align-items: center; gap: 12px; }
  .theme-midnight .brand-note { margin-left: 48px; font-size: .56rem; }
  .brand .brand-logo { width: 36px; }
  .theme-midnight .brand-wordmark { font-size: .95rem; }
  .theme-midnight .nav-toggle { display: inline-flex; }
  .theme-midnight .site-nav { display: none; width: 100%; flex-direction: column; align-items: stretch; gap: 2px; padding: 12px 0 0; border-top: 1px solid var(--border-dark); }
  .theme-midnight .site-nav.is-open { display: flex; }
  .theme-midnight .site-nav a { padding: 8px 12px; }
  .theme-midnight .site-main { padding-top: 28px; padding-bottom: 48px; }
  .theme-midnight .home-hero { min-height: 72svh; padding: 72px 14px 84px; }
  .theme-midnight .home-hero h1 { font-size: clamp(2.8rem, 10.5vw, 4.8rem); }
  .theme-midnight .home-lead { font-size: .85rem; line-height: 2.1; }
  .desktop-break { display: none; }
  .theme-midnight .home-links { gap: 14px; }
  .theme-midnight .home-section { padding: 22px 18px; margin-bottom: 28px; }
  .theme-midnight .page-intro { padding: 32px 24px; }
  .content-grid { gap: 18px; }
  .content-card-body { padding: 16px; }
  .theme-midnight .music-feature-player { padding: 16px; }
  .theme-midnight .site-footer { padding: 22px; gap: 8px; align-items: flex-start; }
  .contact-panel { margin-top: 18px; }
  .video-dialog { padding: 14px; width: calc(100% - 20px); }
  .video-dialog-header { gap: 10px; }
  .video-dialog-header h2 { font-size: .95rem; }
}
@media (max-width: 540px) {
  .content-grid { grid-template-columns: 1fr; }
  .theme-midnight .brand-note { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
