/* =========================================================
   판서로 Component Styles  v1.0
   tokens.css 로드 후 사용
   ========================================================= */

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01","tnum","kern";
  letter-spacing: -.01em;
  min-height: 100vh;
}

/* Graph-paper + grain texture */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='32' height='32'><path d='M32 0H0V32' fill='none' stroke='%23D9CEB4' stroke-width='0.5' opacity='0.35'/></svg>"),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' seed='5'/><feColorMatrix values='0 0 0 0 0.12 0 0 0 0 0.10 0 0 0 0 0.08 0 0 0 0.035 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 32px 32px, 160px 160px;
}
[data-theme="dark"] body::before, body[data-theme="dark"]::before {
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='32' height='32'><path d='M32 0H0V32' fill='none' stroke='%232d3036' stroke-width='0.5' opacity='0.8'/></svg>"),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' seed='5'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.02 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, select, textarea { font-family: inherit; }
a { color: inherit; text-decoration: none; }

kbd {
  font-family: var(--font-mono);
  background: var(--bg-soft); border: 1px solid var(--line);
  padding: 1px 6px; border-radius: 4px; font-size: 11px; font-weight: 500;
}

/* ── Type helpers ── */
.serif  { font-family: var(--font-serif); letter-spacing: -.015em; }
.mono   { font-family: var(--font-mono); letter-spacing: 0; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: .24em; text-transform: uppercase;
  color: var(--muted); font-weight: 500;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 99px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--muted-2); }
::-webkit-scrollbar-track { background: transparent; }

/* ── Reveal animation ── */
.reveal { opacity: 0; transform: translateY(10px); transition: opacity .5s ease, transform .5s cubic-bezier(.22,1,.36,1); }
.reveal.in { opacity: 1; transform: none; }

/* ── Page wrapper ── */
#page { position: relative; z-index: 1; }

/* =========================================================
   HEADER
   ========================================================= */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in oklab, var(--bg) 85%, transparent);
  backdrop-filter: blur(14px) saturate(1.05);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s;
}
.site-header.scrolled { border-bottom-color: var(--line); box-shadow: 0 1px 0 var(--line-2); }
.site-header-inner {
  max-width: 1440px; margin: 0 auto;
  height: 60px; padding: 0 24px;
  display: grid; grid-template-columns: auto 1fr auto; gap: 24px;
  align-items: center;
}

/* Logo */
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.logo-mark {
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--ink); color: var(--bg);
  display: grid; place-items: center;
  font-family: var(--font-serif); font-weight: 700; font-size: 15px;
  position: relative; overflow: hidden; transform: rotate(-3deg);
  flex-shrink: 0;
}
.logo-mark::after {
  content: ''; position: absolute; right: -4px; bottom: -4px;
  width: 12px; height: 12px; background: var(--brand); border-radius: 50%;
}
.logo-word { font-size: 15px; letter-spacing: -.02em; }
.logo-sub {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .16em;
  color: var(--brand); margin-left: -2px; font-weight: 600;
}

/* Header search */
.h-search { justify-self: center; width: 100%; max-width: 520px; position: relative; }
.h-search input {
  width: 100%; height: 38px; padding: 0 14px 0 38px;
  background: var(--bg-soft); border: 1px solid transparent;
  border-radius: 99px; font-size: 13.5px; color: var(--ink);
  transition: background .2s, border-color .2s;
}
.h-search input::placeholder { color: var(--muted); }
.h-search input:focus { outline: none; background: var(--bg-card); border-color: var(--brand); }
.h-search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); display: grid; place-items: center; }
.h-search-icon svg, .h-search-icon i { width: 16px; height: 16px; }
.h-search kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); }

/* Header actions */
.h-actions { display: flex; align-items: center; gap: 4px; }
.h-btn {
  height: 36px; padding: 0 14px; border-radius: 8px;
  font-size: 13px; font-weight: 500; color: var(--ink-2);
  display: inline-flex; align-items: center; gap: 6px;
  transition: background .15s; white-space: nowrap;
}
.h-btn:hover { background: var(--bg-soft); }
.h-btn.primary { background: var(--brand); color: #fff; font-weight: 600; padding: 0 18px; }
.h-btn.primary:hover { background: var(--brand-deep); }
.h-btn.ghost { border: 1px solid var(--line); }
.h-btn.ghost:hover { background: var(--bg-card); border-color: var(--ink); }
.h-btn svg, .h-btn i { width: 14px; height: 14px; }
.h-theme {
  width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center;
  color: var(--ink-2); transition: background .15s;
}
.h-theme:hover { background: var(--bg-soft); }
.h-theme svg, .h-theme i { width: 15px; height: 15px; }

/* User avatar in header */
.h-user {
  width: 32px; height: 32px; border-radius: 50%;
  font-size: 13px; font-weight: 700; color: #fff;
  display: grid; place-items: center; cursor: pointer;
  flex-shrink: 0;
}

/* Mobile nav */
@media (max-width: 767px) {
  .site-header-inner { grid-template-columns: auto 1fr auto; gap: 12px; padding: 0 16px; }
  .h-search { display: none; }
  .h-btn:not(.primary):not(.h-theme) { display: none; }
}

/* =========================================================
   HERO (index page)
   ========================================================= */
.hero {
  padding: 84px 24px 68px;
  position: relative; overflow: hidden;
}
.hero-inner { max-width: 960px; margin: 0 auto; text-align: center; position: relative; }
.hero-rule {
  display: flex; align-items: center; justify-content: center; gap: 18px;
  color: var(--muted); font-family: var(--font-mono);
  font-size: 10px; font-weight: 500; letter-spacing: .32em; text-transform: uppercase;
  margin-bottom: 28px;
}
.hero-rule::before, .hero-rule::after {
  content: ''; flex: 1; max-width: 140px; height: 1px; background: var(--line);
}
.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(38px, 5.6vw, 68px);
  font-weight: 500; line-height: 1.08; letter-spacing: -.03em;
  margin: 0 0 14px; color: var(--ink);
}
.hero-title .hl {
  color: var(--brand); font-style: italic; font-weight: 500;
  position: relative; white-space: nowrap;
}
.hero-title .hl::after {
  content: ''; position: absolute; left: -2%; right: -2%; bottom: 6px; height: 10px;
  background: var(--brand-soft); z-index: -1; border-radius: 2px; transform: skewX(-6deg);
}
.hero-sub {
  font-size: 16px; color: var(--muted); max-width: 520px;
  margin: 0 auto 38px; line-height: 1.55;
}

/* Hero search box */
.hero-search { max-width: 640px; margin: 0 auto; position: relative; }
.hero-search-field {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-card); border: 1.5px solid var(--line);
  border-radius: 16px; padding: 8px 8px 8px 20px;
  box-shadow: 0 2px 0 var(--line-2), 0 14px 40px -12px rgba(30,26,21,.08);
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.hero-search-field:focus-within {
  border-color: var(--brand);
  box-shadow: 0 2px 0 var(--brand-soft), 0 14px 40px -10px rgba(194,65,12,.22);
  transform: translateY(-1px);
}
.hero-search-field .pencil-icon { width: 20px; height: 20px; color: var(--brand); flex-shrink: 0; }
.hero-search-field .pencil-icon svg, .hero-search-field .pencil-icon i { width: 20px; height: 20px; }
.hero-search-field input {
  flex: 1; border: 0; background: transparent; color: var(--ink);
  font-size: 17px; padding: 14px 4px; outline: none; min-width: 0;
  font-family: var(--font-serif);
}
.hero-search-field input::placeholder { color: var(--muted-2); font-style: italic; }
.hero-search-submit {
  height: 44px; padding: 0 22px; background: var(--ink); color: var(--bg);
  font-size: 14px; font-weight: 600; border-radius: 10px;
  display: inline-flex; align-items: center; gap: 6px;
  transition: background .15s, transform .15s; white-space: nowrap;
}
.hero-search-submit:hover { background: var(--brand); transform: translateY(-1px); }
.hero-search-submit i, .hero-search-submit svg { width: 15px; height: 15px; }

/* Autocomplete dropdown */
.suggest {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  background: var(--bg-card); border: 1px solid var(--line); border-radius: 14px;
  padding: 6px; z-index: 20;
  box-shadow: 0 20px 50px -10px rgba(30,26,21,.18);
  display: none;
}
.suggest.open { display: block; animation: slideDown .2s cubic-bezier(.22,1,.36,1); }
@keyframes slideDown { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.suggest-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  border-radius: 8px; font-size: 14px; color: var(--ink-2); cursor: pointer;
}
.suggest-item:hover, .suggest-item.active { background: var(--bg-soft); color: var(--brand); }
.suggest-item i, .suggest-item svg { width: 14px; height: 14px; color: var(--muted); flex-shrink: 0; }
.suggest-item .match { color: var(--ink); font-weight: 600; }
.suggest-item .kind {
  margin-left: auto; font-size: 11px; color: var(--muted);
  font-family: var(--font-mono);
}

/* Hero tags */
.hero-tags {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: center; gap: 8px; margin-top: 24px;
}
.hero-tags .label {
  font-size: 12px; color: var(--muted); font-family: var(--font-mono);
  letter-spacing: .14em; text-transform: uppercase; margin-right: 2px;
}
.tag-pill {
  padding: 7px 14px; border-radius: 99px; background: var(--bg-card);
  border: 1px solid var(--line); font-size: 13px; font-weight: 500; color: var(--ink-2);
  transition: background .15s, color .15s, border-color .15s, transform .15s; cursor: pointer;
  white-space: nowrap;
}
.tag-pill:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); transform: translateY(-2px); }

