@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/Fraunces-VariableFont_SOFT,WONK,opsz,wght.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/Fraunces-Italic-VariableFont_SOFT,WONK,opsz,wght.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #fff;
  --surface: rgba(255, 255, 255, 0.86);
  --surface-strong: rgba(255, 255, 255, 0.94);
  --text: #1c1b18;
  --heading: #4a3c2b;
  --muted: #6f4d58;
  --accent: #8b6f47;
  --accent-strong: #6f4d58;
  --line: rgba(139, 111, 71, 0.26);
  --shadow: 0 14px 28px rgba(90, 46, 63, 0.12);
  --soft-pink: #fff4f8;
  --soft-blue: #f1fbff;
  --soft-green: #f3fbf6;
  --blob-1: rgba(255, 190, 215, 0.62);
  --blob-2: rgba(255, 170, 200, 0.68);
  --blob-3: rgba(255, 200, 230, 0.6);
  --blob-4: rgba(255, 180, 210, 0.68);
  --blob-5: rgba(255, 200, 225, 0.68);
  --blob-6: rgba(255, 185, 215, 0.6);
  --blob-7: rgba(255, 175, 205, 0.7);
  --blob-8: rgba(255, 205, 235, 0.62);
  --blob-9: rgba(255, 195, 220, 0.68);
  --page-pad-y: 40px;
  --page-pad-x: 24px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background:
    linear-gradient(135deg, var(--soft-pink), transparent 34%),
    linear-gradient(225deg, var(--soft-blue), transparent 36%),
    linear-gradient(0deg, #fff, var(--soft-green));
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: transparent;
  color: var(--text);
  font-family: "Fraunces", Georgia, serif;
}

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

button,
input {
  font: inherit;
}

.page-shell {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.hue-field {
  position: absolute;
  inset: 0 0 auto;
  z-index: 0;
  width: 100%;
  height: var(--hue-field-height, 100vh);
  min-height: 100vh;
  overflow: hidden;
  pointer-events: none;
  contain: layout paint;
}

.hue-blob {
  position: absolute;
  z-index: 0;
  border-radius: 50%;
  filter: blur(5px);
  opacity: 0.9;
  pointer-events: none;
  transform: translate3d(var(--drift-x, 0), var(--drift-y, 0), 0);
  will-change: transform;
}

.hue-blob.b1 {
  width: 520px;
  height: 520px;
  top: 12%;
  right: 50%;
  background: radial-gradient(circle, var(--blob-1), transparent 72%);
}

.hue-blob.b2 {
  width: 420px;
  height: 420px;
  top: 58%;
  left: 8%;
  background: radial-gradient(circle, var(--blob-2), transparent 70%);
}

.hue-blob.b3 {
  width: 460px;
  height: 460px;
  top: 30%;
  left: 55%;
  background: radial-gradient(circle, var(--blob-3), transparent 74%);
}

.hue-blob.b4 {
  width: 380px;
  height: 380px;
  top: 78%;
  right: 15%;
  background: radial-gradient(circle, var(--blob-4), transparent 68%);
}

.hue-blob.b5 {
  width: 300px;
  height: 300px;
  top: 5%;
  left: 18%;
  background: radial-gradient(circle, var(--blob-5), transparent 68%);
}

.hue-blob.b6 {
  width: 340px;
  height: 340px;
  top: 18%;
  right: 12%;
  background: radial-gradient(circle, var(--blob-6), transparent 70%);
}

.hue-blob.b7 {
  width: 420px;
  height: 420px;
  top: 46%;
  left: 20%;
  background: radial-gradient(circle, var(--blob-7), transparent 72%);
}

.hue-blob.b8 {
  width: 360px;
  height: 360px;
  top: 64%;
  left: 62%;
  background: radial-gradient(circle, var(--blob-8), transparent 70%);
}

.hue-blob.b9 {
  width: 300px;
  height: 300px;
  top: 88%;
  right: 25%;
  background: radial-gradient(circle, var(--blob-9), transparent 68%);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  background: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.brand {
  color: var(--heading);
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  font-weight: 740;
  letter-spacing: 0;
}

.menu-button {
  position: absolute;
  left: 22px;
  top: 50%;
  width: 42px;
  height: 42px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid rgba(139, 111, 71, 0.4);
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--heading);
  cursor: pointer;
  transform: translateY(-50%);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.menu-button:hover {
  transform: translateY(calc(-50% - 1px));
  box-shadow: 0 8px 18px rgba(90, 46, 63, 0.18);
}

.menu-button span {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 60;
  width: min(320px, 82vw);
  padding: 92px 22px 22px;
  background: rgba(255, 255, 255, 0.96);
  border-right: 1px solid var(--line);
  box-shadow: 18px 0 36px rgba(90, 46, 63, 0.16);
  transform: translateX(-105%);
  transition: transform 0.18s ease;
}

.menu-open .sidebar {
  transform: translateX(0);
}

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  background: rgba(74, 60, 43, 0.18);
}

.menu-open .sidebar-backdrop {
  display: block;
}

.sidebar-nav {
  display: grid;
  gap: 12px;
}

.sidebar-nav a {
  padding: 14px 16px;
  border: 1px solid rgba(139, 111, 71, 0.28);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--muted);
  font-size: 1.35rem;
  text-align: center;
}

