/* =========================================================
   CHERRY TOONS — Stylesheet
   Dark theme with cherry accent. Change colors in :root
   ========================================================= */
:root {
  --bg: #0f0f13;
  --bg-2: #16161c;
  --card: #1c1c23;
  --card-2: #23232c;
  --border: rgba(255,255,255,.06);
  --text: #f5f5f7;
  --muted: #9a9aa6;
  --cherry: #e63e6d;
  --cherry-2: #ff5c8a;
  --violet: #5865f2;
  --green: #2ecc71;
  --blue: #3b82f6;
  --gold: #f5b301;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 10px 30px rgba(0,0,0,.45);
  --topbar-h: 64px;
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Poppins', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
img { display: block; max-width: 100%; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.container { width: min(1280px, 100% - 32px); margin-inline: auto; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  height: var(--topbar-h);
  backdrop-filter: blur(14px);
  background: rgba(15,15,19,.75);
  border-bottom: 1px solid var(--border);
}
.topbar__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.topbar__left, .topbar__right { display: flex; align-items: center; gap: 8px; }
.topbar__left { background: var(--card); border-radius: 12px; padding: 4px; }
.topbar__center { display: flex; align-items: center; gap: 12px; flex: 1; justify-content: center; }
.logo img { width: 40px; height: 40px; transition: transform .2s; }
.logo:hover img { transform: rotate(-10deg) scale(1.08); }

.icon-btn {
  width: 40px; height: 40px; display: grid; place-items: center;
  border-radius: 10px; color: var(--text); transition: background .2s, color .2s;
}
.icon-btn:hover { background: var(--card-2); color: var(--cherry-2); }
.icon-btn--ghost { color: var(--muted); }

.search {
  display: flex; align-items: center; gap: 10px;
  background: var(--card); border-radius: 999px; padding: 0 18px;
  height: 42px; width: min(280px, 100%);
  border: 1px solid transparent; transition: border-color .2s;
}
.search:focus-within { border-color: var(--cherry); }
.search svg { color: var(--muted); flex-shrink: 0; }
.search input { background: none; border: 0; outline: 0; color: var(--text); width: 100%; font: inherit; font-size: 14px; }
.search input::placeholder { color: var(--muted); }

.avatar { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; border: 2px solid var(--card-2); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.menu-toggle { display: none; }

.mobile-nav {
  display: none; flex-direction: column; gap: 6px;
  padding: 12px 16px; background: var(--bg-2); border-bottom: 1px solid var(--border);
  position: sticky; top: var(--topbar-h); z-index: 49;
}
.mobile-nav.open { display: flex; }
.mobile-nav a:not(.btn) { padding: 10px 12px; border-radius: 8px; font-weight: 500; }
.mobile-nav a:not(.btn):hover { background: var(--card); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 12px; font-weight: 600; font-size: 14px;
  transition: transform .15s, filter .15s; white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.08); }
.btn svg { width: 18px; height: 18px; }
.btn--light { background: #fff; color: #111; }
.btn--cherry { background: var(--cherry); color: #fff; }
.btn--violet { background: var(--violet); color: #fff; }
.btn--tiny { padding: 6px 12px; font-size: 12px; background: var(--card-2); border-radius: 8px; }

.round-btn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fff; }
.round-btn--violet { background: var(--violet); }
.round-btn svg { width: 18px; height: 18px; }

/* ---------- Sections ---------- */
.section { margin-top: 44px; }
.section__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.section__head h2 { font-size: 22px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.section__head .pin { width: 18px; height: 18px; fill: currentColor; stroke: none; }
.view-all { color: var(--muted); font-size: 14px; display: inline-flex; align-items: center; gap: 4px; transition: color .2s; }
.view-all:hover { color: var(--cherry-2); }
.view-all svg { width: 14px; height: 14px; }

/* ---------- Tags ---------- */
.tags { position: absolute; top: 10px; left: 10px; display: flex; gap: 4px; flex-wrap: wrap; z-index: 2; }
.tag {
  font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 6px;
  background: rgba(20,20,26,.85); backdrop-filter: blur(4px); color: #fff;
}
.tag--new { background: rgba(20,20,26,.85); }
.tag--completed { background: var(--cherry); }
.tag--hiatus { background: var(--blue); }
.tag--type { background: rgba(20,20,26,.85); }

.status { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 6px; background: rgba(46,204,113,.14); color: var(--green); letter-spacing: .3px; }
.status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status--completed { background: rgba(230,62,109,.14); color: var(--cherry-2); }
.status--hiatus { background: rgba(59,130,246,.14); color: var(--blue); }

/* ---------- Covers (placeholders) ---------- */
.cover {
  position: relative; aspect-ratio: 3/4; border-radius: var(--radius); overflow: hidden;
  background: var(--card); box-shadow: var(--shadow);
  display: flex; align-items: flex-end; padding: 14px;
  transition: transform .25s;
}
.cover::before { content: ''; position: absolute; inset: 0; background: var(--cover-art, linear-gradient(160deg,#4b1d3a,#1f0f2a)); }
.cover::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.75), rgba(0,0,0,0) 55%); }
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover .cover__title { position: relative; z-index: 1; font-weight: 700; font-size: 18px; line-height: 1.15; text-shadow: 0 2px 10px rgba(0,0,0,.6); font-style: italic; }
.cover .watermark { position: absolute; z-index: 2; left: 12px; top: 40px; font-size: 9px; font-weight: 700; letter-spacing: .5px; padding: 2px 6px; border-radius: 4px; background: rgba(255,255,255,.85); color: #111; }
a:hover > .cover { transform: translateY(-4px); }

/* ---------- Hero carousel ---------- */
.hero { position: relative; margin-top: 16px; overflow: hidden; }
.hero__track {
  display: flex; gap: 20px; padding: 0 calc((100% - 1280px) / 2 + 16px);
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
}
.hero__track::-webkit-scrollbar { display: none; }
.hero-card {
  flex: 0 0 360px; height: 360px; border-radius: var(--radius); overflow: hidden;
  position: relative; scroll-snap-align: start; box-shadow: var(--shadow);
  display: flex; flex-direction: column; justify-content: flex-end; padding: 16px;
  transition: transform .25s;
}
.hero-card::before { content: ''; position: absolute; inset: 0; background: var(--cover-art); }
.hero-card::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(10,10,14,.95) 0%, rgba(10,10,14,.4) 45%, rgba(10,10,14,0) 70%); }
.hero-card:hover { transform: translateY(-4px); }
.hero-card > * { position: relative; z-index: 1; }
.hero-card .tags { position: absolute; z-index: 2; }
.hero-card .original { font-size: 12px; color: var(--muted); }
.hero-card h3 { font-size: 20px; font-weight: 700; margin: 2px 0 6px; }
.hero-card p { font-size: 12px; color: var(--muted); margin-top: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hero-card .art-title { position: absolute; right: 16px; top: 45%; font-size: 44px; font-weight: 800; font-style: italic; opacity: .18; z-index: 0; pointer-events: none; letter-spacing: -1px; }
.hero__arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 40px; height: 40px; border-radius: 50%; background: var(--card);
  display: grid; place-items: center; box-shadow: var(--shadow); transition: background .2s;
}
.hero__arrow:hover { background: var(--cherry); }
.hero__arrow--prev { left: 16px; }
.hero__arrow--next { right: 16px; }

/* ---------- Ranking (Trending) ---------- */
.ranking { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.rank-item { display: block; }
.rank-item__meta { display: flex; gap: 8px; margin-top: 10px; align-items: flex-start; }
.rank-item__num { font-size: 40px; font-weight: 800; line-height: .9; color: #fff; }
.rank-item__title { font-size: 14px; font-weight: 600; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rank-item__genres { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* ---------- Panels ---------- */
.panels { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.panel {
  background: var(--card); border-radius: var(--radius); padding: 16px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  border-left: 3px solid var(--card-2);
}
.panel--wide { grid-column: 1 / -1; }
.panel__text { display: flex; flex-direction: column; }
.panel__text strong { font-size: 14px; font-weight: 600; }
.panel__text span { font-size: 12px; color: var(--muted); }
.panel__action { display: flex; align-items: center; gap: 12px; }
.shares { text-align: right; line-height: 1; }
.shares b { font-size: 18px; display: block; }
.shares small { font-size: 10px; color: var(--muted); }
.notice {
  grid-column: 1 / -1; background: var(--card); border-radius: var(--radius);
  padding: 12px 20px; font-size: 13px; display: flex; align-items: center; gap: 8px;
}
.notice span { color: var(--muted); flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Scroller horizontal (Pinned) ---------- */
.scroller-wrap { position: relative; }
.scroller { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 4px; }
.scroller::-webkit-scrollbar { display: none; }
.scroller .update-card { flex: 0 0 340px; scroll-snap-align: start; }
.scroller__arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 40px; height: 40px; border-radius: 50%; background: var(--card);
  display: grid; place-items: center; box-shadow: var(--shadow); transition: background .2s;
}
.scroller__arrow:hover { background: var(--cherry); }
.scroller__arrow--prev { left: 12px; }
.scroller__arrow--next { right: 12px; }

/* ---------- Update cards ---------- */
.update-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.update-card {
  background: var(--card); border-radius: var(--radius); padding: 12px;
  display: grid; grid-template-columns: 112px 1fr; gap: 12px;
  transition: background .2s;
}
.update-card:hover { background: var(--card-2); }
.update-card .cover { padding: 8px; box-shadow: none; aspect-ratio: 3/4; }
.update-card .cover .cover__title { font-size: 14px; }
.update-card .pinned-badge {
  position: absolute; z-index: 2; left: 8px; bottom: 8px; font-size: 10px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 3px;
}
.update-card .pinned-badge svg { width: 10px; height: 10px; fill: currentColor; stroke: none; }
.update-card__body { display: flex; flex-direction: column; min-width: 0; }
.update-card__title { font-size: 14px; font-weight: 600; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 8px; }
.chapters { display: flex; flex-direction: column; gap: 0; margin-top: auto; }
.chapter { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 12px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.chapter:last-child { border-bottom: 0; }
.chapter__left { display: flex; align-items: center; gap: 5px; white-space: nowrap; min-width: 0; }
.chapter__left b { font-weight: 500; }
.coin { width: 12px; height: 12px; border-radius: 50%; background: var(--gold); box-shadow: inset 0 0 0 2px rgba(0,0,0,.25); }
.chip-new { font-size: 9px; font-weight: 600; padding: 1px 5px; border-radius: 4px; background: var(--card-2); color: var(--muted); }
.chapter__time { color: var(--muted); font-size: 10px; white-space: nowrap; }

/* ---------- Cover grid ---------- */
.cover-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.cover-item { display: block; }
.cover-item__title { font-size: 14px; font-weight: 600; margin-top: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cover-item__genres { font-size: 11px; color: var(--muted); }

/* ---------- Footer ---------- */
.footer { margin-top: 90px; padding: 40px 16px 60px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.footer h3 { font-size: 20px; font-weight: 700; margin-top: 8px; }
.footer p { font-size: 14px; color: var(--text); }
.footer__links { display: flex; gap: 8px; margin-top: 12px; }
.footer__links .icon-btn { background: var(--card); }
.footer small { color: var(--muted); font-size: 12px; margin-top: 16px; }

/* ---------- Empty search state ---------- */
.empty { color: var(--muted); font-size: 14px; padding: 24px; text-align: center; grid-column: 1 / -1; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .ranking, .cover-grid { grid-template-columns: repeat(4, 1fr); }
  .update-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .topbar__left { display: none; }
  .topbar__right .btn, .topbar__right .icon-btn--ghost { display: none; }
  .menu-toggle { display: grid; }
  .topbar__center { justify-content: flex-start; }
  .search { width: 100%; }
  .hero__track { padding: 0 16px; }
  .hero-card { flex-basis: 280px; height: 300px; }
  .ranking, .cover-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .rank-item__num { font-size: 28px; }
  .panels { grid-template-columns: 1fr; }
  .panel { flex-wrap: wrap; }
  .notice { flex-wrap: wrap; }
  .notice span { white-space: normal; }
  .update-grid { grid-template-columns: 1fr; }
  .scroller .update-card { flex-basis: 300px; }
  .scroller__arrow { display: none; }
}
@media (max-width: 480px) {
  .ranking, .cover-grid { grid-template-columns: repeat(2, 1fr); }
  .update-card { grid-template-columns: 100px 1fr; }
  .section__head h2 { font-size: 18px; }
}

/* =========================================================
   v2 — accounts, coins, purchase modal, reader, admin
   ========================================================= */
.user-slot { display: flex; align-items: center; gap: 8px; }
.coins-pill { display: inline-flex; align-items: center; gap: 6px; background: var(--card); border-radius: 999px; padding: 8px 14px; font-weight: 600; font-size: 14px; transition: background .2s; }
.coins-pill:hover { background: var(--card-2); }
.coin--lg { width: 22px; height: 22px; }
.user-menu { position: relative; }
.user-menu__list { position: absolute; right: 0; top: 48px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; min-width: 200px; padding: 6px; display: none; flex-direction: column; box-shadow: var(--shadow); z-index: 60; }
.user-menu__list.open { display: flex; }
.user-menu__list a { padding: 9px 12px; border-radius: 8px; font-size: 14px; }
.user-menu__list a:hover { background: var(--card-2); }
.user-menu__head { padding: 8px 12px 10px; border-bottom: 1px solid var(--border); margin-bottom: 4px; display: flex; flex-direction: column; }
.user-menu__head small { color: var(--muted); font-size: 11px; }

/* modals */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.7); backdrop-filter: blur(3px); display: none; align-items: center; justify-content: center; z-index: 100; padding: 16px; }
.modal.open { display: flex; }
.modal__box { background: var(--bg-2); border: 1px solid var(--border); border-radius: 18px; padding: 24px; width: min(420px, 100%); max-height: 92vh; overflow-y: auto; position: relative; box-shadow: var(--shadow); }
.modal__box--wide { width: min(480px, 100%); }
.modal__close { position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; border-radius: 50%; background: var(--card); display: grid; place-items: center; font-size: 13px; }
.modal__close:hover { background: var(--cherry); }
.modal__title { font-size: 20px; font-weight: 700; margin-bottom: 14px; }
.tabs { display: flex; gap: 4px; background: var(--card); padding: 4px; border-radius: 10px; margin-bottom: 18px; }
.tab { flex: 1; padding: 8px; border-radius: 8px; font-weight: 600; font-size: 14px; color: var(--muted); }
.tab.active { background: var(--cherry); color: #fff; }
.form { display: flex; flex-direction: column; gap: 12px; }
.form label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--muted); font-weight: 500; }
input:not([type=checkbox]):not([type=file]), select, textarea { background: var(--card); border: 1px solid var(--border); color: var(--text); border-radius: 10px; padding: 10px 12px; font: inherit; font-size: 14px; outline: 0; }
input:focus, select:focus, textarea:focus { border-color: var(--cherry); }
.form__error { color: var(--cherry-2); font-size: 13px; min-height: 18px; margin-top: 8px; }
.btn--block { width: 100%; justify-content: center; }
.btn--lg { padding: 13px 18px; font-size: 15px; border-radius: 999px; }
.btn.disabled, .btn:disabled { opacity: .5; pointer-events: none; }
.btn.danger { background: rgba(230,62,109,.15); color: var(--cherry-2); }
.label { font-size: 13px; font-weight: 600; margin: 14px 0 8px; }

/* purchase */
.pay-methods { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.pay-method { background: var(--card); border: 2px solid transparent; border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; text-align: left; transition: border-color .2s; }
.pay-method:only-child { flex-direction: row-reverse; justify-content: space-between; align-items: center; }
.pay-method.active { border-color: #fff; }
.pay-method.disabled { opacity: .45; }
.pay-method__badges { display: flex; gap: 4px; justify-content: flex-end; }
.pay-method__label { font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.badge { font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 5px; }
.badge--blue { background: var(--violet); color: #fff; }
.badge--grey { background: var(--card-2); color: var(--muted); }
.pi { display: inline-grid; place-items: center; font-size: 10px; font-weight: 800; border-radius: 4px; padding: 0 5px; height: 18px; }
.pi--usdt { background: #26a17b; color: #fff; }
.pi--pp { background: #003087; color: #fff; }
.pi--visa { background: #1a1f71; color: #fff; }
.pi--mc { width: 18px; background: radial-gradient(circle at 35% 50%, #eb001b 0 40%, transparent 41%), radial-gradient(circle at 65% 50%, #f79e1b 0 40%, transparent 41%); }
.presets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.preset { background: var(--card); border: 2px solid transparent; border-radius: 12px; padding: 10px; font-weight: 600; }
.preset.active { border-color: #fff; }
.amount-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.amount-input { display: flex; align-items: center; gap: 8px; background: var(--card); border-radius: 12px; padding: 0 12px; }
.amount-input input { background: none; border: 0; padding: 10px 0; width: 100%; }
.amount-input span:first-child { color: var(--muted); font-weight: 600; }
.note { background: var(--card); border-radius: 12px; padding: 12px; font-size: 12px; color: var(--muted); margin: 14px 0; line-height: 1.5; }
.quote { background: var(--card); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.quote > div { display: flex; justify-content: space-between; }
.quote b { display: inline-flex; align-items: center; gap: 4px; }
.quote__total { border-top: 1px solid var(--border); padding-top: 8px; margin-top: 4px; font-size: 15px; }
.unlock__name { font-weight: 600; margin-bottom: 12px; }

/* chapter list chips */
.chip-free { font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 4px; background: rgba(46,204,113,.15); color: var(--green); }
.chip-unlocked { font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 4px; background: rgba(88,101,242,.2); color: #9aa4ff; }
.chapter--big { padding: 12px 4px; font-size: 14px; }
.chapter--big .chapter__right { display: flex; align-items: center; gap: 12px; }
.chapter--big .price { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; font-size: 13px; color: var(--gold); }
.chapter__name { color: var(--muted); font-weight: 400; margin-left: 6px; }
.chapters--list { background: var(--card); border-radius: var(--radius); padding: 4px 16px; margin-top: 8px; }
.chapters--list .chapter:hover { color: var(--cherry-2); }
.muted { color: var(--muted); }
.serie { display: grid; grid-template-columns: 280px 1fr; gap: 32px; margin-top: 32px; }
.serie h1 { font-size: 30px; font-weight: 800; line-height: 1.15; margin: 6px 0 10px; }
.serie .original { color: var(--muted); font-size: 14px; }
.serie .genres { display: flex; gap: 6px; flex-wrap: wrap; margin: 14px 0; }
.serie .genres span { background: var(--card); padding: 4px 12px; border-radius: 999px; font-size: 12px; }
.serie p.syn { color: var(--muted); max-width: 640px; margin-bottom: 18px; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); margin-top: 24px; }
.back:hover { color: var(--cherry-2); }
.hero-card__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.hero-empty { padding: 60px 16px; color: var(--muted); text-align: center; width: 100%; }

/* reader */
.reader-body { background: #000; }
.reader-bar__center { justify-content: flex-start; }
.reader-bar__title { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.reader-bar__title a { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reader-bar__title b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reader { max-width: 900px; margin: 0 auto; padding-bottom: 90px; }
.reader .page { width: 100%; display: block; }
.reader-nav { position: fixed; bottom: 0; left: 0; right: 0; background: rgba(15,15,19,.9); backdrop-filter: blur(10px); border-top: 1px solid var(--border); padding: 10px 16px; display: flex; justify-content: center; gap: 10px; z-index: 40; }
.locked { max-width: 420px; margin: 40px auto; text-align: center; display: flex; flex-direction: column; gap: 14px; align-items: center; padding: 0 16px; }
.locked .cover { width: 200px; }
.locked h2 { font-size: 22px; }
.locked p { color: var(--muted); }
.locked b { color: var(--gold); display: inline-flex; align-items: center; gap: 4px; }

/* account */
.account { padding-bottom: 40px; }
.acct-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 20px; }
.card { background: var(--card); border-radius: var(--radius); padding: 20px; margin-top: 16px; }
.card--inner { background: var(--bg-2); }
.card h2 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.stat { display: flex; align-items: center; gap: 10px; margin: 14px 0; }
.stat b { font-size: 32px; font-weight: 800; }
.stat small { color: var(--muted); }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; color: var(--muted); font-weight: 500; font-size: 12px; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.table td { padding: 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table-wrap, .card:has(.table) { overflow-x: auto; }
.chip { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: var(--card-2); }
.chip-paid { background: rgba(46,204,113,.15); color: var(--green); }
.chip-pending { background: rgba(245,179,1,.15); color: var(--gold); }
.chip-failed { background: rgba(230,62,109,.15); color: var(--cherry-2); }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.lib-item { display: grid; grid-template-columns: 60px 1fr; gap: 10px; background: var(--bg-2); border-radius: 12px; padding: 8px; align-items: center; }
.lib-item .cover--sm { padding: 0; aspect-ratio: 3/4; box-shadow: none; }
.lib-item div:last-child { display: flex; flex-direction: column; font-size: 13px; }
.lib-item small { color: var(--muted); font-size: 11px; }
.banner { border-radius: 12px; padding: 14px 16px; margin-top: 20px; font-size: 14px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.banner--ok { background: rgba(46,204,113,.15); color: var(--green); }
.banner--wait { background: rgba(245,179,1,.12); color: var(--gold); }
.banner--error { background: rgba(230,62,109,.15); color: var(--cherry-2); }
.spinner { width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; display: inline-block; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.steps { margin: 10px 0 0 18px; color: var(--muted); font-size: 14px; line-height: 1.8; }
.steps b { color: var(--text); }

/* toast */
#toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 20px); background: #fff; color: #111; padding: 10px 18px; border-radius: 999px; font-weight: 600; font-size: 14px; opacity: 0; pointer-events: none; transition: all .25s; z-index: 200; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.err { background: var(--cherry); color: #fff; }

@media (max-width: 760px) {
  .acct-grid, .amount-row { grid-template-columns: 1fr; }
  .serie { grid-template-columns: 1fr; }
  .serie .cover { max-width: 240px; }
  .user-slot .btn { display: none; }
  .reader-nav .btn { font-size: 12px; padding: 8px 12px; }
}