/* Hero stats */
.hero-stats {
  display: flex; justify-content: center; gap: 48px; margin-top: 52px;
  padding-top: 32px; border-top: 1px dashed var(--line);
  max-width: 640px; margin-left: auto; margin-right: auto;
}
.hero-stat { text-align: left; }
.hero-stat .num {
  font-family: var(--font-serif); font-size: 26px; font-weight: 600;
  color: var(--ink); font-variant-numeric: tabular-nums;
}
.hero-stat .lab {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .18em;
  text-transform: uppercase; color: var(--muted); margin-top: 2px;
}

/* =========================================================
   CATEGORY TABS
   ========================================================= */
.cat-tabs {
  position: sticky; top: 60px; z-index: 20;
  background: color-mix(in oklab, var(--bg) 90%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.cat-tabs-inner {
  max-width: 1440px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; gap: 2px;
  overflow-x: auto; scrollbar-width: none; position: relative;
}
.cat-tabs-inner::-webkit-scrollbar { display: none; }
.cat-tab {
  position: relative; padding: 16px 18px; white-space: nowrap;
  font-size: 14px; font-weight: 500; color: var(--muted);
  transition: color .15s; flex-shrink: 0;
}
.cat-tab:hover { color: var(--ink-2); }
.cat-tab.active { color: var(--ink); font-weight: 600; }
.cat-tab .count {
  font-family: var(--font-mono); font-size: 10px; margin-left: 4px;
  color: var(--muted-2); font-weight: 400;
}
.cat-tab.active .count { color: var(--brand); }
.cat-indicator {
  position: absolute; bottom: -1px; height: 2px; background: var(--brand);
  transition: left .28s cubic-bezier(.5,1.5,.5,1), width .28s cubic-bezier(.5,1.5,.5,1);
  pointer-events: none;
}
.cat-right { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.sort-sel {
  padding: 7px 10px 7px 14px; border-radius: 8px;
  background: var(--bg-soft); border: 1px solid transparent;
  font-size: 13px; color: var(--ink-2); cursor: pointer; font-family: inherit;
}
.sort-sel:hover { background: var(--bg-card); border-color: var(--line); }
.sort-sel:focus { outline: none; border-color: var(--brand); }

/* =========================================================
   MAIN LAYOUT (3-col)
   ========================================================= */
.main {
  max-width: 1440px; margin: 0 auto; padding: 32px 24px 80px;
  display: grid; grid-template-columns: 240px 1fr 280px; gap: 40px;
}
@media (max-width: 1279px) { .main { grid-template-columns: 1fr 280px; gap: 32px; } .sidebar-left { display: none; } }
@media (max-width: 1023px) { .main { grid-template-columns: 1fr; } .sidebar-right { display: none; } }

/* ── Sidebar shared ── */
.sidebar-left {
  position: sticky; top: 130px; align-self: start;
  max-height: calc(100vh - 150px); overflow-y: auto; padding-right: 4px;
}
.sidebar-right { position: sticky; top: 130px; align-self: start; }
.side-block { margin-bottom: 30px; }
.side-head {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .24em;
  text-transform: uppercase; color: var(--muted); font-weight: 600;
  padding-bottom: 10px; border-bottom: 1px solid var(--line); margin-bottom: 10px;
  display: flex; justify-content: space-between; align-items: center;
}
.side-row {
  display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 7px;
  font-size: 13.5px; color: var(--ink-2); cursor: pointer;
  transition: background .15s, color .15s;
}
.side-row:hover { background: var(--bg-soft); color: var(--ink); }
.side-row.active { color: var(--brand); font-weight: 600; }
.side-row .ico { width: 20px; display: grid; place-items: center; color: var(--muted); flex-shrink: 0; }
.side-row.active .ico { color: var(--brand); }
.side-row .ico i, .side-row .ico svg { width: 14px; height: 14px; }
.side-row .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-row .ct { font-family: var(--font-mono); font-size: 11px; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.side-row .dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

/* Mini instructor card */
.inst-card-mini {
  display: flex; align-items: center; gap: 10px; padding: 10px;
  border-radius: 10px; background: var(--bg-card); border: 1px solid var(--line);
  margin-bottom: 8px; transition: border-color .15s;
}
.inst-card-mini:hover { border-color: var(--brand); }
.inst-av {
  width: 32px; height: 32px; border-radius: 50%; color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: 13px; flex-shrink: 0;
}
.inst-mini-name { font-size: 13px; font-weight: 600; }
.inst-mini-meta { font-size: 11px; color: var(--muted); font-family: var(--font-mono); }

/* Featured instructor card */
.inst-card {
  padding: 16px; background: var(--bg-card); border: 1px solid var(--line);
  border-radius: 14px; text-align: center;
}
.inst-av-lg {
  width: 52px; height: 52px; border-radius: 50%; color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: 20px;
  margin: 0 auto 10px;
}
.inst-name { font-size: 15px; font-weight: 700; }
.inst-sub { font-size: 12px; color: var(--muted); margin: 2px 0 12px; }
.inst-stats { display: flex; justify-content: center; gap: 20px; margin-bottom: 12px; }
.inst-stats .n { font-family: var(--font-serif); font-size: 17px; font-weight: 600; }
.inst-stats .l { font-family: var(--font-mono); font-size: 10px; color: var(--muted); letter-spacing: .1em; text-transform: uppercase; }

/* Trending row */
.trend-row { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px dashed var(--line-2); }
.trend-row:last-child { border-bottom: 0; }
.trend-rank { font-family: var(--font-serif); font-size: 28px; font-weight: 600; font-style: italic; color: var(--brand); min-width: 36px; line-height: 1; }
.trend-title { font-size: 13px; font-weight: 500; line-height: 1.4; }
.trend-meta { font-size: 11px; color: var(--muted); margin-top: 2px; font-family: var(--font-mono); }

/* Side review card */
.review-card { padding: 12px 0; border-bottom: 1px dashed var(--line-2); }
.review-card:last-child { border-bottom: 0; }
.review-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.review-av { width: 26px; height: 26px; border-radius: 50%; color: #fff; display: grid; place-items: center; font-size: 11px; font-weight: 700; flex-shrink: 0; }
.review-name { font-size: 13px; font-weight: 600; flex: 1; }
.review-stars { font-size: 12px; color: var(--star); }
.review-body { font-size: 12.5px; color: var(--muted); line-height: 1.5; }

/* Follow button */
.follow-btn {
  height: 32px; padding: 0 14px; border-radius: 99px;
  border: 1px solid var(--line); font-size: 12px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 5px;
  transition: all .15s; color: var(--ink-2);
}
.follow-btn:hover { border-color: var(--brand); color: var(--brand); }
.follow-btn.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.inst-card .follow-btn {
  width: 100%; justify-content: center; margin-top: 4px;
  background: var(--brand); border-color: var(--brand); color: #fff;
  height: 36px; border-radius: 10px;
}
.inst-card .follow-btn:hover { background: var(--brand-deep, #9a3412); border-color: var(--brand-deep, #9a3412); }

/* =========================================================
   RESULTS HEAD + VIEW TOGGLE
   ========================================================= */
.results-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 20px; }
.results-title { font-size: 18px; font-weight: 700; margin: 0 0 4px; }
.results-title .q { color: var(--brand); font-family: var(--font-serif); font-style: italic; }
.results-sub { font-size: 12px; color: var(--muted); font-family: var(--font-mono); }
.view-toggle {
  display: flex; gap: 2px; background: var(--bg-soft);
  border-radius: 8px; padding: 3px;
}
.view-toggle button {
  width: 30px; height: 28px; border-radius: 6px; display: grid; place-items: center;
  color: var(--muted); transition: all .15s;
}
.view-toggle button i, .view-toggle button svg { width: 15px; height: 15px; }
.view-toggle button:hover { color: var(--ink); }
.view-toggle button.active { background: var(--bg-card); color: var(--ink); box-shadow: var(--shadow-sm); }

/* =========================================================
   CONTENT CARDS
   ========================================================= */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}
.card-list { display: flex; flex-direction: column; gap: 12px; }

/* Grid card */
.panser-card {
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius-lg); overflow: hidden;
  transition: box-shadow .2s, transform .2s, border-color .2s;
  cursor: pointer;
}
.panser-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); border-color: var(--line-2); }
.panser-card.feature { grid-column: span 2; border-color: var(--brand-soft); }
@media (max-width: 767px) { .panser-card.feature { grid-column: span 1; } }

.panser-thumb {
  position: relative; aspect-ratio: 16/10; background: var(--bg-soft);
  overflow: hidden;
}
.panser-thumb canvas { width: 100%; height: 100%; display: block; }
.th-badge {
  position: absolute; top: 10px; left: 10px;
  padding: 3px 8px; border-radius: 5px; font-size: 10px; font-weight: 700;
  font-family: var(--font-mono); letter-spacing: .08em;
}
.th-badge.free { background: var(--free-soft); color: var(--free); }
.th-badge.pro  { background: var(--pro-soft);  color: var(--pro); }
.th-dur {
  position: absolute; bottom: 8px; right: 8px;
  background: rgba(30,26,21,.72); color: #fff; backdrop-filter: blur(4px);
  padding: 2px 7px; border-radius: 5px; font-size: 11px; font-family: var(--font-mono);
}
.th-play {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(30,26,21,.32); opacity: 0; transition: opacity .2s;
}
.panser-card:hover .th-play { opacity: 1; }
.pbtn {
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(252,250,244,.9); display: grid; place-items: center;
  color: var(--ink);
}
.pbtn i, .pbtn svg { width: 20px; height: 20px; }

.panser-body { padding: 14px 16px 16px; }
.feature-mark {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .2em;
  text-transform: uppercase; color: var(--brand); font-weight: 600; margin-bottom: 6px;
}
.panser-cat { font-size: 11px; color: var(--muted); font-family: var(--font-mono); margin-bottom: 5px; }
.panser-title { font-size: 15px; font-weight: 700; line-height: 1.4; margin: 0 0 6px; }
.panser-keys { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.panser-key {
  font-size: 11px; color: var(--muted); background: var(--bg-soft);
  border-radius: 4px; padding: 2px 6px; font-family: var(--font-mono);
}
.panser-desc { font-size: 12.5px; color: var(--muted); line-height: 1.55; margin-bottom: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.panser-foot {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 10px; border-top: 1px dashed var(--line);
}
.panser-inst { display: flex; align-items: center; gap: 6px; }
.iv { width: 22px; height: 22px; border-radius: 50%; color: #fff; display: grid; place-items: center; font-size: 10px; font-weight: 700; flex-shrink: 0; }
.inm { font-size: 12px; color: var(--muted); }
.panser-stats { display: flex; gap: 10px; font-size: 11px; color: var(--muted); font-family: var(--font-mono); }
.panser-stats span { display: flex; align-items: center; gap: 3px; }
.panser-stats .star { color: var(--star); }
.panser-stats i, .panser-stats svg { width: 11px; height: 11px; }
.panser-price { font-size: 14px; font-weight: 700; color: var(--brand); margin-top: 8px; }
.panser-price.free { color: var(--free); }

/* List row card */
.panser-row {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 14px 16px;
  cursor: pointer; transition: box-shadow .2s, border-color .2s;
}
.panser-row:hover { box-shadow: var(--shadow); border-color: var(--line-2); }
.pr-thumb { width: 120px; height: 80px; border-radius: 8px; overflow: hidden; flex-shrink: 0; }
.pr-thumb canvas { width: 100%; height: 100%; display: block; }
.pr-body { flex: 1; min-width: 0; }
.pr-title { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.pr-desc { font-size: 12.5px; color: var(--muted); line-height: 1.5; margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pr-right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex-shrink: 0; }

/* =========================================================
   BADGE INLINE
   ========================================================= */
.badge-inline {
  display: inline-flex; align-items: center;
  padding: 3px 8px; border-radius: 5px;
  font-size: 10px; font-weight: 700; font-family: var(--font-mono); letter-spacing: .08em;
}
.badge-inline.free { background: var(--free-soft); color: var(--free); }
.badge-inline.pro  { background: var(--pro-soft);  color: var(--pro); }

/* =========================================================
   SCROLL TO TOP
   ========================================================= */
.scroll-top {
  position: fixed; bottom: 28px; right: 28px; z-index: 40;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--ink); color: var(--bg);
  display: grid; place-items: center;
  box-shadow: var(--shadow-lg);
  opacity: 0; pointer-events: none;
  transition: opacity .25s, transform .25s;
  transform: translateY(10px);
}
.scroll-top.show { opacity: 1; pointer-events: auto; transform: none; }
.scroll-top i, .scroll-top svg { width: 16px; height: 16px; }

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  border-top: 1px solid var(--line); padding: 40px 24px;
  text-align: center; color: var(--muted);
}
.site-footer p { font-family: var(--font-serif); font-style: italic; font-size: 14px; margin: 8px 0 16px; }
.site-footer .links { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; }
.site-footer .links a { font-size: 13px; color: var(--muted); transition: color .15s; }
.site-footer .links a:hover { color: var(--ink); }

/* =========================================================
   TOAST
   ========================================================= */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(16px);
  background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 99px;
  font-size: 13px; font-weight: 500; display: flex; align-items: center; gap: 8px;
  z-index: 999; white-space: nowrap;
  opacity: 0; pointer-events: none;
  transition: opacity .25s, transform .25s;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }
.toast i, .toast svg { width: 15px; height: 15px; color: var(--accent); }

/* =========================================================
   DETAIL / VIEW PAGE
   ========================================================= */
.breadcrumb {
  max-width: 1280px; margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--muted); font-family: var(--font-mono);
}
.breadcrumb a:hover { color: var(--brand); }
.breadcrumb .sep { color: var(--line); }
.breadcrumb .cur { color: var(--ink-2); font-weight: 500; }

.detail-main {
  max-width: 1280px; margin: 0 auto; padding: 0 24px 80px;
  display: grid; grid-template-columns: 1fr 320px; gap: 32px; align-items: start;
}
@media (max-width: 1023px) { .detail-main { grid-template-columns: 1fr; } }

/* Player */
.player-wrap {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  background: var(--bg-card); border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.player-canvas { width: 100%; display: block; aspect-ratio: 4/3; background: var(--bg-soft); }
.player-toolbar {
  display: flex; align-items: center; gap: 8px; padding: 10px 14px;
  border-top: 1px solid var(--line); background: var(--bg-card);
  flex-wrap: wrap; gap: 6px;
}
.player-time { font-family: var(--font-mono); font-size: 12px; color: var(--muted); min-width: 90px; }
.player-progress { flex: 1; height: 4px; border-radius: 99px; background: var(--bg-soft); min-width: 60px; cursor: pointer; position: relative; }
.player-progress-fill { height: 100%; border-radius: 99px; background: var(--brand); transition: width .1s linear; pointer-events: none; }
.player-btn {
  width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center;
  color: var(--ink-2); transition: background .15s;
}
.player-btn:hover { background: var(--bg-soft); }
.player-btn.active { color: var(--brand); }
.player-btn i, .player-btn svg { width: 15px; height: 15px; }
.play-btn {
  width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: var(--bg);
  display: grid; place-items: center;
}
.play-btn:hover { background: var(--brand); }
.play-btn i, .play-btn svg { width: 15px; height: 15px; }
.bg-sel {
  display: flex; gap: 4px; padding: 4px; background: var(--bg-soft); border-radius: 8px;
}
.bg-dot {
  width: 18px; height: 18px; border-radius: 50%; cursor: pointer;
  border: 2px solid transparent; transition: border-color .15s;
}
.bg-dot.active { border-color: var(--brand); }
.speed-sel {
  padding: 4px 8px; border-radius: 6px; background: var(--bg-soft);
  font-size: 11px; font-family: var(--font-mono); color: var(--ink-2); font-weight: 600;
  border: 1px solid transparent; cursor: pointer;
}
.speed-sel:hover { border-color: var(--line); }

/* Instructor bar */
.inst-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; background: var(--bg-card);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
}
.inst-bar-av { width: 42px; height: 42px; border-radius: 50%; color: #fff; display: grid; place-items: center; font-size: 17px; font-weight: 700; flex-shrink: 0; }
.inst-bar-info { flex: 1; min-width: 0; }
.inst-bar-name { font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 5px; }
.inst-bar-spec { font-size: 12px; color: var(--muted); margin: 1px 0; }
.inst-bar-meta { font-size: 11px; color: var(--muted); font-family: var(--font-mono); display: flex; gap: 4px; }
.inst-bar-meta .dot { color: var(--line); }
.verified { color: var(--accent); display: grid; place-items: center; }
.verified i, .verified svg { width: 14px; height: 14px; }

/* Description card */
.desc-card {
  padding: 16px; background: var(--bg-card);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
}
.desc-cat { font-size: 11px; color: var(--muted); font-family: var(--font-mono); margin-bottom: 6px; }
.desc-title { font-size: 20px; font-weight: 700; line-height: 1.35; margin: 0 0 10px; }
.desc-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.desc-body { font-size: 14px; color: var(--ink-2); line-height: 1.7; }
.desc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.desc-tag {
  font-size: 12px; color: var(--muted); background: var(--bg-soft);
  border-radius: 99px; padding: 3px 10px;
  border: 1px solid var(--line); transition: all .15s; cursor: pointer;
}
.desc-tag:hover { color: var(--brand); border-color: var(--brand); }

/* Right panel */
.panel {
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 14px;
}
.panel-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 14px; border-bottom: 1px solid var(--line);
  font-size: 13px; font-weight: 600;
}
.panel-head .ct { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }

.chap-row {
  display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px;
  border-bottom: 1px dashed var(--line-2); cursor: pointer;
  transition: background .15s;
}
.chap-row:last-child { border-bottom: 0; }
.chap-row:hover { background: var(--bg-soft); }
.chap-row.active { background: var(--brand-soft); }
.chap-row.done { opacity: .6; }
.chap-num { font-family: var(--font-mono); font-size: 13px; font-weight: 600; color: var(--muted); min-width: 24px; }
.chap-row.active .chap-num { color: var(--brand); }
.chap-title { font-size: 13px; font-weight: 500; }
.chap-range { font-size: 11px; color: var(--muted); font-family: var(--font-mono); margin-top: 2px; }
.chap-state { margin-left: auto; color: var(--muted); }
.chap-state i, .chap-state svg { width: 14px; height: 14px; }
.chap-row.active .chap-state { color: var(--brand); }

.info-row {
  display: flex; align-items: center; gap: 10px; padding: 9px 14px;
  border-bottom: 1px dashed var(--line-2); font-size: 13px;
}
.info-row:last-of-type { border-bottom: 0; }
.info-row .ic { color: var(--muted); width: 16px; display: grid; place-items: center; }
.info-row .ic i, .info-row .ic svg { width: 14px; height: 14px; }
.info-row .k { color: var(--muted); flex: 1; }
.info-row .v { font-weight: 500; }
.info-row .v.star { color: var(--star); }

.panel-price {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  border-top: 1px solid var(--line);
}
.panel-price .big { font-family: var(--font-serif); font-size: 22px; font-weight: 600; color: var(--ink); }
.panel-cta { padding: 0 14px 14px; display: flex; flex-direction: column; gap: 8px; }
.cta-primary {
  width: 100%; height: 44px; border-radius: 10px;
  background: var(--brand); color: #fff; font-size: 14px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: background .15s;
}
.cta-primary:hover { background: var(--brand-deep); }
.cta-primary i, .cta-primary svg { width: 16px; height: 16px; }
.cta-secondary {
  width: 100%; height: 38px; border-radius: 8px;
  border: 1px solid var(--line); font-size: 13px; font-weight: 500; color: var(--ink-2);
  display: flex; align-items: center; justify-content: center; gap: 6px;
  transition: all .15s;
}
.cta-secondary:hover { border-color: var(--brand); color: var(--brand); }
.cta-secondary i, .cta-secondary svg { width: 14px; height: 14px; }

/* Reviews section */
.section { max-width: 1280px; margin: 0 auto; padding: 0 24px 48px; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 20px; }
.section-title { font-size: 20px; font-weight: 700; margin: 0 0 4px; display: flex; align-items: center; gap: 10px; }
.section-title .num { font-family: var(--font-mono); font-size: 14px; color: var(--muted); font-weight: 400; }
.section-sub { font-size: 12px; color: var(--muted); font-family: var(--font-mono); }

.reviews-wrap { display: grid; grid-template-columns: 220px 1fr; gap: 32px; }
@media (max-width: 767px) { .reviews-wrap { grid-template-columns: 1fr; } }

.rating-summary { text-align: center; }
.rating-big { font-family: var(--font-serif); font-size: 56px; font-weight: 600; line-height: 1; color: var(--ink); }
.rating-stars { font-size: 18px; color: var(--star); margin: 4px 0; }
.rating-count { font-size: 12px; color: var(--muted); font-family: var(--font-mono); margin-bottom: 16px; }
.rating-bars { display: flex; flex-direction: column; gap: 5px; }
.rating-bar { display: flex; align-items: center; gap: 8px; font-size: 12px; font-family: var(--font-mono); }
.rating-bar .bar { flex: 1; height: 6px; background: var(--bg-soft); border-radius: 99px; overflow: hidden; }
.rating-bar .bar span { display: block; height: 100%; background: var(--star); border-radius: 99px; }

.review-compose {
  display: flex; gap: 10px; align-items: center; margin-bottom: 16px;
  padding-bottom: 16px; border-bottom: 1px solid var(--line);
}
.rc-av { width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 14px; flex-shrink: 0; }
.review-compose input {
  flex: 1; height: 36px; padding: 0 14px; border-radius: 99px;
  background: var(--bg-soft); border: 1px solid transparent; color: var(--ink); font-size: 13px;
}
.review-compose input:focus { outline: none; border-color: var(--brand); background: var(--bg-card); }

.review-list { display: flex; flex-direction: column; gap: 16px; }
.review-card-full { padding: 16px; background: var(--bg-card); border: 1px solid var(--line); border-radius: 12px; }
.review-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.review-who { flex: 1; }
.review-name { font-size: 14px; font-weight: 600; }
.review-meta { font-size: 11px; color: var(--muted); font-family: var(--font-mono); }
.review-stars { font-size: 13px; color: var(--star); }
.review-body { font-size: 13.5px; color: var(--ink-2); line-height: 1.6; margin-bottom: 10px; }
.review-actions { display: flex; gap: 12px; }
.review-actions button { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 4px; transition: color .15s; }
.review-actions button:hover { color: var(--brand); }
.review-actions button.liked { color: var(--brand); }
.review-actions button i, .review-actions button svg { width: 12px; height: 12px; }

/* Related grid */
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }

/* PIP (picture-in-picture) */
.pip {
  position: fixed; bottom: 24px; right: 24px; z-index: 50;
  width: 280px; border-radius: 12px; overflow: hidden;
  box-shadow: 0 8px 32px rgba(30,26,21,.24);
  border: 1px solid var(--line);
  opacity: 0; pointer-events: none; transform: translateY(12px);
  transition: opacity .25s, transform .25s;
}
.pip.show { opacity: 1; pointer-events: auto; transform: none; }
.pip canvas { width: 100%; aspect-ratio: 4/3; display: block; }
.pip-bar {
  background: var(--bg-card); padding: 8px 10px;
  display: flex; align-items: center; gap: 8px;
}
.pip-bar span { flex: 1; font-size: 12px; color: var(--muted); font-family: var(--font-mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* =========================================================
   DASHBOARD
   ========================================================= */
.dash-layout {
  display: grid; grid-template-columns: 240px 1fr; min-height: 100vh;
}
@media (max-width: 1023px) { .dash-layout { grid-template-columns: 1fr; } }

.dash-sidebar {
  background: var(--bg-card); border-right: 1px solid var(--line);
  padding: 24px 16px; position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 4px;
}
.dash-logo { display: flex; align-items: center; gap: 10px; font-weight: 700; margin-bottom: 24px; padding: 0 8px; }
.dash-nav-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 9px;
  font-size: 13.5px; font-weight: 500; color: var(--ink-2);
  transition: background .15s, color .15s; cursor: pointer;
}
.dash-nav-item:hover { background: var(--bg-soft); color: var(--ink); }
.dash-nav-item.active { background: var(--brand-soft); color: var(--brand); }
.dash-nav-item i, .dash-nav-item svg { width: 16px; height: 16px; flex-shrink: 0; }
.dash-nav-section {
  font-family: var(--font-mono); font-size: 9px; letter-spacing: .3em;
  text-transform: uppercase; color: var(--muted); padding: 16px 12px 4px;
}
.dash-plan-card {
  margin-top: auto; padding: 14px; background: var(--bg-soft);
  border-radius: 12px; border: 1px solid var(--line);
}
.dash-plan-name { font-size: 11px; font-family: var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.dash-plan-cta {
  display: block; width: 100%; height: 34px; margin-top: 10px; border-radius: 8px;
  background: var(--brand); color: #fff; font-size: 12px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.dash-plan-cta:hover { background: var(--brand-deep); }

.dash-main { padding: 32px 32px 80px; min-width: 0; }
.dash-header { margin-bottom: 28px; }
.dash-title { font-family: var(--font-serif); font-size: 28px; font-weight: 600; margin: 0 0 4px; }
.dash-sub { font-size: 13px; color: var(--muted); }

.dash-panel { display: none; }
.dash-panel.active { display: block; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; margin-bottom: 28px; }
.stat-card {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 16px; transition: box-shadow .2s;
}
.stat-card:hover { box-shadow: var(--shadow); }
.stat-card .lbl { font-size: 11px; font-family: var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.stat-card .val { font-family: var(--font-serif); font-size: 28px; font-weight: 600; line-height: 1; color: var(--ink); }
.stat-card .delta { font-size: 11px; color: var(--free); margin-top: 4px; font-family: var(--font-mono); }

/* Content table */
.content-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.content-table th {
  text-align: left; padding: 10px 12px; font-family: var(--font-mono);
  font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted);
  border-bottom: 1px solid var(--line); font-weight: 600;
}
.content-table td { padding: 12px 12px; border-bottom: 1px dashed var(--line-2); vertical-align: middle; }
.content-table tr:last-child td { border-bottom: 0; }
.content-table tr:hover td { background: var(--bg-soft); }

/* =========================================================
   SIGNUP / LOGIN
   ========================================================= */
.auth-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 40px 24px;
}
.auth-card {
  width: 100%; max-width: 440px;
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius-xl); padding: 40px;
  box-shadow: var(--shadow-lg);
}
.auth-logo { text-align: center; margin-bottom: 28px; }
.auth-title { font-family: var(--font-serif); font-size: 24px; font-weight: 600; text-align: center; margin: 0 0 6px; }
.auth-sub { font-size: 13px; color: var(--muted); text-align: center; margin: 0 0 28px; }
.auth-divider {
  display: flex; align-items: center; gap: 12px; margin: 20px 0;
  font-size: 12px; color: var(--muted); font-family: var(--font-mono);
}
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* Form fields */
.field { margin-bottom: 16px; }
.field label:not(.field-label) { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--ink-2); }
.field input, .field select {
  width: 100%; height: 44px; padding: 0 14px;
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: var(--radius); font-size: 14px; color: var(--ink);
  transition: border-color .2s, background .2s;
}
.field input:focus, .field select:focus {
  outline: none; border-color: var(--brand); background: var(--bg-card);
}
.field input::placeholder { color: var(--muted-2); }
.field-hint { font-size: 11px; color: var(--muted); margin-top: 4px; }

.btn-block {
  width: 100%; height: 46px; border-radius: var(--radius);
  background: var(--brand); color: #fff; font-size: 15px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: background .15s; margin-top: 8px;
}
.btn-block:hover { background: var(--brand-deep); }
.btn-block.secondary { background: var(--bg-soft); color: var(--ink-2); border: 1px solid var(--line); }
.btn-block.secondary:hover { background: var(--bg-card); border-color: var(--ink); color: var(--ink); }

.auth-footer { text-align: center; font-size: 13px; color: var(--muted); margin-top: 20px; }
.auth-footer a { color: var(--brand); font-weight: 600; }

/* =========================================================
   CHANNEL PAGE (@username)
   ========================================================= */
.channel-hero {
  background: var(--bg-card); border-bottom: 1px solid var(--line);
  padding: 40px 24px;
}
.channel-hero-inner { max-width: 1280px; margin: 0 auto; display: flex; gap: 24px; align-items: flex-end; flex-wrap: wrap; }
.channel-av-lg {
  width: 72px; height: 72px; border-radius: 50%; color: #fff;
  display: grid; place-items: center; font-size: 28px; font-weight: 700; flex-shrink: 0;
}
.channel-info { flex: 1; }
.channel-name { font-family: var(--font-serif); font-size: 28px; font-weight: 600; margin: 0 0 4px; }
.channel-handle { font-family: var(--font-mono); font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.channel-bio { font-size: 14px; color: var(--ink-2); max-width: 500px; }
.channel-stats { display: flex; gap: 24px; margin-top: 12px; flex-wrap: wrap; }
.channel-stats span { font-size: 13px; color: var(--muted); }
.channel-stats strong { color: var(--ink); font-weight: 700; }
.channel-content { max-width: 1280px; margin: 0 auto; padding: 32px 24px 80px; }

/* =========================================================
   MODAL
   ========================================================= */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(30,26,21,.5); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 24px;
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.modal-box {
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius-xl); padding: 32px; width: 100%; max-width: 480px;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px); transition: transform .25s cubic-bezier(.22,1,.36,1);
}
.modal-overlay.open .modal-box { transform: none; }
.modal-title { font-family: var(--font-serif); font-size: 20px; font-weight: 600; margin: 0 0 16px; }
.modal-close {
  position: absolute; top: 16px; right: 16px; width: 32px; height: 32px;
  border-radius: 8px; display: grid; place-items: center; color: var(--muted);
}
.modal-close:hover { background: var(--bg-soft); color: var(--ink); }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 767px) {
  .hero { padding: 52px 16px 48px; }
  .hero-stats { gap: 24px; }
  .main { padding: 20px 16px 60px; }
  .dash-main { padding: 20px 16px 60px; }
  .detail-main { padding: 0 16px 60px; }
  .section { padding: 0 16px 32px; }
  .auth-card { padding: 28px 20px; }
  .channel-hero { padding: 28px 16px; }
}

