:root {
  --bg: #f2f4f7;
  --card: #ffffff;
  --ink: #101828;
  --muted: #667085;
  --line: #eaecf0;
  --line-strong: #d0d5dd;
  --soft: #f9fafb;
  --brand: #3538cd;
  --brand-strong: #2d31a6;
  --brand-soft: #eef4ff;
  --green: #067647;
  --green-soft: #ecfdf3;
  --shadow: 0 12px 32px rgba(16, 24, 40, .08);
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Pretendard, "Malgun Gothic", sans-serif;
  font-size: 14px;
  line-height: 1.45;
}
body:has(.app) { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }

.app {
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr);
  height: calc(100vh - 32px);
  margin: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.side {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-right: 1px solid var(--line);
  padding: 20px 16px 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px 18px;
  font-size: 16px;
  font-weight: 700;
}
.logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #101828;
  color: #fff;
  display: grid;
  place-items: center;
}
.logo svg { width: 18px; height: 18px; }
.nav, .side-foot { display: flex; flex-direction: column; gap: 2px; }
.nav { flex: 1; min-height: 0; overflow: auto; }
.nav button.nav-toggle {
  width: 100%;
  justify-content: flex-start;
  height: auto;
  min-height: 40px;
  padding: 8px 12px;
  border: 0;
  background: transparent;
  color: #344054;
  border-radius: 8px;
}
.nav button.nav-toggle:hover { background: var(--soft); }
.nav button.nav-toggle.is-active { background: var(--brand-soft); color: var(--brand); }
.nav button.nav-toggle::after {
  content: "";
  margin-left: auto;
  border: 4px solid transparent;
  border-left: 5px solid currentColor;
}
.nav button.nav-toggle[aria-expanded="true"]::after {
  border-left-color: transparent;
  border-top: 5px solid currentColor;
  margin-top: 4px;
}
.sub-label {
  margin: 8px 0 2px;
  padding: 0 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.subnav { display: grid; gap: 2px; margin: 0 0 8px 16px; }
.nav .subnav[hidden] { display: none !important; }
td.links { white-space: nowrap; }
td.links a + a { margin-left: 10px; }
.nav .subnav a.deep { padding-left: 22px; }
.nav .subnav a {
  min-height: 32px;
  padding: 4px 10px;
  font-size: 13px;
  font-weight: 500;
}
.side-foot { margin-top: auto; padding-top: 12px; }
.nav a, .side-foot > a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 8px;
  color: #344054;
  font-weight: 600;
}
.nav a:hover, .side-foot > a:hover { background: var(--soft); }
.nav a.is-active, .side-foot > a.is-active { background: var(--brand-soft); color: var(--brand); }
.user {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 12px 8px 4px;
  border-top: 1px solid var(--line);
}
.build-meta {
  margin: 4px 8px 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}
.build-meta span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #f2f4f7;
  border: 1px solid var(--line);
  font-weight: 700;
}
.user-meta { display: grid; min-width: 0; }
.user-meta strong, .who strong { font-size: 14px; }
.user-meta span, .sub, .muted { color: var(--muted); font-size: 13px; }
.user-meta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.content { min-width: 0; min-height: 0; overflow: auto; padding: 28px 32px 40px; background: #fff; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
h1 { margin: 0; font-size: 24px; letter-spacing: -0.02em; }
.sub { margin: 4px 0 0; }
.page-actions, .actions { display: flex; gap: 8px; align-items: center; }
.btn, button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid var(--brand);
  background: var(--brand);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}
