/* =========================================================
   드라마툰 — 요일·회차별 15~30분 웹드라마 연재 플랫폼 (프로토타입)
   순수 CSS · 외부 의존성 없음
   ========================================================= */

:root {
  --green: #00DC64;
  --green-700: #00b653;
  --green-ink: #00280f;
  --green-soft: rgba(0, 220, 100, .12);
  --radius-xl: 26px;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 9px;
  --maxw: 1240px;
  --font: "Pretendard", "Pretendard Variable", -apple-system, BlinkMacSystemFont,
          "Apple SD Gothic Neo", "Malgun Gothic", "맑은 고딕", "Noto Sans KR",
          system-ui, sans-serif;
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, .18);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, .45);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

[data-theme="dark"] {
  --bg: #0b0d10;
  --bg-soft: #101318;
  --bg-elev: #14181e;
  --card: #151a20;
  --card-hover: #1c222a;
  --line: #252c36;
  --line-soft: #1b2129;
  --text: #f2f5f8;
  --text-2: #c8d0da;
  --muted: #8c97a6;
  --hero-veil: linear-gradient(90deg, rgba(8, 10, 13, .95) 0%, rgba(8, 10, 13, .72) 45%, rgba(8, 10, 13, .15) 100%);
  --hero-veil-m: linear-gradient(0deg, rgba(8, 10, 13, .96) 10%, rgba(8, 10, 13, .55) 55%, rgba(8, 10, 13, .2) 100%);
  --glass: rgba(11, 13, 16, .82);
  --input: #0f1318;
  --white-soft: rgba(255, 255, 255, .06);
}

[data-theme="light"] {
  --bg: #ffffff;
  --bg-soft: #f5f7f9;
  --bg-elev: #f0f2f5;
  --card: #ffffff;
  --card-hover: #f7f8fa;
  --line: #e6e9ee;
  --line-soft: #eef0f4;
  --text: #111418;
  --text-2: #363c45;
  --muted: #6b7481;
  --hero-veil: linear-gradient(90deg, rgba(8, 10, 13, .92) 0%, rgba(8, 10, 13, .62) 48%, rgba(8, 10, 13, .18) 100%);
  --hero-veil-m: linear-gradient(0deg, rgba(8, 10, 13, .95) 8%, rgba(8, 10, 13, .5) 55%, rgba(8, 10, 13, .15) 100%);
  --glass: rgba(255, 255, 255, .9);
  --input: #ffffff;
  --white-soft: rgba(0, 0, 0, .04);
  --shadow-sm: 0 2px 10px rgba(16, 24, 40, .06);
  --shadow-lg: 0 24px 60px rgba(16, 24, 40, .16);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  font-size: 15px;
  letter-spacing: -.01em;
  -webkit-font-smoothing: antialiased;
  transition: background-color .25s var(--ease), color .25s var(--ease);
  min-height: 100vh;
  overflow-x: hidden;
}

h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--green); color: #00240e; }

.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.mono { font-variant-numeric: tabular-nums; }

/* ---------------- scrollbar ---------------- */
* { scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 99px; }
::-webkit-scrollbar-track { background: transparent; }

/* hidden 속성은 항상 숨김 */
[hidden] { display: none !important; }

/* =========================================================
   Header
   ========================================================= */
.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  background: var(--glass);
  border-bottom: 1px solid var(--line-soft);
}
.topbar-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
  height: 66px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.logo { display: inline-flex; align-items: center; gap: 9px; flex: none; }
.logo-mark {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border-radius: 9px;
  background: var(--green);
  color: #00240e;
  font-size: 12px;
  padding-left: 2px;
  box-shadow: 0 0 0 4px var(--green-soft);
}
.logo-text {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -.04em;
}
.logo-text::first-letter { color: var(--green); }
.logo-badge {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .08em;
  color: var(--green);
  border: 1px solid rgba(0, 220, 100, .45);
  border-radius: 5px;
  padding: 1px 5px;
  transform: translateY(-1px);
}
.main-nav { display: flex; align-items: center; gap: 4px; flex: 1; min-width: 0; }
.nav-item {
  position: relative;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  transition: color .18s var(--ease), background-color .18s var(--ease);
}
.nav-item:hover { color: var(--text); background: var(--white-soft); }
.nav-item.active { color: var(--text); }
.nav-item.active::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px; bottom: 1px;
  height: 2px;
  border-radius: 2px;
  background: var(--green);
}
.nav-emoji { font-size: 13px; }

.topbar-actions { display: flex; align-items: center; gap: 10px; flex: none; margin-left: auto; }
.icon-btn {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: var(--card);
  font-size: 16px;
  transition: background-color .18s, transform .18s;
}
.icon-btn:hover { background: var(--card-hover); transform: translateY(-1px); }
.coin-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 5px 0 11px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--card);
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
}
.coin-icon { font-size: 14px; }
.coin-pill strong { font-weight: 800; color: #ffcf4a; }
[data-theme="light"] .coin-pill strong { color: #b07d00; }
.charge-btn {
  height: 28px;
  padding: 0 10px;
  border-radius: 8px;
  background: var(--green-soft);
  color: var(--green-700);
  font-size: 12px;
  font-weight: 800;
  transition: background-color .18s, color .18s;
}
[data-theme="dark"] .charge-btn { color: var(--green); }
.charge-btn:hover { background: var(--green); color: var(--green-ink); }

/* =========================================================
   Layout / common
   ========================================================= */
.view { display: block; min-height: 70vh; padding-bottom: 40px; }
.page { padding-top: 34px; }
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
  flex-wrap: wrap;
}
.eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .18em;
  color: var(--green);
  margin-bottom: 8px;
}
.page-head h1 { font-size: 30px; font-weight: 800; letter-spacing: -.04em; line-height: 1.2; }
.page-head .muted { margin-top: 8px; max-width: 60ch; font-size: 13.5px; }