/* =========================================================
   SUPPLEMENT v1.1 — 새 PHP 템플릿 클래스 보완
   ========================================================= */

/* ── Generic helpers ── */
.muted  { color: var(--muted); }
.spin   { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
[hidden] { display: none !important; }

/* ── Avatar system ── */
.avatar {
  border-radius: 50%; object-fit: cover; display: inline-block;
  background: var(--accent); color: #fff; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.avatar-placeholder { font-size: 14px; }
.avatar-sm  { width: 32px;  height: 32px;  font-size: 12px; }
.avatar-md  { width: 44px;  height: 44px;  font-size: 16px; }
.avatar-lg  { width: 56px;  height: 56px;  font-size: 20px; }
.avatar-xl  { width: 80px;  height: 80px;  font-size: 28px; }

/* ── Button system ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-family: var(--font-sans); font-weight: 600; border-radius: var(--radius);
  transition: background .15s, color .15s, border-color .15s, transform .15s;
  cursor: pointer; border: 1px solid transparent; white-space: nowrap;
  height: 40px; padding: 0 18px; font-size: 14px;
}
.btn i, .btn svg { width: 15px; height: 15px; }
.btn-brand  { background: var(--brand); color: #fff; }
.btn-brand:hover { background: var(--brand-deep); }
.btn-ghost  { background: transparent; color: var(--ink-2); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); background: var(--bg-card); }
.btn-social { background: var(--bg-soft); color: var(--ink-2); border-color: var(--line); }
.btn-social:hover { border-color: var(--ink-2); }
.btn-social:disabled { opacity: .5; cursor: default; }
.btn-sm   { height: 32px; padding: 0 12px; font-size: 13px; }
.btn-sm i, .btn-sm svg { width: 13px; height: 13px; }
.btn-block { width: 100%; }
.btn-danger { color: var(--danger) !important; border-color: var(--danger-soft) !important; }
.btn-danger:hover { background: var(--danger-soft) !important; }

/* ── Icon button ── */
.icon-btn {
  width: 32px; height: 32px; border-radius: 8px; display: inline-flex;
  align-items: center; justify-content: center; color: var(--muted);
  transition: background .15s, color .15s; cursor: pointer; background: none; border: none;
}
.icon-btn:hover { background: var(--bg-soft); color: var(--ink); }
.icon-btn--danger:hover { color: var(--danger); }
.icon-btn i, .icon-btn svg { width: 14px; height: 14px; }

/* ── Badge ── */
.badge {
  display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 99px;
  font-size: 11px; font-weight: 700; font-family: var(--font-mono); letter-spacing: .06em;
}
.badge-free { background: var(--free-soft);  color: var(--free);  }
.badge-pro  { background: var(--pro-soft);   color: var(--pro);   }
.badge-lg   { font-size: 13px; padding: 3px 12px; }

/* ── Follow button ── */
.btn-follow {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 16px; border-radius: 99px; font-size: 13px; font-weight: 600;
  border: 1.5px solid var(--brand); color: var(--brand); background: transparent;
  transition: all .15s; cursor: pointer;
}
.btn-follow:hover  { background: var(--brand); color: #fff; }
.btn-follow.following { background: var(--bg-soft); border-color: var(--line); color: var(--muted); }
.btn-follow.following:hover { border-color: var(--danger); color: var(--danger); }

/* ── Header supplement ── */
.header-inner {
  max-width: 1440px; margin: 0 auto;
  height: 60px; padding: 0 24px;
  display: grid; grid-template-columns: auto 1fr auto; gap: 16px;
  align-items: center;
}
.header-logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 15px; font-weight: 700; text-decoration: none; color: var(--ink);
}
.header-logo .logo-text { letter-spacing: -.02em; }
.header-search { justify-self: center; width: 100%; max-width: 520px; }
.search-wrap { position: relative; display: flex; align-items: center; }
.search-ico {
  position: absolute; left: 12px; color: var(--muted);
  width: 16px; height: 16px; pointer-events: none;
}
.search-input {
  width: 100%; height: 38px; padding: 0 36px 0 38px;
  background: var(--bg-soft); border: 1px solid transparent;
  border-radius: 99px; font-size: 13.5px; color: var(--ink);
  transition: background .2s, border-color .2s;
}
.search-input::placeholder { color: var(--muted); }
.search-input:focus { outline: none; background: var(--bg-card); border-color: var(--brand); }
.search-clear {
  position: absolute; right: 10px; background: none; border: none;
  color: var(--muted); cursor: pointer; display: flex; align-items: center;
  padding: 4px;
}
.search-clear i { width: 14px; height: 14px; }
.header-actions { display: flex; align-items: center; gap: 4px; }
.header-guest   { display: flex; align-items: center; gap: 6px; }
.header-user    { position: relative; }
.header-notif   { position: relative; }
.notif-dot {
  position: absolute; top: 6px; right: 6px; width: 7px; height: 7px;
  border-radius: 50%; background: var(--brand); border: 2px solid var(--bg);
}
.avatar-btn {
  display: flex; align-items: center; gap: 8px;
  background: none; border: none; cursor: pointer; padding: 4px 8px; border-radius: 8px;
  transition: background .15s;
}
.avatar-btn:hover { background: var(--bg-soft); }
.avatar-name { font-size: 13px; font-weight: 600; color: var(--ink); }
.avatar-chevron { width: 14px; height: 14px; color: var(--muted); }
.dropdown-menu {
  position: absolute; top: calc(100% + 6px); right: 0;
  min-width: 200px; background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  padding: 6px; z-index: 40;
  animation: slideDown .18s cubic-bezier(.22,1,.36,1);
}
.dropdown-header { padding: 8px 10px 8px; }
.dropdown-header strong { display: block; font-size: 14px; font-weight: 700; }
.dropdown-header small  { font-size: 11px; }
.dropdown-divider { margin: 4px 0; border: 0; border-top: 1px solid var(--line-2); }
.dropdown-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 8px; font-size: 13.5px;
  color: var(--ink-2); transition: background .12s, color .12s;
  width: 100%; text-align: left;
  border: 0; background: none; cursor: pointer;
}
.dropdown-item:hover { background: var(--bg-soft); color: var(--ink); }
.dropdown-item--danger:hover { color: var(--danger); }
.dropdown-item i { width: 14px; height: 14px; color: var(--muted); }

@media (max-width: 767px) {
  .header-inner { grid-template-columns: auto auto; }
  .header-search { display: none; }
  .avatar-name, .avatar-chevron { display: none; }
}

/* ── Hero supplement ── */
.hero-eyebrow {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .3em;
  text-transform: uppercase; color: var(--brand); margin-bottom: 14px;
}
.hero-title-accent { color: var(--brand); font-style: italic; }
/* .hero-search supplement removed — original rule (L192: max-width:640px; margin:0 auto; position:relative) used instead */
.hs-ico { color: var(--muted); width: 18px; height: 18px; flex-shrink: 0; }
.hs-input {
  flex: 1; border: none; background: transparent; color: var(--ink);
  font-size: 16px; outline: none; padding: 8px 4px;
  font-family: var(--font-serif); min-width: 0;
}
.hs-input::placeholder { color: var(--muted-2); font-style: italic; }
.hs-btn { flex-shrink: 0; }
.hs-input--sm { font-size: 14px; padding: 6px 4px; }
.hero-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 32px; }
.hero-tag {
  font-size: 12.5px; padding: 5px 12px; border-radius: 99px;
  background: var(--bg-soft); border: 1px solid var(--line); color: var(--muted);
  transition: all .15s; font-family: var(--font-mono);
}
.hero-tag:hover { background: var(--brand-soft); color: var(--brand); border-color: var(--brand); }
/* NOTE: .hero-stats original definition (lines ~262-275) uses reference design layout;
   supplement override removed so .hero-stat .num/.lab blocks render correctly */
