:root {
  color-scheme: dark;
  --bg: #11100f;
  --bg-soft: #171513;
  --surface: #1c1917;
  --surface-raised: #24201d;
  --surface-hover: #2b2622;
  --line: rgba(255, 245, 235, 0.11);
  --line-strong: rgba(255, 245, 235, 0.2);
  --text: #f6f0e9;
  --muted: #aaa19a;
  --muted-light: #cec5bd;
  --accent: #e04f3e;
  --accent-soft: #ff7866;
  --accent-dark: #a92e22;
  --green: #64c69a;
  --warning: #e6aa5a;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --content: min(1460px, calc(100vw - 80px));
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
  --sans: "Pretendard Variable", Pretendard, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  --serif: Georgia, "Times New Roman", "Nanum Myeongjo", serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-color: #5b4b44 var(--bg);
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 78% 8%, rgba(143, 42, 31, 0.12), transparent 28rem),
    var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.5;
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
select {
  cursor: pointer;
}

button {
  border: 0;
}

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

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

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

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--text);
  color: var(--bg);
  font-weight: 800;
  transform: translateY(-150%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

:focus-visible {
  outline: 3px solid rgba(255, 120, 102, 0.92);
  outline-offset: 3px;
}

.site-header {
  position: relative;
  z-index: 10;
  display: flex;
  width: var(--content);
  min-height: 92px;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(255, 120, 102, 0.52);
  border-radius: 50%;
  background: rgba(224, 79, 62, 0.08);
}

.brand-mark::before,
.brand-mark::after,
.brand-mark span {
  position: absolute;
  width: 4px;
  border-radius: 999px;
  background: var(--accent);
  content: "";
  transform: rotate(19deg);
}

.brand-mark::before {
  height: 10px;
  transform: translate(-7px, 4px) rotate(19deg);
}

.brand-mark span {
  height: 19px;
}

.brand-mark::after {
  height: 10px;
  transform: translate(7px, -4px) rotate(19deg);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-copy strong {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand-copy small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.update-chip {
  display: inline-flex;
  min-height: 34px;
  padding: 0 12px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(23, 21, 19, 0.75);
  color: var(--muted-light);
  font-size: 12px;
  font-weight: 650;
  backdrop-filter: blur(10px);
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(100, 198, 154, 0.1);
}

.hero {
  position: relative;
  display: flex;
  width: var(--content);
  min-height: 620px;
  margin: 0 auto;
  padding: 96px 0 80px;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero::before,
.hero::after {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  content: "";
  filter: blur(1px);
  pointer-events: none;
}

.hero::before {
  top: 58px;
  left: 6%;
  width: 110px;
  height: 110px;
  border: 1px solid rgba(255, 255, 255, 0.035);
}

.hero::after {
  top: 92px;
  right: 7%;
  width: 240px;
  height: 240px;
  border: 1px solid rgba(224, 79, 62, 0.07);
}

.hero-glow {
  position: absolute;
  z-index: -2;
  top: -180px;
  left: 50%;
  width: min(1040px, 90vw);
  height: 590px;
  background: radial-gradient(ellipse, rgba(180, 50, 37, 0.17), rgba(17, 16, 15, 0) 68%);
  transform: translateX(-50%);
  pointer-events: none;
}

.eyebrow,
.section-kicker {
  margin: 0;
  color: var(--accent-soft);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
}

.eyebrow span {
  width: 18px;
  height: 1px;
  background: currentColor;
}

.hero h1 {
  margin: 24px 0 20px;
  font-size: clamp(48px, 6vw, 84px);
  font-weight: 800;
  letter-spacing: -0.065em;
  line-height: 1.05;
}

.hero h1 em {
  color: var(--accent-soft);
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.045em;
}

.hero-copy {
  margin: 0;
  color: var(--muted-light);
  font-size: clamp(15px, 1.5vw, 18px);
  line-height: 1.8;
}

.hero-search {
  position: relative;
  display: flex;
  width: min(820px, 100%);
  min-height: 72px;
  margin-top: 38px;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: rgba(31, 28, 26, 0.94);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.36), 0 0 0 1px rgba(255, 255, 255, 0.02) inset;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.hero-search:focus-within {
  border-color: rgba(255, 120, 102, 0.62);
  box-shadow: 0 20px 65px rgba(0, 0, 0, 0.42), 0 0 0 4px rgba(224, 79, 62, 0.08);
}

.search-icon {
  display: grid;
  width: 64px;
  height: 100%;
  flex: 0 0 auto;
  place-items: center;
  color: var(--muted);
}

.search-icon svg {
  width: 23px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.6;
}

.hero-search input {
  width: 100%;
  min-width: 0;
  height: 70px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 16px;
  letter-spacing: -0.02em;
}

.hero-search input::placeholder {
  color: #8b827c;
  opacity: 1;
}

.hero-search input::-webkit-search-cancel-button {
  display: none;
}

.search-clear,
.dialog-close {
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  transition: background 150ms ease, color 150ms ease;
}

.search-clear {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
}

.search-clear:hover,
.dialog-close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.search-clear svg,
.dialog-close svg {
  width: 18px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.8;
}

.search-submit {
  min-width: 88px;
  height: 52px;
  margin: 0 9px 0 8px;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  transition: background 150ms ease, transform 150ms ease;
}

.search-submit:hover {
  background: var(--accent-soft);
  transform: translateY(-1px);
}

.search-hint {
  margin: 13px 0 0;
  color: #938983;
  font-size: 12px;
}

.search-hint span {
  margin-right: 4px;
  color: var(--accent-soft);
}

.catalog-stats {
  display: flex;
  margin: 48px 0 0;
  gap: 0;
}

.catalog-stats div {
  display: flex;
  min-width: 118px;
  padding: 0 28px;
  flex-direction: column;
  border-left: 1px solid var(--line);
}

.catalog-stats div:first-child {
  border-left: 0;
}

.catalog-stats dt {
  order: 2;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.catalog-stats dd {
  margin: 0;
  font-family: var(--serif);
  font-size: 24px;
  font-variant-numeric: tabular-nums;
}

.catalog-section {
  width: var(--content);
  margin: 0 auto;
  padding: 72px 0 110px;
  border-top: 1px solid var(--line);
}

.catalog-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.catalog-heading h2 {
  margin: 9px 0 0;
  font-size: clamp(30px, 4vw, 48px);
  letter-spacing: -0.055em;
  line-height: 1.1;
}

.filter-toggle {
  display: none;
  min-height: 42px;
  padding: 0 14px;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  font-size: 13px;
  font-weight: 700;
}

.filter-toggle svg {
  width: 17px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.7;
}

.filter-toggle span {
  display: grid;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  place-items: center;
  border-radius: 999px;
  background: var(--accent);
  font-size: 10px;
}

.filter-bar {
  display: grid;
  margin-top: 30px;
  padding: 18px;
  grid-template-columns: minmax(140px, 0.8fr) minmax(170px, 1fr) minmax(150px, 0.9fr) minmax(170px, 1fr) auto;
  align-items: end;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(27, 24, 22, 0.75);
}

.select-field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 6px;
}

.select-field > span {
  padding-left: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.05em;
}

.select-field select {
  width: 100%;
  height: 46px;
  padding: 0 38px 0 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  background-color: #211e1b;
  background-image:
    linear-gradient(45deg, transparent 50%, #938982 50%),
    linear-gradient(135deg, #938982 50%, transparent 50%);
  background-position: calc(100% - 16px) 20px, calc(100% - 11px) 20px;
  background-repeat: no-repeat;
  background-size: 5px 5px, 5px 5px;
  color: var(--muted-light);
  font-size: 13px;
  font-weight: 650;
  appearance: none;
}

.select-field select:focus {
  border-color: rgba(255, 120, 102, 0.66);
}

.filter-reset {
  height: 46px;
  padding: 0 16px;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  transition: color 150ms ease, background 150ms ease;
}

.filter-reset:hover {
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
}

.results-toolbar {
  display: flex;
  min-height: 65px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.results-toolbar p {
  margin: 0;
  color: var(--muted-light);
  font-size: 13px;
}

#result-summary strong {
  color: var(--text);
  font-weight: 800;
}

.results-toolbar .match-note {
  color: var(--accent-soft);
  font-size: 11px;
}

.title-grid,
.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 32px 16px;
}

.title-card {
  min-width: 0;
}

.card-action {
  display: block;
  width: 100%;
  padding: 0;
  background: transparent;
  text-align: left;
}

.poster-wrap,
.skeleton-card::before {
  aspect-ratio: 2 / 3;
  border-radius: var(--radius);
}

.poster-wrap {
  display: block;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(145deg, #29231f, #181615);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  isolation: isolate;
  transform: translateZ(0);
}

.poster-wrap::after {
  position: absolute;
  z-index: 2;
  inset: 0;
  background: linear-gradient(to top, rgba(8, 7, 6, 0.78), transparent 38%);
  content: "";
  opacity: 0.25;
  transition: opacity 220ms ease;
}

.poster-wrap img {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 350ms cubic-bezier(0.2, 0.7, 0.2, 1), opacity 180ms ease;
}

.poster-wrap img[data-loading="true"] {
  opacity: 0;
}

.poster-fallback {
  position: absolute;
  z-index: 0;
  inset: 0;
  display: flex;
  padding: 20px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: #8d8179;
  text-align: center;
}

.poster-fallback span:first-child {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  border: 1px solid #584b45;
  border-radius: 50%;
  color: var(--accent-soft);
  font-family: var(--serif);
  font-size: 24px;
}

.poster-fallback span:last-child {
  display: -webkit-box;
  overflow: hidden;
  font-size: 11px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-badge {
  position: absolute;
  z-index: 3;
  top: 10px;
  left: 10px;
  min-height: 24px;
  padding: 4px 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 7px;
  background: rgba(13, 12, 11, 0.76);
  color: #e8dfd7;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  backdrop-filter: blur(8px);
}

.card-arrow {
  position: absolute;
  z-index: 3;
  right: 11px;
  bottom: 11px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  font-size: 17px;
  opacity: 0;
  transform: translateY(7px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.card-action:hover .poster-wrap::after,
.card-action:focus-visible .poster-wrap::after {
  opacity: 1;
}

.card-action:hover .poster-wrap img,
.card-action:focus-visible .poster-wrap img {
  transform: scale(1.045);
}

.card-action:hover .card-arrow,
.card-action:focus-visible .card-arrow {
  opacity: 1;
  transform: translateY(0);
}

.card-action:focus-visible {
  border-radius: var(--radius);
  outline-offset: 5px;
}

.card-info {
  display: block;
  padding: 12px 3px 0;
}

.card-title {
  display: -webkit-box;
  min-height: 1.5em;
  margin: 0;
  overflow: hidden;
  color: #eee7e0;
  font-size: 14px;
  font-weight: 760;
  letter-spacing: -0.025em;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.card-meta {
  display: flex;
  margin-top: 6px;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
}

.meta-dot {
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: #726760;
}

.rating {
  color: #e7b66d;
}

.skeleton-grid[hidden] {
  display: none;
}

.skeleton-card::before {
  display: block;
  background: linear-gradient(100deg, #1d1a18 10%, #2a2522 25%, #1d1a18 40%);
  background-size: 200% 100%;
  content: "";
  animation: skeleton 1.4s ease-in-out infinite;
}

.skeleton-card::after {
  display: block;
  width: 70%;
  height: 14px;
  margin: 13px 3px 0;
  border-radius: 5px;
  background: #201c1a;
  content: "";
}

@keyframes skeleton {
  to { background-position-x: -200%; }
}

.state-panel {
  display: flex;
  min-height: 330px;
  padding: 50px 24px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  background: rgba(28, 25, 23, 0.55);
  text-align: center;
}

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

.state-symbol {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--accent-soft);
  font-family: var(--serif);
  font-size: 25px;
}

.state-panel h3 {
  margin: 19px 0 7px;
  font-size: 20px;
  letter-spacing: -0.04em;
}

.state-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.state-panel button {
  min-height: 42px;
  margin-top: 20px;
  padding: 0 18px;
  border-radius: 9px;
  background: var(--text);
  color: var(--bg);
  font-size: 12px;
  font-weight: 800;
}

.pagination {
  display: flex;
  margin-top: 58px;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.pagination[hidden] {
  display: none;
}

.page-button,
.page-ellipsis {
  display: grid;
  min-width: 40px;
  height: 40px;
  padding: 0 10px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--muted-light);
  font-size: 12px;
  font-weight: 700;
}

.page-button:hover:not(:disabled) {
  border-color: var(--line-strong);
  background: var(--surface-hover);
  color: var(--text);
}

.page-button[aria-current="page"] {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
}

.page-button:disabled {
  cursor: default;
  opacity: 0.35;
}

.page-ellipsis {
  border-color: transparent;
  background: transparent;
}

.site-footer {
  display: grid;
  width: var(--content);
  min-height: 190px;
  margin: 0 auto;
  padding: 44px 0;
  grid-template-columns: 1fr 1.7fr 1fr;
  align-items: start;
  gap: 36px;
  border-top: 1px solid var(--line);
}

.brand-mark--small {
  width: 27px;
  height: 27px;
}

.brand-mark--small::before,
.brand-mark--small::after,
.brand-mark--small span {
  width: 3px;
}

.brand-mark--small::before,
.brand-mark--small::after {
  height: 8px;
}

.brand-mark--small span {
  height: 15px;
}

.brand-mark--small::before { transform: translate(-5px, 3px) rotate(19deg); }
.brand-mark--small::after { transform: translate(5px, -3px) rotate(19deg); }

.footer-brand strong {
  font-size: 14px;
}

.footer-notices p,
.footer-note {
  margin: 0;
  color: #857c76;
  font-size: 10px;
  line-height: 1.65;
}

.footer-notices p + p {
  margin-top: 4px;
}

.tmdb-credit {
  display: inline-flex;
  margin-bottom: 10px;
  opacity: 0.72;
  transition: opacity 160ms ease;
}

.tmdb-credit:hover,
.tmdb-credit:focus-visible {
  opacity: 1;
}

.tmdb-credit img {
  display: block;
  width: 72px;
  height: auto;
}

.footer-note {
  text-align: right;
}

.detail-dialog {
  width: min(980px, calc(100vw - 40px));
  max-width: none;
  max-height: min(820px, calc(100vh - 40px));
  padding: 0;
  overflow: hidden auto;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 22px;
  background: #171513;
  color: var(--text);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.7);
}

.detail-dialog::backdrop {
  background: rgba(6, 5, 5, 0.78);
  backdrop-filter: blur(9px);
}

.dialog-shell {
  position: relative;
}

.dialog-close {
  position: sticky;
  z-index: 10;
  top: 16px;
  float: right;
  width: 42px;
  height: 42px;
  margin: 16px 16px -58px 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(15, 13, 12, 0.78);
  color: white;
  backdrop-filter: blur(10px);
}

.detail-hero {
  position: relative;
  min-height: 390px;
  overflow: hidden;
  border-radius: 21px 21px 0 0;
  background: #231f1c;
}

.detail-backdrop,
.detail-backdrop-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.detail-backdrop {
  object-fit: cover;
}

.detail-backdrop-shade {
  background:
    linear-gradient(90deg, rgba(18, 16, 14, 0.95) 0%, rgba(18, 16, 14, 0.64) 48%, rgba(18, 16, 14, 0.22)),
    linear-gradient(0deg, #171513 0%, transparent 43%);
}

.detail-hero-copy {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: 390px;
  max-width: 690px;
  padding: 62px 62px 52px;
  flex-direction: column;
  justify-content: end;
}

.detail-type {
  align-self: flex-start;
  margin: 0 0 13px;
  padding: 5px 8px;
  border: 1px solid rgba(255, 120, 102, 0.4);
  border-radius: 6px;
  background: rgba(224, 79, 62, 0.11);
  color: var(--accent-soft);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.detail-hero h2 {
  margin: 0;
  font-size: clamp(34px, 5vw, 56px);
  letter-spacing: -0.06em;
  line-height: 1.1;
}

.detail-original {
  margin: 9px 0 0;
  color: rgba(238, 231, 224, 0.62);
  font-size: 12px;
}

.detail-tagline {
  margin: 19px 0 0;
  color: #ddd3ca;
  font-family: var(--serif);
  font-size: 17px;
  font-style: italic;
}

.detail-meta {
  display: flex;
  margin: 18px 0 0;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: #c8beb5;
  font-size: 12px;
}

.detail-meta .rating {
  padding: 3px 7px;
  border-radius: 5px;
  background: rgba(231, 182, 109, 0.1);
}

.detail-body {
  display: grid;
  padding: 22px 62px 64px;
  grid-template-columns: minmax(0, 1.6fr) minmax(210px, 0.7fr);
  gap: 54px;
}

.detail-overview {
  margin: 0;
  color: #d2c9c1;
  font-size: 14px;
  line-height: 1.85;
}

.chip-list {
  display: flex;
  margin-top: 24px;
  flex-wrap: wrap;
  gap: 7px;
}

.chip {
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted-light);
  font-size: 10px;
}

.detail-block + .detail-block {
  margin-top: 22px;
}

.detail-block h3 {
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.detail-block p,
.detail-block ul {
  margin: 0;
  padding: 0;
  color: #dbd2ca;
  font-size: 12px;
  line-height: 1.7;
  list-style: none;
}

.detail-block li + li {
  margin-top: 4px;
}

.cast-character {
  display: block;
  color: #817871;
  font-size: 10px;
}

.watch-link {
  display: inline-flex;
  min-height: 45px;
  margin-top: 27px;
  padding: 0 17px;
  align-items: center;
  gap: 9px;
  border-radius: 10px;
  background: var(--accent);
  color: white;
  font-size: 12px;
  font-weight: 800;
  transition: background 150ms ease, transform 150ms ease;
}

.watch-link:hover {
  background: var(--accent-soft);
  transform: translateY(-1px);
}

.watch-link span {
  font-size: 16px;
}

.detail-loading {
  min-height: 500px;
  background: linear-gradient(100deg, #171513 10%, #24201d 25%, #171513 40%);
  background-size: 200% 100%;
  animation: skeleton 1.4s ease-in-out infinite;
}

.detail-error {
  display: flex;
  min-height: 430px;
  padding: 50px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.detail-error h2 {
  margin: 0 0 8px;
  font-size: 21px;
}

.detail-error p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.toast {
  position: fixed;
  z-index: 100;
  right: 22px;
  bottom: 22px;
  max-width: min(380px, calc(100vw - 44px));
  padding: 12px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #2b2724;
  color: var(--text);
  box-shadow: var(--shadow);
  font-size: 12px;
}

.toast[hidden] {
  display: none;
}

/* Private operations page */
.admin-body {
  min-height: 100vh;
  background: #11100f;
}

.admin-shell {
  width: min(1120px, calc(100vw - 48px));
  margin: 0 auto;
  padding: 42px 0 80px;
}

.admin-header {
  display: flex;
  padding-bottom: 26px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
}

.admin-kicker {
  margin: 0 0 7px;
  color: var(--accent-soft);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.admin-header h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.05em;
}

.admin-layout {
  display: grid;
  margin-top: 28px;
  grid-template-columns: 320px minmax(0, 1fr);
  align-items: start;
  gap: 20px;
}

.admin-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.admin-card h2 {
  margin: 0 0 16px;
  font-size: 15px;
  letter-spacing: -0.03em;
}

.admin-card p {
  color: var(--muted);
  font-size: 12px;
}

.admin-label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: var(--muted-light);
  font-size: 11px;
  font-weight: 700;
}

.admin-input {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  outline: 0;
  background: #141210;
  color: var(--text);
  font: 12px Consolas, monospace;
}

.admin-input:focus {
  border-color: var(--accent-soft);
}

.admin-actions {
  display: flex;
  margin-top: 12px;
  gap: 8px;
}

.admin-button {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.admin-button--ghost {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted-light);
}

.admin-button:disabled {
  cursor: wait;
  opacity: 0.5;
}

.admin-status-list {
  display: grid;
  margin: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.admin-status-list div {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #181513;
}

.admin-status-list dt {
  color: var(--muted);
  font-size: 10px;
}

.admin-status-list dd {
  margin: 6px 0 0;
  font-size: 15px;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.admin-section-head {
  display: flex;
  margin-bottom: 14px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-section-head h2 {
  margin: 0;
}

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

.run-item {
  display: grid;
  padding: 13px 0;
  grid-template-columns: 1fr auto;
  gap: 6px 16px;
  border-top: 1px solid var(--line);
}

.run-item:first-child {
  border-top: 0;
}

.run-title {
  font-size: 12px;
  font-weight: 700;
}

.run-time,
.run-detail {
  color: var(--muted);
  font-size: 10px;
}

.run-detail {
  grid-column: 1 / -1;
}

.status-pill {
  align-self: start;
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(100, 198, 154, 0.1);
  color: var(--green);
  font-size: 9px;
  font-weight: 800;
}

.status-pill[data-status="failed"],
.status-pill[data-status="error"] {
  background: rgba(224, 79, 62, 0.1);
  color: var(--accent-soft);
}

.status-pill[data-status="running"],
.status-pill[data-status="initializing"],
.status-pill[data-status="enriching"],
.status-pill[data-status="queued"] {
  background: rgba(230, 170, 90, 0.1);
  color: var(--warning);
}

.admin-message {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.admin-message[data-tone="error"] { color: var(--accent-soft); }
.admin-message[data-tone="success"] { color: var(--green); }

@media (max-width: 1180px) {
  :root { --content: min(100% - 56px, 1200px); }
  .title-grid, .skeleton-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (max-width: 940px) {
  .title-grid, .skeleton-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .filter-bar { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .filter-reset { grid-column: 1 / -1; }
  .site-footer { grid-template-columns: 1fr 2fr; }
  .footer-note { grid-column: 1 / -1; text-align: left; }
  .admin-layout { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  :root { --content: calc(100vw - 34px); }
  .site-header { min-height: 76px; }
  .brand-copy small { display: none; }
  .update-chip { max-width: 50%; padding: 0 10px; overflow: hidden; }
  #update-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .hero { min-height: auto; padding: 72px 0 67px; }
  .hero h1 { margin-top: 20px; }
  .hero-copy { line-height: 1.7; }
  .desktop-only { display: none; }
  .hero-search { min-height: 62px; margin-top: 30px; border-radius: 14px; }
  .search-icon { width: 51px; }
  .hero-search input { height: 60px; font-size: 14px; }
  .search-submit { min-width: 64px; height: 44px; margin-right: 8px; }
  .search-hint { max-width: 440px; line-height: 1.6; }
  .catalog-stats { margin-top: 38px; }
  .catalog-stats div { min-width: 92px; padding: 0 17px; }
  .catalog-stats dd { font-size: 21px; }
  .catalog-section { padding: 55px 0 82px; }
  .filter-toggle { display: inline-flex; }
  .filter-bar { display: none; padding: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-bar[data-open="true"] { display: grid; }
  .filter-reset { grid-column: 1 / -1; }
  .title-grid, .skeleton-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 27px 12px; }
  .poster-wrap, .skeleton-card::before { border-radius: 12px; }
  .site-footer { grid-template-columns: 1fr; gap: 25px; }
  .detail-dialog { width: calc(100vw - 22px); max-height: calc(100vh - 22px); border-radius: 18px; }
  .detail-hero { min-height: 350px; }
  .detail-hero-copy { min-height: 350px; padding: 56px 28px 35px; }
  .detail-body { padding: 14px 28px 45px; grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 500px) {
  :root { --content: calc(100vw - 26px); }
  .brand-mark { width: 30px; height: 30px; }
  .brand-copy strong { font-size: 15px; }
  .update-chip { border-color: transparent; background: transparent; font-size: 10px; }
  .hero { padding-top: 58px; }
  .hero h1 { font-size: 43px; }
  .hero-copy { font-size: 14px; }
  .search-icon { width: 44px; }
  .search-icon svg { width: 20px; }
  .hero-search input { font-size: 13px; }
  .search-submit { min-width: 58px; padding: 0 10px; font-size: 12px; }
  .search-clear { width: 30px; }
  .search-hint { padding: 0 8px; font-size: 10px; }
  .catalog-stats div { min-width: 82px; padding: 0 13px; }
  .catalog-heading h2 { font-size: 29px; }
  .filter-bar { grid-template-columns: 1fr; }
  .filter-reset { grid-column: auto; }
  .results-toolbar { min-height: 58px; align-items: start; flex-direction: column; justify-content: center; gap: 3px; }
  .title-grid, .skeleton-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 11px; }
  .card-title { font-size: 13px; }
  .card-arrow { opacity: 1; transform: none; }
  .pagination { flex-wrap: wrap; }
  .page-button, .page-ellipsis { min-width: 36px; height: 36px; }
  .detail-hero { min-height: 330px; }
  .detail-hero-copy { min-height: 330px; padding: 52px 21px 30px; }
  .detail-hero h2 { font-size: 32px; }
  .detail-body { padding: 10px 21px 36px; }
  .admin-shell { width: calc(100vw - 28px); }
  .admin-header { align-items: start; flex-direction: column; }
  .admin-status-list { grid-template-columns: 1fr; }
}

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