.section-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  margin: 34px 0 14px;
}
.section-head h2 { font-size: 19px; font-weight: 800; letter-spacing: -.03em; }
.section-head h2 .count { color: var(--muted); font-size: 14px; font-weight: 700; margin-left: 4px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 42px;
  padding: 0 18px;
  border-radius: 11px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -.02em;
  border: 1px solid transparent;
  transition: transform .16s var(--ease), background-color .18s, border-color .18s, color .18s, box-shadow .18s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(.995); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary {
  background: var(--green);
  color: #00240e;
  box-shadow: 0 8px 24px rgba(0, 220, 100, .22);
}
.btn-primary:hover:not(:disabled) { background: #25e878; box-shadow: 0 10px 28px rgba(0, 220, 100, .3); }
.btn-ghost {
  background: var(--card);
  border-color: var(--line);
  color: var(--text);
}
.btn-ghost:hover { background: var(--card-hover); }
.btn-outline {
  border-color: var(--line);
  color: var(--text-2);
  background: transparent;
}
.btn-outline:hover { border-color: var(--green); color: var(--green); }
.btn-danger { background: rgba(255, 86, 96, .12); color: #ff6b74; border-color: rgba(255, 86, 96, .3); }
.btn-danger:hover { background: rgba(255, 86, 96, .2); }
.btn-small { height: 34px; padding: 0 13px; font-size: 12.5px; border-radius: 9px; }
.btn-block { width: 100%; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: -.01em;
  backdrop-filter: blur(6px);
}
.badge-day { background: rgba(0, 0, 0, .55); color: #fff; border: 1px solid rgba(255, 255, 255, .16); }
.badge-genre { background: var(--green-soft); color: var(--green-700); }
[data-theme="dark"] .badge-genre { color: var(--green); }
.badge-done { background: rgba(120, 130, 145, .22); color: var(--text-2); }
.badge-new { background: var(--green); color: #00240e; }

.pill {
  display: inline-flex; align-items: center; gap: 4px;
  height: 24px; padding: 0 9px;
  border-radius: 99px;
  font-size: 11.5px;
  font-weight: 800;
}
.pill-free { background: var(--green-soft); color: var(--green-700); }
[data-theme="dark"] .pill-free { color: var(--green); }
.pill-lock { background: rgba(255, 196, 0, .14); color: #e0a800; }
[data-theme="dark"] .pill-lock { color: #ffcf4a; }
.pill-ok { background: rgba(90, 160, 255, .15); color: #4f92ff; }

.empty-box {
  border: 1px dashed var(--line);
  border-radius: var(--radius-lg);
  padding: 44px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 13.5px;
  background: var(--bg-soft);
}

/* =========================================================
   Home — hero
   ========================================================= */
.hero {
  position: relative;
  margin-top: 26px;
  min-height: 400px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  isolation: isolate;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--line-soft);
}
.hero-bg {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center 28%;
  transform: scale(1.03);
  z-index: -2;
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background: var(--hero-veil);
  z-index: -1;
}
.hero-inner { padding: 44px; max-width: 640px; color: #fff; }
.hero-tag {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 11.5px; font-weight: 800; letter-spacing: .06em;
  color: #d9ffe9;
  background: rgba(0, 220, 100, .16);
  border: 1px solid rgba(0, 220, 100, .4);
  padding: 4px 10px;
  border-radius: 99px;
  margin-bottom: 16px;
}
.hero h1 {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 900;
  letter-spacing: -.045em;
  line-height: 1.15;
  margin-bottom: 12px;
  text-shadow: 0 2px 24px rgba(0, 0, 0, .35);
}
.hero-syn {
  color: rgba(255, 255, 255, .8);
  font-size: 14.5px;
  line-height: 1.65;
  margin-bottom: 22px;
  max-width: 52ch;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hero-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; font-size: 12.5px; color: rgba(255, 255, 255, .68); }
.hero-meta .dot { opacity: .5; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.hero .btn-primary { height: 46px; padding: 0 24px; border-radius: 12px; font-size: 14.5px; }
.hero .btn-ghost { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .24); color: #fff; backdrop-filter: blur(8px); height: 46px; }
.hero .btn-ghost:hover { background: rgba(255, 255, 255, .18); }

/* =========================================================
   Toolbar (day tabs / genre / search)
   ========================================================= */
.toolbar { margin-top: 30px; }
.day-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line-soft);
  scrollbar-width: none;
}
.day-tabs::-webkit-scrollbar { display: none; }
.day-tab {
  position: relative;
  flex: none;
  height: 40px;
  padding: 0 15px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  transition: color .16s, background-color .16s;
}
.day-tab:hover { color: var(--text); background: var(--white-soft); }
.day-tab.active { color: var(--green); }
.day-tab.active::after {
  content: "";
  position: absolute;
  left: 12px; right: 12px; bottom: -7px;
  height: 2px; border-radius: 2px;
  background: var(--green);
}
.filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.chips { display: flex; gap: 7px; flex-wrap: wrap; flex: 1; }
.chip {
  flex: 0 0 auto;
  white-space: nowrap;
  height: 32px;
  padding: 0 13px;
  border-radius: 99px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 700;
  transition: all .16s var(--ease);
}
.chip:hover { border-color: var(--muted); }
.chip.active { background: var(--text); color: var(--bg); border-color: var(--text); }
[data-theme="dark"] .chip.active { background: #fff; color: #0b0d10; }
.search {
  position: relative;
  display: flex;
  align-items: center;
  width: 260px;
  max-width: 100%;
}
.search input {
  width: 100%;
  height: 38px;
  padding: 0 34px 0 36px;
  border-radius: 99px;
  border: 1px solid var(--line);
  background: var(--input);
  font-size: 13px;
  transition: border-color .16s, box-shadow .16s;
}
.search input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.search .s-icon { position: absolute; left: 13px; font-size: 13px; opacity: .6; }
.search .s-clear {
  position: absolute; right: 8px;
  width: 22px; height: 22px;
  display: grid; place-items: center;
  border-radius: 50%;
  font-size: 11px;
  color: var(--muted);
}
.search .s-clear:hover { background: var(--white-soft); color: var(--text); }
.result-line { margin: 18px 0 12px; font-size: 12.5px; color: var(--muted); }
.result-line b { color: var(--text); }

/* =========================================================
   Work grid & card
   ========================================================= */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(178px, 1fr));
  gap: 26px 20px;
  margin-top: 18px;
}
.card { display: block; min-width: 0; }
.card-cover {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: var(--card);
  box-shadow: var(--shadow-sm);
  transition: transform .28s var(--ease), box-shadow .28s var(--ease);
}
.card:hover .card-cover { transform: translateY(-5px); box-shadow: 0 18px 34px rgba(0, 0, 0, .3); }
.card-cover img.cover { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.card:hover .card-cover img.cover { transform: scale(1.04); }
.card-cover::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.35) 0%, transparent 26%, transparent 58%, rgba(0,0,0,.72) 100%);
  pointer-events: none;
}
.card-badges { position: absolute; top: 9px; left: 9px; z-index: 2; display: flex; gap: 5px; flex-wrap: wrap; max-width: calc(100% - 52px); }
.heart-btn {
  position: absolute;
  top: 8px; right: 8px;
  z-index: 3;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, .42);
  backdrop-filter: blur(6px);
  color: rgba(255, 255, 255, .85);
  font-size: 14px;
  transition: transform .18s var(--ease), color .18s, background-color .18s;
}
.heart-btn:hover { transform: scale(1.1); background: rgba(0, 0, 0, .6); }
.heart-btn.on { color: #ff5d7a; }
.heart-btn.on::after {
  content: "";
  position: absolute; inset: -4px;
  border-radius: 50%;
  border: 1px solid rgba(255, 93, 122, .5);
  animation: pop .35s var(--ease);
}
@keyframes pop { from { transform: scale(.6); opacity: 1; } to { transform: scale(1.15); opacity: 0; } }
.card-price {
  position: absolute;
  left: 10px; bottom: 10px;
  z-index: 2;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  background: rgba(0, 0, 0, .5);
  border: 1px solid rgba(255, 255, 255, .18);
  backdrop-filter: blur(6px);
  padding: 3px 8px;
  border-radius: 6px;
}
.card-price.free { color: #b6ffd6; border-color: rgba(0, 220, 100, .45); }
.card-body { padding: 11px 2px 0; }
.card-body h3 {
  font-size: 14.5px;
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: keep-all;
}
.card-sub { margin-top: 5px; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.card-sub .up { color: var(--green); font-weight: 800; font-size: 11px; }

/* =========================================================
   Detail
   ========================================================= */
.crumb { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); padding: 22px 0 18px; }
.crumb a:hover { color: var(--text); }
.crumb .sep { opacity: .5; }

.detail-head {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 40px;
  align-items: start;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--line-soft);
}
.detail-cover {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: var(--card);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--line-soft);
}
.detail-cover img, .detail-cover .cover-art { width: 100%; height: 100%; object-fit: cover; }
.detail-info { padding-top: 6px; min-width: 0; }
.detail-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.detail-badges .badge-day { background: var(--bg-elev); color: var(--text-2); border-color: var(--line); }
.detail-info h1 { font-size: clamp(26px, 3.4vw, 38px); font-weight: 900; letter-spacing: -.045em; line-height: 1.2; margin-bottom: 10px; word-break: keep-all; }
.detail-author { font-size: 13.5px; color: var(--muted); margin-bottom: 18px; }
.detail-author b { color: var(--text-2); font-weight: 700; }
.detail-synopsis { font-size: 14.5px; color: var(--text-2); line-height: 1.75; max-width: 62ch; margin-bottom: 14px; white-space: pre-line; word-break: keep-all; }
.tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.tags span { font-size: 12px; color: var(--green); background: var(--green-soft); padding: 3px 9px; border-radius: 6px; font-weight: 700; }
.detail-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 26px; }
.detail-actions .btn-primary { height: 48px; padding: 0 26px; border-radius: 12px; font-size: 15px; }
.detail-actions .btn-ghost { height: 48px; border-radius: 12px; }
.heart-toggle.on { border-color: rgba(255, 93, 122, .5); color: #ff5d7a; background: rgba(255, 93, 122, .08); }
.heart-toggle.on span { color: #ff5d7a; font-weight: 800; }
.detail-stats {
  display: flex;
  gap: 0;
  border-top: 1px solid var(--line-soft);
  padding-top: 18px;
  flex-wrap: wrap;
}
.detail-stats > div { padding-right: 28px; margin-right: 28px; border-right: 1px solid var(--line-soft); }
.detail-stats > div:last-child { border: 0; margin: 0; padding-right: 0; }
.detail-stats .k { font-size: 11.5px; color: var(--muted); font-weight: 700; margin-bottom: 3px; }
.detail-stats .v { font-size: 18px; font-weight: 800; letter-spacing: -.03em; }
.detail-stats .v em { font-style: normal; font-size: 12px; color: var(--muted); font-weight: 600; margin-left: 3px; }

/* episode list */
.ep-section { padding-top: 6px; }
.ep-section > header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 26px 0 16px;
}
.ep-section h2 { font-size: 19px; font-weight: 800; letter-spacing: -.03em; }
.ep-section h2 span { color: var(--muted); font-size: 14px; font-weight: 700; margin-left: 5px; }
.ep-list { display: flex; flex-direction: column; gap: 10px; }
.ep-row {
  display: grid;
  grid-template-columns: 108px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line-soft);
  background: var(--card);
  cursor: pointer;
  transition: border-color .16s, background-color .16s, transform .16s;
}
.ep-row:hover { border-color: var(--line); background: var(--card-hover); transform: translateX(2px); }
.ep-row.locked { background: var(--bg-soft); }
.ep-thumb {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--bg-elev);
}
.ep-thumb img, .ep-thumb .cover-art { width: 100%; height: 100%; object-fit: cover; }
.ep-no {
  position: absolute; left: 6px; top: 6px;
  font-size: 10.5px; font-weight: 800; color: #fff;
  background: rgba(0, 0, 0, .6);
  padding: 1px 6px; border-radius: 5px;
}
.ep-lock {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: 17px;
  background: rgba(6, 8, 12, .5);
  color: #ffd75e;
  backdrop-filter: blur(1.5px);
}
.ep-watched {
  position: absolute; right: 6px; bottom: 6px;
  font-size: 9.5px; font-weight: 800; color: #00240e;
  background: var(--green);
  padding: 1px 6px; border-radius: 5px;
}
.ep-main { min-width: 0; }
.ep-main h3 { font-size: 14.5px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 4px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ep-main h3 .new-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.ep-main p { font-size: 12px; color: var(--muted); }
.ep-note {
  margin-top: 5px;
  font-size: 12.5px !important;
  color: var(--text-2) !important;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.ep-side { display: flex; align-items: center; gap: 12px; }

/* =========================================================
   Viewer
   ========================================================= */
.viewer {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  background: rgba(6, 8, 11, .94);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  color: #f2f5f8;
  animation: vIn .22s var(--ease);
}
@keyframes vIn { from { opacity: 0; transform: scale(1.01); } to { opacity: 1; transform: none; } }
.viewer-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  padding-top: max(14px, env(safe-area-inset-top));
  flex: none;
}
.viewer-bar .icon-btn { background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .12); color: #fff; }
.viewer-bar .icon-btn:hover { background: rgba(255, 255, 255, .14); }
.vb-title { min-width: 0; flex: 1; display: flex; align-items: baseline; gap: 10px; overflow: hidden; }
.vb-title strong { font-size: 15px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vb-title span { font-size: 12.5px; color: rgba(255, 255, 255, .55); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vb-nav { display: flex; gap: 8px; flex: none; }
.vb-nav button {
  height: 36px; padding: 0 14px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .06);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  transition: background-color .16s, opacity .16s;
}
.vb-nav button:hover:not(:disabled) { background: rgba(255, 255, 255, .14); }
.vb-nav button:disabled { opacity: .3; cursor: not-allowed; }

.viewer-body {
  flex: 1;
  display: flex;
  gap: 28px;
  padding: 22px 24px 24px;
  min-height: 0;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
}
.stage-col { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; }
.stage {
  /* 기본값 16:9 — 웹드라마 감상 화면. 실제 영상 비율은 JS가 --ar로 넘겨준다 (9:16~16:9) */
  --ar: 1.7778;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(100%, calc((100vh - 216px) * var(--ar)));
  max-width: 100%;
  max-height: calc(100vh - 216px);
  aspect-ratio: var(--ar);
  border-radius: 20px;
  background: #000;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .06);
  overflow: hidden;
}
.stage video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  border-radius: inherit;
}
.stage-hint { font-size: 12px; color: rgba(255, 255, 255, .42); text-align: center; }
.stage-hint b { color: rgba(255, 255, 255, .7); }
.stage-note { font-size: 11px; color: rgba(255, 255, 255, .3); text-align: center; max-width: 60ch; }

.paywall-overlay, .end-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: linear-gradient(180deg, rgba(6, 8, 11, .35), rgba(6, 8, 11, .9));
  backdrop-filter: blur(6px);
  z-index: 4;
  text-align: center;
}
.po-card, .eo-card {
  max-width: 320px;
  background: rgba(20, 24, 30, .92);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 18px;
  padding: 24px 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .5);
}
.po-badge { font-size: 11px; font-weight: 800; color: #ffcf4a; letter-spacing: .04em; margin-bottom: 8px; }
.po-card h3, .eo-card h3 { font-size: 18px; font-weight: 800; letter-spacing: -.03em; color: #fff; margin-bottom: 8px; }
.po-card p, .eo-card p { font-size: 12.5px; color: rgba(255, 255, 255, .62); margin-bottom: 16px; line-height: 1.6; }
.po-card .btn, .eo-card .btn { width: 100%; margin-bottom: 8px; }
.po-card .btn-ghost, .eo-card .btn-ghost { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .16); color: #fff; }
.eo-card .eo-sub { font-size: 28px; margin-bottom: 6px; }

.viewer-side {
  width: 388px;
  flex: none;
  overflow-y: auto;
  padding-right: 6px;
  overscroll-behavior: contain;
}
.vs-head h2 { font-size: 20px; font-weight: 800; letter-spacing: -.03em; color: #fff; margin-bottom: 5px; }
.vs-head p { font-size: 12.5px; color: rgba(255, 255, 255, .5); }

.vs-rate { display: flex; align-items: center; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.stars { display: inline-flex; gap: 2px; }
.stars button { font-size: 20px; line-height: 1; color: rgba(255, 255, 255, .22); transition: transform .12s, color .12s; padding: 0; }
.stars button:hover { transform: scale(1.15); }
.stars button.on { color: #ffc93c; }
.vs-rate span { font-size: 12px; color: rgba(255, 255, 255, .5); }
.vs-rate b { color: #ffc93c; }

.vs-actions { display: flex; gap: 8px; margin-top: 16px; }
.vs-actions button {
  flex: 1;
  height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .06);
  color: rgba(255, 255, 255, .85);
  font-size: 12.5px;
  font-weight: 700;
  transition: background-color .16s, color .16s, border-color .16s;
}
.vs-actions button:hover { background: rgba(255, 255, 255, .13); }
.vs-actions button.on { color: #ff7a90; border-color: rgba(255, 122, 144, .45); background: rgba(255, 122, 144, .12); }
.vs-actions button b { font-variant-numeric: tabular-nums; }

.support {
  margin-top: 22px;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid rgba(0, 220, 100, .22);
  background: linear-gradient(160deg, rgba(0, 220, 100, .1), rgba(0, 220, 100, .02));
}
.support h3 { font-size: 13px; font-weight: 800; color: #b8ffd8; margin-bottom: 4px; }
.support > p { font-size: 11.5px; color: rgba(255, 255, 255, .5); margin-bottom: 12px; }
.support-btns { display: flex; gap: 7px; }
.support-btns button {
  flex: 1;
  height: 38px;
  border-radius: 9px;
  background: rgba(0, 220, 100, .14);
  border: 1px solid rgba(0, 220, 100, .3);
  color: #b8ffd8;
  font-size: 12.5px;
  font-weight: 800;
  transition: background-color .16s, transform .16s;
}
.support-btns button:hover { background: var(--green); color: #00240e; transform: translateY(-1px); }

.author-note { margin-top: 20px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .08); }
.author-note h3 { font-size: 12px; font-weight: 800; color: rgba(255, 255, 255, .45); letter-spacing: .04em; margin-bottom: 7px; }
.author-note p { font-size: 13px; color: rgba(255, 255, 255, .72); line-height: 1.7; white-space: pre-line; }

.comments { margin-top: 22px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .08); }
.comments h3 { font-size: 14px; font-weight: 800; color: #fff; }
.comments h3 span { color: rgba(255, 255, 255, .45); font-size: 12px; margin-left: 4px; }
.comment-form { margin-top: 12px; }
.comment-form textarea {
  width: 100%;
  min-height: 62px;
  resize: vertical;
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .05);
  color: #fff;
  font-size: 13px;
  line-height: 1.55;
}
.comment-form textarea::placeholder { color: rgba(255, 255, 255, .35); }
.comment-form textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(0, 220, 100, .14); }
.cf-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.cf-foot .muted { font-size: 11px; }
.comment-list { margin-top: 16px; display: flex; flex-direction: column; gap: 14px; }
.comment { padding-bottom: 13px; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.comment:last-child { border-bottom: 0; }
.c-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.c-head b { font-size: 12px; font-weight: 800; color: #b8ffd8; }
.c-head span { font-size: 10.5px; color: rgba(255, 255, 255, .35); }
.comment p { font-size: 12.5px; color: rgba(255, 255, 255, .74); line-height: 1.6; word-break: break-word; }

/* =========================================================
   Studio
   ========================================================= */
.studio-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: 22px;
  align-items: start;
}
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.panel > h2 { font-size: 17px; font-weight: 800; letter-spacing: -.03em; margin-bottom: 18px; display: flex; align-items: baseline; gap: 8px; }
.panel > h2 span { font-size: 13px; color: var(--muted); font-weight: 700; }

.form { display: flex; flex-direction: column; gap: 16px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field > span { font-size: 12px; font-weight: 700; color: var(--text-2); }
.field input[type="text"], .field input:not([type]), .field select, .field textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--input);
  font-size: 13.5px;
  transition: border-color .16s, box-shadow .16s;
}
.field textarea { resize: vertical; min-height: 92px; line-height: 1.6; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px var(--green-soft);
}
.field input::placeholder, .field textarea::placeholder { color: var(--muted); opacity: .75; }
.day-checks { display: flex; gap: 4px; flex-wrap: wrap; }
.day-checks label {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--input);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  transition: all .14s;
}
.day-checks input { position: absolute; opacity: 0; pointer-events: none; }
.day-checks label:has(input:checked) { background: var(--green-soft); border-color: var(--green); color: var(--green); }
[data-theme="light"] .day-checks label:has(input:checked) { color: var(--green-700); }
.day-checks label:hover { border-color: var(--muted); }

.cover-picker { display: flex; gap: 8px; flex-wrap: wrap; }
.cover-opt {
  position: relative;
  width: 58px; height: 76px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
  padding: 0;
  background: var(--bg-elev);
  transition: border-color .16s, transform .16s;
}
.cover-opt .mark { font-size: 12px; letter-spacing: -.02em; }
.cover-opt:hover { transform: translateY(-2px); }
.cover-opt.selected { border-color: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.cover-opt .tick {
  position: absolute; right: 3px; top: 3px;
  width: 16px; height: 16px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--green);
  color: #00240e;
  font-size: 9px;
  font-weight: 900;
}
.cover-upload {
  width: 58px; height: 76px;
  border-radius: 8px;
  border: 1px dashed var(--line);
  display: grid;
  place-items: center;
  text-align: center;
  font-size: 10px;
  line-height: 1.3;
  color: var(--muted);
  cursor: pointer;
  transition: border-color .16s, color .16s;
  padding: 4px;
}
.cover-upload:hover { border-color: var(--green); color: var(--green); }

.manage-list { display: flex; flex-direction: column; gap: 9px; }
.manage-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 11px;
  border: 1px solid var(--line-soft);
  background: var(--bg-soft);
}
.manage-thumb { width: 44px; height: 58px; border-radius: 6px; overflow: hidden; flex: none; background: var(--bg-elev); }
.manage-thumb img, .manage-thumb .cover-art { width: 100%; height: 100%; object-fit: cover; }
.manage-main { flex: 1; min-width: 0; }
.manage-main h3 { font-size: 13.5px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.manage-main p { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.manage-actions { display: flex; gap: 6px; flex: none; }

.danger-zone { margin-top: 26px; padding-top: 20px; border-top: 1px dashed var(--line); }
.danger-zone h3 { font-size: 13px; font-weight: 800; margin-bottom: 5px; }
.danger-zone .muted { margin-bottom: 12px; }

/* =========================================================
   Library
   ========================================================= */
.lib-section { margin-bottom: 34px; }
.lib-list { display: flex; flex-direction: column; gap: 10px; }
.lib-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line-soft);
  background: var(--card);
  transition: border-color .16s, background-color .16s;
}
.lib-row:hover { border-color: var(--line); background: var(--card-hover); }
.lib-thumb { width: 52px; height: 68px; border-radius: 7px; overflow: hidden; flex: none; background: var(--bg-elev); }
.lib-thumb img, .lib-thumb .cover-art { width: 100%; height: 100%; object-fit: cover; }
.lib-main { flex: 1; min-width: 0; }
.lib-main h3 { font-size: 14.5px; font-weight: 800; margin-bottom: 3px; }
.lib-main p { font-size: 12px; color: var(--muted); }
.lib-side { font-size: 11.5px; color: var(--muted); flex: none; }

/* =========================================================
   Revenue dashboard
   ========================================================= */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 22px;
}
.stat-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card);
  padding: 22px;
  overflow: hidden;
}
.stat-card::after {
  content: "";
  position: absolute;
  right: -30px; top: -40px;
  width: 130px; height: 130px;
  border-radius: 50%;
  background: var(--green-soft);
  filter: blur(6px);
}
.stat-card .k { font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 9px; display: flex; align-items: center; gap: 6px; }
.stat-card .v { font-size: 30px; font-weight: 900; letter-spacing: -.045em; line-height: 1; }
.stat-card .v em { font-style: normal; font-size: 13px; font-weight: 700; color: var(--muted); margin-left: 4px; letter-spacing: 0; }
.stat-card .sub { margin-top: 9px; font-size: 11.5px; color: var(--muted); }
.stat-card.highlight { border-color: rgba(0, 220, 100, .35); background: linear-gradient(150deg, rgba(0, 220, 100, .09), var(--card) 70%); }
.stat-card.highlight .v { color: var(--green); }