.sidebar-nav a:hover,
.sidebar-nav a:focus {
  box-shadow: 0 8px 18px rgba(90, 46, 63, 0.14);
  text-decoration: underline;
}

.page,
.watch-page,
.content-page {
  position: relative;
  z-index: 1;
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: var(--page-pad-y) var(--page-pad-x) 24px;
  flex: 1;
}

.archive-intro {
  width: min(980px, 100%);
  margin: 0 auto 34px;
  text-align: center;
}

.archive-intro h1,
.content-page h1 {
  margin: 28px 0 0;
  color: var(--text);
  font-size: clamp(2.35rem, 6vw, 4rem);
  font-weight: 760;
  letter-spacing: 0;
}

.archive-intro p,
.content-page p {
  width: min(820px, 100%);
  margin: 14px auto 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  line-height: 1.5;
}

.video-actions {
  width: min(900px, 100%);
  margin: 16px auto 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.action-button {
  width: 100%;
  justify-self: stretch;
  display: inline-block;
  padding: 18px 0;
  border-radius: 999px;
  border: 1px solid rgba(139, 111, 71, 0.4);
  background: rgba(255, 255, 255, 0.85);
  color: #4a3c2b;
  font-family: "Fraunces", serif;
  cursor: pointer;
  font-size: 1.3rem;
  text-align: center;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.action-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(90, 46, 63, 0.18);
}

.action-button[aria-pressed="true"] {
  box-shadow: 0 10px 22px rgba(90, 46, 63, 0.2);
}

.action-button:active {
  transform: translateY(0);
  box-shadow: none;
}

.divider {
  width: 72px;
  height: 3px;
  margin: 12px auto 0;
  background: var(--accent);
  border-radius: 999px;
}

.search-panel {
  width: min(820px, 100%);
  margin: 0 auto;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.search-row input,
.date-row input {
  width: 100%;
  min-width: 0;
  height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(139, 111, 71, 0.32);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--heading);
  outline: none;
}

.search-row input:focus,
.date-row input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(139, 111, 71, 0.12);
}

.search-row button,
.ghost-button {
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid rgba(139, 111, 71, 0.4);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--heading);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.search-row button:hover,
.ghost-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(90, 46, 63, 0.18);
}

.date-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  gap: 10px;
  margin-top: 12px;
  align-items: end;
}

.date-row label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.95rem;
  text-align: left;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 32px 20px;
}

.video-tile {
  display: block;
  min-width: 0;
}

.thumbnail-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px;
  background: #efe7dd;
  box-shadow: var(--shadow);
}

.thumbnail {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.18s ease;
}

.video-tile:hover .thumbnail {
  transform: scale(1.025);
}

.duration {
  position: absolute;
  right: 8px;
  bottom: 8px;
  min-width: 44px;
  padding: 3px 6px;
  border-radius: 6px;
  background: rgba(74, 60, 43, 0.82);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  text-align: center;
}

