:root {
  --bg: #f8fafc; --bg-elev: #fff; --text: #1e293b; --text-muted: #64748b;
  --primary: #3b82f6; --primary-hover: #2563eb; --primary-light: #dbeafe;
  --accent: #f59e0b; --danger: #ef4444; --success: #22c55e; --warn: #f97316;
  --border: #e2e8f0; --shadow: 0 4px 14px rgba(15,23,42,.06);
  --radius: 12px; --radius-sm: 8px; --trans: .2s ease;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; }
body { font-family: system-ui, -apple-system, 'Segoe UI', 'Microsoft YaHei', sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; min-height: 100vh; }
h1,h2,h3,h4,h5,h6 { font-family: Georgia, 'Songti SC', 'SimSun', serif; font-weight: 600; line-height: 1.3; color: var(--text); }
a { color: var(--primary); text-decoration: none; transition: color var(--trans); }
a:hover { color: var(--primary-hover); }
img { max-width: 100%; height: auto; display: block; border-radius: var(--radius-sm); }
button { font-family: inherit; cursor: pointer; border: none; background: none; font-size: 1rem; }
input, textarea, select { font-family: inherit; font-size: 1rem; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .6rem .9rem; background: #fff; color: var(--text); transition: border-color var(--trans), box-shadow var(--trans); width: 100%; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.card { background: var(--bg-elev); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--border); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .6rem 1.2rem; border-radius: var(--radius-sm); font-weight: 500; transition: all var(--trans); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: var(--bg); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--border); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-ghost { background: transparent; color: var(--text); }
.btn-ghost:hover { background: var(--bg); }
.btn-sm { padding: .35rem .8rem; font-size: .875rem; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1024px) { .grid-4 { grid-template-columns: repeat(3, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) { .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; } }

/* Layout */
.app-layout { display: flex; flex-direction: column; min-height: 100vh; }
.header { background: var(--bg-elev); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; }
.header-inner { max-width: 1200px; margin: 0 auto; padding: .8rem 1rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.logo { font-family: Georgia, 'Songti SC', 'SimSun', serif; font-size: 1.5rem; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: .5rem; }
.logo:hover { color: var(--primary); }
.nav { display: flex; align-items: center; gap: .5rem; }
.nav-link { padding: .4rem .8rem; border-radius: var(--radius-sm); color: var(--text-muted); font-weight: 500; font-size: .9rem; }
.nav-link:hover, .nav-link.active { color: var(--primary); background: var(--primary-light); }
.user-menu { position: relative; }
.user-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border); }
.dropdown { position: absolute; right: 0; top: 100%; margin-top: .5rem; background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 180px; opacity: 0; visibility: hidden; transform: translateY(-8px); transition: all var(--trans); z-index: 50; }
.dropdown.open { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown a, .dropdown button { display: block; width: 100%; padding: .6rem 1rem; text-align: left; color: var(--text); border: none; background: transparent; }
.dropdown a:hover, .dropdown button:hover { background: var(--primary-light); color: var(--primary); }
.dropdown hr { border: none; border-top: 1px solid var(--border); margin: .4rem 0; }

.main { flex: 1; padding: 2rem 0; }
.footer { background: var(--bg-elev); border-top: 1px solid var(--border); padding: 2rem; text-align: center; color: var(--text-muted); font-size: .875rem; }

/* Hero / Carousel */
.hero { margin-bottom: 2rem; }
.carousel { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 21/9; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.carousel-inner { display: flex; height: 100%; transition: transform .5s ease; }
.carousel-slide { flex: 0 0 100%; position: relative; }
.carousel-slide img { width: 100%; height: 100%; object-fit: cover; filter: brightness(.7); }
.carousel-caption { position: absolute; bottom: 2rem; left: 2rem; right: 2rem; color: #fff; z-index: 1; }
.carousel-caption h2 { font-size: clamp(1.5rem, 4vw, 2.5rem); margin-bottom: .5rem; }
.carousel-caption p { font-size: 1.1rem; opacity: .9; margin-bottom: 1rem; max-width: 600px; }
.carousel-dots { position: absolute; bottom: 1rem; left: 50%; transform: translateX(-50%); display: flex; gap: .5rem; z-index: 2; }
.carousel-dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.5); border: none; padding: 0; transition: all var(--trans); }
.carousel-dot.active { background: #fff; transform: scale(1.2); }

/* Section */
.section { margin-bottom: 3rem; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; flex-wrap: wrap; gap: 1rem; }
.section-title { font-size: 1.5rem; }
.section-more { font-size: .9rem; color: var(--text-muted); }
.section-more:hover { color: var(--primary); }

/* Novel Card */
.novel-card { display: flex; flex-direction: column; height: 100%; transition: transform var(--trans), box-shadow var(--trans); }
.novel-card:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(15,23,42,.1); }
.novel-cover { aspect-ratio: 2/3; width: 100%; object-fit: cover; border-radius: var(--radius) var(--radius) 0 0; background: linear-gradient(135deg, var(--border), #e0e7ff); }
.novel-body { padding: 1rem; flex: 1; display: flex; flex-direction: column; }
.novel-title { font-size: 1rem; font-weight: 600; margin-bottom: .4rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.novel-meta { display: flex; flex-wrap: wrap; gap: .5rem; font-size: .75rem; color: var(--text-muted); margin-bottom: .5rem; }
.novel-meta span { display: flex; align-items: center; gap: .25rem; }
.novel-desc { font-size: .85rem; color: var(--text-muted); flex: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: .75rem; }
.novel-footer { display: flex; align-items: center; justify-content: space-between; padding-top: .75rem; border-top: 1px solid var(--border); font-size: .75rem; color: var(--text-muted); }
.novel-stat { display: flex; align-items: center; gap: .25rem; }
.novel-stat svg { width: 14px; height: 14px; }

/* Rank badge */
.rank-badge { position: absolute; top: .75rem; left: .75rem; width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .8rem; color: #fff; background: linear-gradient(135deg, var(--accent), #f97316); z-index: 1; }
.rank-badge.gold { background: linear-gradient(135deg, #fbbf24, #f59e0b); }
.rank-badge.silver { background: linear-gradient(135deg, #94a3b8, #64748b); }
.rank-badge.bronze { background: linear-gradient(135deg, #d97706, #b45309); }

/* Novel Detail */
.detail-header { display: grid; grid-template-columns: 200px 1fr; gap: 2rem; margin-bottom: 2rem; }
@media (max-width: 768px) { .detail-header { grid-template-columns: 1fr; max-width: 320px; margin: 0 auto 2rem; text-align: center; } }
.detail-cover { aspect-ratio: 2/3; border-radius: var(--radius); object-fit: cover; box-shadow: var(--shadow); }
.detail-info h1 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: .5rem; }
.detail-author { display: flex; align-items: center; gap: .5rem; color: var(--text-muted); margin-bottom: .75rem; }
.detail-author img { width: 36px; height: 36px; border-radius: 50%; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 1rem; font-size: .9rem; color: var(--text-muted); }
.detail-meta span { display: flex; align-items: center; gap: .35rem; }
.detail-tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.tag { padding: .2rem .7rem; background: var(--primary-light); color: var(--primary); border-radius: 999px; font-size: .75rem; }
.detail-desc { color: var(--text-muted); line-height: 1.8; margin-bottom: 1.5rem; }
.detail-actions { display: flex; gap: .75rem; flex-wrap: wrap; }

/* Chapter list */
.chapter-list { border-top: 1px solid var(--border); }
.chapter-volume { padding: 1rem; }
.chapter-volume-title { font-size: 1rem; font-weight: 600; color: var(--text-muted); margin-bottom: .75rem; padding-bottom: .5rem; border-bottom: 1px solid var(--border); }
.chapter-item { display: flex; align-items: center; justify-content: space-between; padding: .75rem 0; border-bottom: 1px solid var(--border); transition: background var(--trans); }
.chapter-item:last-child { border-bottom: none; }
.chapter-item:hover { background: var(--bg); }
.chapter-info { display: flex; flex-direction: column; gap: .2rem; flex: 1; }
.chapter-title { font-weight: 500; }
.chapter-meta { display: flex; gap: 1rem; font-size: .75rem; color: var(--text-muted); }
.chapter-status { padding: .15rem .5rem; border-radius: 999px; font-size: .7rem; font-weight: 600; text-transform: uppercase; }
.chapter-status.published { background: #dcfce7; color: #166534; }
.chapter-status.draft { background: #fef3c7; color: #92400e; }
.chapter-status.pending { background: #dbeafe; color: #1e40af; }
.chapter-status.rejected { background: #fee2e2; color: #991b1b; }
.chapter-status.free::before { content: '免费'; }
.chapter-status.paid::before { content: '付费'; }

/* Reader */
.reader { max-width: 800px; margin: 0 auto; }
.reader-header { display: flex; align-items: center; justify-content: space-between; padding: 1rem 0; border-bottom: 1px solid var(--border); margin-bottom: 2rem; flex-wrap: wrap; gap: 1rem; }
.reader-title { font-size: 1.5rem; }
.reader-nav { display: flex; gap: .5rem; }
.reader-content { font-size: 1.1rem; line-height: 2; color: #334155; font-family: Georgia, 'Songti SC', 'SimSun', serif; white-space: pre-wrap; word-break: break-word; }
.reader-content p { margin-bottom: 1.5em; text-indent: 2em; }
.reader-footer { display: flex; justify-content: space-between; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.reader-setting { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 100; }
.reader-setting-btn { width: 56px; height: 56px; border-radius: 50%; background: var(--primary); color: #fff; box-shadow: var(--shadow); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; }
.reader-setting-panel { position: absolute; bottom: 70px; right: 0; background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1rem; min-width: 240px; display: none; }
.reader-setting-panel.open { display: block; }
.setting-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: .75rem; }
.setting-row label { font-size: .9rem; }

/* Forms */
.form-group { margin-bottom: 1rem; }
.form-label { display: block; margin-bottom: .4rem; font-weight: 500; font-size: .9rem; }
.form-input { width: 100%; }
.form-textarea { min-height: 120px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }
.auth-form { max-width: 420px; margin: 2rem auto; padding: 2rem; }
.auth-form h2 { text-align: center; margin-bottom: 1.5rem; }
.auth-form .form-group { margin-bottom: 1rem; }
.auth-form .btn { width: 100%; margin-top: .5rem; }
.auth-switch { text-align: center; margin-top: 1.5rem; color: var(--text-muted); font-size: .9rem; }

/* Dashboard */
.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; margin-bottom: 2rem; }
.stat-card { padding: 1.5rem; }
.stat-card h3 { font-size: .85rem; color: var(--text-muted); margin-bottom: .5rem; text-transform: uppercase; letter-spacing: .05em; }
.stat-card .value { font-size: 2rem; font-weight: 700; font-family: Georgia, 'Songti SC', 'SimSun', serif; }
.stat-card .trend { font-size: .8rem; margin-top: .25rem; }
.stat-card .trend.up { color: var(--success); }
.stat-card .trend.down { color: var(--danger); }
.chart-placeholder { height: 200px; background: var(--bg); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; color: var(--text-muted); border: 1px solid var(--border); }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { padding: .75rem 1rem; text-align: left; border-bottom: 1px solid var(--border); }
th { font-weight: 600; color: var(--text-muted); background: var(--bg); position: sticky; top: 0; }
tr:hover td { background: var(--bg); }
.action-btn { padding: .3rem .7rem; margin-right: .3rem; }

/* Notifications */
.notification-item { display: flex; align-items: flex-start; gap: .75rem; padding: 1rem; border-bottom: 1px solid var(--border); transition: background var(--trans); }
.notification-item.unread { background: var(--primary-light); }
.notification-item:last-child { border-bottom: none; }
.notification-icon { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 1rem; }
.notification-icon.follow { background: #dbeafe; color: var(--primary); }
.notification-icon.comment { background: #fef3c7; color: var(--accent); }
.notification-icon.review { background: #fce7f3; color: #ec4899; }
.notification-icon.system { background: #f1f5f9; color: var(--text-muted); }
.notification-content { flex: 1; min-width: 0; }
.notification-title { font-weight: 500; margin-bottom: .2rem; }
.notification-time { font-size: .75rem; color: var(--text-muted); }
.notification-link { color: var(--primary); font-size: .85rem; margin-top: .4rem; display: inline-block; }

/* Pagination */
.pagination { display: flex; align-items: center; justify-content: center; gap: .5rem; margin-top: 2rem; }
.page-btn { min-width: 36px; height: 36px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--bg-elev); color: var(--text); font-weight: 500; }
.page-btn:hover:not(:disabled) { background: var(--primary); border-color: var(--primary); color: #fff; }
.page-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.page-btn:disabled { opacity: .4; cursor: not-allowed; }
.page-ellipsis { color: var(--text-muted); padding: 0 .5rem; }

/* Empty state */
.empty-state { text-align: center; padding: 4rem 2rem; color: var(--text-muted); }
.empty-state svg { width: 80px; height: 80px; margin-bottom: 1rem; opacity: .5; }
.empty-state h3 { font-size: 1.2rem; margin-bottom: .5rem; color: var(--text); }
.empty-state .btn { margin-top: 1rem; }

/* Loading / Toast */
.loading-overlay { position: fixed; inset: 0; background: rgba(255,255,255,.8); display: flex; align-items: center; justify-content: center; z-index: 1000; }
.spinner { width: 40px; height: 40px; border: 3px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast { position: fixed; bottom: 1.5rem; right: 1.5rem; background: var(--text); color: #fff; padding: .8rem 1.2rem; border-radius: var(--radius); box-shadow: var(--shadow); z-index: 1100; animation: slideIn .3s ease; max-width: 360px; }
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
.toast.warning { background: var(--warn); }
@keyframes slideIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* Transitions */
.fade-enter-active, .fade-leave-active { transition: opacity .2s ease; }
.fade-enter-from, .fade-leave-to { opacity: 0; }

/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ==================== Payments / subscriptions / account ==================== */
.tag.free { background: #dcfce7; color: #15803d; }
.tag.paid { background: #fef3c7; color: #b45309; }
.bell { position: relative; }
.badge { position: absolute; top: -4px; right: -6px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--danger); color: #fff; font-size: .65rem; line-height: 16px; text-align: center; }
.account-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.reader-toolbar { display: flex; align-items: center; gap: .75rem; margin: 1rem 0 .25rem; }

.paywall-banner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.4rem; margin-bottom: 1.5rem; background: linear-gradient(90deg, #fffbeb, #fff); border-left: 4px solid var(--accent); }
.paywall-banner p { color: var(--text-muted); font-size: .9rem; }
.paywall-card { max-width: 860px; margin: 1rem auto; padding: 2.5rem; text-align: center; }
.paywall-lock { font-size: 2.8rem; margin: 1rem 0 .5rem; }
.paywall-card h1 { font-size: 1.8rem; }
.paywall-sub { color: var(--text-muted); margin: .4rem 0 1.5rem; font-size: .9rem; }
.paywall-preview { position: relative; max-width: 640px; margin: 0 auto; padding: 1.5rem; text-align: left; line-height: 2; color: var(--text-muted); background: var(--bg); border-radius: var(--radius-sm); max-height: 190px; overflow: hidden; }
.paywall-fade { height: 60px; margin-top: -60px; position: relative; background: linear-gradient(transparent, var(--bg-elev)); pointer-events: none; }
.paywall-providers { display: flex; align-items: center; justify-content: center; gap: .6rem; flex-wrap: wrap; margin: 1.5rem 0; font-size: .9rem; }
.provider-chip { display: inline-flex; flex-direction: column; gap: .15rem; padding: .6rem 1rem; border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; background: var(--bg-elev); min-width: 150px; transition: all var(--trans); }
.provider-chip small { color: var(--text-muted); font-size: .72rem; line-height: 1.3; }
.provider-chip.active { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-light); }
.provider-chip.disabled { opacity: .55; cursor: not-allowed; }
.paywall-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; margin-top: 1rem; }
.paywall-option { position: relative; padding: 1.5rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); }
.paywall-option.featured { border-color: var(--primary); background: #f5f9ff; }
.paywall-option h3 { margin-bottom: .6rem; }
.paywall-option p { color: var(--text-muted); font-size: .85rem; margin-bottom: 1rem; }
.paywall-price { font-size: 1.7rem; font-weight: 700; color: var(--primary); margin-bottom: .5rem; }
.paywall-price small { font-size: .8rem; font-weight: 400; color: var(--text-muted); }
.featured-badge { position: absolute; top: -10px; right: 14px; background: var(--primary); color: #fff; font-size: .7rem; padding: .15rem .6rem; border-radius: 10px; }
.paywall-note { margin-top: 1.5rem; font-size: .85rem; color: var(--text-muted); }
.config-hint { margin-top: 1rem; padding: .8rem 1rem; background: #fffbeb; border: 1px solid #fde68a; border-radius: var(--radius-sm); font-size: .85rem; color: #92400e; line-height: 1.7; }
.config-hint code { background: #fef3c7; padding: 0 .3rem; border-radius: 3px; }

.pricing-hero { text-align: center; padding: 2.5rem 1rem 1.5rem; }
.pricing-hero h1 { font-size: 2.2rem; }
.pricing-hero p { color: var(--text-muted); margin: .6rem 0 1rem; }
.provider-bar { padding: 1.5rem; margin-bottom: 2rem; }
.provider-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .8rem; margin-top: 1rem; }
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.25rem; }
.plan-card { padding: 1.8rem; display: flex; flex-direction: column; gap: .6rem; }
.plan-card.featured { border: 2px solid var(--primary); }
.plan-card h3 { font-size: 1.2rem; }
.plan-card p { color: var(--text-muted); font-size: .88rem; }
.plan-price { font-size: 2rem; font-weight: 700; color: var(--primary); }
.plan-price small { font-size: .8rem; font-weight: 400; color: var(--text-muted); }
.plan-card ul { list-style: none; flex: 1; font-size: .88rem; color: var(--text-muted); }
.plan-card li { padding: .2rem 0; }

.payment-result { max-width: 640px; margin: 3rem auto; }
.result-card { padding: 2.5rem; text-align: center; }
.result-icon { font-size: 3rem; margin-bottom: 1rem; }
.result-icon.success { color: var(--success); }
.result-icon.warn { color: var(--warn); }
.result-detail { margin: 1.5rem 0; text-align: left; background: var(--bg); border-radius: var(--radius-sm); padding: 1rem 1.2rem; }
.result-detail > div { display: flex; justify-content: space-between; gap: 1rem; padding: .35rem 0; font-size: .9rem; }
.result-detail span { color: var(--text-muted); }
.result-detail code { font-size: .78rem; word-break: break-all; }
.result-actions { display: flex; justify-content: center; gap: .6rem; flex-wrap: wrap; margin-top: 1.5rem; }

.notif-list { padding: .5rem 1rem; }
.notif-item { display: flex; align-items: flex-start; gap: 1rem; padding: 1rem .5rem; border-bottom: 1px solid var(--border); }
.notif-item:last-child { border-bottom: none; }
.notif-item.unread { background: #f5f9ff; }
.notification-content { flex: 1; }
.notification-content p { color: var(--text-muted); font-size: .9rem; }
.notification-content small { color: var(--text-muted); font-size: .75rem; }
.notif-actions { display: flex; gap: .25rem; }
.billing-columns { display: grid; grid-template-columns: 1.6fr 1fr; gap: 1.25rem; }
.unlock-list { list-style: none; margin-top: .75rem; }
.unlock-list li { padding: .4rem 0; border-bottom: 1px solid var(--border); font-size: .9rem; }
.report-row { padding: .5rem 0; border-bottom: 1px solid var(--border); font-size: .9rem; }

.modal-backdrop { position: fixed; inset: 0; background: rgba(15,23,42,.45); display: flex; align-items: center; justify-content: center; z-index: 1050; padding: 1rem; }
.modal-card { width: min(480px, 100%); padding: 1.6rem; background: var(--bg-elev); }
@media (max-width: 768px) {
  .paywall-options, .billing-columns { grid-template-columns: 1fr; }
  .paywall-card { padding: 1.5rem; }
}

/* ---------------------------------------------------------- platform pages */
.locale-toggle { border: 1px solid var(--border); margin-right: .5rem; font-weight: 600; }
.footer-links { margin-top: .35rem; font-size: .82rem; }
.footer-links a { color: var(--text-muted); text-decoration: none; }
.footer-links a:hover { color: var(--accent); }
.announcement-strip { display: flex; align-items: center; gap: .85rem; padding: .8rem 1.1rem; flex-wrap: wrap; }
.announcement-item { color: var(--text-muted); font-size: .9rem; }
.update-card { padding: 1rem; cursor: pointer; display: flex; flex-direction: column; gap: .4rem; }
.update-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.update-title { font-size: .98rem; }
.update-chapter, .platform-sub { color: var(--text-muted); font-size: .86rem; margin: 0; }
.platform-page { max-width: 1080px; }
.platform-panel { padding: 1.4rem; margin-bottom: 1.25rem; }
.platform-panel h1 { font-size: 1.45rem; margin-bottom: .6rem; }
.platform-panel h2 { font-size: 1.1rem; margin-bottom: .8rem; }
.platform-actions { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin: .8rem 0; }
.platform-hint { color: var(--text-muted); font-size: .82rem; margin-top: .8rem; }
.platform-hint a { color: var(--accent); }
.platform-note { margin-top: 1rem; padding: .9rem; background: var(--bg); border-radius: var(--radius-sm); }
.platform-note code { word-break: break-all; font-size: .78rem; }
.platform-list { display: flex; flex-direction: column; gap: .5rem; }
.platform-row { display: flex; align-items: center; gap: .75rem; padding: .75rem .9rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-elev); flex-wrap: wrap; font-size: .9rem; }
.platform-row code { font-size: .76rem; color: var(--text-muted); }
.platform-row[role="button"] { cursor: pointer; }
.platform-row[role="button"]:hover { border-color: var(--accent); }
.platform-thumb { width: 56px; height: 76px; object-fit: cover; border-radius: 6px; }
.platform-title { font-weight: 600; color: var(--text); text-decoration: none; }
.platform-title:hover { color: var(--accent); }
.platform-check { display: inline-flex; align-items: center; gap: .3rem; font-size: .85rem; white-space: nowrap; }
.platform-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .75rem; margin: .8rem 0; }
.platform-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .75rem; margin: 1rem 0; }
.platform-stats > div { padding: .9rem 1rem; border: 1px solid var(--border); border-radius: var(--radius-sm); display: flex; flex-direction: column; gap: .25rem; }
.platform-stats small { color: var(--text-muted); }
.platform-stats strong { font-size: 1.35rem; }
.platform-tabs { display: flex; gap: .35rem; flex-wrap: wrap; margin-bottom: 1rem; }
.platform-tabs button { padding: .4rem .8rem; border: 1px solid var(--border); background: var(--bg-elev); border-radius: 999px; cursor: pointer; font-size: .84rem; }
.platform-tabs button.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.platform-columns { display: grid; grid-template-columns: 1fr 1.6fr; gap: 1.25rem; }
.platform-thread { max-height: 360px; overflow-y: auto; }
.platform-bubble { padding: .6rem .8rem; border-radius: 10px; background: var(--bg); max-width: 80%; }
.platform-bubble.mine { margin-left: auto; background: #e0e7ff; }
.platform-bubble p { margin: 0; font-size: .9rem; }
.platform-bubble small { color: var(--text-muted); font-size: .7rem; }
.platform-card { padding: 1rem; display: block; text-decoration: none; color: var(--text); }
.platform-card strong { font-size: 1rem; }
.platform-card:hover { box-shadow: var(--shadow); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
@media (max-width: 768px) {
  .platform-columns, .grid-3 { grid-template-columns: 1fr; }
  .platform-row { align-items: flex-start; }
}