.rev-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 22px; align-items: start; }
.slider-box { display: flex; align-items: center; gap: 14px; margin: 6px 0 4px; }
.slider-box input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  height: 6px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--green) var(--fill, 40%), var(--line) var(--fill, 40%));
  outline: none;
}
.slider-box input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--green);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .3);
  cursor: pointer;
}
.slider-box input[type="range"]::-moz-range-thumb {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--green);
  cursor: pointer;
}
.slider-val { font-size: 20px; font-weight: 900; color: var(--green); min-width: 58px; text-align: right; font-variant-numeric: tabular-nums; }
.slider-legend { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }
.rev-split { display: flex; gap: 10px; margin-top: 18px; }
.rev-split > div { flex: 1; padding: 12px 14px; border-radius: 10px; background: var(--bg-soft); border: 1px solid var(--line-soft); }
.rev-split .k { font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.rev-split .v { font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; }
.rev-split .v.green { color: var(--green); }

.rank-list { display: flex; flex-direction: column; gap: 14px; margin-top: 4px; }
.rank-item { display: flex; flex-direction: column; gap: 6px; }
.rank-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 12.5px; }
.rank-top .t { font-weight: 800; display: flex; align-items: center; gap: 7px; min-width: 0; }
.rank-top .t .n { font-size: 10.5px; font-weight: 900; color: var(--muted); width: 16px; flex: none; }
.rank-top .t .name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-top .amt { font-weight: 800; color: var(--green); font-variant-numeric: tabular-nums; flex: none; }
.rank-bar { height: 8px; border-radius: 99px; background: var(--bg-elev); overflow: hidden; }
.rank-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--green-700), var(--green)); transition: width .5s var(--ease); }