.hero-stats-dot { color: var(--line); }

/* ── Results head ── */
/* .results-head supplement removed — original rule (L414: display:flex; justify-content:space-between) used instead */
.results-head-inner {
  max-width: 1440px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.results-query { font-size: 16px; margin: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.results-query-term { font-family: var(--font-serif); font-weight: 600; color: var(--ink); }
.results-count { font-size: 13px; color: var(--muted); font-family: var(--font-mono); }
.results-search { display: flex; align-items: center; gap: 8px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 4px 4px 12px; }

/* ── Category tabs ── */
.category-tabs {
  position: sticky; top: 60px; z-index: 20;
  background: color-mix(in oklab, var(--bg) 90%, transparent);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
  overflow-x: auto; scrollbar-width: none;
}
.category-tabs::-webkit-scrollbar { display: none; }
/* .cat-tabs-inner supplement removed — original rule (L286: align-items:center; gap:2px; overflow-x:auto) used instead */
.cat-tab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 12px 14px; font-size: 13.5px; font-weight: 500; color: var(--muted);
  transition: color .15s; white-space: nowrap; border-bottom: 2px solid transparent;
  flex-shrink: 0;
}
.cat-tab:hover { color: var(--ink); }
.cat-tab.active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }
.cat-tab i { width: 14px; height: 14px; }
.cat-tab-indicator {
  position: absolute; bottom: 0; height: 2px; background: var(--brand);
  border-radius: 2px 2px 0 0; transition: left .2s, width .2s;
  pointer-events: none;
}