.video-title {
  display: -webkit-box;
  margin: 11px 0 4px;
  overflow: hidden;
  color: var(--heading);
  font-size: 1.03rem;
  font-weight: 720;
  line-height: 1.32;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.video-date {
  color: var(--muted);
  font-size: 0.92rem;
}

.status {
  min-height: 28px;
  margin: 30px 0;
  color: var(--muted);
  text-align: center;
}

#sentinel {
  width: 100%;
  height: 1px;
}

.watch-page {
  max-width: 1180px;
}

.player-shell {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 16px;
  background: #050505;
  box-shadow: var(--shadow);
}

.player-shell video {
  width: 100%;
  height: 100%;
  display: block;
  background: #050505;
}

.watch-meta {
  max-width: 920px;
  padding: 20px 0 0;
}

.watch-meta h1 {
  margin: 0 0 8px;
  color: var(--heading);
  font-size: clamp(1.7rem, 3.2vw, 2.35rem);
  line-height: 1.25;
}

.watch-meta p {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
  white-space: pre-wrap;
}

.content-page {
  max-width: 900px;
  text-align: center;
}

.content-page pre {
  width: min(760px, 100%);
  margin: 22px auto 0;
  padding: 16px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--heading);
  text-align: left;
}

.api-docs,
.service-status {
  width: min(820px, 100%);
  margin: 28px auto 0;
  display: grid;
  gap: 14px;
  text-align: left;
}

.api-endpoint {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
}

.api-endpoint h2 {
  margin: 0;
  color: var(--heading);
  font-size: 1.25rem;
}

.api-endpoint p {
  margin: 12px 0 0;
  font-size: 1rem;
}

.api-endpoint pre {
  width: 100%;
  margin-top: 14px;
}

.api-endpoint ul {
  margin: 14px 0 0;
  padding-left: 22px;
  color: var(--muted);
  line-height: 1.5;
}

.service-row {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
}

.service-name {
  color: var(--heading);
  font-size: 1.1rem;
  font-weight: 720;
}

.service-state {
  min-width: 118px;
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--heading);
  background: rgba(255, 255, 255, 0.92);
  font-size: 0.95rem;
  text-align: center;
}

.service-state.is-ok {
  border: 1px solid rgba(63, 128, 89, 0.42);
  background: rgba(232, 249, 238, 0.92);
}

.service-state.is-error {
  border: 1px solid rgba(154, 75, 84, 0.42);
  background: rgba(255, 235, 238, 0.92);
}

.service-state.is-loading {
  border: 1px solid rgba(139, 111, 71, 0.3);
}

.checked-at {
  margin-top: 18px;
}

.site-footer {
  position: relative;
  z-index: 1;
  padding: 18px 24px 40px;
}

.sticker-row {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 80px;
  margin-top: 0;
}

.sticker-row img {
  width: clamp(110px, 18vw, 180px);
  height: auto;
  filter: drop-shadow(0 10px 18px rgba(90, 46, 63, 0.18));
  opacity: 0.95;
}

.sticker-left {
  transform: translateX(-20px);
}

.sticker-right {
  transform: translateX(20px);
}

.footer {
  margin-top: 28px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
  text-align: center;
}

.footer a,
.content-page a {
  color: inherit;
  text-decoration: none;
}

.footer a:hover,
.footer a:focus,
.content-page a:hover,
.content-page a:focus {
  text-decoration: underline;
}

@media (max-width: 720px) {
  :root {
    --page-pad-y: 24px;
    --page-pad-x: 16px;
  }

  .topbar {
    min-height: 58px;
    padding: 10px 16px;
  }

  .menu-button {
    left: 14px;
    width: 40px;
    height: 40px;
  }

  .brand {
    max-width: calc(100% - 100px);
    font-size: 1.2rem;
    text-align: center;
  }

  .search-panel {
    padding: 12px;
  }

  .search-row,
  .date-row,
  .video-actions {
    grid-template-columns: 1fr;
  }

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

  .service-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .sticker-row {
    gap: 48px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hue-blob {
    transform: none;
    will-change: auto;
  }
}