.txn-wrap { margin-top: 26px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--card); overflow: hidden; }
.txn-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line-soft); flex-wrap: wrap; }
.txn-head h2 { font-size: 16px; font-weight: 800; letter-spacing: -.03em; }
.txn-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.txn-table th, .txn-table td { padding: 11px 20px; text-align: left; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
.txn-table th { font-size: 11px; color: var(--muted); font-weight: 700; background: var(--bg-soft); }
.txn-table td.num, .txn-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.txn-table tbody tr:last-child td { border-bottom: 0; }
.txn-table tbody tr:hover { background: var(--card-hover); }
.txn-type { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: 5px; }
.txn-type.unlock { background: rgba(90, 160, 255, .14); color: #5b9bff; }
.txn-type.support { background: rgba(255, 122, 144, .14); color: #ff7a90; }
.txn-empty { padding: 40px 20px; text-align: center; color: var(--muted); font-size: 13px; }
.notice {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  padding: 13px 16px;
  border-radius: 10px;
  border: 1px solid rgba(255, 196, 0, .25);
  background: rgba(255, 196, 0, .07);
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.6;
}
.notice b { color: #e0a800; }
[data-theme="dark"] .notice b { color: #ffcf4a; }

/* =========================================================
   Modal
   ========================================================= */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(4, 6, 9, .7);
  backdrop-filter: blur(6px);
  animation: fadeIn .18s var(--ease);
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.sheet {
  width: 100%;
  max-width: 430px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 26px;
  box-shadow: var(--shadow-lg);
  animation: sheetIn .22s var(--ease);
  max-height: 90vh;
  overflow-y: auto;
}
[data-theme="dark"] .sheet { background: #1a2029; border-color: #2f3a46; }

.sheet.wide { max-width: 560px; }
@keyframes sheetIn { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.sheet-cover {
  width: 100%;
  height: 132px;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 18px;
  position: relative;
  background: var(--bg-elev);
}
.sheet-cover img, .sheet-cover .cover-art { width: 100%; height: 100%; object-fit: cover; }
.sheet-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,0,0,.6), transparent 70%); }
.sheet h3 { font-size: 19px; font-weight: 800; letter-spacing: -.03em; margin-bottom: 4px; }
.sheet .sub { font-size: 12.5px; color: var(--muted); margin-bottom: 16px; }
.sheet-price {
  display: flex; align-items: center; gap: 8px;
  font-size: 26px; font-weight: 900; letter-spacing: -.04em;
  color: #ffcf4a;
  margin: 6px 0 4px;
}
.sheet-balance { font-size: 12px; color: var(--muted); margin-bottom: 20px; }
.sheet-actions { display: flex; flex-direction: column; gap: 8px; }
.sheet-close { width: 100%; height: 38px; margin-top: 6px; color: var(--muted); font-size: 12.5px; font-weight: 700; border-radius: 8px; }
.sheet-close:hover { background: var(--white-soft); color: var(--text); }
.sheet .form { margin-top: 4px; }
.sheet-foot { display: flex; gap: 8px; margin-top: 6px; }
.sheet-foot .btn { flex: 1; }

.file-drop {
  border: 1.5px dashed var(--line);
  border-radius: 12px;
  padding: 22px 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color .16s, background-color .16s;
  background: var(--bg-soft);
}
.file-drop:hover, .file-drop.drag { border-color: var(--green); background: var(--green-soft); }
.file-drop .fd-icon { font-size: 24px; margin-bottom: 6px; }
.file-drop .fd-main { font-size: 13px; font-weight: 700; }
.file-drop .fd-sub { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.file-drop.has-file { border-style: solid; border-color: var(--green); background: var(--green-soft); }
.file-name { font-size: 12.5px; font-weight: 700; color: var(--green); margin-top: 6px; word-break: break-all; }

/* =========================================================
   Toast
   ========================================================= */
.toast-wrap {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
  width: max-content;
  max-width: calc(100vw - 32px);
}
.toast {
  background: #171d25;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 10px;
  padding: 11px 18px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 14px 40px rgba(0, 0, 0, .5);
  animation: tIn .24s var(--ease);
  text-align: center;
}
.toast.good { border-color: rgba(0, 220, 100, .5); }
.toast.bad { border-color: rgba(255, 86, 96, .5); }
.toast.out { opacity: 0; transform: translateY(8px); transition: all .28s var(--ease); }
@keyframes tIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* =========================================================
   Cover art presets
   ========================================================= */
.cover-art {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.cover-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(115deg, rgba(255, 255, 255, .05) 0 1px, transparent 1px 22px);
  opacity: .8;
}
.cover-art .mark {
  position: relative;
  font-size: 34px;
  font-weight: 900;
  letter-spacing: -.08em;
  color: rgba(255, 255, 255, .85);
  text-shadow: 0 6px 24px rgba(0, 0, 0, .35);
}
.cover-night { background: radial-gradient(120% 90% at 20% 10%, #00dc64 0%, #0a3a58 42%, #070d1c 100%); }
.cover-dawn { background: radial-gradient(120% 90% at 80% 0%, #ffb36b 0%, #ff5f8f 45%, #33143f 100%); }
.cover-rose { background: radial-gradient(120% 90% at 25% 15%, #ff8fa8 0%, #8a1f45 48%, #1b0713 100%); }

/* =========================================================
   Creator CTA
   ========================================================= */
.studio-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 46px;
  padding: 26px 28px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(0, 220, 100, .22);
  background:
    radial-gradient(120% 160% at 100% 0%, rgba(0, 220, 100, .14), transparent 60%),
    var(--bg-soft);
}
.studio-cta h3 { font-size: 19px; font-weight: 800; letter-spacing: -.03em; margin: 2px 0 6px; }
.studio-cta .muted { max-width: 62ch; }
.studio-cta .btn { flex: none; }

/* =========================================================
   Home — promo strip / rails / collections
   ========================================================= */
.promo-strip {
  display: flex; align-items: center; gap: 10px;
  margin-top: 18px; padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: linear-gradient(90deg, var(--green-soft), transparent 55%);
  font-size: 12.5px; color: var(--text-2);
}
.promo-strip .ps-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(0, 220, 100, .14); flex: none; }
.promo-strip p { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.promo-strip b { color: var(--text); font-weight: 800; }
.promo-strip .ps-sub { color: var(--muted); }
.promo-strip .ps-link { flex: none; font-size: 12px; font-weight: 800; color: var(--green-700); }
[data-theme="dark"] .promo-strip .ps-link { color: var(--green); }
.promo-strip .ps-link:hover { text-decoration: underline; }

.hero-score { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-bottom: 14px; }
.hero-score .score {
  font-size: 13px; font-weight: 900; color: #ffc93c;
  background: rgba(255, 200, 60, .12); border: 1px solid rgba(255, 200, 60, .34);
  padding: 3px 10px; border-radius: 99px;
}
.hero-score .score b { font-size: 16px; }
.hero-score .chip {
  font-size: 11.5px; font-weight: 700; color: rgba(255, 255, 255, .86);
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16);
  padding: 3px 10px; border-radius: 99px; backdrop-filter: blur(6px);
}
.hero-tags { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 20px; }
.hero-tags span {
  font-size: 11.5px; font-weight: 700; color: #bfffd9;
  background: rgba(0, 220, 100, .12); border: 1px solid rgba(0, 220, 100, .28);
  padding: 3px 9px; border-radius: 7px;
}

.home-section { margin-top: 34px; }
.section-title { display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.section-title h2 { font-size: 19px; font-weight: 900; letter-spacing: -.03em; display: flex; align-items: center; gap: 7px; }
.section-title .sec-icon { font-size: 17px; }
.section-title .sec-sub { font-size: 12px; color: var(--muted); }
.rail {
  display: flex; gap: 16px;
  overflow-x: auto; overflow-y: hidden;
  padding: 10px 2px 10px;
  scroll-snap-type: x proximity;
  overscroll-behavior-x: contain;
}
.rail > .card { flex: 0 0 196px; scroll-snap-align: start; }
.rail::-webkit-scrollbar { height: 6px; }
.rail::-webkit-scrollbar-thumb { background: var(--line); border-radius: 99px; }

.card-stats {
  position: absolute; left: 9px; bottom: 9px; z-index: 2;
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10.5px; font-weight: 800; color: #fff;
  background: rgba(0, 0, 0, .55); border: 1px solid rgba(255, 255, 255, .16);
  backdrop-filter: blur(6px); padding: 3px 8px; border-radius: 6px;
  font-variant-numeric: tabular-nums;
}
.card-stats .star { color: #ffc93c; }
.badge-hot { background: linear-gradient(135deg, #ff8a3d, #ff3d68); color: #fff; }
.card-tags { margin-top: 4px; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 테마별 기획전 */
.collections { margin-top: 40px; }
.collection-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.collection {
  position: relative; overflow: hidden; text-align: left;
  display: flex; flex-direction: column; gap: 5px;
  min-height: 168px; padding: 18px;
  border-radius: var(--radius-lg); border: 1px solid rgba(255, 255, 255, .08);
  color: #f2f5f8; cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.collection:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(0, 0, 0, .32); }
.collection .c-emoji { position: absolute; right: 14px; top: 12px; font-size: 30px; opacity: .92; }
.collection .c-tag { font-size: 9.5px; font-weight: 900; letter-spacing: .14em; color: rgba(255, 255, 255, .55); }
.collection .c-title { font-size: 16px; font-weight: 900; letter-spacing: -.03em; line-height: 1.3; margin-top: 2px; }
.collection .c-desc { font-size: 11.5px; line-height: 1.55; color: rgba(255, 255, 255, .62); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.collection .c-more { margin-top: auto; font-size: 11.5px; font-weight: 800; color: var(--green); }
.collection.c1 { background: linear-gradient(150deg, #24313f, #12161d 70%); }
.collection.c2 { background: linear-gradient(150deg, #3a2433, #17121a 70%); }
.collection.c3 { background: linear-gradient(150deg, #1f3346, #0f1620 70%); }
.collection.c4 { background: linear-gradient(150deg, #2c3324, #141812 70%); }

/* 업로드 진행 상태 */
.up-progress { margin-top: 10px; }
.up-progress .up-bar { height: 8px; border-radius: 99px; background: var(--bg-elev); border: 1px solid var(--line-soft); overflow: hidden; }
.up-progress .up-bar i { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--green-700), var(--green)); transition: width .25s var(--ease); }
.up-progress.indeterminate .up-bar i { width: 40% !important; background: repeating-linear-gradient(115deg, var(--green) 0 12px, var(--green-700) 12px 24px); animation: upSlide 1s linear infinite; }
@keyframes upSlide { from { transform: translateX(-40%); } to { transform: translateX(240%); } }
.up-progress .up-meta { display: flex; justify-content: space-between; gap: 10px; margin-top: 6px; font-size: 11.5px; color: var(--muted); }
.up-progress .up-meta #upStatus { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-progress .up-meta #upPct { flex: none; font-weight: 800; color: var(--text-2); font-variant-numeric: tabular-nums; }

/* 회차 숫자 버튼 그리드 */
.ep-jump { display: flex; align-items: flex-start; gap: 12px; padding: 2px 0 14px; border-bottom: 1px solid var(--line-soft); margin-bottom: 12px; }
.ep-jump-label { flex: none; padding-top: 7px; font-size: 11.5px; font-weight: 800; color: var(--muted); }
.ep-num-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.ep-num {
  min-width: 46px; height: 34px; padding: 0 9px;
  border-radius: 8px; border: 1px solid var(--line);
  background: var(--card); color: var(--text-2);
  font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums;
  transition: border-color .15s, color .15s, background-color .15s;
}
.ep-num:hover { border-color: var(--green); color: var(--green-700); }
[data-theme="dark"] .ep-num:hover { color: var(--green); }
.ep-num.watched { border-color: rgba(0, 220, 100, .35); color: var(--green-700); }
[data-theme="dark"] .ep-num.watched { color: var(--green); }
.ep-num.locked { color: var(--muted); }
.ep-num.active { background: var(--green); border-color: var(--green); color: #00240e; }

.vs-eps { margin-top: 16px; padding-top: 15px; border-top: 1px solid rgba(255, 255, 255, .08); }
.vs-eps h3 { font-size: 11.5px; font-weight: 800; letter-spacing: .04em; color: rgba(255, 255, 255, .45); margin-bottom: 9px; }
.vs-eps .ep-num { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .14); color: rgba(255, 255, 255, .82); }
.vs-eps .ep-num.locked { color: rgba(255, 255, 255, .45); }
.vs-eps .ep-num:hover { border-color: var(--green); color: var(--green); }
.vs-eps .ep-num.active { background: var(--green); border-color: var(--green); color: #00240e; }

/* =========================================================
   Footer
   ========================================================= */
.site-foot {
  border-top: 1px solid var(--line-soft);
  margin-top: 40px;
  padding: 30px 0 40px;
  background: var(--bg-soft);
}
.foot-inner { display: flex; flex-direction: column; gap: 5px; }
.foot-inner p { font-size: 12px; color: var(--text-2); }
.foot-inner .muted { font-size: 11.5px; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1080px) {
  .rev-grid { grid-template-columns: 1fr; }
  .studio-grid { grid-template-columns: 1fr; }
  .detail-head { grid-template-columns: 240px 1fr; gap: 28px; }
  .viewer-side { width: 340px; }
}

@media (max-width: 900px) {
  .topbar-inner { height: auto; padding: 10px 16px 0; flex-wrap: wrap; gap: 10px 14px; }
  .main-nav {
    order: 3;
    width: 100%;
    flex: none;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
    gap: 2px;
  }
  .main-nav::-webkit-scrollbar { display: none; }
  .nav-item { padding: 8px 11px; font-size: 13.5px; }
  .nav-item.active::after { left: 10px; right: 10px; bottom: 0; }
  .topbar-actions { margin-left: auto; }
  .logo-text { font-size: 17px; }
  .container { padding: 0 18px; }
  .hero { min-height: 340px; margin-top: 18px; }
  .hero-inner { padding: 28px 24px; }
  .hero-syn { -webkit-line-clamp: 3; font-size: 13.5px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(144px, 1fr)); gap: 22px 14px; }
  .detail-head { grid-template-columns: 190px 1fr; gap: 22px; }
  .detail-stats > div { padding-right: 18px; margin-right: 18px; }
  .ep-row { grid-template-columns: 88px 1fr; gap: 14px; }
  .ep-side { grid-column: 2; justify-content: flex-start; }
  .viewer-body { flex-direction: column; gap: 18px; padding: 14px 16px 20px; overflow-y: auto; }
  .stage-col { flex: none; }
  .stage { width: min(100%, calc(46vh * var(--ar))); max-height: 46vh; }
  .viewer-side { width: 100%; overflow: visible; padding-right: 0; }
  .collection-grid { grid-template-columns: repeat(2, 1fr); }
  .rail > .card { flex-basis: 168px; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .txn-table { font-size: 11.5px; }
  .txn-table th, .txn-table td { padding: 10px 14px; }
}

@media (max-width: 640px) {
  .page-head h1 { font-size: 24px; }
  .page-head { margin-bottom: 18px; }
  .hero { min-height: 380px; border-radius: 18px; }
  .hero::after { background: var(--hero-veil-m); }
  .hero-inner { padding: 22px 20px; }
  .hero h1 { font-size: 27px; }
  .hero .btn-primary, .hero .btn-ghost { height: 42px; font-size: 13.5px; padding: 0 18px; flex: 1; }
  .detail-head { grid-template-columns: 1fr; gap: 20px; }
  .detail-cover { max-width: 190px; }
  .detail-info h1 { font-size: 25px; }
  .detail-stats > div { padding-right: 14px; margin-right: 14px; }
  .detail-stats .v { font-size: 16px; }
  .ep-section > header { padding: 20px 0 12px; }
  .search { width: 100%; }
  .filter-row { flex-direction: column; align-items: stretch; }
  .chips { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
  .stat-grid { grid-template-columns: 1fr; }
  .stat-card .v { font-size: 26px; }
  .stat-card { padding: 18px; }
  .field-row { grid-template-columns: 1fr; }
  .studio-cta { padding: 20px; margin-top: 34px; }
  .studio-cta .btn { width: 100%; }
  .promo-strip { border-radius: 14px; padding: 9px 12px; font-size: 11.5px; }
  .promo-strip .ps-sub { display: none; }
  .hero-score .chip { font-size: 11px; padding: 2px 8px; }
  .section-title h2 { font-size: 17px; }
  .rail > .card { flex-basis: 148px; }
  .collection-grid { grid-template-columns: 1fr; }
  .collection { min-height: 0; padding: 16px; }
  .ep-jump { flex-direction: column; gap: 8px; }
  .ep-jump-label { padding-top: 0; }
  .panel { padding: 18px; }
  .coin-pill { padding-left: 8px; gap: 5px; font-size: 12.5px; }
  .charge-btn { padding: 0 8px; font-size: 11px; }
  .icon-btn { width: 34px; height: 34px; }
  .viewer-bar { padding: 10px 12px; gap: 8px; }
  .vb-title span { display: none; }
  .vb-nav button { padding: 0 10px; }
  .stage { width: min(100%, calc(46vh * var(--ar))); max-height: 46vh; border-radius: 14px; }
  .stage video { border-radius: 14px; }
  .toast-wrap { bottom: 16px; }
  .txn-wrap { overflow-x: auto; }
  .txn-table { min-width: 560px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