/* ── Main layout ── */
.main-layout { max-width: 1440px; margin: 0 auto; padding: 32px 24px 80px; }
.main-inner {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr) 240px;
  gap: 28px;
}
@media (max-width: 1199px) { .main-inner { grid-template-columns: minmax(0,1fr) 220px; } .sidebar-left { display: none; } }
@media (max-width: 767px)  { .main-inner { grid-template-columns: 1fr; } .sidebar-right { display: none; } }

/* ── Sidebars ── */
.sidebar { position: sticky; top: 106px; align-self: start; }
.sidebar-section { margin-bottom: 24px; }
.sidebar-title {
  font-size: 11px; font-family: var(--font-mono); letter-spacing: .2em;
  text-transform: uppercase; color: var(--muted); font-weight: 600; margin: 0 0 10px;
}
.sidebar-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 2px; }
.sidebar-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: 8px; font-size: 13.5px; color: var(--ink-2);
  transition: background .12s, color .12s;
}
.sidebar-item:hover { background: var(--bg-soft); color: var(--ink); }
.sidebar-item.active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.sidebar-item i { width: 14px; height: 14px; flex-shrink: 0; }
.diff-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

/* ── Content area ── */
.content-area {}
.content-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 18px; flex-wrap: wrap;
}
.content-count { font-size: 13px; color: var(--muted); margin: 0; }
.content-count strong { color: var(--ink); }
.toolbar-right { display: flex; align-items: center; gap: 8px; }
.sort-select {
  height: 32px; padding: 0 10px; border-radius: 8px;
  background: var(--bg-soft); border: 1px solid var(--line); font-size: 13px;
  color: var(--ink-2); cursor: pointer;
}
.sort-select:focus { outline: none; border-color: var(--brand); }
.view-toggle { display: flex; gap: 2px; }
.view-btn {
  width: 32px; height: 32px; border-radius: 8px; display: flex;
  align-items: center; justify-content: center; color: var(--muted);
  transition: background .12s, color .12s;
}
.view-btn:hover { background: var(--bg-soft); color: var(--ink); }
.view-btn.active { background: var(--brand-soft); color: var(--brand); }
.view-btn i { width: 15px; height: 15px; }