.btn:hover, button:hover { background: var(--brand-strong); }
.btn.ghost, button.ghost {
  background: #fff;
  color: #344054;
  border-color: var(--line-strong);
}
.btn.ghost:hover, button.ghost:hover { background: var(--soft); }
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 20px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.tabs + .stats,
.tabs + .filters,
.tabs + .panel,
.tabs + .cap-note,
.tabs + .alert,
.tabs + .confirm-panel { margin-top: 0; }
.tabs a {
  position: relative;
  padding: 8px 2px 12px;
  color: var(--muted);
  font-weight: 600;
}
.tabs-private {
  margin-left: auto;
  display: flex;
  gap: 2px 12px;
  align-items: flex-end;
}
.tabs a.quiet {
  color: #b0b7c3;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
}
.tabs a.quiet:hover { color: #667085; }
.tabs a.quiet.on { color: #667085; }
.tabs a.quiet.on:after { height: 1px; background: #d0d5dd; }
.tabs a.on { color: var(--brand); }
.tabs a.on:after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--brand);
}
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 24px;
}
.stat {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}
.stat header { display: flex; justify-content: space-between; color: #344054; font-weight: 600; }
.stat strong { display: block; margin-top: 12px; font-size: 30px; letter-spacing: -0.03em; line-height: 1.2; }
.stat p { margin: 8px 0 0; color: var(--muted); }
.toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 20px 0 16px;
}
.chip {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: #344054;
  font-weight: 600;
  font-size: 13px;
}
.search { margin-left: auto; position: relative; width: min(320px, 100%); }
.search input {
  width: 100%;
  height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 0 12px 0 36px;
  background: #fff;
  outline: none;
}
.search input:focus, .form input:focus, .form select:focus, .form textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 4px #eef4ff; }
.search svg { position: absolute; left: 10px; top: 10px; color: #98a2b3; }

.table-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.table-card.scroll { overflow-x: auto; }
.table-card.scroll table { width: max-content; min-width: 100%; }
.table-card.scroll th,
.table-card.scroll td { white-space: nowrap; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px 16px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--line); }
th {
  background: var(--soft);
  color: #475467;
  font-size: 12px;
  font-weight: 600;
}
tr:last-child td { border-bottom: 0; }
tr.total td { font-weight: 700; background: var(--soft); }
th.cell-muted, td.cell-muted { background: #fcfcfd; color: #98a2b3; }
tr.total td.cell-muted { background: #f8f9fb; color: #98a2b3; }
tbody tr:hover td.cell-muted { background: #f8f9fb; }
tbody tr:hover { background: #fcfcfd; }
.who { display: flex; align-items: center; gap: 12px; }
.mark {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 700;
}
.who small, .stack small { display: block; color: var(--muted); font-weight: 400; }
.stack strong { display: block; }
a.drill { color: var(--brand); }
a.drill:hover { text-decoration: underline; }
.money { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.clip { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
td.rich, td.note { white-space: normal; line-height: 1.55; vertical-align: top; }
td.rich { min-width: 160px; max-width: 320px; }
td.memo-hover { max-width: 160px; cursor: default; }
td.memo-hover .memo-bit {
  display: block;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
td.memo-hover .memo-full { display: none; }
#cursor-tip {
  position: fixed;
  z-index: 80;
  max-width: min(420px, calc(100vw - 24px));
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.55;
  box-shadow: 0 12px 28px rgba(16, 24, 40, .16);
  pointer-events: none;
}
#cursor-tip[hidden] { display: none !important; }
tr.tone-ask td { background: #f5f8ff; }
tr.tone-issued td { background: #eef2ff; }
tr.tone-ok td { background: #f3fbf6; }
tr.tone-paid td { background: #f2f4f7; }
tr.tone-done td { background: #e4e7ec; }
tr.tone-late td { background: #fef3f2; }
tr.tone-ask td:first-child { box-shadow: inset 3px 0 0 #c7d7fe; }
tr.tone-issued td:first-child { box-shadow: inset 3px 0 0 #3538cd; }
tr.tone-ok td:first-child { box-shadow: inset 3px 0 0 #067647; }
tr.tone-paid td:first-child { box-shadow: inset 3px 0 0 #d0d5dd; }
tr.tone-done td:first-child { box-shadow: inset 3px 0 0 #98a2b3; }
tr.tone-late td:first-child { box-shadow: inset 3px 0 0 #d92d20; }
.pill {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 12px;
  font-weight: 600;
}
.pill.gray { background: #f2f4f7; color: #344054; }
.bar { width: 120px; height: 8px; border-radius: 999px; background: #f2f4f7; overflow: hidden; }
.bar span { display: block; height: 100%; background: #444ce7; border-radius: inherit; }
.table-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
}
.pager { display: flex; gap: 6px; align-items: center; }
.pager a, .pager span {
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #344054;
  font-weight: 600;
}
.pager span { background: var(--soft); }
.alert {
  margin: 16px 0 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fff6ed;
  color: #b54708;
  border: 1px solid #f9dbaf;
}
.empty { padding: 48px 16px; text-align: center; color: var(--muted); }
.detail { margin-top: 20px; }
.note { padding: 24px 20px !important; line-height: 1.7; background: #fff; }
.note-form { display: grid; gap: 10px; padding: 16px 20px 20px; }
.note-form textarea {
  width: 100%;
  min-height: 88px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 10px 12px;
  resize: vertical;
  font: inherit;
}
.note-form .actions { justify-content: flex-end; }
.table-bar .actions { margin-top: 0; }
.table-bar form, td.comment-actions form { margin: 0; }
td.comment-actions { width: 1%; white-space: nowrap; vertical-align: top; }
td.comment-actions .actions { justify-content: flex-end; margin-top: 0; }
.comment-edit { display: grid; gap: 10px; }
.comment-edit textarea {
  width: 100%;
  min-height: 88px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 10px 12px;
  resize: vertical;
  font: inherit;
}
.form {
  display: grid;
  gap: 16px;
  max-width: 920px;
  margin-top: 20px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.form-line { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-line > label:has(input[type="checkbox"]) { align-content: end; padding-bottom: 10px; }
.pick-list {
  display: grid;
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: auto;
  max-height: 240px;
  background: #fff;
}
.pick-list button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
  height: auto;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  color: #344054;
  font-weight: 500;
  text-align: left;
}
.pick-list button:last-child { border-bottom: 0; }
.pick-list button:hover { background: var(--soft); }
.pick-list .pick-main { font-weight: 600; line-height: 1.35; }
.pick-list .pick-meta,
.pick-list em {
  color: var(--muted);
  font-style: normal;
  font-weight: 600;
  font-size: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.01em;
  word-break: break-all;
}
.pick-empty {
  margin: 0;
  padding: 12px;
  color: var(--muted);
  font-size: 13px;
}
.code-row { display: flex; gap: 8px; align-items: center; }
.code-row input { flex: 1; min-width: 0; }
.code-row .btn { flex: none; white-space: nowrap; }
.form-head { margin: 8px 0 0; font-size: 16px; }
.form label { display: grid; gap: 6px; font-weight: 600; color: #344054; }
.form input, .form select, .form textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
  outline: none;
}
.form input[type="checkbox"] { width: auto; justify-self: start; }
.actions { justify-content: flex-end; margin-top: 4px; }
.form-delete { margin-top: 36px; }
.movie-link { color: inherit; text-decoration: none; }
.movie-link:hover { color: var(--brand); text-decoration: underline; }
button.copy-code {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.admin-ext-cell { text-align: center; }
a.pill.admin-ext {
  text-decoration: none;
  background: #eef2ff;
  color: #3538cd;
}
a.pill.admin-ext:hover {
  background: #dbe4ff;
  color: #2d31a6;
}
.movie-page { background: #fff; }
.crumb { display: flex; gap: 6px; margin: 0 0 8px; color: #98a2b3; font-size: 13px; }
.crumb a:hover { color: var(--brand); }
.crumb span::before { content: ">"; margin-right: 6px; }
.hero-card {
  container-type: inline-size;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px 28px;
  align-items: center;
  margin-top: 18px;
  padding: 22px 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
}
.hero-main { display: flex; gap: 18px; min-width: 0; flex: 1 1 420px; }
.poster-box {
  width: 92px;
  height: 118px;
  flex: none;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 12px;
  background: #f2f4f7;
  color: #98a2b3;
}
.poster-box img { width: 100%; height: 100%; object-fit: cover; }
.poster-box svg { width: 28px; height: 28px; }
.hero-title { margin: 0 0 8px; font-size: 22px; letter-spacing: -0.03em; }
.hero-line { display: flex; align-items: center; gap: 6px; margin: 0 0 4px; color: #667085; }
.hero-line b { color: var(--ink); font-weight: 600; }
button.icon-btn {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #98a2b3;
}
button.icon-btn svg { width: 16px; height: 16px; }
button.icon-btn:hover { background: var(--soft); color: var(--brand); }
.pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tag {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.tag.brand { background: #eef2ff; color: #3538cd; }
.tag.sky { background: #e0f2fe; color: #026aa2; }
.tag.gray { background: #f2f4f7; color: #344054; }
.tag.pink { background: #fdf2fa; color: #c11574; }
.movie-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(96px, auto));
  gap: 8px 28px;
  flex: 1 1 340px;
}
@container (min-width: 820px) {
  .movie-metrics { padding-left: 28px; border-left: 1px solid var(--line); }
}
.movie-metrics.is-short { grid-template-columns: minmax(140px, auto); }
.movie-metrics span { display: block; color: #98a2b3; font-size: 13px; }
.movie-metrics strong { display: block; margin-top: 6px; font-size: 18px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.3; }
.movie-metrics small { display: block; margin-top: 2px; color: #667085; font-size: 13px; }
.movie-page .table-card + .table-card { margin-top: 16px; }
.table-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.table-bar strong { font-size: 14px; }
.btn.tiny { height: 34px; padding: 0 12px; font-size: 13px; }
.btn.tiny svg { width: 15px; height: 15px; }
table.kv th { width: 18%; white-space: nowrap; }
table.kv td.note { white-space: normal; line-height: 1.55; }
tr:last-child th { border-bottom: 0; }
.movie-state {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.movie-state.is-on { background: #ecfdf3; color: #027a48; }
.movie-state.is-wait { background: #fffaeb; color: #b54708; }
.movie-state.is-hold { background: #fef3f2; color: #b42318; }
.movie-state.is-off { background: var(--soft); color: var(--muted); }
.movie-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 22px 0 14px;
  border-bottom: 1px solid var(--line);
}
.movie-tabs a {
  position: relative;
  padding: 8px 2px 12px;
  color: var(--muted);
  font-weight: 700;
  text-decoration: none;
}
.movie-tabs a.is-active { color: var(--brand); }
.movie-tabs a.is-active:after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--brand);
}
.movie-stats { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.actions form { margin: 0; }

.login-body { display: grid; place-items: center; min-height: 100vh; padding: 24px; }
.login-card {
  width: min(440px, 100%);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 32px;
  display: grid;
  gap: 14px;
}
.login-card h1 { font-size: 24px; }
.login-card label { display: grid; gap: 6px; font-weight: 600; }
.login-card input {
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 0 12px;
}
.login-card button { height: 44px; }
.notice-box { border-top: 1px solid var(--line); padding-top: 12px; }
.notice-box h2 { margin: 0 0 8px; font-size: 14px; }
.notice-box p { margin: 4px 0; color: #344054; }

.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 20px 0 16px;
}
.filters input, .filters select {
  height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
  outline: none;
}
.filters input.grow { flex: 1; min-width: 180px; }
.filters input:focus, .filters select:focus { border-color: var(--brand); box-shadow: 0 0 0 4px #eef4ff; }
.filter-pick {
  position: relative;
  flex: 1;
  min-width: 180px;
}
.filter-pick input.grow { width: 100%; }
.filter-pick .pick-list {
  position: absolute;
  z-index: 30;
  left: 0;
  right: 0;
  margin-top: 4px;
  box-shadow: 0 8px 24px rgba(16, 24, 40, 0.12);
}
.cap-note { margin: -4px 0 16px; color: var(--muted); }
.cap-note.warn { color: #b42318; }
.panel {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px 20px 8px;
  margin-bottom: 16px;
  background: #fff;
}
.ops-page .page-head { margin-bottom: 20px; }
.ops-page .panel { padding: 20px; margin-bottom: 24px; }
.ops-page .panel .fields { gap: 20px 16px; }
.ops-page .panel .log-box,
.ops-page .panel .table-card { margin-top: 20px; }
.ops-page .panel .log-box { margin-bottom: 0; }
.panel h2 { margin: 0 0 8px; font-size: 16px; }
.panel .muted { margin: 0 0 14px; color: var(--muted); line-height: 1.55; }
.panel .filters { margin-bottom: 12px; }
.log-box {
  margin: 0 0 12px;
  padding: 14px 16px;
  border-radius: 8px;
  background: var(--soft);
  border: 1px solid var(--line);
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 13px;
  line-height: 1.5;
  max-height: 360px;
  overflow: auto;
}
.btn.warn, button.warn {
  background: #b54708;
  border-color: #b54708;
  color: #fff;
}
.btn.warn:hover, button.warn:hover { background: #93370d; border-color: #93370d; }
.btn.danger, button.danger {
  background: #b42318;
  border-color: #b42318;
}
.btn.danger:hover, button.danger:hover { background: #912018; }
.btn.danger-ghost, button.danger-ghost {
  background: #fff;
  color: #b42318;
  border-color: #fecdca;
}
.btn.danger-ghost:hover, button.danger-ghost:hover { background: #fff6f5; }
.confirm-panel.is-danger { border-color: #fecdca; background: #fffbfa; }
.confirm-lines { margin: 0 0 14px; padding-left: 18px; }
.confirm-lines li { margin: 4px 0; }
.confirm-check {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0 0 4px;
  font-weight: 600;
}
.confirm-check input { width: 16px; height: 16px; margin: 0; }
.btn.btn-next, button.btn-next {
  animation: btn-next-pulse 1.15s ease-in-out infinite;
}
.btn.btn-next.warn, button.btn-next.warn {
  animation-name: btn-next-pulse-warn;
}
.btn.btn-next.danger, button.btn-next.danger,
.btn.btn-next.danger-ghost, button.btn-next.danger-ghost {
  animation-name: btn-next-pulse-danger;
}
@keyframes btn-next-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(53, 56, 205, 0.5); filter: brightness(1); }
  50% { box-shadow: 0 0 0 8px rgba(53, 56, 205, 0); filter: brightness(1.12); }
}
@keyframes btn-next-pulse-warn {
  0%, 100% { box-shadow: 0 0 0 0 rgba(181, 71, 8, 0.5); filter: brightness(1); }
  50% { box-shadow: 0 0 0 8px rgba(181, 71, 8, 0); filter: brightness(1.12); }
}
@keyframes btn-next-pulse-danger {
  0%, 100% { box-shadow: 0 0 0 0 rgba(180, 35, 24, 0.5); filter: brightness(1); }
  50% { box-shadow: 0 0 0 8px rgba(180, 35, 24, 0); filter: brightness(1.12); }
}
@media (prefers-reduced-motion: reduce) {
  .btn.btn-next, button.btn-next {
    animation: none;
    outline: 3px solid currentColor;
    outline-offset: 3px;
  }
}
.genre-picks { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.genre-picks label, .check-line {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  font-weight: 600;
}
.genre-picks input, .check-line input { width: 16px; height: 16px; margin: 0; }
.osp-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 8px;
}
.osp-tools input[type="search"] {
  height: 40px;
  min-width: 220px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
  outline: none;
}
.osp-list {
  max-height: 240px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 2px 12px;
  margin-bottom: 4px;
  background: var(--soft);
}
.osp-item {
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 32px;
  font-size: 13px;
}
.osp-item input { width: 16px; height: 16px; margin: 0; flex: 0 0 auto; }
.osp-item span { min-width: 0; }
.osp-item em { color: var(--muted); font-style: normal; margin-left: auto; white-space: nowrap; }
.jtbc-all { margin: 0 0 8px; }
.jtbc-table .num {
  width: 96px;
  height: 20px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  padding: 0 6px;
  text-align: right;
  background: #fff;
  line-height: 18px;
}
.jtbc-table .jtbc-title { font-weight: 600; }
.jtbc-table td small {
  display: inline;
  color: var(--muted);
  margin-left: 6px;
  font-weight: 400;
}
.fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}
.field {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
  background: #fff;
}
.field span { display: block; color: var(--muted); font-size: 13px; }
.field strong { display: block; margin-top: 6px; font-size: 16px; font-weight: 600; word-break: break-word; }
.field strong.tone-ok { color: var(--green); }
.field strong.tone-bad { color: #b42318; }
td.tone-bad { color: #b42318; font-weight: 600; }

@media (max-width: 1100px) {
  .stats { grid-template-columns: 1fr; }
  .app {
    display: flex;
    flex-direction: column;
    grid-template-columns: 1fr;
    height: auto;
    min-height: 100vh;
    margin: 0;
    border-radius: 0;
    overflow: visible;
  }
  body,
  body:has(.app) { overflow: auto; }
  .side {
    display: contents;
    border-right: 0;
  }
  .brand {
    order: 1;
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
    background: #fff;
  }
  .nav {
    order: 2;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--line);
    background: #fff;
    overflow: auto;
  }
  .nav > a,
  .nav > button.nav-toggle {
    flex: 0 0 auto;
    width: 44px;
    min-height: 44px;
    padding: 0;
    justify-content: center;
    gap: 0;
  }
  .nav-label { display: none; }
  .nav button.nav-toggle::after { display: none; }
  .nav .subnav {
    flex: 1 0 100%;
    margin: 4px 0 0;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--soft);
  }
  .content {
    order: 3;
    overflow: visible;
    padding: 20px 16px 32px;
  }
  .side-foot {
    order: 4;
    margin-top: 0;
    padding: 16px;
    border-top: 1px solid var(--line);
    background: #fff;
  }
  .search { width: 100%; margin-left: 0; }
  .toolbar, .page-head, .table-foot, .filters { flex-wrap: wrap; }
  .fields { grid-template-columns: 1fr; }
  .table-card {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
  }
  .table-card table {
    width: max-content;
    min-width: 100%;
  }
  .table-card th,
  .table-card td { white-space: nowrap; }
}
@media (max-width: 720px) {
  .form-line { grid-template-columns: 1fr; }
  .movie-stats { grid-template-columns: 1fr; }
  .hero-card, .movie-metrics { display: block; }
  .movie-metrics { margin-top: 18px; padding: 16px 0 0; border-left: 0; border-top: 1px solid var(--line); }
  table.kv th, table.kv td { white-space: normal; }
}
.table-card table.kv { width: 100%; min-width: 0; }
.table-card table.kv th,
.table-card table.kv td { white-space: normal; }
