:root {
  color-scheme: light;
  --bg: #f7f4ee;
  --ink: #1b1b1b;
  --accent: #12355b;
  --accent-2: #f25f5c;
  --card: #ffffff;
  --border: #e3dfd6;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Georgia", "Times New Roman", serif;
  background: var(--bg);
  color: var(--ink);
}

.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

header {
  margin-bottom: 2rem;
}

h1 {
  margin: 0 0 0.5rem;
  font-size: 2.4rem;
  color: var(--accent);
}

h2 {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
}

.subtle {
  color: #565046;
}

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

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card-link {
  color: inherit;
  text-decoration: none;
}

.card img {
  width: 100%;
  height: 340px;
  object-fit: cover;
}

.poster-placeholder {
  height: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #efe9dc;
  color: #7a7367;
}

.card-body {
  padding: 1rem;
}

.notice {
  padding: 0.9rem 1rem;
  border-radius: 10px;
  margin-bottom: 1rem;
  border: 1px solid var(--border);
}

.notice.success {
  background: #e5f4ea;
  border-color: #b8d9c2;
}

.notice.error {
  background: #fdecea;
  border-color: #f5c2bd;
}

.form {
  display: grid;
  gap: 0.75rem;
  max-width: 420px;
}

label {
  font-weight: 600;
}

input {
  padding: 0.6rem;
  border-radius: 8px;
  border: 1px solid var(--border);
}

button {
  padding: 0.7rem 1.1rem;
  border-radius: 999px;
  border: none;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

button:hover {
  background: var(--accent-2);
}

a {
  color: var(--accent);
}

.table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 2rem;
}

.table th,
.table td {
  text-align: left;
  padding: 0.6rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}

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

.actions form {
  margin: 0;
}

.link {
  background: none;
  color: var(--accent);
  padding: 0;
  border: none;
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
}

select,
textarea {
  padding: 0.6rem;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.media-row {
  display: grid;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}

.media-row.media-row-with-region {
  grid-template-columns: 2fr 1.4fr 2fr;
}

.media-row:not(.media-row-with-region) {
  grid-template-columns: 2fr 1fr 2fr;
}

.stack {
  display: grid;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}

.secondary {
  background: #f1ede6;
  color: var(--accent);
  border: 1px solid var(--border);
  margin-bottom: 1rem;
}

.subtitle-picker {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 0.6rem;
  align-items: center;
}

.subtitle-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.chip {
  border: 1px solid var(--border);
  background: #fff;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  cursor: pointer;
}

.hidden {
  display: none;
}

.page-wide {
  max-width: 1280px;
}

.detail-hero {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 280px 1fr;
  margin-bottom: 2rem;
}

.detail-poster img {
  width: 100%;
  border-radius: 12px;
}

.detail-section {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.5rem 1rem;
  margin-top: 1rem;
}

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

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

select,
textarea {
  width: 100%;
}