/* ── Panser Grid & Cards ── */
.panser-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
.panser-grid[data-view="list"] { grid-template-columns: 1fr; }

.panser-card {
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius-lg); overflow: hidden;
  transition: box-shadow .2s, transform .2s;
}
.panser-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.panser-card--sm { }

.card-thumb-link { display: block; }
.card-thumb { position: relative; aspect-ratio: 16/9; overflow: hidden; background: var(--bg-soft); }
.card-thumb canvas { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-thumb-overlay {
  position: absolute; inset: 0; background: rgba(30,26,21,.35);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .2s; color: #fff;
}
.card-thumb-overlay i { width: 40px; height: 40px; }
.panser-card:hover .card-thumb-overlay { opacity: 1; }
.card-duration {
  position: absolute; bottom: 8px; right: 8px;
  background: rgba(0,0,0,.7); color: #fff; padding: 2px 7px;
  border-radius: 6px; font-size: 11px; font-family: var(--font-mono); font-weight: 600;
}
.card-body { padding: 14px; }
.card-meta-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.card-cat { font-size: 11px; color: var(--muted); font-family: var(--font-mono); }
.card-title { font-size: 14px; font-weight: 700; line-height: 1.4; margin: 0 0 8px; }
.card-title a { color: var(--ink); }
.card-title a:hover { color: var(--brand); }
.card-title--sm { font-size: 13px; }
.card-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 10px; }
.card-tag {
  font-size: 11px; padding: 2px 8px; border-radius: 99px;
  background: var(--bg-soft); color: var(--muted); border: 1px solid var(--line-2);
  transition: all .12s;
}
.card-tag:hover { color: var(--brand); border-color: var(--brand); }
.card-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card-inst { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.card-inst-avatar {
  width: 20px; height: 20px; border-radius: 50%; background: var(--accent);
  color: #fff; font-size: 10px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.card-inst-avatar-img { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; }
.card-stats { display: flex; align-items: center; gap: 10px; font-size: 11px; color: var(--muted); }
.card-stats i { width: 11px; height: 11px; }
.card-price { margin-top: 8px; }
.price-tag {
  font-family: var(--font-mono); font-size: 13px; font-weight: 700;
  color: var(--pro); background: var(--pro-soft); padding: 3px 10px; border-radius: 99px;
}

/* List view card */
.panser-grid[data-view="list"] .panser-card {
  display: grid; grid-template-columns: 180px 1fr;
}
.panser-grid[data-view="list"] .card-thumb { aspect-ratio: auto; height: 100%; min-height: 100px; }

/* ── Pagination ── */
.pagination { display: flex; justify-content: center; gap: 6px; padding: 32px 0; }
.page-btn {
  min-width: 36px; height: 36px; padding: 0 10px; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13.5px; color: var(--ink-2);
  border: 1px solid var(--line); background: var(--bg-card);
  transition: all .12s; text-decoration: none;
}
.page-btn:hover { border-color: var(--brand); color: var(--brand); }
.page-btn.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.page-btn i { width: 14px; height: 14px; }

/* ── Trending / Creator / Tag cloud (right sidebar) ── */
.trending-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.trending-item { display: flex; align-items: flex-start; gap: 10px; }
.trending-rank {
  font-family: var(--font-mono); font-size: 13px; font-weight: 700;
  color: var(--muted-2); min-width: 18px; margin-top: 2px;
}
.trending-rank--top { color: var(--brand); }
.trending-info { flex: 1; min-width: 0; }
.trending-title { font-size: 13px; font-weight: 600; color: var(--ink-2); display: block; line-clamp: 2; -webkit-line-clamp: 2; overflow: hidden; }
.trending-title:hover { color: var(--brand); }
.trending-sub { font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 4px; margin-top: 3px; }
.trending-sub i { width: 11px; height: 11px; }

.creator-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.creator-item { display: flex; align-items: center; gap: 10px; }
.creator-info { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; text-decoration: none; }
.creator-text { min-width: 0; }
.creator-name { font-size: 13px; font-weight: 700; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }
.creator-bio  { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; }

/* ── Footer ── */
.site-footer {
  border-top: 1px solid var(--line); margin-top: 48px;
  background: var(--bg-soft);
}
.footer-inner {
  max-width: 1440px; margin: 0 auto; padding: 48px 24px 32px;
  display: grid; grid-template-columns: 1fr 2fr; gap: 40px;
}
@media (max-width: 767px) { .footer-inner { grid-template-columns: 1fr; gap: 24px; } }
.footer-brand {}
.footer-logo { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; color: var(--ink); margin-bottom: 10px; }
.footer-tagline { font-size: 13px; color: var(--muted); line-height: 1.6; max-width: 280px; margin: 0; }
.footer-nav { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 540px) { .footer-nav { grid-template-columns: repeat(2, 1fr); } }
.footer-col-title { font-size: 11px; font-family: var(--font-mono); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.footer-col a { font-size: 13.5px; color: var(--ink-2); }
.footer-col a:hover { color: var(--brand); }
.footer-bottom {
  max-width: 1440px; margin: 0 auto; padding: 16px 24px;
  border-top: 1px solid var(--line-2);
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; color: var(--muted);
}
.footer-lang { display: flex; align-items: center; gap: 6px; }
.footer-lang i { width: 13px; height: 13px; }

/* ── Scroll to top ── */
.scroll-top-btn {
  position: fixed; bottom: 28px; right: 28px; z-index: 30;
  width: 44px; height: 44px; border-radius: 50%; border: none;
  background: var(--ink); color: var(--bg); display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-lg); cursor: pointer;
  opacity: 0; transform: translateY(10px); transition: opacity .25s, transform .25s;
  pointer-events: none;
}
.scroll-top-btn.visible { opacity: 1; transform: none; pointer-events: auto; }
.scroll-top-btn:hover { background: var(--brand); }
.scroll-top-btn i { width: 18px; height: 18px; }

/* ── Toast ── */
#toast-container {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%);
  z-index: 999; display: flex; flex-direction: column; gap: 8px; align-items: center;
  pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 18px; border-radius: 12px; font-size: 13.5px; font-weight: 500;
  background: var(--ink); color: var(--bg);
  box-shadow: 0 6px 24px rgba(30,26,21,.24);
  opacity: 0; transform: translateY(8px) scale(.95);
  transition: opacity .22s, transform .22s;
  cursor: pointer; pointer-events: auto; white-space: nowrap;
}
.toast.toast-show { opacity: 1; transform: none; }
.toast-success { background: var(--free);   }
.toast-error   { background: var(--danger); }
.toast-info    { background: var(--accent); }
.toast-warn    { background: var(--star); color: var(--ink); }
.toast-icon    { font-size: 15px; }

/* ── Auth page supplement ── */
.auth-page body, body.auth-page { background: var(--bg); }
.auth-main {
  min-height: calc(100vh - 60px);
  display: flex; align-items: center; justify-content: center; padding: 40px 24px;
}
.auth-brand {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 20px; font-weight: 700; margin-bottom: 24px; text-align: center;
}
.auth-card { animation: fadeUp .3s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.auth-form { margin-top: 4px; }
.auth-switch { text-align: center; font-size: 13px; color: var(--muted); margin-top: 18px; }
.auth-switch a { color: var(--brand); font-weight: 600; }
.social-btns { display: flex; flex-direction: column; gap: 10px; }

/* Form field supplement */
.field-label {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--ink-2);
}
.field-label-link { font-size: 12px; font-weight: 400; color: var(--brand); }
.field-input {
  width: 100%; height: 44px; padding: 0 14px;
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: var(--radius); font-size: 14px; color: var(--ink);
  transition: border-color .2s, background .2s;
  display: block;
}
.field-input:focus { outline: none; border-color: var(--brand); background: var(--bg-card); }
.field-input::placeholder { color: var(--muted-2); }
.field-input.is-error { border-color: var(--danger); }
textarea.field-input { height: auto; min-height: 90px; padding: 12px 14px; resize: vertical; line-height: 1.6; }
.field-input--sm { height: 34px; font-size: 13px; }
.field-input-group { display: flex; align-items: center; position: relative; }
.field-input-group .field-input { flex: 1; }
.field-prefix {
  height: 44px; display: flex; align-items: center; padding: 0 10px;
  background: var(--bg-soft); border: 1px solid var(--line); border-right: 0;
  border-radius: var(--radius) 0 0 var(--radius); font-size: 13px; color: var(--muted);
  white-space: nowrap;
}
.field-prefix + .field-input { border-radius: 0 var(--radius) var(--radius) 0; }
.field-eye {
  position: absolute; right: 12px; background: none; border: none;
  color: var(--muted); cursor: pointer; display: flex; align-items: center;
}
.field-eye i { width: 16px; height: 16px; }
.field-error { display: block; font-size: 12px; color: var(--danger); margin-top: 4px; }
.field-hint  { display: block; font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.checkbox-label { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; cursor: pointer; margin-bottom: 16px; }
.checkbox-label input { width: 16px; height: 16px; margin-top: 1px; flex-shrink: 0; accent-color: var(--brand); }
.pw-strength { margin-top: 6px; min-height: 14px; font-size: 11px; display: flex; align-items: center; gap: 8px; }
.pw-bar { height: 4px; border-radius: 2px; transition: width .3s; }

/* ── View layout (view.php) ── */
.view-layout { max-width: 1440px; margin: 0 auto; padding: 0 24px 80px; }
.view-inner {
  display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px;
  align-items: start;
}
@media (max-width: 1023px) { .view-inner { grid-template-columns: 1fr; } }
.view-main {}
.view-sidebar { position: sticky; top: 106px; }

.view-title-area { padding: 20px 0 16px; border-bottom: 1px solid var(--line-2); margin-bottom: 16px; }
.view-meta-top { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.view-cat { font-size: 11px; color: var(--muted); font-family: var(--font-mono); }
.view-title { font-family: var(--font-serif); font-size: clamp(20px, 2.5vw, 28px); font-weight: 600; line-height: 1.3; margin: 0 0 14px; }
.view-stats-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.view-stat { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.view-stat i { width: 14px; height: 14px; }
.view-stat small { color: var(--muted-2); }
.view-tags { display: flex; flex-wrap: wrap; gap: 6px; }

/* ── Instructor bar ── */
.inst-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0; border-bottom: 1px solid var(--line-2); margin-bottom: 16px; gap: 12px; flex-wrap: wrap;
}
.inst-bar-left { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.inst-bar-info {}
.inst-name { display: block; font-size: 15px; font-weight: 700; color: var(--ink); }
.inst-spec { display: block; font-size: 12px; color: var(--muted); }
.inst-bar-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ── CTA panel ── */
.cta-panel {
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 20px; margin-bottom: 16px;
}
.cta-price { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.free-price { flex-direction: column; align-items: flex-start; }
.price-main { font-family: var(--font-serif); font-size: 28px; font-weight: 600; color: var(--ink); }
.cta-info-list { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.cta-info-row { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.cta-info-row i { width: 14px; height: 14px; color: var(--muted); flex-shrink: 0; }

/* ── Chapter panel ── */
.chapter-panel {
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius-lg); overflow: hidden;
}
.chapter-panel-title {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 16px; font-size: 14px; font-weight: 700;
  border-bottom: 1px solid var(--line);
}
.chapter-panel-title i { width: 15px; height: 15px; color: var(--muted); }
.chapter-list { list-style: none; padding: 0; margin: 0; }
.chapter-item { border-bottom: 1px dashed var(--line-2); }
.chapter-item:last-child { border-bottom: 0; }
.chapter-item.active { background: var(--brand-soft); }
.chapter-btn {
  width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; background: none; border: none; text-align: left;
  cursor: pointer; transition: background .12s;
}
.chapter-btn:hover { background: var(--bg-soft); }
.chapter-item.active .chapter-btn { background: transparent; }
.chapter-num { font-family: var(--font-mono); font-size: 12px; font-weight: 600; color: var(--muted); min-width: 18px; }
.chapter-item.active .chapter-num { color: var(--brand); }
.chapter-title { flex: 1; font-size: 13.5px; font-weight: 500; color: var(--ink-2); }
.chapter-item.active .chapter-title { color: var(--brand); font-weight: 600; }
.chapter-dur { font-size: 11px; font-family: var(--font-mono); color: var(--muted); }

/* ── Reviews section (view.php) ── */
.reviews-section { padding: 24px 0; border-top: 1px solid var(--line); margin-top: 24px; }
.reviews-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
.reviews-title { font-family: var(--font-serif); font-size: 20px; font-weight: 600; margin: 0; display: flex; align-items: center; gap: 10px; }
.reviews-badge { background: var(--brand-soft); color: var(--brand); font-size: 12px; font-family: var(--font-mono); padding: 2px 8px; border-radius: 99px; }
.rating-summary { display: flex; align-items: center; gap: 12px; }
.rating-big { font-family: var(--font-serif); font-size: 36px; font-weight: 600; line-height: 1; color: var(--ink); }
.rating-stars { display: flex; gap: 2px; }
.star-ico { width: 14px; height: 14px; color: var(--muted-2); }
.star-ico.star-filled { color: var(--star); fill: var(--star); }
.rating-count { font-size: 12px; color: var(--muted); font-family: var(--font-mono); }

.rating-bars { display: flex; flex-direction: column; gap: 6px; margin-bottom: 24px; max-width: 280px; }
.rating-bar-row { display: flex; align-items: center; gap: 10px; font-size: 12px; font-family: var(--font-mono); }
.rbar-label { min-width: 22px; color: var(--muted); }
.rbar-track { flex: 1; height: 6px; background: var(--bg-soft); border-radius: 99px; overflow: hidden; }
.rbar-fill { height: 100%; background: var(--star); border-radius: 99px; transition: width .6s; }
.rbar-pct { min-width: 32px; color: var(--muted); text-align: right; }

.review-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 16px; }
.review-item { padding: 16px; background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.review-top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.review-avatar {
  width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: #fff;
  font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; overflow: hidden;
}
.review-avatar img { width: 100%; height: 100%; object-fit: cover; }
.review-meta { flex: 1; }
.review-meta strong { font-size: 14px; font-weight: 600; display: block; }
.review-stars { display: flex; gap: 2px; margin-top: 2px; }
.review-date { font-size: 11px; font-family: var(--font-mono); margin-left: auto; }
.review-body { font-size: 13.5px; color: var(--ink-2); line-height: 1.65; margin-bottom: 10px; }
.review-actions { display: flex; gap: 12px; }
.review-like-btn { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 4px; transition: color .12s; background: none; border: none; cursor: pointer; }
.review-like-btn:hover { color: var(--brand); }
.review-like-btn i { width: 13px; height: 13px; }

.review-form-wrap { margin-top: 24px; padding: 20px; background: var(--bg-soft); border-radius: var(--radius-lg); border: 1px solid var(--line); }
.review-form-title { font-size: 15px; font-weight: 700; margin: 0 0 14px; }
.review-star-picker { display: flex; gap: 6px; margin-bottom: 12px; }
.star-pick-btn {
  background: none; border: none; cursor: pointer; color: var(--muted-2);
  transition: color .12s, transform .12s; padding: 2px;
}
.star-pick-btn:hover, .star-pick-btn.selected { color: var(--star); transform: scale(1.2); }
.star-pick-btn i { width: 22px; height: 22px; }
.review-input {
  width: 100%; padding: 12px 14px; border-radius: var(--radius);
  background: var(--bg-card); border: 1px solid var(--line); color: var(--ink);
  font-size: 13.5px; line-height: 1.6; resize: vertical; min-height: 80px;
  font-family: var(--font-sans);
}
.review-input:focus { outline: none; border-color: var(--brand); }
.review-form-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.review-char-count { font-size: 11px; color: var(--muted); font-family: var(--font-mono); }

/* ── Related section ── */
.related-section { padding: 24px 0 0; border-top: 1px solid var(--line); margin-top: 24px; }
.related-title { font-family: var(--font-serif); font-size: 20px; font-weight: 600; margin: 0 0 18px; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }

/* ── PIP Player ── */
.pip-player {
  position: fixed; bottom: 80px; right: 24px; z-index: 50;
  width: 280px; border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-lg); border: 1px solid var(--line);
  background: #111;
}
.pip-canvas-wrap { aspect-ratio: 16/9; overflow: hidden; }
.pip-canvas-wrap canvas { width: 100%; height: 100%; display: block; }
.pip-controls {
  background: #1a1a1a; padding: 8px 10px;
  display: flex; align-items: center; gap: 8px;
}
.pip-title { flex: 1; font-size: 11px; color: #aaa; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── Breadcrumb ── */
.breadcrumb { padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.breadcrumb-inner {
  max-width: 1440px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted);
}
.breadcrumb-inner a { color: var(--muted); }
.breadcrumb-inner a:hover { color: var(--brand); }
.bc-sep { width: 12px; height: 12px; color: var(--muted-2); }

/* ── Dashboard supplement ── */
.dash-page body, body.dash-page {}
.dash-sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.dash-profile { display: flex; align-items: center; gap: 12px; padding: 0 8px 20px; margin-bottom: 8px; border-bottom: 1px solid var(--line-2); }
.dash-profile-info {}
.dash-name { display: block; font-size: 14px; font-weight: 700; }
.dash-handle { font-size: 12px; display: block; }
.dash-nav-list { list-style: none; padding: 0; margin: 0; }
.dash-nav-item { text-decoration: none; }
.dash-plan-badge {
  margin-top: auto; padding: 12px; background: var(--brand-soft);
  border-radius: var(--radius); border: 1px solid rgba(194,65,12,.2);
  display: flex; align-items: center; gap: 8px; font-size: 12px;
}
.dash-plan-badge i { width: 14px; height: 14px; color: var(--brand); }
.plan-upgrade-link { margin-left: auto; font-size: 11px; color: var(--brand); font-weight: 600; }
.dash-new-btn { margin-top: 10px; }

.dash-tab {}
.dash-tab-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px; gap: 12px; flex-wrap: wrap;
}
.dash-tab-title { font-family: var(--font-serif); font-size: 26px; font-weight: 600; margin: 0; }
.dash-date { font-size: 13px; color: var(--muted); font-family: var(--font-mono); }

.stat-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; margin-bottom: 28px; }
/* .stat-card already defined above */
.stat-icon { width: 36px; height: 36px; border-radius: 10px; background: var(--brand-soft); display: flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.stat-icon i { width: 16px; height: 16px; color: var(--brand); }
.stat-info {}
.stat-label { font-size: 11px; font-family: var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); display: block; margin-bottom: 6px; }
.stat-value { font-family: var(--font-serif); font-size: 26px; font-weight: 600; color: var(--ink); display: block; }
.stat-change { font-size: 11px; color: var(--free); font-family: var(--font-mono); display: block; margin-top: 4px; }

.dash-section { margin-bottom: 32px; }
.dash-section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.dash-section-title { font-size: 16px; font-weight: 700; margin: 0; }
.dash-section-link { font-size: 13px; color: var(--brand); }
.quick-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.quick-link-card {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 20px 12px; border-radius: var(--radius-lg);
  background: var(--bg-card); border: 1px solid var(--line);
  text-decoration: none; color: var(--ink-2); font-size: 13px; font-weight: 500;
  transition: all .15s; text-align: center;
}
.quick-link-card:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-2px); box-shadow: var(--shadow); }
.quick-link-card i { width: 24px; height: 24px; }

.data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; table-layout: fixed; }
.data-table th {
  text-align: left; padding: 10px 12px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .18em;
  text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line);
}
.data-table td { padding: 12px 12px; border-bottom: 1px dashed var(--line-2); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tr:hover td { background: var(--bg-soft); }
.table-thumb { border-radius: 6px; object-fit: cover; vertical-align: middle; }
.td-title { overflow: hidden; }
.td-title-inner { display: flex; align-items: center; gap: 10px; }
.td-actions { white-space: nowrap; }
.status-badge {
  font-size: 11px; font-family: var(--font-mono); font-weight: 700;
  padding: 2px 8px; border-radius: 99px;
}
.status-live  { background: var(--free-soft); color: var(--free); }
.status-draft { background: var(--bg-soft);   color: var(--muted); }

.revenue-summary { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; margin-bottom: 28px; }
.rev-card { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px; }
.rev-card--total { border-color: var(--brand); background: var(--brand-soft); }
.rev-label { font-size: 11px; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); display: block; margin-bottom: 8px; }
.rev-amount { font-family: var(--font-serif); font-size: 24px; font-weight: 600; color: var(--ink); display: block; }
.rev-amount--muted { color: var(--muted); font-size: 18px; }

