/* ============================================================
   GENERATED FILE — do not edit directly.
   Edit the modules in cloudberry-garden-css/parts/*.css,
   then rebuild with:  bash cloudberry-garden-css/build.sh
   ============================================================ */

/* Fonts (Cormorant Garamond / Marcellus / Nunito Sans) are loaded via a
   preconnected <link> in each page <head> — faster than a render-blocking @import. */

/* ============================================================
   Cloudberry Garden — main.css
   Pastel reading-community design system
   ============================================================ */

:root {
  --bg: #F7F0F6;
  --page-bg: #FCF9FE;
  --panel-bg: #FFFFFF;
  --card-bg: #FFFFFF;
  --soft-bg: #FBF6FD;

  --border: #F1E7F7;
  --border-2: #ECDFF4;
  --border-hover: #D9C4EE;

  --ink: #84778F;
  --muted: #8A7B9C;
  --ink-strong: #6B5C7E;
  --head: #5E4A86;
  --head-2: #6E55A0;

  --accent: #7E63B4;
  --accent-2: #9B7FC9;
  --accent-3: #C9A9E1;
  --blush: #E07BA0;
  --blush-2: #EC8FB2;
  --blush-soft: #FBE3EE;
  --sage: #79A472;
  --star: #E3A24B;
  --pill: #EDE3F6;

  --track: #EEE4F5;
  --grad-title: linear-gradient(98deg, #7257AC 0%, #9468C4 44%, #CC8FCE 100%);
  --grad-btn: linear-gradient(135deg, #AE8DDC, #8C6AC2);
  --grad-fill: linear-gradient(90deg, #B98AD4, #8C6AC2);

  --shadow-card: 0 12px 26px -12px rgba(150,118,185,.4);
  --shadow-card-h: 0 22px 40px -14px rgba(150,118,185,.55);
  --shadow-panel: 0 20px 48px -26px rgba(150,118,185,.5);
  --shadow-sm: 0 3px 10px rgba(150,120,185,.12);

  --serif: 'Cormorant Garamond', Georgia, serif;
  --display: 'Marcellus', Georgia, serif;
  --body: 'Nunito Sans', ui-sans-serif, system-ui, sans-serif;

  --maxw: 1180px;
}

[data-theme="dark"] {
  --bg: #15111F;
  --page-bg: #1E1A29;
  --panel-bg: #241E33;
  --card-bg: #241E33;
  --soft-bg: #2A2338;

  --border: #33293F;
  --border-2: #3A3050;
  --border-hover: #4A3D63;

  --ink: #C3B6D2;
  --muted: #A99CBE;
  --ink-strong: #C4B6D2;
  --head: #D9C7F0;
  --head-2: #D2C2EA;

  --accent: #C9A9E1;
  --accent-2: #B294DC;
  --accent-3: #C9A9E1;
  --blush: #EC8FB2;
  --blush-soft: #3A2A3A;
  --pill: #322A47;

  --track: #3A3050;
  --soft-bg: #2A2338;
  --shadow-card: 0 12px 26px -14px rgba(0,0,0,.5);
  --shadow-panel: 0 20px 48px -28px rgba(0,0,0,.55);
}

* { box-sizing: border-box; -webkit-font-smoothing: antialiased; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--body);
  color: var(--ink);
  background:
    radial-gradient(62% 48% at 0% 0%, #FCEADE 0%, transparent 66%),
    radial-gradient(58% 46% at 100% 0%, #FBE6DF 0%, transparent 66%),
    radial-gradient(62% 60% at 100% 100%, #F1E6F9 0%, transparent 68%),
    radial-gradient(62% 60% at 0% 100%, #EEE6FA 0%, transparent 68%),
    var(--bg);
  min-height: 100vh;
}
[data-theme="dark"] body {
  background:
    radial-gradient(62% 48% at 0% 0%, #2a2238 0%, transparent 66%),
    radial-gradient(62% 60% at 100% 100%, #251d33 0%, transparent 68%),
    var(--bg);
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; }
::selection { background: var(--blush-soft); }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #D7C4EC; border-radius: 6px; }
[data-theme="dark"] ::-webkit-scrollbar-thumb { background: #463a5e; }
.no-bar { scrollbar-width: none; -ms-overflow-style: none; }
.no-bar::-webkit-scrollbar { display: none; }

/* ---- page shell ---- */
.site-shell {
  position: relative;
  max-width: var(--maxw);
  margin: 22px auto;
  background: var(--page-bg);
  border: 1px solid var(--border);
  border-radius: 30px;
  box-shadow: 0 44px 100px -34px rgba(150,118,185,.5);
  overflow: hidden;
}
[data-theme="dark"] .site-shell { box-shadow: 0 44px 100px -40px rgba(0,0,0,.6); }

#main { display: block; }

.section { padding: 28px 30px 0; }
.section:last-child { padding-bottom: 6px; }
@media (max-width: 640px) { .section { padding: 22px 18px 0; } }

.section-head, .panel-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-bottom: 20px;
}
.section-title {
  font-family: var(--serif);
  font-weight: 600; font-size: 1.5rem; line-height: 1.1;
  color: var(--head); margin: 0;
  display: flex; align-items: center; gap: 10px;
}
.section-title .accent { font-size: 1rem; color: var(--blush); }
.section-lead { margin: 8px 0 0; }
.muted { color: var(--muted); font-family: var(--body); font-size: 14px; }

.page-head { padding: 28px 30px 0; }
.page-head h1 {
  font-family: var(--serif); font-weight: 700; color: var(--head);
  font-size: clamp(2rem, 4vw, 2.8rem); margin: 0; line-height: 1.05;
}
@media (max-width: 640px) { .page-head { padding: 22px 18px 0; } }

.view-all {
  font-family: var(--display); font-weight: 600; font-size: 13.5px;
  color: var(--accent); display: inline-flex; align-items: center; gap: 6px;
  white-space: nowrap;
}
.view-all:hover { text-decoration: underline; }

.grad-title {
  background: var(--grad-title); -webkit-background-clip: text;
  background-clip: text; color: transparent;
}

/* ---- buttons ---- */
.btn {
  font-family: var(--display); font-weight: 400; font-size: 14px;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 12px 22px; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; transition: .22s; text-align: center; white-space: nowrap;
}
.btn-primary {
  color: #fff; background: var(--grad-btn);
  box-shadow: 0 12px 26px -7px rgba(140,106,194,.55);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -7px rgba(140,106,194,.7); }
.btn-soft {
  color: var(--accent); background: var(--panel-bg); border-color: var(--border-2);
  box-shadow: var(--shadow-sm);
}
.btn-soft:hover { transform: translateY(-2px); border-color: var(--accent-2); color: var(--head-2); }

.btn-icon {
  width: 44px; height: 44px; border-radius: 999px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--panel-bg); border: 1px solid var(--border-2);
  color: var(--accent); cursor: pointer; transition: .2s; box-shadow: var(--shadow-sm);
  font-family: var(--display); font-size: 15px;
}
.btn-icon:hover { border-color: var(--accent-2); color: var(--head-2); transform: translateY(-1px); }
.btn-icon:disabled { opacity: .4; cursor: default; transform: none; }
.btn-icon:disabled:hover { border-color: var(--border-2); color: var(--accent); transform: none; }

.chip {
  font-family: var(--display); font-size: 13px; color: var(--ink-strong);
  background: var(--panel-bg); border: 1px solid var(--border-2);
  padding: 7px 16px; border-radius: 999px; cursor: pointer; transition: .2s;
  display: inline-flex; align-items: center; gap: 6px;
}
.chip:hover { border-color: var(--accent-2); color: var(--head-2); }
.chip.is-active { background: var(--grad-btn); color: #fff; border-color: transparent; }

/* ---- panels ---- */
.panel {
  background: var(--panel-bg); border: 1px solid var(--border);
  border-radius: 26px; box-shadow: var(--shadow-panel); position: relative;
}
.panel--padded { padding: 26px; }
@media (max-width: 640px) { .panel--padded { padding: 20px; } }
.glass {
  background: var(--panel-bg); border: 1px solid var(--border);
  border-radius: 26px; box-shadow: var(--shadow-panel);
}

/* ---- breadcrumbs ---- */
.crumbs {
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  font-family: var(--display); font-size: 13px; color: var(--muted);
  margin-bottom: 20px;
}
.crumbs a { color: var(--accent); }
.crumbs a:hover { text-decoration: underline; }
.crumbs i { font-size: 9px; opacity: .6; }
.crumbs span[aria-current], .crumbs > span { color: var(--ink-strong); }

/* ============================================================
   NAV (injected by site.js)
   ============================================================ */
/* Skip-to-content link — visible only when keyboard-focused (WCAG 2.4.1) */
.cg-skip {
  position: fixed; top: 12px; left: 12px; z-index: 100;
  transform: translateY(-160%); transition: transform .18s ease;
  background: var(--grad-btn); color: #fff; font-family: var(--display);
  font-size: 14px; padding: 10px 18px; border-radius: 999px; box-shadow: var(--shadow-panel);
}
.cg-skip:focus { transform: translateY(0); outline: 2px solid #fff; outline-offset: 2px; }
#main:focus { outline: none; }

/* Search overlay (replaces window.prompt) */
.cg-search-overlay { position: fixed; inset: 0; z-index: 120; display: flex; align-items: flex-start; justify-content: center; padding: 14vh 20px 20px; }
.cg-search-overlay[hidden] { display: none; }
.cg-search-overlay__backdrop { position: absolute; inset: 0; background: rgba(60,44,80,.42); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.cg-search-overlay__box {
  position: relative; width: min(640px, 100%); display: flex; align-items: center; gap: 12px;
  background: var(--panel-bg); border: 1px solid var(--border-2); border-radius: 18px;
  box-shadow: 0 40px 90px -30px rgba(60,40,90,.6); padding: 6px 6px 6px 20px;
  animation: cgModalIn .25s cubic-bezier(.22,.61,.36,1);
}
.cg-search-overlay__box > i { color: var(--accent); font-size: 16px; flex: none; }
.cg-search-overlay__box input {
  flex: 1; min-width: 0; border: 0; outline: none; background: transparent;
  font-family: var(--display); font-size: 17px; color: var(--head-2); padding: 14px 0;
}
.cg-search-overlay__box input::placeholder { color: #B6A4C6; }
.cg-search-overlay__x {
  width: 44px; height: 44px; flex: none; border-radius: 12px; border: 0;
  background: var(--soft-bg); color: var(--muted); cursor: pointer; transition: .15s;
}
.cg-search-overlay__x:hover { background: var(--pill); color: var(--head-2); }

.cg-nav { padding: 16px 26px 4px; }
.cg-nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; }

.cg-brand { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; }
.cg-brand__mark { width: 42px; height: 42px; display: block; }
.cg-brand__mark svg { width: 100%; height: 100%; }
.cg-brand__name {
  font-family: var(--serif); font-weight: 600; line-height: .92;
  display: flex; flex-direction: column;
}
.cg-brand__name span { font-size: 22px; background: linear-gradient(100deg, #6E4FA0 0%, #9A66C2 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
[data-theme="dark"] .cg-brand__name span { background: linear-gradient(100deg, #C9A9E1 0%, #E2B9DE 100%); -webkit-background-clip: text; background-clip: text; }

.cg-nav__links { display: flex; align-items: center; gap: 6px; }
.cg-nav__link {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--display); font-size: 15px; color: var(--ink-strong);
  padding: 9px 17px; border-radius: 999px; transition: .2s; white-space: nowrap;
}
.cg-nav__link i { font-size: 13px; color: var(--accent-2); transition: .2s; }
.cg-nav__link:hover { color: var(--head); background: var(--soft-bg); }
.cg-nav__link.is-active { color: var(--accent); background: var(--pill); }
.cg-nav__link.is-active i { color: var(--accent); }

.cg-nav__actions { display: flex; align-items: center; gap: 12px; }

.cg-search {
  position: relative; display: inline-flex; align-items: center;
}
.cg-search i { position: absolute; left: 14px; font-size: 12px; color: #B6A4C6; pointer-events: none; }
.cg-search input {
  width: 220px; padding: 11px 14px 11px 36px; border-radius: 999px;
  background: var(--panel-bg); border: 1px solid var(--border-2);
  font-family: var(--display); font-size: 13px; color: var(--head-2);
  box-shadow: var(--shadow-sm); transition: .2s;
}
.cg-search input::placeholder { color: #B6A4C6; }
.cg-search input:focus { outline: none; border-color: var(--accent-2); box-shadow: 0 0 0 3px rgba(155,127,201,.18); }

.cg-icon-btn {
  width: 40px; height: 40px; border-radius: 999px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--panel-bg); border: 1px solid var(--border-2);
  color: var(--accent); cursor: pointer; transition: .2s; box-shadow: var(--shadow-sm);
  font-size: 14px;
}
.cg-icon-btn:hover { border-color: var(--accent-2); color: var(--head-2); transform: translateY(-1px); }
.cg-icon-btn [data-cg-sun] { display: none; color: #FBD24B; }
[data-theme="dark"] .cg-icon-btn [data-cg-moon] { display: none; }
[data-theme="dark"] .cg-icon-btn [data-cg-sun] { display: inline-block; }

.cg-petals {
  display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 15px;
  border-radius: 999px; background: var(--blush-soft); color: #C26FA0;
  font-family: var(--display); font-size: 13px; white-space: nowrap;
}
[data-theme="dark"] .cg-petals { color: #EC9CC0; }
.cg-petals i { font-size: 12px; }

.cg-user {
  display: inline-flex; align-items: center; gap: 9px; height: 40px;
  padding: 0 14px 0 6px; border-radius: 999px;
  background: var(--panel-bg); border: 1px solid var(--border-2);
  box-shadow: var(--shadow-sm); transition: .2s;
}
.cg-user:hover { border-color: var(--accent-2); }
.cg-user__av {
  width: 28px; height: 28px; border-radius: 999px; display: grid; place-items: center;
  background: linear-gradient(135deg, #C9A6E0, #F0A8C4); color: #fff;
  font-family: var(--display); font-size: 12px;
}
.cg-user__name { font-family: var(--display); font-size: 13px; color: var(--head-2); }
.cg-user i { font-size: 9px; color: #B6A4C6; }

.cg-btn-login {
  font-family: var(--display); font-size: 14px; color: var(--accent);
  padding: 10px 22px; border-radius: 999px; background: var(--panel-bg);
  border: 1px solid var(--border-2); box-shadow: var(--shadow-sm); transition: .2s; white-space: nowrap;
}
.cg-btn-login:hover { border-color: var(--accent-2); color: var(--head-2); transform: translateY(-1px); }
.cg-btn-signup {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  font-family: var(--display); font-size: 14px; color: #fff;
  padding: 10px 22px; border-radius: 999px; background: var(--grad-btn);
  box-shadow: 0 12px 26px -7px rgba(140,106,194,.5); transition: .2s;
}
.cg-btn-signup:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -7px rgba(140,106,194,.65); }
.cg-btn-signup span { font-size: 11px; }

.cg-burger { display: none; }
.cg-mobile__auth { display: flex; gap: 10px; padding: 10px 12px 4px; }
.cg-mobile__auth a { flex: 1; text-align: center; }

.cg-mobile {
  margin: 14px 4px 0; padding: 10px; border-radius: 18px;
  background: var(--panel-bg); border: 1px solid var(--border-2);
  box-shadow: var(--shadow-panel); display: flex; flex-direction: column;
}
.cg-mobile[hidden] { display: none; }
.cg-mobile__link {
  font-family: var(--display); font-size: 15px; color: var(--ink-strong);
  padding: 11px 12px; border-radius: 12px; transition: .15s;
}
.cg-mobile__link:hover { background: var(--soft-bg); color: var(--head); }
.cg-mobile__link.is-active { color: var(--accent); }

@media (max-width: 980px) {
  .cg-nav__links, .cg-btn-login, .cg-btn-signup { display: none; }
  .cg-burger { display: inline-flex; }
  .cg-user__name, .cg-user > i, .cg-user .cg-role-badge { display: none; }
  .cg-user { padding: 6px; }
}

/* phones: keep the bar from overflowing — drop secondary icons, shrink wordmark */
@media (max-width: 600px) {
  .cg-nav { padding: 14px 14px 4px; }
  .cg-nav__actions { gap: 8px; }
  .cg-icon-btn[data-cg-search], .cg-nav__actions > a.cg-icon-btn { display: none; }
  .cg-brand__name span { font-size: 18px; }
  .cg-brand__mark { width: 36px; height: 36px; }
}

/* ============================================================
   HOME HERO
   ============================================================ */
.home-hero {
  position: relative; margin: 18px 30px 0; overflow: hidden;
  border-radius: 26px; border: 1px solid var(--border-2);
  min-height: 470px; display: flex; align-items: center;
  background: url('../assets/cloudberry-banner.webp') center right / cover no-repeat;
}
.home-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(252,249,254,.92) 0%, rgba(252,249,254,.64) 38%, rgba(252,249,254,.16) 60%, transparent 78%);
}
[data-theme="dark"] .home-hero::before {
  background: linear-gradient(90deg, rgba(24,20,32,.92) 0%, rgba(24,20,32,.66) 40%, rgba(24,20,32,.18) 62%, transparent 80%);
}
.home-hero__content { position: relative; z-index: 2; max-width: 520px; padding: 56px 56px; }
.home-hero__eyebrow {
  font-family: var(--display); letter-spacing: .3em; text-transform: uppercase;
  font-size: 11px; color: #9A86B4; margin: 0 0 14px;
}
.home-hero h1 {
  font-family: var(--serif); font-weight: 700; line-height: .92; margin: 0;
  font-size: clamp(2.6rem, 6vw, 4.4rem);
}
.home-hero__tagline {
  font-family: var(--serif); font-style: italic; color: var(--blush-2);
  font-size: clamp(1.7rem, 3.4vw, 2.1rem); line-height: 1.1; margin: 10px 0 14px;
}
.home-hero__copy {
  font-family: var(--body); font-size: 14.5px; line-height: 1.6;
  color: var(--ink); max-width: 360px; margin: 0 0 26px;
}
.home-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 640px) {
  .home-hero { margin: 16px 18px 0; min-height: 420px; }
  .home-hero__content { padding: 40px 28px; }
}

/* ============================================================
   NOVEL CARDS + GRID
   ============================================================ */
.card-grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
.editor-picks { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }

.novel-card {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: 18px; overflow: hidden; box-shadow: var(--shadow-card);
  transition: transform .3s, box-shadow .3s;
}
.novel-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-card-h); }
.novel-card__cover {
  position: relative; display: block; height: 218px; overflow: hidden;
}
.editor-picks .novel-card__cover { height: 150px; }
.cover-glow { position: absolute; bottom: 18px; left: 0; right: 0; height: 60px; background: rgba(255,255,255,.28); filter: blur(22px); }
.novel-card__badge {
  position: absolute; top: 12px; left: 12px;
  background: rgba(255,255,255,.85); color: var(--blush);
  font-family: var(--display); font-size: 11px; padding: 3px 11px;
  border-radius: 999px; backdrop-filter: blur(4px);
  box-shadow: 0 2px 8px rgba(120,90,160,.18);
}
.novel-card__body { padding: 14px; }
.novel-card__title { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 15px; line-height: 1.25; }
.novel-card__title a { color: var(--head); }
.novel-card__title a:hover { color: var(--accent); }
.novel-card__meta { font-family: var(--display); font-size: 12px; color: #A08CB8; margin: 6px 0 10px; }
[data-theme="dark"] .novel-card__meta { color: #9F8FB8; }
.novel-card__stats { display: flex; align-items: center; gap: 16px; font-family: var(--display); font-size: 12px; }
.novel-card__stats .star { color: var(--star); display: inline-flex; align-items: center; gap: 5px; }
.novel-card__stats .views { color: #A695BE; display: inline-flex; align-items: center; gap: 5px; }

/* ============================================================
   HOME LAYOUT GRIDS
   ============================================================ */
.home-duo { display: grid; gap: 24px; grid-template-columns: 7fr 5fr; }
.two-column { display: grid; gap: 24px; grid-template-columns: 4fr 8fr; }
@media (max-width: 920px) { .home-duo, .two-column { grid-template-columns: 1fr; } }

/* categories */
.category-grid { display: grid; gap: 12px; grid-template-columns: repeat(4, 1fr); }
@media (max-width: 560px) { .category-grid { grid-template-columns: repeat(2, 1fr); } }
.category-card {
  display: block; background: var(--card-bg); border: 1px solid var(--border);
  border-radius: 18px; transition: .22s;
}
.category-card:hover { transform: translateY(-3px); border-color: var(--border-hover); box-shadow: 0 12px 22px -10px rgba(150,118,185,.4); }
.category-card__inner { padding: 16px 8px; display: flex; flex-direction: column; align-items: center; gap: 9px; }
.category-card__icon {
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 18px;
}
.category-card__label { font-family: var(--display); font-size: 12.5px; color: var(--ink-strong); }

/* continue reading */
.reading-list { display: flex; flex-direction: column; gap: 12px; }
.reading-row {
  display: flex; align-items: center; gap: 14px; padding: 10px;
  border-radius: 16px; border: 1px solid var(--border); transition: .2s;
}
.reading-row:hover { border-color: var(--border-hover); background: var(--soft-bg); }
.reading-row__cover { width: 48px; height: 64px; border-radius: 12px; flex-shrink: 0; box-shadow: var(--shadow-sm); }
.reading-row__title { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 14px; color: var(--head); line-height: 1.2; }
.reading-row__ch { margin: 3px 0 8px; font-family: var(--display); font-size: 11.5px; color: #A08CB8; }
.reading-row__bar { display: flex; align-items: center; gap: 10px; }
.reading-row__pct { font-family: var(--display); font-size: 11px; color: var(--accent); font-weight: 600; }
.progress { flex: 1; height: 7px; border-radius: 999px; background: var(--track); overflow: hidden; }
.progress span { display: block; height: 100%; border-radius: 999px; background: var(--grad-fill); }

/* garden talk */
.garden-talk { display: flex; flex-direction: column; gap: 10px; }
.talk-item {
  display: flex; align-items: center; gap: 12px; padding: 12px;
  border-radius: 16px; border: 1px solid var(--border); transition: .2s;
}
.talk-item:hover { border-color: var(--border-hover); background: var(--soft-bg); }
.talk-item__av { width: 36px; height: 36px; border-radius: 999px; flex-shrink: 0; display: grid; place-items: center; color: #fff; font-size: 12px; }
.talk-item__q { display: block; font-family: var(--display); font-size: 13px; color: var(--head); line-height: 1.3; }
.talk-item__r { display: block; font-family: var(--display); font-size: 11px; color: #A08CB8; margin-top: 3px; }

/* ============================================================
   NEWSLETTER
   ============================================================ */
.newsletter {
  position: relative; overflow: hidden;
  background-image: url('../assets/cloudberry-newsletter.webp');
  background-size: cover; background-position: center 38%;
  border: 1px solid #EADCF6; border-radius: 26px;
  padding: 34px 40px; display: flex; align-items: center; justify-content: space-between;
  gap: 28px; flex-wrap: wrap;
}
.newsletter::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, transparent 0%, rgba(247,240,251,.5) 30%, rgba(247,240,251,.5) 70%, transparent 100%);
}
[data-theme="dark"] .newsletter { border-color: #3A3050; }
[data-theme="dark"] .newsletter::before { background: linear-gradient(90deg, transparent 0%, rgba(24,19,36,.6) 30%, rgba(24,19,36,.6) 70%, transparent 100%); }
.newsletter > * { position: relative; z-index: 1; }
.newsletter h2 { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 1.55rem; color: var(--head); display: flex; align-items: center; gap: 10px; }
.newsletter p { font-family: var(--body); font-size: 13px; color: var(--muted); margin: 0; }
.newsletter-form { display: flex; gap: 10px; flex-wrap: wrap; }
.newsletter-form input {
  flex: 1; min-width: 200px; padding: 12px 16px; border-radius: 13px;
  background: rgba(255,255,255,.92); border: 1px solid #E6D6F1;
  font-family: var(--display); font-size: 14px; color: var(--head-2);
}
.newsletter-form input::placeholder { color: #B6A4C6; }
.newsletter-form input:focus { outline: none; border-color: var(--accent-2); box-shadow: 0 0 0 3px rgba(155,127,201,.18); }
[data-theme="dark"] .newsletter-form input { background: rgba(20,16,30,.6); border-color: #41365A; color: #E6DAF4; }

/* ============================================================
   FOOTER (injected)
   ============================================================ */
.cg-foot {
  position: relative; margin-top: 36px; padding: 44px 40px 24px;
  background: url('../assets/cloudberry-footer.webp') center bottom / cover, linear-gradient(180deg, #F2EAF8 0%, #EFE6F6 100%);
  border-top: 1px solid #EADDF4; overflow: hidden;
}
.cg-foot::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(242,234,248,.86) 0%, rgba(240,231,246,.8) 45%, rgba(240,231,246,.85) 100%);
}
.cg-foot > * { position: relative; z-index: 1; }
[data-theme="dark"] .cg-foot { background: url('../assets/cloudberry-footer.webp') center bottom / cover, #201A2C; border-color: #352B49; }
[data-theme="dark"] .cg-foot::before { background: linear-gradient(180deg, rgba(30,24,42,.88) 0%, rgba(30,24,42,.82) 45%, rgba(30,24,42,.9) 100%); }
.cg-foot__window { position: absolute; right: 26px; bottom: 28px; width: 168px; height: 168px; opacity: .9; pointer-events: none; }
@media (max-width: 760px) { .cg-foot__window { display: none; } }
.cg-foot__grid { position: relative; display: grid; grid-template-columns: 2.4fr 1fr 1.2fr 1.2fr; gap: 32px; margin-bottom: 32px; }
@media (max-width: 760px) { .cg-foot__grid { grid-template-columns: 1fr 1fr; } .cg-foot__brand { grid-column: 1 / -1; } }
.cg-foot__brand p { font-family: var(--body); font-size: 13px; color: var(--muted); line-height: 1.6; max-width: 240px; margin: 14px 0 16px; }
.cg-foot__social { display: flex; gap: 10px; }
.cg-foot__social a {
  width: 36px; height: 36px; border-radius: 999px; display: grid; place-items: center;
  background: var(--panel-bg); border: 1px solid var(--border-2); color: var(--accent);
  box-shadow: var(--shadow-sm); transition: .2s; font-size: 14px;
}
.cg-foot__social a:hover { border-color: var(--accent-2); color: var(--head-2); transform: translateY(-1px); }
.cg-foot__col h4 { font-family: var(--serif); font-weight: 600; font-size: 15px; color: var(--head-2); margin: 0 0 14px; }
.cg-foot__col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.cg-foot__col a { font-family: var(--body); font-size: 13.5px; color: var(--muted); transition: .2s; }
.cg-foot__col a:hover { color: var(--accent); }
.cg-foot__rule { height: 1px; background: linear-gradient(90deg, transparent, #E2D2F0, transparent); margin-bottom: 18px; }
.cg-foot__bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-family: var(--display); font-size: 12px; color: #A695BE; }
.cg-foot__bottom i { color: var(--blush); font-size: 11px; }

/* ============================================================
   LIBRARY / NOVELS — sidebar + toolbar + tabs
   ============================================================ */
.library-layout { display: grid; grid-template-columns: 280px 1fr; gap: 24px; align-items: start; }
.library-layout > * { min-width: 0; }
.library-sidebar { position: sticky; top: 18px; }
.filter-list { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
@media (max-width: 900px) {
  .library-layout { grid-template-columns: 1fr; }
  .library-sidebar { position: static; background: transparent; border: none; box-shadow: none; border-radius: 0; padding: 0; }
  .library-sidebar .section-title { display: none; }
  .filter-list { flex-direction: row; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; -ms-overflow-style: none; margin-top: 0; padding-bottom: 4px; }
  .filter-list::-webkit-scrollbar { display: none; }
  .filter-pill { flex-shrink: 0; white-space: nowrap; }
}
.filter-pill {
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--display); font-size: 14px; color: var(--ink-strong);
  padding: 10px 15px; border-radius: 13px; border: 1px solid var(--border); transition: .2s;
}
.filter-pill span { font-size: 12px; color: #A695BE; }
.filter-pill:hover { border-color: var(--border-hover); background: var(--soft-bg); }
.filter-pill.is-active { background: var(--grad-btn); color: #fff; border-color: transparent; }
.filter-pill.is-active span { color: rgba(255,255,255,.8); }

.library-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.library-toolbar h1 { margin: 0; font-family: var(--serif); font-weight: 700; font-size: clamp(1.8rem, 3.5vw, 2.4rem); color: var(--head); }

.tabs { display: flex; gap: 10px; flex-wrap: wrap; margin: 22px 0; }
.tab {
  font-family: var(--display); font-size: 14px; color: var(--ink-strong);
  background: var(--panel-bg); border: 1px solid var(--border-2);
  padding: 9px 20px; border-radius: 999px; cursor: pointer; transition: .2s;
}
.tab:hover { border-color: var(--accent-2); color: var(--head-2); }
.tab.is-active { background: var(--grad-btn); color: #fff; border-color: transparent; }

/* ============================================================
   NOVEL DETAIL
   ============================================================ */
.novel-hero { display: grid; grid-template-columns: 260px 1fr; gap: 32px; align-items: start; }
@media (max-width: 760px) { .novel-hero { grid-template-columns: 1fr; } }
.novel-hero__cover {
  position: relative; height: 360px; border-radius: 22px; overflow: hidden;
  box-shadow: var(--shadow-panel); border: 1px solid var(--border);
}
@media (max-width: 760px) { .novel-hero__cover { max-width: 240px; } }
.novel-hero h1 { margin: 0 0 6px; font-family: var(--serif); font-weight: 700; font-size: clamp(2rem, 4vw, 2.8rem); color: var(--head); line-height: 1.05; }
.novel-hero__author { font-family: var(--serif); font-style: italic; font-size: 1.2rem; color: var(--blush-2); margin: 0 0 18px; }
.novel-hero__author a { color: inherit; text-decoration: none; border-bottom: 1px solid transparent; transition: .18s; }
.novel-hero__author a:hover { color: var(--accent); border-bottom-color: currentColor; }
.meta-chips { display: flex; gap: 9px; flex-wrap: wrap; margin-bottom: 20px; }
.stat-strip {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px;
  background: var(--soft-bg); border: 1px solid var(--border); border-radius: 18px; padding: 16px;
}
.stat-strip .num { font-family: var(--serif); font-weight: 700; font-size: 1.5rem; color: var(--head); text-align: center; }
.stat-strip .lbl { font-family: var(--display); font-size: 11px; color: var(--muted); text-align: center; margin-top: 2px; }
.synopsis { font-family: var(--body); font-size: 14.5px; line-height: 1.7; color: var(--ink-strong); margin: 0 0 22px; }
.synopsis p { margin: 0 0 13px; }
.synopsis p:last-child { margin-bottom: 0; }
.synopsis h3 { font-family: var(--serif); font-weight: 700; font-size: 1.05rem; color: var(--head); margin: 20px 0 8px; }
.synopsis hr { border: 0; height: 1px; background: var(--border-2); margin: 20px 0; }
.synopsis blockquote { margin: 0 0 13px; padding: 8px 14px; border-left: 3px solid var(--accent-3); background: var(--soft-bg); border-radius: 8px; color: var(--ink-strong); }
.synopsis ul { margin: 0 0 13px; padding-left: 20px; }
.synopsis li { margin: 2px 0; }
.synopsis strong { color: var(--head-2); }
.actions-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

.chapter-list { display: flex; flex-direction: column; gap: 4px; margin-top: 18px; }
.chapter-row {
  display: flex; align-items: center; gap: 16px; padding: 14px 16px;
  border-radius: 14px; border: 1px solid transparent; transition: .18s;
}
.chapter-row:hover { background: var(--soft-bg); border-color: var(--border); }
.chapter-row__no { font-family: var(--serif); font-weight: 700; font-size: 1.1rem; color: var(--accent-2); width: 32px; flex-shrink: 0; }
.chapter-row__title { flex: 1; font-family: var(--display); font-size: 15px; color: var(--head); }
.chapter-row__date { font-family: var(--display); font-size: 12px; color: var(--muted); }
.chapter-row__lock { color: var(--accent-3); font-size: 13px; }

/* ============================================================
   READER
   ============================================================ */
.reader-shell { max-width: 760px; margin: 0 auto; padding: 28px 24px 8px; --reader-size: 18px; }
.reader-shell.font-sm { --reader-size: 16px; }
.reader-shell.font-lg { --reader-size: 21px; }
.reader-panel {
  background: var(--panel-bg); border: 1px solid var(--border);
  border-radius: 26px; box-shadow: var(--shadow-panel); padding: 44px 48px;
}
@media (max-width: 640px) { .reader-panel { padding: 30px 24px; } }
.reader-title { margin: 0; font-family: var(--serif); font-weight: 700; font-size: clamp(1.7rem, 3.5vw, 2.2rem); color: var(--head); line-height: 1.15; }
.reader-meta { font-family: var(--display); font-size: 13px; color: var(--muted); margin: 10px 0 28px; }
.reader-content p { font-family: var(--body); font-size: var(--reader-size); line-height: 1.9; color: var(--ink-strong); margin: 0 0 1.4em; text-wrap: pretty; }
/* real drop-cap: a large floated initial on the chapter's first paragraph only */
.reader-content p:first-of-type::first-letter {
  float: left; font-family: var(--serif); font-weight: 700;
  font-size: 3.4em; line-height: .8; padding: .06em .12em 0 0; color: var(--accent);
}
@media (max-width: 480px) { .reader-content p:first-of-type::first-letter { font-size: 2.8em; } }
.reader-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 30px; }
.reader-toolbar {
  position: sticky; bottom: 18px; margin: 22px auto 0; width: max-content;
  display: flex; gap: 8px; padding: 8px; border-radius: 999px;
  background: var(--panel-bg); border: 1px solid var(--border-2); box-shadow: var(--shadow-panel);
}

/* ============================================================
   COMMUNITY
   ============================================================ */
.composer { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; }
.input, .textarea {
  width: 100%; font-family: var(--body); font-size: 14px; color: var(--head-2);
  background: var(--soft-bg); border: 1px solid var(--border-2); border-radius: 14px;
  padding: 13px 16px; transition: .2s;
}
.input::placeholder, .textarea::placeholder { color: #B6A4C6; }
.input:focus, .textarea:focus { outline: none; border-color: var(--accent-2); box-shadow: 0 0 0 3px rgba(155,127,201,.18); background: var(--panel-bg); }
.textarea { min-height: 120px; resize: vertical; }

.thread-list { display: flex; flex-direction: column; gap: 12px; }
.thread {
  display: flex; align-items: center; gap: 16px; padding: 18px 20px;
  background: var(--panel-bg); border: 1px solid var(--border); border-radius: 18px;
  box-shadow: var(--shadow-card); transition: .2s;
}
.thread:hover { transform: translateY(-2px); border-color: var(--border-hover); box-shadow: var(--shadow-card-h); }
.thread__av { width: 46px; height: 46px; border-radius: 999px; flex-shrink: 0; display: grid; place-items: center; color: #fff; font-family: var(--display); font-size: 16px; }
.thread__title { font-family: var(--serif); font-weight: 600; font-size: 1.1rem; color: var(--head); line-height: 1.25; }
.thread__meta { font-family: var(--display); font-size: 12px; color: var(--muted); margin-top: 4px; }
.thread__stats { margin-left: auto; text-align: center; flex-shrink: 0; }
.thread__stats .num { font-family: var(--serif); font-weight: 700; font-size: 1.3rem; color: var(--accent); }
.thread__stats .lbl { font-family: var(--display); font-size: 11px; color: var(--muted); }

/* ============================================================
   AUTH
   ============================================================ */
.auth-page { display: grid; place-items: center; padding: 36px 30px; }
.auth-card { width: min(460px, 100%); padding: 38px 36px; }
.auth-card h1 { margin: 0; font-family: var(--serif); font-weight: 700; font-size: 2rem; color: var(--head); }
.auth-card.glass { text-align: center; }
.auth-form { display: flex; flex-direction: column; gap: 16px; margin-top: 22px; text-align: left; }
.form-field { display: flex; flex-direction: column; gap: 7px; }
.form-label { font-family: var(--display); font-size: 13px; color: var(--head-2); }
.auth-note { font-family: var(--body); font-size: 13.5px; color: var(--muted); margin: 20px 0 0; }
.auth-note a { color: var(--accent); font-weight: 600; }
.auth-note a:hover { text-decoration: underline; }

/* ============================================================
   DECOR + UTILITIES
   ============================================================ */
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
.floaty { animation: floaty 6s ease-in-out infinite; }
/* Respect users who ask for less motion (WCAG 2.3.3): neutralize the infinite
   petal/floaty drift, modal/spinner keyframes, and all transitions. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .cg-petal { display: none !important; }
}

/* Orchestrated page-load reveal: top-level blocks (hero, section, panels)
   rise + fade in sequence. fill-mode:both holds the final state so content
   never gets stuck hidden; the reduce block above neutralizes it on request. */
@keyframes cg-rise { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  #main > * { animation: cg-rise .55s cubic-bezier(.22,.61,.36,1) both; }
  #main > *:nth-child(1) { animation-delay: .03s; }
  #main > *:nth-child(2) { animation-delay: .09s; }
  #main > *:nth-child(3) { animation-delay: .15s; }
  #main > *:nth-child(4) { animation-delay: .21s; }
  #main > *:nth-child(5) { animation-delay: .27s; }
  #main > *:nth-child(n+6) { animation-delay: .32s; }
}

@keyframes cg-drift { 0% { transform: translateY(-10%) translateX(0) rotate(0); } 100% { transform: translateY(120%) translateX(40px) rotate(200deg); } }
.cg-petal { position: absolute; top: -6%; opacity: .7; animation: cg-drift linear infinite; }

.cg-top {
  position: fixed; right: 26px; bottom: 26px; z-index: 40;
  width: 44px; height: 44px; border-radius: 999px; cursor: pointer;
  display: grid; place-items: center; color: var(--accent);
  background: var(--panel-bg); border: 1px solid var(--border-2);
  box-shadow: 0 10px 26px -8px rgba(150,118,185,.5);
  opacity: 0; transform: translateY(12px); pointer-events: none; transition: .25s;
}
.cg-top.is-visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.cg-top:hover { border-color: var(--accent-2); color: var(--head-2); }

/* ============================================================
   HOME — trending row + Stay-in-the-Garden card + features
   ============================================================ */
.trending-row { display: grid; grid-template-columns: 1fr 304px; gap: 24px; align-items: stretch; }
@media (max-width: 980px) { .trending-row { grid-template-columns: 1fr; } }

.trending-main { min-width: 0; }
.trending-wrap { position: relative; }
.trending-track {
  display: flex; gap: 16px; overflow-x: auto; padding: 4px 2px 8px;
  scroll-snap-type: x mandatory; scroll-padding: 2px;
}
.trending-track .novel-card { width: 204px; flex-shrink: 0; scroll-snap-align: start; }
.trending-track .novel-card__cover { height: 196px; }

.carousel-btn {
  position: absolute; top: 38%; z-index: 6; width: 40px; height: 40px; border-radius: 999px;
  display: grid; place-items: center; cursor: pointer; color: var(--accent);
  background: var(--panel-bg); border: 1px solid var(--border-2);
  box-shadow: 0 8px 20px -6px rgba(150,118,185,.45); transition: .2s;
}
.carousel-btn:hover { border-color: var(--accent-2); color: var(--head-2); }
.carousel-btn--prev { left: -16px; }
.carousel-btn--next { right: -16px; }
@media (max-width: 640px) { .carousel-btn { display: none; } }

.news-card {
  position: relative; overflow: hidden; border-radius: 24px; padding: 26px 24px 22px;
  background: linear-gradient(165deg, #F2E8FB 0%, #F4E8F4 55%, #F9EAEF 100%);
  border: 1px solid #EADCF6; display: flex; flex-direction: column;
}
[data-theme="dark"] .news-card { background: linear-gradient(165deg, #2A2240, #251D34); border-color: #3A3050; }
.news-card > * { position: relative; z-index: 1; }
.news-card__topper { display: flex; justify-content: center; margin-bottom: 6px; }
.news-card h3 { margin: 0 0 8px; font-family: var(--serif); font-weight: 600; font-size: 1.55rem; color: var(--head); text-align: center; }
.news-card p { margin: 0 0 18px; font-family: var(--body); font-size: 12.5px; line-height: 1.6; color: var(--muted); text-align: center; max-width: 230px; align-self: center; }
.news-card form { display: flex; flex-direction: column; gap: 10px; position: relative; z-index: 2; margin-top: auto; }
.news-card input {
  width: 100%; padding: 12px 15px; border-radius: 13px; font-family: var(--display); font-size: 14px;
  background: rgba(255,255,255,.92); border: 1px solid #E6D6F1; color: var(--head-2);
}
.news-card input::placeholder { color: #B6A4C6; }
.news-card input:focus { outline: none; border-color: var(--accent-2); box-shadow: 0 0 0 3px rgba(155,127,201,.18); }
[data-theme="dark"] .news-card input { background: rgba(20,16,30,.6); border-color: #41365A; color: #E6DAF4; }
.news-card .btn { width: 100%; }
.news-card__art {
  margin: 18px -24px -22px; height: 140px;
  background: url('../assets/cloudberry-news.webp') center bottom / cover no-repeat;
}
@media (max-width: 980px) { .news-card__art { height: 120px; } }

.feature-band {
  position: relative; overflow: hidden; border-radius: 26px; padding: 28px 32px;
  background: linear-gradient(120deg, #EEE4FA 0%, #F3E8F6 58%, #F8E9EF 100%);
  border: 1px solid #EADCF6;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px;
}
[data-theme="dark"] .feature-band { background: linear-gradient(120deg, #241D33, #2A2240); border-color: #3A3050; }
@media (max-width: 860px) { .feature-band { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .feature-band { grid-template-columns: 1fr; } }
.feature { position: relative; z-index: 1; display: flex; align-items: flex-start; gap: 14px; }
.feature + .feature::before {
  content: ""; position: absolute; left: -11px; top: 4px; bottom: 4px; width: 1px;
  background: rgba(150,118,185,.18);
}
@media (max-width: 860px) { .feature + .feature::before { display: none; } }
.feature__icon {
  width: 46px; height: 46px; border-radius: 14px; flex-shrink: 0; display: grid; place-items: center;
  background: rgba(255,255,255,.72); color: var(--accent); font-size: 18px; box-shadow: var(--shadow-sm);
}
[data-theme="dark"] .feature__icon { background: rgba(255,255,255,.08); }
.feature h3 { margin: 0 0 4px; font-family: var(--display); font-size: 15px; color: var(--head); }
.feature p { margin: 0; font-family: var(--body); font-size: 12.5px; line-height: 1.5; color: var(--muted); }

/* ============================================================
   HOME (rebuilt) — trending grid, genre grid, feed rows, join
   ============================================================ */

/* Hot & Trending — fixed 5-up grid (equal-height cards, aligned meta/stats) */
.trending-grid { display: grid; gap: 18px; grid-template-columns: repeat(5, 1fr); }
@media (max-width: 1024px) { .trending-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px)  { .trending-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px)  { .trending-grid { grid-template-columns: 1fr; } }
.trending-grid .novel-card { display: flex; flex-direction: column; }
.trending-grid .novel-card__cover { height: 188px; }
.trending-grid .novel-card__body { display: flex; flex-direction: column; flex: 1; }
/* reserve two lines so meta + stats line up across every card */
.trending-grid .novel-card__title {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; min-height: 2.5em;
}
.trending-grid .novel-card__stats { margin-top: auto; }

/* Browse by Genre — 6-up */
.category-grid--6 { grid-template-columns: repeat(6, 1fr); }
@media (max-width: 1024px) { .category-grid--6 { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 640px)  { .category-grid--6 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 440px)  { .category-grid--6 { grid-template-columns: repeat(2, 1fr); } }

/* Latest Updates + Garden Events row */
.updates-row { display: grid; gap: 24px; grid-template-columns: 1fr 304px; }
@media (max-width: 980px) { .updates-row { grid-template-columns: 1fr; } }

.feed-list { display: flex; flex-direction: column; }
.feed-row {
  display: flex; align-items: center; gap: 14px; padding: 15px 0;
  border-bottom: 1px solid var(--border);
}
.feed-row:first-child { padding-top: 2px; }
.feed-row:last-child { border-bottom: 0; padding-bottom: 0; }
.feed-row__icon {
  width: 46px; height: 46px; border-radius: 14px; flex-shrink: 0;
  display: grid; place-items: center; font-size: 17px; color: var(--accent);
  background: var(--soft-bg); border: 1px solid var(--border-2);
}
.feed-row__body { min-width: 0; }
.feed-row__title {
  margin: 0; font-family: var(--serif); font-weight: 600; font-size: 15px;
  color: var(--head); line-height: 1.25;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.feed-row__sub {
  margin: 4px 0 0; font-family: var(--display); font-size: 12.5px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Join Our Garden banner */
.join-band {
  position: relative; overflow: hidden; border-radius: 26px;
  padding: 32px 44px; display: flex; align-items: center; justify-content: space-between;
  gap: 28px; flex-wrap: wrap;
  background: linear-gradient(100deg, #EFE3FB 0%, #F6E6F1 52%, #FCEFF1 100%);
  border: 1px solid #EADCF6;
}
[data-theme="dark"] .join-band { background: linear-gradient(100deg, #241D33, #2A2240); border-color: #3A3050; }
.join-band__text { min-width: 260px; }
.join-band__text h2 { margin: 0 0 7px; font-family: var(--serif); font-weight: 600; font-size: 1.7rem; color: var(--head); }
.join-band__text p { margin: 0; font-family: var(--body); font-size: 13.5px; line-height: 1.6; color: var(--muted); max-width: 560px; }
@media (max-width: 640px) { .join-band { padding: 26px 24px; } }

/* ============================================================
   HOME (catalog layout) — centered hero, chips, category rows, updates
   ============================================================ */

/* centered atmospheric hero */
.home-hero { justify-content: center; text-align: center; background-position: center; min-height: 500px; }
.home-hero::before { background: radial-gradient(122% 108% at 50% 46%, rgba(252,249,254,.84) 0%, rgba(252,249,254,.5) 40%, rgba(252,249,254,.12) 70%, transparent 88%); }
[data-theme="dark"] .home-hero::before { background: radial-gradient(122% 108% at 50% 46%, rgba(24,20,32,.86) 0%, rgba(24,20,32,.55) 42%, rgba(24,20,32,.12) 72%, transparent 90%); }
.home-hero__content { max-width: 760px; margin: 0 auto; padding: 72px 40px; display: flex; flex-direction: column; align-items: center; }
.home-hero__copy { max-width: 480px; margin-left: auto; margin-right: auto; }
.home-hero__actions { justify-content: center; }

/* genre chip filter row */
.genre-chips { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 6px; scroll-snap-type: x proximity; }
.genre-chips .chip { flex-shrink: 0; scroll-snap-align: start; white-space: nowrap; }

/* centered category header + see-all */
.cat-head { position: relative; display: flex; align-items: center; justify-content: center; min-height: 32px; margin-bottom: 22px; }
.cat-head__title {
  margin: 0; font-family: var(--serif); font-weight: 600; font-size: 1.6rem; color: var(--head);
  display: inline-flex; align-items: center; gap: 14px; text-align: center;
}
.cat-head__title::before, .cat-head__title::after { content: ""; width: 44px; height: 1px; }
.cat-head__title::before { background: linear-gradient(90deg, transparent, var(--accent-3)); }
.cat-head__title::after { background: linear-gradient(90deg, var(--accent-3), transparent); }
.cat-head__all {
  position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  font-family: var(--display); font-weight: 600; font-size: 13.5px; color: var(--accent);
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.cat-head__all:hover { text-decoration: underline; }
@media (max-width: 640px) {
  .cat-head { flex-direction: column; gap: 8px; }
  .cat-head__all { position: static; transform: none; }
  .cat-head__title::before, .cat-head__title::after { width: 24px; }
}

/* 6-up book row (portrait covers, aligned meta/stats) */
.book-row { display: grid; gap: 18px; grid-template-columns: repeat(6, 1fr); }
@media (max-width: 1024px) { .book-row { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 700px)  { .book-row { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 460px)  { .book-row { grid-template-columns: repeat(2, 1fr); } }
.book-row .novel-card { display: flex; flex-direction: column; }
.book-row .novel-card__cover { height: 232px; }
.book-row .novel-card__body { display: flex; flex-direction: column; flex: 1; }
.book-row .novel-card__title {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; min-height: 2.5em;
}
.book-row .novel-card__stats { margin-top: auto; }

/* latest updates — cards listing recent chapters */
.update-grid { display: grid; gap: 16px; grid-template-columns: repeat(2, 1fr); }
@media (max-width: 760px) { .update-grid { grid-template-columns: 1fr; } }
.update-card {
  display: flex; gap: 16px; padding: 16px; border-radius: 18px;
  background: var(--card-bg); border: 1px solid var(--border); box-shadow: var(--shadow-card); transition: transform .25s, box-shadow .25s, border-color .25s;
}
.update-card:hover { transform: translateY(-3px); border-color: var(--border-hover); box-shadow: var(--shadow-card-h); }
.update-card__cover { width: 64px; height: 88px; border-radius: 12px; flex-shrink: 0; box-shadow: var(--shadow-sm); position: relative; overflow: hidden; }
.update-card__cover .cover-glow { bottom: 8px; height: 28px; }
.update-card__body { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.update-card__title { margin: 0 0 9px; font-family: var(--serif); font-weight: 600; font-size: 15px; color: var(--head); line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.update-card__chs { display: flex; flex-direction: column; gap: 6px; }
.update-chapter { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-family: var(--display); font-size: 12px; transition: color .15s; }
.update-chapter__name { color: var(--ink-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.update-chapter__time { color: var(--muted); flex-shrink: 0; }
.update-chapter:hover .update-chapter__name { color: var(--accent); }

/* ============================================================
   GARDEN TALK — group chat room
   ============================================================ */
.chat {
  display: flex; flex-direction: column; height: 72vh; min-height: 540px; max-height: 760px; overflow: hidden;
  background: var(--panel-bg); border: 1px solid var(--border); border-radius: 26px; box-shadow: var(--shadow-panel);
}
.chat__head { display: flex; align-items: center; gap: 14px; padding: 16px 22px; border-bottom: 1px solid var(--border); }
.chat__head-icon { width: 48px; height: 48px; border-radius: 16px; flex-shrink: 0; display: grid; place-items: center; color: #fff; font-size: 19px; background: var(--grad-btn); }
.chat__head-info { flex: 1; min-width: 0; }
.chat__head-title { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 1.3rem; color: var(--head); }
.chat__head-sub { font-family: var(--display); font-size: 12.5px; color: var(--muted); margin-top: 1px; display: flex; align-items: center; gap: 8px; }
.chat__online { display: inline-flex; align-items: center; gap: 6px; }
.chat__online::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--sage); box-shadow: 0 0 0 3px rgba(121,164,114,.18); }
.chat__head-avs { display: flex; flex-shrink: 0; }
.chat__head-avs span { width: 32px; height: 32px; border-radius: 999px; border: 2px solid var(--panel-bg); margin-left: -9px; display: grid; place-items: center; color: #fff; font-family: var(--display); font-size: 11px; }
@media (max-width: 560px) { .chat__head-avs { display: none; } }

.chat__body { flex: 1; overflow-y: auto; padding: 22px; display: flex; flex-direction: column; gap: 16px; background: linear-gradient(180deg, var(--soft-bg), var(--panel-bg)); }
.chat__day { align-self: center; font-family: var(--display); font-size: 11.5px; color: var(--muted); background: var(--pill); padding: 4px 14px; border-radius: 999px; }

.msg { display: flex; gap: 12px; max-width: 80%; }
.msg__av { width: 38px; height: 38px; border-radius: 999px; flex-shrink: 0; display: grid; place-items: center; color: #fff; font-family: var(--display); font-size: 13px; align-self: flex-end; }
.msg__col { display: flex; flex-direction: column; min-width: 0; align-items: flex-start; }
.msg.is-me .msg__col { align-items: flex-end; }
.msg__head { display: flex; align-items: baseline; gap: 8px; padding: 0 4px 4px; }
.msg__name { font-family: var(--display); font-size: 12.5px; font-weight: 600; color: var(--head-2); }
.msg__time { font-family: var(--display); font-size: 11px; color: var(--muted); }
.msg__bubble {
  font-family: var(--body); font-size: 14px; line-height: 1.5; color: var(--ink-strong);
  background: var(--panel-bg); border: 1px solid var(--border-2);
  padding: 10px 14px; border-radius: 16px; border-top-left-radius: 6px;
  box-shadow: var(--shadow-sm); width: fit-content; max-width: 100%; text-wrap: pretty;
}
.msg__bubble + .msg__bubble { margin-top: 6px; }
.msg__react { display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; font-family: var(--display); font-size: 11px; color: var(--blush); background: var(--blush-soft); border-radius: 999px; padding: 3px 10px; align-self: flex-start; }
.msg__react i { font-size: 10px; }

.msg.is-me { align-self: flex-end; flex-direction: row-reverse; }
.msg.is-me .msg__head { flex-direction: row-reverse; padding: 0 4px 4px; }
.msg.is-me .msg__bubble { background: var(--grad-btn); color: #fff; border-color: transparent; border-radius: 16px; border-top-right-radius: 6px; box-shadow: 0 10px 22px -10px rgba(140,106,194,.5); }
.msg.is-me .msg__av { display: none; }
.msg.is-me .msg__react { align-self: flex-end; }

.chat__composer { display: flex; flex-direction: column; align-items: stretch; gap: 10px; padding: 14px 18px; border-top: 1px solid var(--border); }
.chat__composer-row { display: flex; align-items: center; gap: 10px; }
.chat__reply { display: flex; align-items: center; gap: 12px; padding: 8px 14px; border-radius: 14px; background: var(--soft-bg); border: 1px solid var(--border-2); border-left: 3px solid var(--accent-2); }
.chat__reply[hidden] { display: none; }
.chat__reply-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.chat__reply-name { font-family: var(--display); font-size: 12px; font-weight: 600; color: var(--accent); }
.chat__reply-text { font-family: var(--body); font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat__reply-x { width: 30px; height: 30px; border-radius: 999px; border: 0; background: transparent; color: var(--muted); cursor: pointer; flex-shrink: 0; display: grid; place-items: center; font-size: 13px; transition: .15s; }
.chat__reply-x:hover { background: var(--pill); color: var(--head-2); }

/* reply affordance + quoted reference */
.msg__reply { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 11.5px; padding: 1px 7px; border-radius: 8px; opacity: 0; transition: .15s; display: inline-flex; align-items: center; gap: 4px; font-family: var(--display); }
.msg__reply i { font-size: 10px; }
.msg:hover .msg__reply { opacity: 1; }
.msg__reply:hover { color: var(--accent); background: var(--pill); }
@media (hover: none) { .msg__reply { opacity: .85; } }
.msg__like { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 11.5px; padding: 1px 7px; border-radius: 8px; opacity: 0; transition: .15s; display: inline-flex; align-items: center; gap: 4px; font-family: var(--display); }
.msg__like i { font-size: 10px; }
.msg:hover .msg__like { opacity: 1; }
.msg__like:hover { color: var(--blush); background: var(--blush-soft); }
.msg__like.is-liked { color: var(--blush); opacity: 1; }
@media (hover: none) { .msg__like { opacity: .85; } }
.msg__react { cursor: pointer; border: 0; transition: .15s; }
.msg__react:hover { filter: brightness(.97); }
.msg__react.is-liked { background: var(--blush); color: #fff; }
.msg__quote { display: flex; flex-direction: column; gap: 1px; max-width: 100%; padding: 5px 12px; margin-bottom: 5px; border-radius: 12px; border-left: 3px solid var(--accent-2); background: var(--soft-bg); }
.msg.is-me .msg__quote { border-left-color: var(--accent-3); }
.msg__quote-name { font-family: var(--display); font-size: 11px; font-weight: 600; color: var(--accent); }
.msg__quote-text { font-family: var(--body); font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.chat__icon-btn { width: 44px; height: 44px; border-radius: 999px; flex-shrink: 0; border: 1px solid var(--border-2); background: var(--panel-bg); color: var(--accent); cursor: pointer; display: grid; place-items: center; font-size: 15px; transition: .2s; }
.chat__icon-btn:hover { border-color: var(--accent-2); color: var(--head-2); }
.chat__composer input {
  flex: 1; padding: 13px 18px; border-radius: 999px; font-family: var(--body); font-size: 14px;
  background: var(--soft-bg); border: 1px solid var(--border-2); color: var(--head-2);
}
.chat__composer input::placeholder { color: #B6A4C6; }
.chat__composer input:focus { outline: none; border-color: var(--accent-2); box-shadow: 0 0 0 3px rgba(155,127,201,.18); background: var(--panel-bg); }
.chat__send { width: 46px; height: 46px; border-radius: 999px; flex-shrink: 0; border: 0; cursor: pointer; color: #fff; background: var(--grad-btn); display: grid; place-items: center; font-size: 15px; box-shadow: 0 10px 22px -7px rgba(140,106,194,.55); transition: .2s; }
.chat__send:hover { transform: translateY(-1px); box-shadow: 0 14px 26px -7px rgba(140,106,194,.65); }
@media (max-width: 640px) { .msg { max-width: 90%; } .chat { height: 78vh; } }

/* ============================================================
   STORY STUDIO — write / upload a story
   ============================================================ */
.studio-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.studio-head__actions { display: flex; gap: 10px; flex-wrap: wrap; }

.studio { display: grid; grid-template-columns: 340px 1fr; gap: 24px; align-items: start; }
@media (max-width: 900px) { .studio { grid-template-columns: 1fr; } }

.studio-meta { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 18px; }
@media (max-width: 900px) { .studio-meta { position: static; } }

.cover-upload {
  position: relative; aspect-ratio: 3 / 4; border-radius: 18px; cursor: pointer; overflow: hidden;
  border: 1.5px dashed var(--border-hover); background: var(--soft-bg); background-size: cover; background-position: center;
  display: grid; place-items: center; text-align: center; transition: .2s;
}
.cover-upload:hover { border-color: var(--accent-2); background-color: var(--pill); }
.cover-upload.has-img { border-style: solid; border-color: var(--border-2); }
.cover-upload__prompt { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px; color: var(--muted); }
.cover-upload.has-img .cover-upload__prompt { display: none; }
.cover-upload__prompt i { font-size: 26px; color: var(--accent-2); }
.cover-upload__prompt span { font-family: var(--display); font-size: 13.5px; color: var(--head-2); }
.cover-upload__prompt small { font-family: var(--body); font-size: 11px; color: #B6A4C6; }
.cover-upload__change { position: absolute; inset: auto 0 0 0; padding: 9px; text-align: center; font-family: var(--display); font-size: 12px; color: #fff; background: linear-gradient(0deg, rgba(58,40,78,.66), transparent); opacity: 0; transition: .2s; }
.cover-upload.has-img:hover .cover-upload__change { opacity: 1; }
.cover-upload input { display: none; }

.field-label { font-family: var(--display); font-size: 13px; color: var(--head-2); display: block; margin-bottom: 7px; }
.field-label .req { color: var(--blush); }
.studio-meta .input, .studio-meta .textarea, .studio-select { width: 100%; }
.studio-select {
  font-family: var(--display); font-size: 14px; color: var(--head-2);
  background: var(--soft-bg); border: 1px solid var(--border-2); border-radius: 14px;
  padding: 12px 40px 12px 15px; transition: .2s; appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none' stroke='%239B7FC9' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 15px center;
}
.studio-select:focus { outline: none; border-color: var(--accent-2); box-shadow: 0 0 0 3px rgba(155,127,201,.18); background-color: var(--panel-bg); }

.genre-pick { display: flex; flex-wrap: wrap; gap: 8px; }

.studio-stats { display: flex; gap: 22px; padding-top: 16px; border-top: 1px solid var(--border); }
.studio-stats .n { font-family: var(--serif); font-weight: 700; font-size: 1.25rem; color: var(--head); line-height: 1; }
.studio-stats .l { font-family: var(--display); font-size: 11px; color: var(--muted); margin-top: 3px; }

/* editor side */
.studio-editor { display: flex; flex-direction: column; min-height: 620px; }
.chapter-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 14px; margin-bottom: 16px; border-bottom: 1px solid var(--border); }
.chapter-tab { flex-shrink: 0; font-family: var(--display); font-size: 13px; color: var(--ink-strong); background: var(--panel-bg); border: 1px solid var(--border-2); padding: 8px 16px; border-radius: 999px; cursor: pointer; white-space: nowrap; transition: .2s; }
.chapter-tab:hover { border-color: var(--accent-2); color: var(--head-2); }
.chapter-tab.is-active { background: var(--grad-btn); color: #fff; border-color: transparent; }
.chapter-list { display: flex; flex-direction: column; gap: 7px; }
.chapter-list__item { display: flex; align-items: baseline; gap: 8px; width: 100%; text-align: left; font-family: var(--display); font-size: 13px; color: var(--ink-strong); background: var(--panel-bg); border: 1px solid var(--border-2); border-radius: 12px; padding: 10px 14px; cursor: pointer; transition: .2s; }
.chapter-list__item:hover { border-color: var(--accent-2); color: var(--head-2); }
.chapter-list__item.is-active { background: var(--grad-btn); color: #fff; border-color: transparent; }
.chapter-list__no { font-weight: 600; flex-shrink: 0; }
.chapter-list__t { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chapter-list__item.is-active .chapter-list__t { color: rgba(255,255,255,.82); }
.chapter-add { display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: 100%; font-family: var(--display); font-size: 13px; color: var(--accent); background: transparent; border: 1px dashed var(--border-hover); padding: 10px; border-radius: 12px; cursor: pointer; transition: .2s; margin-top: 1px; }
.chapter-add:hover { color: var(--head-2); border-color: var(--accent-2); background: var(--soft-bg); }

.editor-title { width: 100%; border: 0; background: transparent; font-family: var(--serif); font-weight: 700; font-size: 1.75rem; color: var(--head); padding: 4px 2px; }
.editor-title:focus { outline: none; }
.editor-title::placeholder { color: #C9B8DA; }

.editor-toolbar { display: flex; align-items: center; gap: 3px; margin: 12px 0 16px; padding: 6px; border: 1px solid var(--border); border-radius: 14px; background: var(--soft-bg); }
.editor-toolbar button { width: 34px; height: 34px; border: 0; background: transparent; border-radius: 9px; color: var(--ink-strong); cursor: pointer; font-size: 13px; display: grid; place-items: center; transition: .15s; }
.editor-toolbar button:hover { background: var(--panel-bg); color: var(--accent); box-shadow: var(--shadow-sm); }
.editor-toolbar .sep { width: 1px; height: 20px; background: var(--border-2); margin: 0 5px; }
.editor-toolbar .autosave { margin-left: auto; font-family: var(--display); font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; padding-right: 8px; }
.editor-toolbar .autosave i { color: var(--sage); font-size: 11px; }
.editor-toolbar .autosave.busy i { color: var(--accent-2); }

.editor-area { flex: 1; width: 100%; border: 0; background: transparent; resize: none; min-height: 360px;
  font-family: var(--body); font-size: 17px; line-height: 1.9; color: var(--ink); }
.editor-area:focus { outline: none; }
.editor-area::placeholder { color: #C2B2D4; }

.studio-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.studio-foot__meta { font-family: var(--display); font-size: 12.5px; color: var(--muted); display: flex; gap: 18px; }
.studio-foot__meta b { color: var(--ink-strong); font-weight: 600; }

.toast { position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 18px); z-index: 60;
  background: var(--head); color: #fff; font-family: var(--display); font-size: 13.5px;
  padding: 12px 22px; border-radius: 999px; box-shadow: 0 16px 34px -10px rgba(94,74,134,.6);
  opacity: 0; pointer-events: none; transition: .28s; display: inline-flex; align-items: center; gap: 9px; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast i { color: #F3C7DC; }

/* ============================================================
   ROLES — user chip menu, badges, access gate, admin dashboard
   ============================================================ */
.cg-user { position: relative; cursor: pointer; }
.cg-role-badge { font-family: var(--display); font-size: 10px; font-weight: 700; letter-spacing: .03em; padding: 2px 8px; border-radius: 999px; text-transform: uppercase; }
.cg-role-badge--reader { background: #E3EEF8; color: #3F7BBF; }
.cg-role-badge--translator { background: #E3F1E6; color: #4F9E72; }
.cg-role-badge--admin { background: #FBE3EE; color: #D23F7C; }
[data-theme="dark"] .cg-role-badge--reader { background: #24304a; color: #9bc0ec; }
[data-theme="dark"] .cg-role-badge--translator { background: #233a2c; color: #8fd6a8; }
[data-theme="dark"] .cg-role-badge--admin { background: #3a2a36; color: #ec9cc0; }

.cg-user__menu { position: absolute; right: 0; top: calc(100% + 8px); width: 224px; z-index: 50;
  background: var(--panel-bg); border: 1px solid var(--border-2); border-radius: 16px; box-shadow: var(--shadow-panel); padding: 7px; }
.cg-user__menu[hidden] { display: none; }
.cg-user__menu-label { font-family: var(--display); font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; padding: 7px 10px 5px; }
.cg-user__menu button, .cg-user__menu a { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 0; background: transparent; cursor: pointer; text-decoration: none; box-sizing: border-box;
  font-family: var(--display); font-size: 14px; color: var(--ink-strong); padding: 9px 10px; border-radius: 10px; transition: .15s; }
.cg-user__menu button:hover, .cg-user__menu a:hover { background: var(--soft-bg); color: var(--head); }
.cg-user__menu button.is-current { color: var(--accent); }
.cg-user__menu button > i:first-child, .cg-user__menu a > i:first-child { width: 16px; text-align: center; color: var(--accent-2); }
.cg-user__menu button .fa-check { margin-left: auto; color: var(--accent); font-size: 11px; }
.cg-user__menu-sep { height: 1px; background: var(--border); margin: 6px 4px; }

.access-gate { display: grid; place-items: center; padding: 64px 30px; }
.access-gate__card { max-width: 480px; text-align: center; }
.access-gate__icon { width: 74px; height: 74px; border-radius: 22px; display: grid; place-items: center; margin: 0 auto 18px;
  background: var(--blush-soft); color: var(--blush); font-size: 28px; }
.access-gate h1 { font-family: var(--serif); font-weight: 700; font-size: 1.9rem; color: var(--head); margin: 0 0 8px; }
.access-gate p { color: var(--muted); margin: 0 auto 22px; max-width: 38ch; }
.access-gate__note { font-family: var(--display); font-size: 13px; color: var(--ink-strong); margin-top: 18px; }

.role-choose { display: flex; flex-direction: column; gap: 9px; margin: 4px 0; }
.role-opt { position: relative; display: flex; align-items: center; gap: 12px; text-align: left; width: 100%; cursor: pointer;
  border: 1px solid var(--border-2); background: var(--soft-bg); border-radius: 14px; padding: 11px 14px; transition: .18s; }
.role-opt:hover { border-color: var(--accent-2); }
.role-opt.is-sel { border-color: var(--accent); background: var(--pill); box-shadow: 0 0 0 2px rgba(155,127,201,.16); }
.role-opt input { position: absolute; opacity: 0; pointer-events: none; }
.role-opt__ic { width: 38px; height: 38px; border-radius: 11px; flex-shrink: 0; display: grid; place-items: center; color: #fff; font-size: 15px; }
.role-opt__t { font-family: var(--display); font-size: 14px; color: var(--head); }
.role-opt__d { font-family: var(--body); font-size: 11.5px; color: var(--muted); margin-top: 1px; }

.admin-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 760px) { .admin-grid { grid-template-columns: repeat(2, 1fr); } }
.admin-stat { background: var(--panel-bg); border: 1px solid var(--border); border-radius: 18px; padding: 18px 20px; box-shadow: var(--shadow-sm); }
.admin-stat__n { font-family: var(--serif); font-weight: 700; font-size: 1.9rem; color: var(--head); line-height: 1; }
.admin-stat__l { font-family: var(--display); font-size: 12px; color: var(--muted); margin-top: 5px; }
.admin-stat__d { font-family: var(--display); font-size: 11px; margin-top: 7px; color: var(--sage); }
.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; min-width: 520px; }
.admin-table th { text-align: left; font-family: var(--display); font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 11px 12px; border-bottom: 1px solid var(--border); }
.admin-table td { padding: 13px 12px; border-bottom: 1px solid var(--border); font-family: var(--body); font-size: 13.5px; color: var(--ink-strong); }
.admin-table tr:last-child td { border-bottom: 0; }
.pill-status { font-family: var(--display); font-size: 11px; padding: 3px 11px; border-radius: 999px; white-space: nowrap; }
.pill-status--live { background: #E3F1E6; color: #4F9E72; }
.pill-status--pending { background: #FBF3D9; color: #B08A1F; }
.pill-status--flagged { background: #FBE3EE; color: #D23F7C; }
[data-theme="dark"] .pill-status--live { background: #233a2c; color: #8fd6a8; }
[data-theme="dark"] .pill-status--pending { background: #3a3320; color: #e3c87f; }
[data-theme="dark"] .pill-status--flagged { background: #3a2a36; color: #ec9cc0; }
.admin-act { border: 1px solid var(--border-2); background: var(--panel-bg); color: var(--accent); border-radius: 9px; padding: 5px 12px; font-family: var(--display); font-size: 12px; cursor: pointer; transition: .15s; }
.admin-act:hover { border-color: var(--accent-2); color: var(--head-2); }

/* ===== Auth error + empty states (Cloudberry custom) ===== */
.auth-error { margin: 2px 0 6px; padding: 10px 14px; border-radius: 12px; background: #FDECEF; color: #B3261E; border: 1px solid #F6C9D2; font-size: 0.9rem; line-height: 1.45; text-align: left; }
[data-theme="dark"] .auth-error { background: #3A2230; color: #F6B8C4; border-color: #5A2E3E; }
.cg-empty { grid-column: 1 / -1; width: 100%; box-sizing: border-box; text-align: center; padding: 64px 28px; margin: 8px 0; background: var(--soft-bg); border: 1px dashed var(--border-hover); border-radius: 28px; }
.cg-empty__icon { font-size: 2.6rem; line-height: 1; margin-bottom: 12px; }
.cg-empty__title { font-family: var(--serif, Georgia, serif); font-weight: 600; font-size: 1.4rem; color: var(--head, #5E4A86); margin: 0 0 8px; }
.cg-empty__text { font-size: 0.95rem; color: var(--muted, #8A7B9C); margin: 0 auto; max-width: 46ch; line-height: 1.6; }
.cg-loading { grid-column:1/-1; text-align:center; padding:40px; color:var(--muted,#8A7B9C); }
.cg-empty__cta { grid-column: 1 / -1; text-align: center; margin-top: 16px; }

/* success message (profile saved, etc.) */
.auth-ok { margin: 2px 0 6px; padding: 10px 14px; border-radius: 12px; background: #E7F4EC; color: #1F7A45; border: 1px solid #BFE6CC; font-size: 0.9rem; line-height: 1.45; text-align: left; }
[data-theme="dark"] .auth-ok { background: #1E3528; color: #B7E6C6; border-color: #2E5A3E; }

/* ============================================================
   STUDIO DASHBOARD · INLINE EDITOR · CHAPTER MODAL · FOOTNOTES
   ============================================================ */
.btn--sm { padding: 8px 14px; font-size: 13px; border-radius: 999px; }
.btn-danger { color: #C0436B; background: var(--panel-bg); border: 1px solid #F2C9D8; box-shadow: var(--shadow-sm); border-radius: 999px; padding: 10px 18px; font-family: var(--display); display: inline-flex; align-items: center; gap: 8px; cursor: pointer; transition: .2s; }
.btn-danger:hover { background: #FBE3EC; border-color: #E79BB6; transform: translateY(-1px); }
[data-theme="dark"] .btn-danger { background: #3A2230; color: #F6B8C4; border-color: #5A2E3E; }

/* My Stories dashboard */
.studio-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 26px; }
.story-card { background: var(--panel-bg); border: 1px solid var(--border-2); border-radius: 20px; overflow: hidden; box-shadow: var(--shadow-sm); transition: .2s; }
.story-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-panel); }
.story-card__cover { display: block; aspect-ratio: 3/4; position: relative; }
.story-card__badge { position: absolute; top: 10px; left: 10px; font-family: var(--display); font-size: 11px; padding: 3px 10px; border-radius: 999px; background: rgba(255,255,255,.92); color: var(--head-2); display: inline-flex; align-items: center; gap: 6px; box-shadow: var(--shadow-sm); }
.story-card__badge i { font-size: 8px; }
.story-card__badge.is-live { color: #3F8E63; }
.story-card__badge.is-draft { color: #8A78A8; }
.story-card__body { padding: 14px 14px 16px; }
.story-card__title { margin: 0 0 3px; font-family: var(--serif); font-weight: 700; font-size: 17px; line-height: 1.2; color: var(--head); }
.story-card__title a:hover { color: var(--accent); }
.story-card__meta { margin: 0 0 12px; font-family: var(--body); font-size: 12px; color: var(--muted); }
.story-card__actions { display: flex; gap: 8px; }
.story-card__actions .btn { flex: 1; }

/* inline editor panel */
.edit-panel { background: var(--panel-bg); border: 1px solid var(--border-2); border-radius: 26px; box-shadow: var(--shadow-panel); overflow: hidden; margin-bottom: 30px; }
.edit-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 22px; border-bottom: 1px solid var(--border-2); flex-wrap: wrap; }
.edit-bar__l { display: flex; align-items: center; gap: 10px; min-width: 0; }
.edit-bar__l b { font-family: var(--serif); font-size: 20px; color: var(--head); }
.edit-bar__tag { font-family: var(--display); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); background: var(--pill); padding: 4px 10px; border-radius: 999px; }
.edit-bar__r { display: flex; gap: 8px; flex-wrap: wrap; }
.edit-tabs { display: flex; gap: 4px; padding: 12px 18px 0; border-bottom: 1px solid var(--border-2); }
.edit-tab { font-family: var(--display); font-size: 14px; color: var(--muted); background: transparent; border: 0; padding: 11px 18px; border-radius: 12px 12px 0 0; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.edit-tab i { font-size: 12px; }
.edit-tab:hover { color: var(--head-2); }
.edit-tab.is-active { color: var(--accent); border-bottom-color: var(--accent); }
.edit-tab__n { font-size: 11px; background: var(--pill); color: var(--accent); padding: 1px 8px; border-radius: 999px; }
.edit-body { padding: 24px 22px 26px; }
.edit-grid { display: grid; grid-template-columns: 220px 1fr; gap: 26px; align-items: start; }
.edit-cover { position: relative; aspect-ratio: 3/4; border-radius: 16px; border: 2px dashed var(--border-hover); background: var(--soft-bg); display: grid; place-items: center; cursor: pointer; overflow: hidden; }
.edit-cover__hint { text-align: center; color: var(--muted); font-family: var(--display); font-size: 13px; display: flex; flex-direction: column; gap: 4px; pointer-events: none; }
.edit-cover__hint i { font-size: 24px; color: var(--accent-2); }
.edit-cover__hint small { font-size: 11px; }
.edit-cover input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.edit-fields { display: flex; flex-direction: column; gap: 16px; }
.edit-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: end; }
.edit-toggle { display: flex; align-items: center; gap: 9px; font-family: var(--body); font-size: 14px; color: var(--ink-strong); cursor: pointer; }
.edit-toggle small { color: var(--muted); }
.edit-toggle input { width: 18px; height: 18px; accent-color: var(--accent); }
.edit-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 22px; flex-wrap: wrap; }

/* chapters tab */
.ch-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 12px; flex-wrap: wrap; }
.ch-head__title { margin: 0; font-family: var(--serif); font-weight: 700; font-size: 1.3rem; color: var(--head); }
.ch-list { display: flex; flex-direction: column; gap: 8px; }
.ch-row { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--border-2); border-radius: 14px; background: var(--soft-bg); }
.ch-row__no { font-family: var(--display); font-size: 13px; color: var(--accent); width: 26px; flex: none; }
.ch-row__title { flex: 1; font-family: var(--serif); font-size: 16px; color: var(--head-2); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-row__act { display: flex; gap: 6px; }
.ch-row__btn { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--border-2); background: var(--panel-bg); color: var(--accent); cursor: pointer; transition: .2s; }
.ch-row__btn:hover { border-color: var(--accent-2); color: var(--head-2); }
.ch-row__btn.is-danger:hover { color: #C0436B; border-color: #E79BB6; }

/* modal */
.cg-modal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 20px; }
.cg-modal[hidden] { display: none; }   /* the base display:flex would otherwise override the hidden attribute */
.cg-modal__backdrop { position: absolute; inset: 0; background: rgba(60,44,80,.42); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.cg-modal__card { position: relative; width: 100%; max-width: 480px; max-height: 92vh; display: flex; flex-direction: column; background: var(--page-bg); border: 1px solid var(--border-2); border-radius: 22px; box-shadow: 0 40px 90px -30px rgba(60,40,90,.6); overflow: hidden; animation: cgModalIn .25s cubic-bezier(.22,.61,.36,1); }
.cg-modal__card--lg { max-width: 760px; }
.cg-modal__card--sm { max-width: 420px; }
@keyframes cgModalIn { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }
.cg-modal__head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--border-2); }
.cg-modal__head h2 { margin: 0; font-family: var(--serif); font-weight: 700; font-size: 1.4rem; color: var(--head); }
.cg-modal__x { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border-2); background: var(--panel-bg); color: var(--muted); cursor: pointer; }
.cg-modal__x:hover { color: var(--head-2); border-color: var(--accent-2); }
.cg-modal__body { padding: 20px 22px; overflow-y: auto; }
.cg-modal__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 22px; border-top: 1px solid var(--border-2); }
.cg-modal__meta { font-family: var(--display); font-size: 12px; color: var(--muted); }

/* chapter editor */
.editor-title { width: 100%; border: 0; border-bottom: 2px solid var(--border-2); background: transparent; font-family: var(--serif); font-weight: 700; font-size: 1.5rem; color: var(--head); padding: 4px 2px 10px; outline: none; }
.editor-title:focus { border-color: var(--accent-2); }
.editor-toolbar { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; padding: 10px 0; }
.editor-toolbar button { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--border-2); background: var(--panel-bg); color: var(--ink-strong); cursor: pointer; font-size: 13px; transition: .15s; }
.editor-toolbar button:hover { border-color: var(--accent-2); color: var(--accent); }
.editor-toolbar .sep { width: 1px; height: 22px; background: var(--border-2); margin: 0 4px; }
.editor-toolbar .tb-fn { width: auto; padding: 0 12px; gap: 6px; display: inline-flex; align-items: center; font-family: var(--display); font-size: 12.5px; color: var(--accent); }
.editor-toolbar .tb-fn:hover { background: var(--pill); }
.editor-area { width: 100%; min-height: 280px; resize: vertical; border: 1px solid var(--border-2); border-radius: 14px; background: var(--panel-bg); padding: 16px; font-family: var(--body); font-size: 15px; line-height: 1.7; color: var(--ink-strong); outline: none; }
.editor-area:focus { border-color: var(--accent-2); box-shadow: 0 0 0 3px rgba(155,127,201,.16); }

/* footnote authoring */
.fn-panel { margin-top: 16px; border: 1px solid var(--border-2); border-radius: 14px; background: var(--soft-bg); padding: 14px; }
.fn-panel__head { font-family: var(--display); font-size: 13px; color: var(--head-2); display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.fn-panel__head i { color: var(--accent); }
.fn-panel__head small { color: var(--muted); font-size: 11px; }
.fn-list { display: flex; flex-direction: column; gap: 8px; }
.fn-row { display: flex; align-items: center; gap: 10px; }
.fn-row__n { width: 26px; height: 26px; flex: none; border-radius: 50%; background: var(--grad-btn); color: #fff; font-family: var(--display); font-size: 12px; display: grid; place-items: center; }
.fn-row__in { flex: 1; }
.fn-row__del { width: 30px; height: 30px; flex: none; border-radius: 8px; border: 1px solid var(--border-2); background: var(--panel-bg); color: var(--muted); cursor: pointer; }
.fn-row__del:hover { color: #C0436B; border-color: #E79BB6; }

/* reader footnote reference + tap popover */
.cg-fn { line-height: 0; }
.cg-fn__ref { font: inherit; font-size: .72em; vertical-align: super; line-height: 0; color: var(--accent); background: var(--pill); border: 0; border-radius: 6px; padding: 1px 5px; margin: 0 1px; cursor: pointer; font-weight: 700; transition: .15s; }
.cg-fn__ref:hover { background: var(--accent); color: #fff; }
.cg-fn__pop { position: absolute; z-index: 300; background: var(--head); color: #fff; font-family: var(--body); font-size: 13.5px; line-height: 1.55; padding: 11px 14px; border-radius: 12px; box-shadow: 0 18px 40px -12px rgba(40,28,60,.6); }
.cg-fn__pop[hidden] { display: none; }   /* base position:absolute would otherwise keep the empty bubble visible */
.cg-fn__pop::after { content: ""; position: absolute; left: 50%; transform: translateX(-50%); border: 7px solid transparent; }
.cg-fn__pop[data-side="above"]::after { top: 100%; border-top-color: var(--head); }
.cg-fn__pop[data-side="below"]::after { bottom: 100%; border-bottom-color: var(--head); }
[data-theme="dark"] .cg-fn__pop { background: #2A2240; }
[data-theme="dark"] .cg-fn__pop[data-side="above"]::after { border-top-color: #2A2240; }
[data-theme="dark"] .cg-fn__pop[data-side="below"]::after { border-bottom-color: #2A2240; }

/* tags — display on the novel page */
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 22px; }
.tag-pill { font-family: var(--body); font-size: 12.5px; color: var(--accent); background: var(--soft-bg); border: 1px solid var(--border-2); padding: 5px 12px; border-radius: 999px; transition: .18s; }
.tag-pill:hover { background: var(--pill); border-color: var(--accent-2); color: var(--head-2); transform: translateY(-1px); }

/* tags — editor field */
.tag-edit { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; border: 1px solid var(--border-2); border-radius: 12px; background: var(--panel-bg); padding: 8px 10px; min-height: 46px; }
.tag-edit:focus-within { border-color: var(--accent-2); box-shadow: 0 0 0 3px rgba(155,127,201,.16); }
.tag-chip { display: inline-flex; align-items: center; gap: 7px; font-family: var(--body); font-size: 13px; color: var(--head-2); background: var(--pill); border-radius: 999px; padding: 5px 6px 5px 12px; }
.tag-chip button { width: 20px; height: 20px; border-radius: 50%; border: 0; background: rgba(0,0,0,.07); color: inherit; cursor: pointer; font-size: 10px; display: grid; place-items: center; }
.tag-chip button:hover { background: var(--blush); color: #fff; }
.tag-edit__in { flex: 1; min-width: 150px; border: 0; outline: 0; background: transparent; font-family: var(--body); font-size: 14px; color: var(--ink-strong); padding: 4px; }
.tag-edit__in::placeholder { color: var(--muted); }

@media (max-width: 760px) {
  .edit-grid { grid-template-columns: 1fr; }
  .edit-cover { max-width: 200px; }
  .edit-row2 { grid-template-columns: 1fr; }
}

/* author page */
.author-card { display: flex; align-items: center; gap: 22px; background: var(--panel-bg); border: 1px solid var(--border-2); border-radius: 24px; padding: 26px 28px; box-shadow: var(--shadow-sm); }
.author-card__av { width: 88px; height: 88px; flex: none; border-radius: 50%; display: grid; place-items: center; font-family: var(--serif); font-weight: 700; font-size: 38px; color: #fff; background: linear-gradient(150deg, var(--accent-3), var(--blush-2)); box-shadow: var(--shadow-sm); }
.author-card__eyebrow { margin: 0 0 2px; font-family: var(--display); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-2); }
.author-card__name { margin: 0 0 8px; font-family: var(--serif); font-weight: 700; font-size: clamp(1.8rem, 4vw, 2.4rem); color: var(--head); line-height: 1; }
.author-card__sub { margin: 0; font-family: var(--body); font-size: 14px; color: var(--muted); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
@media (max-width: 560px) { .author-card { flex-direction: column; text-align: center; } .author-card__sub { justify-content: center; } }

/* reader comments */
.comments { margin-top: 32px; }
.comments__head h2 { font-family: var(--serif); font-weight: 700; font-size: 1.4rem; color: var(--head); display: flex; align-items: center; gap: 10px; margin: 0 0 16px; }
.comments__head h2 i { color: var(--accent-2); font-size: 1.05rem; }
.comments__head h2 span { font-size: 12.5px; font-family: var(--display); color: var(--muted); background: var(--pill); padding: 1px 10px; border-radius: 999px; }
.cmt-composer { background: var(--panel-bg); border: 1px solid var(--border-2); border-radius: 16px; padding: 14px; margin-bottom: 20px; }
.cmt-composer textarea { width: 100%; min-height: 80px; resize: vertical; border: 1px solid var(--border-2); border-radius: 12px; background: var(--page-bg); padding: 12px; font-family: var(--body); font-size: 14.5px; color: var(--ink-strong); outline: none; }
.cmt-composer textarea:focus { border-color: var(--accent-2); box-shadow: 0 0 0 3px rgba(155,127,201,.16); }
.cmt-composer__foot { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.cmt-signin { background: var(--soft-bg); border: 1px solid var(--border-2); border-radius: 14px; padding: 14px 16px; margin-bottom: 20px; font-family: var(--body); font-size: 14px; color: var(--muted); }
.cmt-signin a { color: var(--accent); font-weight: 600; }
.cmt-empty { color: var(--muted); font-family: var(--body); font-size: 14px; }
.cmt-list { display: flex; flex-direction: column; gap: 18px; }
.cmt { display: flex; gap: 12px; }
.cmt__av { width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; color: #fff; font-family: var(--display); font-size: 15px; background: linear-gradient(150deg, var(--accent-3), var(--blush-2)); }
.cmt__main { flex: 1; min-width: 0; }
.cmt__head { display: flex; align-items: center; gap: 8px; font-family: var(--display); font-size: 14px; color: var(--head-2); }
.cmt__you { font-size: 10px; background: var(--pill); color: var(--accent); padding: 1px 7px; border-radius: 999px; text-transform: uppercase; letter-spacing: .04em; }
.cmt__time { color: var(--muted); font-size: 12px; font-family: var(--body); margin-left: auto; }
.cmt__body { font-family: var(--body); font-size: 14.5px; line-height: 1.6; color: var(--ink-strong); margin: 3px 0 4px; white-space: pre-wrap; word-break: break-word; }
.cmt__report { border: 0; background: none; color: var(--muted); font-family: var(--body); font-size: 12px; cursor: pointer; padding: 2px 0; display: inline-flex; align-items: center; gap: 5px; }
.cmt__report:hover { color: var(--blush); }
.cmt__report.is-done { color: var(--accent-2); cursor: default; }

/* live Garden Talk extras */
.msg.is-cont { margin-top: -10px; }
.msg:not(.is-me).is-cont { padding-left: 50px; }
.msg__bubble { position: relative; }
.msg__del { border: 0; background: none; cursor: pointer; font-size: 11px; color: var(--muted); opacity: 0; transition: .15s; margin-left: 8px; padding: 0 2px; vertical-align: middle; }
.msg:hover .msg__del { opacity: .6; }
.msg__del:hover { opacity: 1; color: var(--blush); }
.msg.is-me .msg__del { color: rgba(255,255,255,.85); }
.chat__signin { padding: 16px 18px; text-align: center; font-family: var(--body); font-size: 14px; color: var(--muted); border-top: 1px solid var(--border); }
.chat__signin a { color: var(--accent); font-weight: 600; }

/* community tabs */
.community-tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.community-tab { font-family: var(--display); font-size: 14px; color: var(--ink-strong); background: var(--panel-bg); border: 1px solid var(--border-2); padding: 9px 18px; border-radius: 999px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; transition: .18s; }
.community-tab i { color: var(--accent-2); font-size: 13px; }
.community-tab:hover { border-color: var(--accent-2); color: var(--head-2); }
.community-tab.is-active { background: var(--grad-btn); color: #fff; border-color: transparent; }
.community-tab.is-active i { color: #fff; }

/* forum */
.forum-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.forum-list { display: flex; flex-direction: column; gap: 10px; }
.forum-thread { display: flex; align-items: center; justify-content: space-between; gap: 16px; background: var(--panel-bg); border: 1px solid var(--border-2); border-radius: 16px; padding: 16px 18px; box-shadow: var(--shadow-sm); transition: .18s; text-decoration: none; }
.forum-thread:hover { transform: translateY(-2px); box-shadow: var(--shadow-panel); border-color: var(--border-hover); }
.forum-thread__title { margin: 0 0 3px; font-family: var(--serif); font-weight: 700; font-size: 1.15rem; color: var(--head); }
.forum-thread__meta { margin: 0; font-family: var(--body); font-size: 12.5px; color: var(--muted); }
.forum-thread__side { text-align: right; flex: none; display: flex; flex-direction: column; gap: 3px; }
.forum-thread__count { font-family: var(--display); font-size: 13px; color: var(--accent); }
.forum-thread__last { font-family: var(--body); font-size: 11.5px; color: var(--muted); }
.thread-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.thread__title { margin: 0 0 4px; font-family: var(--serif); font-weight: 700; font-size: clamp(1.4rem, 3vw, 1.9rem); color: var(--head); }
.thread__meta { margin: 0 0 18px; font-family: var(--body); font-size: 13px; color: var(--muted); }
@media (max-width: 560px) { .forum-thread { flex-direction: column; align-items: flex-start; } .forum-thread__side { text-align: left; flex-direction: row; gap: 12px; } }

/* glossary tab (story editor) */
.gl-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.gl-add { display: grid; grid-template-columns: 1fr 1fr 150px auto; gap: 8px; margin-bottom: 14px; }
.gl-add .input, .gl-add .studio-select { width: 100%; }
.gl-filter { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.gl-cats { display: flex; gap: 6px; flex-wrap: wrap; }
.gl-cat { font-family: var(--display); font-size: 12px; color: var(--muted); background: var(--panel-bg); border: 1px solid var(--border-2); padding: 5px 12px; border-radius: 999px; cursor: pointer; }
.gl-cat:hover { color: var(--head-2); border-color: var(--accent-2); }
.gl-cat.is-active { background: var(--pill); color: var(--accent); border-color: transparent; }
.gl-list { display: flex; flex-direction: column; gap: 6px; }
.gl-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border-2); border-radius: 12px; background: var(--soft-bg); }
.gl-row__main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.gl-term { font-family: var(--serif); font-weight: 700; font-size: 15px; color: var(--head); }
.gl-arrow { font-size: 10px; color: var(--muted); }
.gl-tr { font-family: var(--body); font-size: 14px; color: var(--ink-strong); }
.gl-row__act { display: flex; gap: 6px; flex: none; }
.gl-edit { display: grid; grid-template-columns: 1fr 1fr 130px auto auto; gap: 8px; width: 100%; align-items: center; }
.gl-chip { font-family: var(--display); font-size: 10px; padding: 2px 9px; border-radius: 999px; text-transform: uppercase; letter-spacing: .03em; background: var(--pill); color: var(--accent); }
.gl-chip--character { background: #E7ECF8; color: #3F6BBF; }
.gl-chip--place { background: #E3F1E6; color: #4F9E72; }
.gl-chip--term { background: #FBF3D9; color: #B08A1F; }
.gl-chip--skill { background: #F3E3FB; color: #9B5FC9; }
.gl-chip--item { background: #FBE7E3; color: #C56B4F; }
.gl-chip--global { background: #FBE3EE; color: #D23F7C; }
/* glossary: sort control, multi-select + bulk bar, collapsible category groups */
.gl-sort { width: auto; min-width: 132px; padding: 9px 36px 9px 14px; }
.gl-row__ck { width: 16px; height: 16px; flex: none; accent-color: var(--accent); cursor: pointer; }
.gl-row__ck-sp { width: 16px; flex: none; }
.gl-row.is-sel { border-color: var(--accent); background: var(--pill); }
.gl-bulk { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; padding: 8px 12px; border-radius: 12px; background: var(--pill); border: 1px solid var(--border-2); }
.gl-bulk > span { font-family: var(--display); font-size: 13px; color: var(--accent); margin-right: auto; }
.gl-group { margin-bottom: 8px; }
.gl-group__head { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; cursor: pointer; font-family: var(--display); font-size: 13px; color: var(--head-2); background: var(--soft-bg); border: 1px solid var(--border-2); border-radius: 12px; padding: 9px 13px; transition: .15s; }
.gl-group__head:hover { border-color: var(--accent-2); }
.gl-group__head > span { margin-left: auto; font-size: 11px; color: var(--muted); background: var(--panel-bg); border-radius: 999px; padding: 1px 9px; }
.gl-group__caret { font-size: 11px; color: var(--accent); transition: transform .18s; }
.gl-group.is-collapsed .gl-group__caret { transform: rotate(-90deg); }
.gl-group.is-collapsed .gl-group__body { display: none; }
.gl-group__body { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
/* scan-chapter candidate list */
.gl-scan-list { display: flex; flex-direction: column; gap: 6px; max-height: 46vh; overflow-y: auto; padding-right: 2px; }
.gl-scan-row { display: grid; grid-template-columns: 18px minmax(0,1fr) auto minmax(0,1.3fr) 130px; align-items: center; gap: 9px; padding: 7px 10px; border: 1px solid var(--border-2); border-radius: 11px; background: var(--soft-bg); }
.gl-scan-term { font-family: var(--serif); font-weight: 700; font-size: 14px; color: var(--head); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gl-scan-n { font-family: var(--display); font-size: 11px; color: var(--muted); }
.gl-scan-tr { padding: 8px 11px; }
.gl-scan-cat { padding: 8px 28px 8px 11px; }
@media (max-width: 600px) {
  .gl-scan-row { grid-template-columns: 18px 1fr auto; row-gap: 6px; }
  .gl-scan-tr, .gl-scan-cat { grid-column: 2 / -1; }
}
@media (max-width: 680px) { .gl-add { grid-template-columns: 1fr 1fr; } .gl-edit { grid-template-columns: 1fr 1fr; } }

/* ── Beris: advance chapters, paywall, wallet ── */
.chapter-row__beri { margin-left: auto; font-family: var(--display); font-size: 11.5px; padding: 3px 10px; border-radius: 999px; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.chapter-row__beri.is-locked { background: #FBF3D9; color: #B08A1F; }
.chapter-row__beri.is-unlocked { background: #E3F1E6; color: #4F9E72; }

.paywall { text-align: center; padding: 40px 20px; background: var(--soft-bg); border: 1px solid var(--border-2); border-radius: 18px; margin: 8px 0 18px; }
.paywall__icon { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; background: var(--pill); color: var(--accent); font-size: 24px; }
.paywall__title { margin: 0 0 6px; font-family: var(--serif); font-weight: 700; font-size: 1.5rem; color: var(--head); }
.paywall__sub { margin: 0 0 6px; font-family: var(--body); font-size: 14.5px; color: var(--muted); }
.paywall__bal { margin: 0 0 16px; font-family: var(--body); font-size: 13px; color: var(--ink-strong); }
.paywall__act { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

.adv-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 14px; padding: 12px 14px; border: 1px solid var(--border-2); border-radius: 12px; background: var(--soft-bg); }
.adv-toggle { display: flex; align-items: center; gap: 9px; font-family: var(--body); font-size: 14px; color: var(--ink-strong); cursor: pointer; }
.adv-toggle small { color: var(--muted); }
.adv-toggle input { width: 18px; height: 18px; accent-color: var(--accent); }
.adv-price { font-family: var(--body); font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.adv-price .input { width: 90px; }

.beri-balance { display: flex; align-items: center; gap: 18px; background: linear-gradient(135deg, var(--accent-3), var(--blush-2)); color: #fff; border-radius: 22px; padding: 26px 28px; box-shadow: var(--shadow-panel); }
.beri-balance__icon { width: 64px; height: 64px; flex: none; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.22); font-size: 26px; }
.beri-balance__n { font-family: var(--serif); font-weight: 700; font-size: 2.6rem; line-height: 1; }
.beri-balance__l { font-family: var(--display); font-size: 13px; opacity: .9; margin-top: 4px; }
.beri-packs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.beri-pack { background: var(--panel-bg); border: 1px solid var(--border-2); border-radius: 16px; padding: 18px; text-align: center; box-shadow: var(--shadow-sm); }
.beri-pack__amt { font-family: var(--serif); font-weight: 700; font-size: 1.5rem; color: var(--head); }
.beri-pack__amt span { font-size: .8rem; color: var(--muted); font-weight: 400; }
.beri-pack__price { font-family: var(--display); font-size: 14px; color: var(--accent); margin: 4px 0 12px; }
.beri-ledger { display: flex; flex-direction: column; }
.beri-led { display: flex; align-items: center; gap: 12px; padding: 11px 4px; border-bottom: 1px solid var(--border-2); font-family: var(--body); font-size: 14px; }
.beri-led:last-child { border-bottom: 0; }
.beri-led__r { flex: 1; color: var(--head-2); }
.beri-led__d { color: var(--muted); font-size: 12px; }
.beri-led__n { font-family: var(--display); font-weight: 700; min-width: 54px; text-align: right; }
.beri-led__n.is-plus { color: #4F9E72; } .beri-led__n.is-minus { color: var(--blush); }
.beri-prov { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; font-family: var(--body); font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.beri-prov__b { font-family: var(--display); font-size: 13px; color: var(--ink-strong); background: var(--panel-bg); border: 1px solid var(--border-2); padding: 7px 14px; border-radius: 999px; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; }
.beri-prov__b.is-active { background: var(--grad-btn); color: #fff; border-color: transparent; }

/* ---------------- Beri wallet (centered) ---------------- */
.wallet { max-width: 1040px; margin: 0 auto; }
.berry { width: 1em; height: 1em; display: inline-block; vertical-align: -0.15em; flex: none; }

.wallet-bal { background: var(--panel-bg); border: 1px solid var(--border, #ecdff1); border-radius: 20px; padding: 30px 34px; box-shadow: 0 18px 40px -28px rgba(126,99,180,.4); text-align: center; }
.wallet-bal__top { font-family: var(--body); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.wallet-bal__row { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 8px 0 4px; }
.wallet-bal__row .berry { width: 44px; height: 44px; }
.wallet-bal__n { font-family: var(--display); font-size: clamp(2.6rem, 8vw, 4rem); line-height: 1; color: var(--head); }
.wallet-bal__sub { font-family: var(--body); font-size: 13.5px; color: var(--muted); }

.wallet-pay { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; margin: 26px 0 6px; }
.wallet-pay__l { font-family: var(--body); font-size: 13.5px; color: var(--muted); }
.wallet-pay__b { font-family: var(--display); font-size: 14px; color: #fff; background: var(--grad-btn); border: none; padding: 10px 20px; border-radius: 999px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; box-shadow: 0 10px 22px -12px rgba(126,99,180,.7); transition: transform .15s, box-shadow .15s; }
.wallet-pay__b:hover { transform: translateY(-1px); box-shadow: 0 14px 26px -12px rgba(126,99,180,.8); }
.wallet-pay__b[disabled] { opacity: .5; cursor: default; box-shadow: none; }
.wallet-pay__cap { text-align: center; font-family: var(--body); font-size: 13px; color: var(--muted); margin-bottom: 6px; min-height: 18px; }
.wallet-pay__cap b { color: var(--head); }
.wallet-note { text-align: center; font-family: var(--body); font-size: 13px; color: var(--muted); margin: 22px 0; }

.wallet-h { font-family: var(--serif); font-size: 1.5rem; color: var(--head); margin: 30px 0 16px; }
.wallet-packs { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.wpack { position: relative; text-align: left; background: var(--panel-bg); border: 1.5px solid var(--border, #ecdff1); border-radius: 16px; padding: 18px 18px 16px; cursor: pointer; display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; transition: border-color .15s, box-shadow .15s, transform .15s; min-height: 116px; }
.wpack:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -22px rgba(126,99,180,.55); }
.wpack.is-active { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(126,99,180,.16); }
.wpack__icon { grid-row: 1 / 3; }
.wpack__icon .berry { width: 34px; height: 34px; }
.wpack__amt { font-family: var(--display); font-size: 1.6rem; color: var(--head); line-height: 1.1; }
.wpack__sub { grid-column: 2; font-family: var(--body); font-size: 12.5px; color: var(--muted); }
.wpack__price { grid-column: 1 / 3; justify-self: end; align-self: end; margin-top: 8px; font-family: var(--body); font-weight: 700; font-size: 13.5px; color: var(--muted); }
.wpack__badge { position: absolute; top: -10px; left: 14px; background: #4F9E72; color: #fff; font-family: var(--body); font-weight: 700; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; padding: 4px 9px; border-radius: 7px; box-shadow: 0 6px 14px -8px rgba(79,158,114,.9); }

.wallet-recent { background: var(--panel-bg); border: 1px solid var(--border, #ecdff1); border-radius: 18px; padding: 22px 24px; margin-top: 32px; }
.wallet-recent__h { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.wallet-recent__h h2 { font-family: var(--serif); font-size: 1.3rem; color: var(--head); margin: 0; }
.wallet-recent__h .muted { font-size: 13px; }
.wallet-recent__empty { font-family: var(--body); font-size: 13.5px; color: var(--muted); margin: 6px 0; }
.wrec { width: 100%; border-collapse: collapse; font-family: var(--body); }
.wrec th { text-align: left; font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 8px 10px; border-bottom: 1px solid var(--border, #ecdff1); }
.wrec td { padding: 12px 10px; border-bottom: 1px solid var(--border, #f1e7f4); font-size: 14px; color: var(--ink-strong, #5b4a6e); }
.wrec tr:last-child td { border-bottom: none; }
.wrec__t i { color: var(--accent); margin-right: 6px; }
.wrec__d { color: var(--muted); white-space: nowrap; }
.wrec__p { text-align: right; white-space: nowrap; }
.wrec__pill { display: inline-block; background: var(--blush, #fbeef3); color: var(--accent); font-weight: 700; font-size: 12.5px; padding: 5px 12px; border-radius: 999px; }

.wallet-faq { margin-top: 34px; }
.wallet-faq__h { font-family: var(--serif); font-size: 1.5rem; color: var(--head); text-align: center; margin: 0 0 16px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.wallet-faq__h .berry { width: 26px; height: 26px; }
.wfaq { border-bottom: 1px solid var(--border, #ecdff1); }
.wfaq summary { list-style: none; cursor: pointer; padding: 16px 4px; font-family: var(--display); font-size: 1.02rem; color: var(--head); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wfaq summary::-webkit-details-marker { display: none; }
.wfaq summary i { color: var(--accent); transition: transform .2s; font-size: 13px; }
.wfaq[open] summary i { transform: rotate(180deg); }
.wfaq__a { font-family: var(--body); font-size: 14px; color: var(--muted); line-height: 1.6; padding: 0 4px 18px; }

@media (max-width: 560px) { .wallet-packs { grid-template-columns: 1fr; } .wallet-bal { padding: 24px 18px; } }

/* Beris nav item (blueberry icon + live balance) */
.cg-nav__link .berry, .cg-mobile__link .berry { width: 1.1em; height: 1.1em; }
.cg-nav__beris { font-weight: 800; color: var(--accent); font-size: .82em; margin-left: 1px; }

/* ---------------- Support / tickets ---------------- */
.sup-intro { margin-bottom: 16px; }
.sup-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.sup-h { font-family: var(--serif); font-size: 1.2rem; color: var(--head); margin: 0 0 12px; }
.sup-lbl { display: block; font-family: var(--body); font-size: 12.5px; font-weight: 700; color: var(--ink-strong); margin: 12px 0 5px; }
.sup-form .sup-lbl:first-of-type { margin-top: 0; }
.sup-form select.input, .sup-form input.input, .sup-form textarea.input { width: 100%; }
.sup-form .btn { margin-top: 16px; }
.sup-list { display: flex; flex-direction: column; gap: 8px; }
.sup-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; text-align: left; background: var(--soft-bg); border: 1px solid var(--border-2); border-radius: 12px; padding: 12px 14px; cursor: pointer; transition: border-color .15s; }
.sup-row:hover { border-color: var(--accent); }
.sup-row__main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sup-row__subj { font-family: var(--display); font-size: 1rem; color: var(--head); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sup-row__meta { font-family: var(--body); font-size: 12px; color: var(--muted); }
.sup-pill { font-family: var(--body); font-weight: 700; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.sup-pill--open { background: #FDEBD2; color: #B5701A; }
.sup-pill--in_progress { background: #E3E9FB; color: #3A56B0; }
.sup-pill--resolved { background: #DBF1E4; color: #2F8155; }
[data-theme="dark"] .sup-pill--open { background: #3a2f20; color: #e8b675; }
[data-theme="dark"] .sup-pill--in_progress { background: #232a40; color: #9fb0e6; }
[data-theme="dark"] .sup-pill--resolved { background: #233a2c; color: #8fd6a8; }
.sup-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.sup-tab { font-family: var(--display); font-size: 13px; color: var(--ink-strong); background: var(--panel-bg); border: 1px solid var(--border-2); padding: 7px 14px; border-radius: 999px; cursor: pointer; }
.sup-tab.is-active { background: var(--grad-btn); color: #fff; border-color: transparent; }
.sup-back { background: none; border: none; color: var(--accent); font-family: var(--body); font-weight: 700; font-size: 13px; cursor: pointer; padding: 0; margin-bottom: 14px; display: inline-flex; align-items: center; gap: 6px; }
.sup-thread__h { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sup-thread__meta { font-family: var(--body); font-size: 12.5px; color: var(--muted); margin: 4px 0 14px; }
.sup-meta { background: var(--soft-bg); border: 1px dashed var(--border-2); border-radius: 12px; padding: 12px 14px; font-family: var(--body); font-size: 13px; color: var(--ink-strong); margin-bottom: 16px; }
.sup-meta ul { margin: 6px 0 0; padding-left: 18px; color: var(--muted); font-size: 12.5px; }
.sup-msgs { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.sup-msg { background: var(--soft-bg); border: 1px solid var(--border-2); border-radius: 12px; padding: 12px 14px; max-width: 88%; }
.sup-msg--staff { background: rgba(126, 99, 180, .1); border-color: rgba(126, 99, 180, .22); align-self: flex-end; }
.sup-msg__who { font-family: var(--display); font-size: 13px; color: var(--head); margin-bottom: 4px; display: flex; align-items: center; gap: 8px; }
.sup-staff { background: var(--accent); color: #fff; font-family: var(--body); font-weight: 700; font-size: 10px; text-transform: uppercase; letter-spacing: .05em; padding: 2px 7px; border-radius: 6px; }
.sup-msg__b { font-family: var(--body); font-size: 14px; color: var(--ink, #4a4458); line-height: 1.6; white-space: pre-wrap; word-wrap: break-word; }
.sup-msg__t { font-family: var(--body); font-size: 11px; color: var(--muted); margin-top: 6px; }
.sup-reply { display: flex; flex-direction: column; gap: 8px; }
.sup-reply .btn { align-self: flex-end; }
@media (max-width: 720px) { .sup-grid { grid-template-columns: 1fr; } }
.cg-report-link { color: var(--muted); font-family: var(--body); font-size: 13px; text-decoration: none; display: inline-flex; align-items: center; gap: 5px; }
.cg-report-link:hover { color: var(--accent); }
.actions-row .cg-report-link { align-self: center; margin-left: 4px; }
.reader-meta .cg-report-link { margin-left: 8px; }
.sup-help { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 24px; }
@media (max-width: 640px) { .sup-help { grid-template-columns: 1fr; } }

.ch-head__act { display: flex; gap: 8px; flex-wrap: wrap; }
/* bulk import (EPUB / DOCX / TXT) */
.imp-drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; padding: 38px 20px; border: 2px dashed var(--border-2); border-radius: 18px; background: var(--soft-bg); cursor: pointer; transition: .2s; }
.imp-drop:hover, .imp-drop:focus-visible, .imp-drop.is-over { border-color: var(--accent-2); background: var(--panel-bg); outline: none; }
.imp-drop__icon { font-size: 30px; color: var(--accent); }
.imp-drop__title { margin: 6px 0 0; font-family: var(--serif); font-size: 16px; color: var(--head-2); }
.imp-drop__hint { margin: 0; font-size: 12.5px; color: var(--muted); }
.imp-busy { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 40px 20px; text-align: center; color: var(--muted); font-size: 14px; }
.imp-spinner { width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--border-2); border-top-color: var(--accent); animation: impSpin .8s linear infinite; }
@keyframes impSpin { to { transform: rotate(360deg); } }
.imp-summary { display: flex; gap: 8px; font-size: 13px; color: var(--head-2); background: var(--soft-bg); border: 1px solid var(--border-2); border-radius: 12px; padding: 11px 13px; margin-bottom: 12px; line-height: 1.45; }
.imp-summary i { color: var(--accent); margin-top: 2px; }
.imp-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.imp-all { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--head-2); cursor: pointer; }
.imp-list { display: flex; flex-direction: column; gap: 6px; max-height: 46vh; overflow-y: auto; padding-right: 2px; }
.imp-row { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border: 1px solid var(--border-2); border-radius: 11px; background: var(--soft-bg); cursor: pointer; }
.imp-row:hover { border-color: var(--accent-2); }
.imp-row__ck { flex: none; }
.imp-row__no { font-family: var(--display); font-size: 12px; color: var(--accent); width: 24px; flex: none; }
.imp-row__title { flex: 1; font-family: var(--serif); font-size: 15px; color: var(--head-2); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.imp-row__wc { font-family: var(--display); font-size: 11px; color: var(--muted); flex: none; }