.follower-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--line-2); }
.follower-item:last-child { border-bottom: 0; }

.settings-form {}
.settings-section { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; margin-bottom: 20px; }
.settings-section-title { font-size: 16px; font-weight: 700; margin: 0 0 20px; padding-bottom: 12px; border-bottom: 1px solid var(--line-2); }
.settings-avatar-row { display: flex; align-items: center; gap: 20px; margin-bottom: 20px; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 540px) { .settings-grid { grid-template-columns: 1fr; } }
.settings-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 0 0; }

.toggle-label { display: flex; align-items: center; gap: 12px; cursor: pointer; padding: 10px 0; font-size: 14px; }
.toggle-label input[type=checkbox] { display: none; }
.toggle-switch {
  width: 40px; height: 22px; border-radius: 99px; background: var(--line);
  position: relative; transition: background .2s; flex-shrink: 0;
}
.toggle-switch::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 16px; height: 16px; border-radius: 50%; background: #fff;
  transition: left .2s;
}
.toggle-label input:checked + .toggle-switch { background: var(--brand); }
.toggle-label input:checked + .toggle-switch::after { left: 21px; }

.table-loading { padding: 40px; text-align: center; color: var(--muted); display: flex; align-items: center; justify-content: center; gap: 10px; }
.empty-state { padding: 48px 20px; text-align: center; color: var(--muted); }
.empty-state i { width: 48px; height: 48px; opacity: .3; }

/* ── Channel page supplement ── */
.channel-hero { position: relative; overflow: hidden; }
.channel-hero-bg { position: absolute; inset: 0; overflow: hidden; }
.channel-hero-bg canvas { width: 100%; height: 100%; object-fit: cover; }
.channel-hero-inner { position: relative; z-index: 1; }
.channel-profile { display: flex; align-items: flex-start; gap: 20px; flex: 1; flex-wrap: wrap; }
.channel-avatar { border: 3px solid var(--bg-card); box-shadow: var(--shadow); }
.channel-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.channel-content { }
.channel-content-inner { max-width: 1280px; margin: 0 auto; padding: 24px 24px 80px; }
.channel-tabs { display: flex; gap: 4px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.channel-tab {
  padding: 10px 16px; font-size: 13.5px; font-weight: 500; color: var(--muted);
  background: none; border: none; border-bottom: 2px solid transparent;
  cursor: pointer; transition: color .15s, border-color .15s;
}
.channel-tab:hover { color: var(--ink); }
.channel-tab.active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }
.sep { color: var(--muted-2); }

/* ── [data-reveal] fix ── */
[data-reveal] { opacity: 0; transform: translateY(10px); transition: opacity .5s ease, transform .5s cubic-bezier(.22,1,.36,1); }
[data-reveal].revealed { opacity: 1; transform: none; }

/* ── Player overlay ── */
.player-play-overlay {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.2); color: #fff; cursor: pointer; border: none;
  transition: opacity .2s;
}
.player-play-overlay.hidden { opacity: 0; pointer-events: none; }
.player-play-overlay i { width: 60px; height: 60px; filter: drop-shadow(0 2px 8px rgba(0,0,0,.5)); }

/* ── Content filters (dashboard) ── */
.content-filters { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.content-filters .field-input { max-width: 280px; }

