
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#162033;background:#f5f7fa;font-size:15px;line-height:1.55}body::selection{background:#dbeafe}a{color:inherit;text-decoration:none}button,input,select,textarea{font:inherit}button{cursor:pointer}.mobile-only{display:none}.topbar{position:sticky;top:0;z-index:100;height:64px;background:#fff;border-bottom:1px solid #e6e9ee}.topbar-inner{height:64px;max-width:1440px;margin:auto;padding:0 22px;display:flex;align-items:center;gap:18px}.brand{display:flex;align-items:center;gap:10px;font-weight:800;letter-spacing:-.3px;white-space:nowrap}.brand-mark{width:34px;height:34px;border-radius:10px;background:#1877f2;color:#fff;display:grid;place-items:center;font-weight:900}.brand-mark-dark{background:#111827}.global-search{width:min(430px,42vw);height:40px;display:flex;align-items:center;gap:9px;padding:0 12px;border-radius:10px;background:#f0f2f5;color:#667085}.global-search input{width:100%;min-width:0;border:0;outline:0;background:transparent}.top-actions{margin-left:auto;display:flex;align-items:center;gap:10px}.top-icon,.icon-button{width:38px;height:38px;border:1px solid #e0e4ea;border-radius:10px;background:#fff;display:grid;place-items:center;position:relative}.top-icon svg,.icon-button svg,.side-icon svg,.mobile-bottom svg{width:19px;height:19px}.top-profile{display:flex;gap:8px;align-items:center;font-weight:700}.avatar{background:#e8f1ff;color:#1877f2;border-radius:50%;display:grid;place-items:center;overflow:hidden;font-weight:800}.avatar img{width:100%;height:100%;object-fit:cover}.avatar.xs{width:32px;height:32px;font-size:12px}.notif-dot,.side-badge{background:#1877f2;color:#fff;border-radius:999px;font-size:10px;min-width:18px;height:18px;padding:0 5px;display:grid;place-items:center}.notif-dot{position:absolute;top:-4px;right:-4px;border:2px solid #fff}.app-shell{display:flex;min-height:calc(100vh - 64px)}.sidebar{position:sticky;top:64px;height:calc(100vh - 64px);width:245px;flex:0 0 245px;background:#fff;border-right:1px solid #e4e7ec;transition:width .18s ease;z-index:90}.sidebar-scroll{height:100%;overflow:auto;padding:12px}.sidebar-title-row{display:flex;align-items:center;justify-content:space-between;padding:9px 8px 12px;color:#667085;font-weight:800;text-transform:uppercase;font-size:11px;letter-spacing:.08em}.side-item{width:100%;display:flex;align-items:center;gap:11px;padding:10px 12px;border-radius:10px;color:#526075;margin:2px 0;border:0;background:transparent}.side-item:hover{background:#f2f4f7;color:#162033}.side-item.active{background:#eaf2ff;color:#1877f2;font-weight:700}.side-icon{width:20px;display:grid;place-items:center;flex:0 0 20px}.side-text{overflow:hidden;white-space:nowrap}.side-badge{margin-left:auto}.side-caption{font-size:10px;text-transform:uppercase;letter-spacing:.08em;color:#98a2b3;font-weight:800;padding:15px 10px 6px}.sidebar-divider{height:1px;background:#edf0f3;margin:12px 6px}.sidebar-footer{margin-top:auto;padding-top:10px}.side-submit{text-align:left}.main-content{flex:1;min-width:0;padding:28px clamp(16px,3vw,42px) 76px;max-width:1440px}.page-heading{margin-bottom:24px}.page-heading h1{margin:2px 0 6px;font-size:34px;letter-spacing:-.7px}.page-heading p{margin:0;color:#667085}.eyebrow{display:inline-block;color:#6b7280;font-size:11px;font-weight:800;letter-spacing:.1em;text-transform:uppercase}.section-head{display:flex;align-items:flex-end;justify-content:space-between;gap:14px;margin:26px 0 12px}.section-head h1,.section-head h2{margin:0}.panel{background:#fff;border:1px solid #e4e7ec;border-radius:14px;padding:18px;box-shadow:0 2px 10px rgba(16,24,40,.03)}.hero{background:#fff;border:1px solid #e4e7ec;border-radius:16px;padding:34px;display:grid;grid-template-columns:1.4fr .6fr;gap:24px;align-items:center}.hero h1{font-size:44px;line-height:1.05;letter-spacing:-1.3px;margin:8px 0 12px}.hero-art{min-height:180px;border-radius:14px;background:linear-gradient(135deg,#eef5ff,#f8fafc);display:flex;flex-direction:column;justify-content:center;padding:28px}.hero-art strong{font-size:34px;line-height:1.05}.searchbar,.filter-bar,.filter{display:flex;align-items:center;gap:10px}.searchbar{max-width:720px;margin-top:20px}.searchbar input,.search-field,.filter input,.filter select,.filter-bar select{height:42px;border:1px solid #d9dee7;border-radius:10px;background:#fff;padding:0 12px;outline:0}.searchbar input{flex:1}.search-field{display:flex;align-items:center;gap:8px;flex:1}.search-field input{border:0;outline:0;flex:1;min-width:0}.btn{display:inline-flex;justify-content:center;align-items:center;gap:7px;min-height:40px;padding:8px 13px;border:1px solid #d8dde6;border-radius:9px;background:#fff;color:#24324a;font-weight:700;white-space:nowrap}.btn:hover{background:#f7f8fa}.btn-primary{background:#1877f2;border-color:#1877f2;color:#fff}.btn-primary:hover{background:#1269da}.btn-sm{min-height:34px;padding:6px 10px;font-size:13px}.btn-lg{min-height:44px;padding:10px 16px}.story-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.story-card{background:#fff;border:1px solid #e4e7ec;border-radius:14px;overflow:hidden;min-width:0}.story-cover{display:block;aspect-ratio:3/4;background:#edf1f5;position:relative;overflow:hidden}.story-cover img,.story-cover .cover-image{width:100%;height:100%;display:block;object-fit:cover}.story-cover>span{display:grid;place-items:center;width:100%;height:100%;color:#667085;font-weight:800;font-size:18px}.story-body{padding:14px}.story-body h3{font-size:17px;line-height:1.25;margin:6px 0}.story-body p{margin:0}.author{color:#667085;font-size:13px}.clamp{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;color:#697586;font-size:13px;margin-top:8px!important}.story-meta,.row-top{display:flex;gap:10px;justify-content:space-between;align-items:center;font-size:12px;color:#6b7280;margin-top:12px}.badge,.status-pill{display:inline-flex;align-items:center;padding:4px 8px;border-radius:999px;background:#f2f4f7;color:#526075;font-size:11px;font-weight:700}.actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.grid-2{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:18px}.chapter-list{background:#fff;border:1px solid #e4e7ec;border-radius:14px;overflow:hidden}.chapter-row{display:flex;justify-content:space-between;gap:12px;padding:13px 16px;border-bottom:1px solid #edf0f3}.chapter-row:last-child{border-bottom:0}.chapter-row:hover{background:#f8fafc}.feed-preview{display:grid;gap:8px}.feed-preview-row{background:#fff;border:1px solid #e4e7ec;border-radius:10px;padding:12px;display:flex;gap:8px;align-items:center}.verified{color:#1877f2}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.field{display:grid;gap:7px}.field.full{grid-column:1/-1}.field label{font-size:13px;font-weight:700}.field input,.field select,.field textarea,.install-form input{width:100%;border:1px solid #d9dee7;border-radius:10px;padding:10px 12px;outline:0;background:#fff}.field textarea{min-height:130px;resize:vertical}.field input:focus,.field select:focus,.field textarea:focus{border-color:#8ab4f8;box-shadow:0 0 0 3px rgba(24,119,242,.08)}.settings-grid{display:grid;gap:14px;max-width:820px}.setting-row{display:flex;align-items:center;justify-content:space-between;gap:16px}.highlight-card{border-color:#cfe1ff;background:#f9fbff}.link-list{display:grid}.link-list a{padding:12px 0;border-bottom:1px solid #edf0f3}.link-list a:last-child{border-bottom:0}.flash-wrap{margin-bottom:16px}.alert{border:1px solid #ead8d8;border-radius:10px;padding:11px 13px;background:#fff5f5;color:#a33a3a}.alert.success{border-color:#cfe9d9;background:#f3fbf6;color:#1f7a45}.site-footer{margin-top:24px;background:#fff;border-top:1px solid #e4e7ec}.footer-inner{max-width:1440px;margin:auto;padding:22px;display:flex;justify-content:space-between;gap:20px;color:#697586}.footer-inner span{display:block;font-size:12px}.footer-links{display:flex;gap:14px;font-size:12px}.mobile-bottom{display:none}.sidebar-dark{background:#111827;border-right-color:#202938;color:#e5e7eb}.sidebar-dark .sidebar-title-row,.sidebar-dark .side-caption{color:#9ca3af}.sidebar-dark .side-item{color:#d1d5db}.sidebar-dark .side-item:hover{background:#1b2433;color:#fff}.sidebar-dark .side-item.active{background:#1d4ed8;color:#fff}.sidebar-dark .sidebar-divider{background:#253043}.admin-app .main-content{background:#f4f6f8}.admin-grid{display:block}.admin-side{display:none}.admin-main{max-width:none}.auth-card{max-width:440px;margin:9vh auto}.guest-main{min-height:calc(100vh - 64px);padding:32px 16px}.install-shell{min-height:100vh}.install-main{max-width:760px;margin:auto;padding:48px 16px}.install-brand{display:flex;align-items:center;gap:10px;font-weight:800;font-size:22px;margin-bottom:20px}.install-card{background:#fff;border:1px solid #e4e7ec;border-radius:16px;padding:26px;box-shadow:0 8px 30px rgba(16,24,40,.06)}.install-card h1{margin:4px 0 8px}.install-form{display:grid;gap:14px}.install-form label{display:grid;gap:7px;font-size:13px;font-weight:700}.install-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.install-note{padding:12px 14px;border:1px solid #cfe1ff;background:#f5f9ff;border-radius:10px;color:#175cd3}.install-btn{min-height:44px;border:0;border-radius:10px;background:#1877f2;color:#fff;font-weight:800}.error-page{max-width:700px;margin:12vh auto}.admin-top{display:flex;justify-content:space-between;gap:15px;align-items:center;margin-bottom:20px}.stats-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.stat{background:#fff;border:1px solid #e4e7ec;border-radius:12px;padding:16px}.stat span{display:block;color:#667085;font-size:12px}.stat strong{font-size:28px;display:block;margin-top:5px}.table-wrap{overflow:auto}.data-table{width:100%;border-collapse:collapse;min-width:680px}.data-table th,.data-table td{padding:11px 10px;border-bottom:1px solid #edf0f3;text-align:left;vertical-align:top}.data-table th{font-size:12px;color:#667085;background:#fafbfc}.data-table tr:last-child td{border-bottom:0}.notice,.muted{color:#667085}.mobile-bottom-studio,.mobile-bottom-admin{background:#fff}
.sidebar-collapsed .sidebar{width:76px;flex-basis:76px}.sidebar-collapsed .side-text,.sidebar-collapsed .side-badge,.sidebar-collapsed .sidebar-title-row>span,.sidebar-collapsed .side-caption{display:none}.sidebar-collapsed .side-item{justify-content:center}.sidebar-collapsed .collapse-button svg{transform:rotate(180deg)}
@media(max-width:1100px){.story-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-2{grid-template-columns:1fr}.hero{grid-template-columns:1fr}.hero-art{min-height:120px}.mobile-only{display:grid}.sidebar{position:fixed;left:0;top:64px;height:calc(100vh - 64px);transform:translateX(-102%);transition:transform .2s ease;width:270px!important;flex-basis:270px;box-shadow:14px 0 30px rgba(16,24,40,.12)}.sidebar-open .sidebar{transform:translateX(0)}.sidebar-backdrop{display:none;position:fixed;inset:64px 0 0;background:rgba(16,24,40,.35);z-index:80}.sidebar-open .sidebar-backdrop{display:block}.main-content{padding:22px 18px 90px}}
@media(max-width:760px){.topbar-inner{padding:0 12px;gap:10px}.brand span:last-child{font-size:17px}.global-search{width:auto;flex:1;max-width:none}.top-profile>span+span{display:none}.story-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.hero{padding:22px}.hero h1{font-size:34px}.form-grid,.install-grid{grid-template-columns:1fr}.field.full{grid-column:auto}.page-heading h1{font-size:29px}.section-head{margin-top:22px}.footer-inner{flex-direction:column}.footer-links{flex-wrap:wrap}.mobile-bottom{position:fixed;left:0;right:0;bottom:0;height:64px;background:#fff;border-top:1px solid #e4e7ec;display:grid;grid-template-columns:repeat(5,1fr);z-index:120;padding-bottom:env(safe-area-inset-bottom)}.mobile-bottom a{display:grid;place-items:center;align-content:center;gap:2px;color:#667085;font-size:10px;font-weight:700}.mobile-bottom a:hover,.mobile-bottom a.active{color:#1877f2}.mobile-bottom svg{width:20px;height:20px}.mobile-bottom-admin a.active{color:#111827}.mobile-bottom-studio a.active{color:#1877f2}.actions .btn{flex:1}.story-head{grid-template-columns:110px 1fr}.story-cover-lg img{max-height:160px}.admin-top{align-items:flex-start;flex-direction:column}.stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.filter,.filter-bar{flex-wrap:wrap}.filter input,.filter select,.filter-bar select,.search-field{width:100%;flex:1 1 100%}}
@media(max-width:430px){.story-grid{grid-template-columns:1fr}.top-actions>a:first-child:not(.btn){display:none}.hero h1{font-size:30px}.main-content{padding-left:12px;padding-right:12px}.panel{padding:14px}.story-body{padding:12px}}
.install-divider{height:1px;background:#edf0f3;margin:4px 0}.install-footer{padding-top:16px;color:#98a2b3;font-size:12px}.install-form label{display:grid;gap:7px;font-size:13px;font-weight:700}.install-form input{width:100%;border:1px solid #d9dee7;border-radius:10px;padding:10px 12px;outline:0;background:#fff}.install-form{display:grid;gap:14px}.install-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.install-btn{width:100%;min-height:44px;border:0;border-radius:10px;background:#1877f2;color:#fff;font-weight:800}.install-brand{display:flex;align-items:center;gap:10px;font-weight:800;font-size:22px;margin-bottom:20px}.install-mark{width:36px;height:36px;border-radius:10px;background:#1877f2;color:#fff;display:grid;place-items:center}.install-card{max-width:760px;margin:auto}.install-main{max-width:760px;margin:auto;padding:48px 16px}.install-shell{min-height:100vh;display:flex;align-items:flex-start;justify-content:center}/* V17 navigation refinements */
.mobile-search-toggle{display:none}
.profile-menu{position:relative}.profile-trigger{border:1px solid #e4e7ec;background:#fff;min-height:40px;padding:4px 7px 4px 5px;border-radius:12px;display:flex;align-items:center;gap:8px;font-weight:700;color:#24324a}.profile-trigger:hover{background:#f8fafc}.profile-trigger .icon{width:14px;height:14px;transform:rotate(90deg);color:#98a2b3}.profile-dropdown{position:absolute;right:0;top:calc(100% + 9px);width:286px;background:#fff;border:1px solid #e4e7ec;border-radius:14px;box-shadow:0 14px 40px rgba(16,24,40,.12);padding:8px;display:none;z-index:250}.profile-menu.open .profile-dropdown{display:block}.profile-summary{display:flex;gap:10px;align-items:center;padding:10px}.profile-summary strong,.profile-summary small{display:block}.profile-summary small{color:#98a2b3;font-size:12px;margin-top:2px}.avatar.md{width:44px;height:44px;font-size:15px}.profile-coins{display:flex;justify-content:space-between;gap:10px;padding:10px 12px;background:#f5f9ff;border:1px solid #e4efff;border-radius:10px;margin:4px 2px 7px}.profile-coins span{color:#667085}.profile-dropdown>a,.profile-dropdown form button{width:100%;display:flex;align-items:center;gap:9px;padding:10px;border:0;background:transparent;border-radius:9px;color:#344054;text-align:left}.profile-dropdown>a:hover,.profile-dropdown form button:hover{background:#f2f4f7}.profile-dropdown svg{width:17px;height:17px;color:#667085}.dropdown-divider{height:1px;background:#edf0f3;margin:7px 2px}.mobile-search-panel{display:none}.mobile-search-panel.open{display:block;padding:8px 12px;background:#fff;border-bottom:1px solid #e4e7ec}.mobile-search-panel form{height:42px;border:1px solid #d9dee7;background:#fff;border-radius:11px;display:flex;align-items:center;gap:8px;padding-left:12px}.mobile-search-panel input{border:0;outline:0;min-width:0;flex:1}.mobile-search-panel .icon-button{border:0;width:32px;height:32px}.content-status{font-size:12px;color:#667085}.empty-state{text-align:center;padding:42px 20px}.empty-state h3{margin:0 0 6px}.empty-state p{margin:0}.story-card{transition:transform .15s ease,box-shadow .15s ease}.story-card:hover{transform:translateY(-1px);box-shadow:0 5px 18px rgba(16,24,40,.06)}.btn-danger{background:#fff5f5!important;border-color:#fecaca!important;color:#b42318!important}.btn-success{background:#ecfdf3!important;border-color:#abefc6!important;color:#027a48!important}.action-row{display:flex;flex-wrap:wrap;gap:8px;align-items:center}.profile-card{display:flex;gap:14px;align-items:center}.profile-card .avatar.lg{width:72px;height:72px;font-size:24px}.cover-preview{max-width:160px;aspect-ratio:3/4;border-radius:12px;overflow:hidden;background:#eef2f6}.cover-preview img{width:100%;height:100%;object-fit:cover}.field-hint{font-size:12px;color:#98a2b3}.table-actions{display:flex;gap:6px;flex-wrap:wrap}.sticky-actions{position:sticky;bottom:12px;z-index:10;background:rgba(255,255,255,.94);backdrop-filter:blur(8px);border:1px solid #e4e7ec;border-radius:12px;padding:10px}
@media(max-width:760px){
 .desktop-search{display:none}.mobile-search-toggle{display:grid}.profile-name{display:none}.profile-trigger{width:40px;height:40px;justify-content:center;padding:4px}.profile-trigger .icon{display:none}.profile-dropdown{right:-4px;width:min(290px,calc(100vw - 24px))}.top-actions{gap:6px}.top-actions>a[href$="/login"]{font-size:13px}.main-content{padding-bottom:92px}.story-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.story-body h3{font-size:15px}.hero{border-radius:13px}.hero h1{font-size:31px}.section-head{gap:8px}.profile-card{align-items:flex-start}.table-wrap{-webkit-overflow-scrolling:touch}.filter-bar{display:grid;grid-template-columns:1fr}.filter-bar .btn{width:100%}
}
@media(max-width:430px){.story-grid{grid-template-columns:1fr 1fr}.story-cover{aspect-ratio:2.9/4}.profile-dropdown{right:-8px}.hero{padding:18px}.hero h1{font-size:28px}.brand-mark{width:32px;height:32px}.brand span:last-child{font-size:16px}}
/* V18 Creator Studio UI: single active state + responsive professional layout */
.creator-app{background:#f3f6fb;color:#172033}
.creator-topbar{background:rgba(255,255,255,.98);backdrop-filter:saturate(140%) blur(8px)}
.creator-shell{min-height:calc(100vh - 64px)}
.creator-sidebar{background:#fbfcfe;border-right:1px solid #e2e8f0}
.creator-sidebar .sidebar-scroll{padding:14px 10px 18px}
.creator-sidebar .sidebar-title-row{padding:8px 10px 12px;color:#64748b}
.creator-sidebar .side-item{margin:3px 0;padding:10px 12px;min-height:42px;border-radius:10px;color:#475569;border:1px solid transparent}
.creator-sidebar .side-item:hover{background:#eef5ff;color:#2563eb}
.creator-sidebar .side-item.active{background:#e8f1ff;color:#2563eb;border-color:#d5e5ff;font-weight:750}
.creator-sidebar .side-item.active .side-icon{color:#2563eb}
.creator-sidebar .side-submit{width:100%;text-align:left}
.creator-content{padding:28px clamp(16px,3vw,42px) 80px}
.creator-content h1,.creator-content h2,.creator-content h3{letter-spacing:-.02em}
.creator-content .admin-top{margin-bottom:22px}
.creator-content .admin-top>div:first-child{min-width:0}
.creator-content .stats-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:20px}
.creator-content .stat{background:#fff;border:1px solid #e2e8f0;border-radius:14px;box-shadow:0 2px 10px rgba(15,23,42,.035);padding:17px}
.creator-content .stat span{color:#64748b;font-size:12px;font-weight:700}
.creator-content .stat strong{display:block;margin-top:3px;font-size:22px;color:#0f172a}
.creator-content .panel{border-radius:14px;border-color:#e2e8f0;box-shadow:0 2px 10px rgba(15,23,42,.035)}
.creator-content .data-table{min-width:760px}
.creator-content .table-wrap{overflow-x:auto;border-radius:14px}
.creator-content .table-actions{min-width:190px}
.creator-content .btn{min-height:40px}
.creator-content .form-grid{gap:16px}
.creator-content .section-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.profile-trigger{border-color:#dbe4ef}
.profile-trigger .avatar{flex:none}
.creator-website-btn{border-color:#d6e2f2;background:#fff}
.creator-website-btn:hover{background:#f7faff}
@media(max-width:1100px){
 .creator-content .stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .creator-content .form-grid{grid-template-columns:1fr}
}
@media(max-width:760px){
 .creator-content{padding:18px 12px 88px}
 .creator-content .stats-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 .creator-content .stat{padding:14px}
 .creator-content .stat strong{font-size:19px}
 .creator-content .admin-top{gap:12px;margin-bottom:16px}
 .creator-content .admin-top>.btn{width:100%;justify-content:center}
 .creator-content .panel{padding:15px}
 .creator-content .data-table{min-width:720px}
 .creator-content .table-actions{min-width:180px}
 .creator-sidebar{top:64px}
 .creator-topbar .topbar-inner{padding:0 10px}
 .creator-topbar .brand{min-width:0}
 .creator-topbar .brand span:last-child{overflow:hidden;text-overflow:ellipsis}
 .creator-topbar .creator-website-btn{display:none}
 .creator-topbar .profile-name{display:none}
 .mobile-bottom-studio{height:68px}
 .mobile-bottom-studio a{font-size:10px;min-width:0}
 .mobile-bottom-studio a span{white-space:nowrap}
}
@media(max-width:430px){
 .creator-content .stats-grid{grid-template-columns:1fr 1fr}
 .creator-content .stats-grid .stat{min-width:0}
 .creator-content h1{font-size:26px}
 .creator-content .eyebrow{font-size:11px}
 .creator-content .data-table{min-width:690px}
}
/* V19 interaction + security + mobile refinements */
.switch{position:relative;display:inline-flex;align-items:center;width:42px;height:24px;flex:0 0 42px}
.switch input{position:absolute;opacity:0;pointer-events:none}
.switch span{width:42px;height:24px;background:#d9e1ec;border-radius:999px;transition:.16s;position:relative;display:block}
.switch span:after{content:"";position:absolute;top:3px;left:3px;width:18px;height:18px;background:#fff;border-radius:50%;box-shadow:0 1px 3px rgba(15,23,42,.18);transition:.16s}
.switch input:checked+span{background:#5b8def}
.switch input:checked+span:after{transform:translateX(18px)}
.mobile-bottom{padding-bottom:env(safe-area-inset-bottom);min-height:64px}
.mobile-bottom a{min-width:0;overflow:hidden}
.mobile-bottom a span{max-width:100%;overflow:hidden;text-overflow:ellipsis}
.btn:active,.icon-button:active,.side-item:active,.mobile-bottom a:active{transform:scale(.98)}
.toast-stack{position:fixed;right:18px;bottom:88px;z-index:400;display:grid;gap:8px;width:min(360px,calc(100vw - 24px))}
.toast{background:#fff;border:1px solid #e4e7ec;box-shadow:0 12px 30px rgba(16,24,40,.12);border-radius:12px;padding:11px 13px;display:flex;gap:9px;align-items:flex-start;animation:toastIn .18s ease}
.toast.success{border-color:#cfe9d9}.toast.error{border-color:#f1caca}
@keyframes toastIn{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
@media(max-width:760px){.toast-stack{right:12px;bottom:80px}.mobile-bottom{height:68px}.mobile-bottom a{padding-inline:4px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;animation:none!important;transition:none!important}.story-card:hover{transform:none}}

/* V20 Premium soft-blue design system */
:root{
  --ck-blue:#2f80ed;--ck-blue-2:#5b9df9;--ck-ink:#15233b;--ck-muted:#687891;--ck-line:#e1e8f2;
  --ck-bg:#f5f8fc;--ck-soft:#eef6ff;--ck-soft-2:#f7fbff;--ck-shadow:0 14px 40px rgba(48,86,135,.08);
  --ck-shadow-sm:0 6px 20px rgba(48,86,135,.06);--ck-radius:18px
}
body{background:radial-gradient(circle at 78% -12%,rgba(91,157,249,.12),transparent 26%),var(--ck-bg);color:var(--ck-ink);line-height:1.6}
::selection{background:#d9ebff;color:#10213d}
h1,h2,h3,h4{color:var(--ck-ink);letter-spacing:-.03em}p{color:#667791}
.topbar{height:72px;background:rgba(255,255,255,.88);backdrop-filter:blur(14px);border-bottom:1px solid rgba(223,231,242,.95)}
.topbar-inner{height:72px;padding:0 28px;gap:20px}.brand{font-size:15px}.brand-mark{width:38px;height:38px;border-radius:12px;box-shadow:0 7px 18px rgba(47,128,237,.22);background:linear-gradient(145deg,#4d95f4,#2677e5)}
.global-search{height:42px;border-radius:13px;background:#eff4fa;border:1px solid transparent;width:min(470px,44vw)}.global-search:focus-within{background:#fff;border-color:#cfe0f6;box-shadow:0 0 0 4px rgba(47,128,237,.07)}
.top-icon,.icon-button{width:42px;height:42px;border-radius:13px;border-color:#dce5f0;box-shadow:0 3px 10px rgba(32,67,106,.03)}
.profile-trigger{height:42px;border:1px solid #dce5f0;border-radius:14px;background:#fff;padding:4px 10px 4px 5px;display:flex;align-items:center;gap:8px;font-weight:750;color:#233451}.profile-trigger:hover{background:#f9fcff}
.profile-dropdown{border:1px solid #dce5f0;border-radius:16px;box-shadow:0 22px 60px rgba(40,73,116,.17);padding:8px;background:#fff;min-width:250px}.profile-dropdown a,.profile-dropdown button{border-radius:11px;padding:10px 11px}.profile-dropdown a:hover,.profile-dropdown button:hover{background:#f2f7fd}
.app-shell{min-height:calc(100vh - 72px)}.sidebar{top:72px;height:calc(100vh - 72px);width:258px;flex-basis:258px;background:rgba(255,255,255,.92);border-right:1px solid var(--ck-line);box-shadow:4px 0 18px rgba(45,84,129,.025)}
.sidebar-scroll{padding:16px}.sidebar-title-row{padding:11px 10px 14px}.side-item{padding:12px 14px;border-radius:13px;margin:3px 0;color:#566982;transition:.2s ease}.side-item:hover{background:#f5f9fe;transform:translateX(2px)}.side-item.active{background:linear-gradient(100deg,#e8f2ff,#eff7ff);color:var(--ck-blue);box-shadow:inset 0 0 0 1px #d7e8ff}.side-icon{width:22px}.side-caption{padding:18px 10px 7px;font-size:10px}
.main-content{max-width:none;padding:34px clamp(18px,3.3vw,52px) 84px}.main-content>*{max-width:1280px;margin-left:auto;margin-right:auto}.page-heading{margin-bottom:28px}.page-heading h1{font-size:40px;margin:3px 0 7px}.page-heading p{font-size:15px;max-width:760px}
.panel{border:1px solid #e0e8f3;border-radius:var(--ck-radius);padding:22px;box-shadow:var(--ck-shadow-sm);background:rgba(255,255,255,.96)}.btn{min-height:42px;border-radius:12px;border-color:#d6e0ec;padding:9px 14px;transition:transform .18s ease,box-shadow .18s ease,background .18s ease}.btn:hover{transform:translateY(-1px);box-shadow:0 7px 18px rgba(33,76,125,.08);background:#f9fbfe}.btn-primary{border-color:var(--ck-blue);background:linear-gradient(135deg,#3a8af0,#2678e7);box-shadow:0 8px 18px rgba(47,128,237,.18)}.btn-primary:hover{background:linear-gradient(135deg,#3484eb,#1f70dd);box-shadow:0 10px 22px rgba(47,128,237,.24)}.btn-soft{background:#eef6ff;border-color:#d5e8ff;color:#2368b9}.btn-block{width:100%}
.hero,.home-hero-premium{border:1px solid #dbe7f4;border-radius:26px;box-shadow:var(--ck-shadow);background:linear-gradient(120deg,#ffffff 0%,#f8fbff 60%,#eef6ff 100%)}
.home-hero-premium{display:grid;grid-template-columns:minmax(0,1.22fr) minmax(280px,.78fr);gap:18px;align-items:center;padding:52px;overflow:hidden;position:relative;margin-bottom:28px}.home-hero-premium:after{content:"";position:absolute;width:300px;height:300px;border-radius:50%;background:rgba(120,185,255,.14);filter:blur(8px);right:-90px;top:-80px}.hero-copy{position:relative;z-index:2}.hero-copy h1{font-size:clamp(42px,4.7vw,68px);line-height:.98;margin:12px 0 18px;max-width:760px}.hero-copy p{font-size:17px;max-width:700px}.hero-search{display:flex;align-items:center;gap:10px;margin-top:24px;max-width:760px;background:#fff;border:1px solid #d7e3f0;padding:7px;border-radius:15px;box-shadow:0 10px 26px rgba(35,74,121,.08)}.hero-search span{padding-left:10px;color:#6a7f99}.hero-search input{border:0;outline:0;flex:1;min-width:0;padding:10px;background:transparent}.hero-pills{display:flex;gap:9px;flex-wrap:wrap;margin-top:16px}.hero-pills a{padding:8px 11px;background:#fff;border:1px solid #dce8f5;border-radius:999px;color:#517090;font-size:12px;font-weight:750;transition:.18s ease}.hero-pills a:hover{border-color:#c1dbf7;color:#246bb8;transform:translateY(-1px)}
.hero-orbit{min-height:340px;display:grid;place-items:center;position:relative;z-index:2}.orbit-card-main{width:min(100%,330px);padding:28px;border-radius:24px;background:linear-gradient(150deg,#276fc9,#5e9efa);color:#fff;box-shadow:0 24px 48px rgba(43,110,185,.24);transform:rotate(-4deg);animation:floatCard 5s ease-in-out infinite}.orbit-card-main strong{display:block;font-size:29px;line-height:1.05;margin:13px 0 8px}.orbit-card-main span{color:rgba(255,255,255,.82)}.mini-badge{display:inline-flex!important;padding:5px 9px;border-radius:999px;background:rgba(255,255,255,.16);font-size:10px;font-weight:800;letter-spacing:.08em}.orbit-dot{position:absolute;border-radius:50%;filter:blur(.2px);animation:orb 7s ease-in-out infinite}.orbit-one{width:16px;height:16px;background:#77b4ff;right:14%;top:15%}.orbit-two{width:28px;height:28px;background:#c4e0ff;left:12%;bottom:16%;animation-delay:-2.5s}.orbit-three{width:10px;height:10px;background:#3d85dd;right:8%;bottom:27%;animation-delay:-4s}
.spotlight-card{margin-bottom:28px;border:1px solid #d7e7f7;border-radius:22px;padding:28px 30px;background:linear-gradient(115deg,#eef6ff,#fff);display:grid;grid-template-columns:1fr 220px;gap:22px;align-items:center;box-shadow:var(--ck-shadow-sm)}.spotlight-card h2{margin:4px 0 8px;font-size:30px}.spotlight-art{height:150px;border-radius:18px;background:radial-gradient(circle at 35% 30%,#d5ebff,transparent 30%),linear-gradient(160deg,#ddecff,#f9fcff);border:1px solid #d8e8f7}
.home-section{margin-top:38px}.first-home-section{margin-top:10px}.section-head{margin:0 0 16px;padding:0 2px}.section-head h1,.section-head h2{font-size:27px;margin-top:2px}.section-head h2{font-size:28px}.live-chip{display:inline-flex;align-items:center;gap:7px;border:1px solid #cfe4fb;background:#f6fbff;border-radius:999px;padding:7px 11px;font-size:12px;color:#47739f}.live-chip i,.online-dot-wrap i,.community-topline i{width:7px;height:7px;border-radius:50%;background:#38c793;display:inline-block;box-shadow:0 0 0 5px rgba(56,199,147,.10);animation:pulseDot 2s infinite}
.story-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:18px}.story-grid-compact{grid-template-columns:repeat(4,minmax(0,1fr))}.story-card{border:1px solid #dce6f2;border-radius:18px;overflow:hidden;box-shadow:0 5px 16px rgba(51,84,122,.04);background:#fff;transition:transform .22s ease,box-shadow .22s ease,border-color .22s ease}.story-card:hover{transform:translateY(-5px);box-shadow:0 18px 36px rgba(47,88,134,.12);border-color:#c9dced}.story-cover{aspect-ratio:3/4;background:linear-gradient(160deg,#eaf3fc,#f9fbfd)}.story-cover img{transition:transform .5s ease}.story-card:hover .story-cover img{transform:scale(1.04)}.cover-gradient{position:absolute;inset:42% 0 0;background:linear-gradient(to bottom,transparent,rgba(8,29,57,.5));pointer-events:none}.cover-badge{position:absolute;left:11px;bottom:10px;padding:5px 9px;border-radius:999px;color:#fff;font-size:10px;font-weight:800;background:rgba(15,36,63,.65);backdrop-filter:blur(6px)}.cover-fallback{font-size:42px!important;color:#2e79c7!important;background:linear-gradient(140deg,#e6f1ff,#f8fbff)}.story-body{padding:16px}.story-body h3{font-size:18px;margin:7px 0 4px}.story-meta{margin-top:14px}.story-readtime{color:#7c8ca1;font-size:11px}.author a{color:#2f76bf}.row-top{margin-top:0}
.community-panel{padding:26px;border-radius:24px;background:linear-gradient(120deg,#fbfdff,#f1f7ff);border:1px solid #dce8f5}.social-teasers{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.social-teaser{display:flex;gap:12px;align-items:flex-start;padding:14px;background:#fff;border:1px solid #dce6f2;border-radius:15px;transition:.18s ease}.social-teaser:hover{transform:translateY(-2px);box-shadow:var(--ck-shadow-sm)}.social-teaser p{margin:3px 0 0;font-size:13px}.genre-cloud{display:flex;gap:11px;flex-wrap:wrap}.genre-chip{display:flex;align-items:center;gap:18px;padding:12px 15px;border-radius:14px;border:1px solid #dce7f3;background:#fff;color:#385575;font-weight:750;box-shadow:0 4px 12px rgba(50,90,130,.03);transition:.18s ease}.genre-chip:hover{border-color:#bed8f4;background:#f6fbff;color:#276bb5;transform:translateY(-2px)}.genre-chip i{color:#76a1c8;font-style:normal}
.search-hero-panel{display:grid;grid-template-columns:minmax(0,1fr) 210px auto;gap:10px;align-items:center;margin-bottom:16px;background:linear-gradient(100deg,#fff,#f5faff)}.search-hero-field{display:flex;align-items:center;gap:9px;height:50px;padding:0 14px;border:1px solid #d8e4f0;border-radius:14px;background:#fff}.search-hero-field:focus-within{border-color:#9fc9ef;box-shadow:0 0 0 4px rgba(47,128,237,.07)}.search-hero-field input{flex:1;border:0;outline:0}.search-hero-panel select{height:50px;border:1px solid #d8e4f0;border-radius:14px;padding:0 12px;background:#fff}.search-toolbar{display:flex;justify-content:space-between;gap:16px;align-items:center;margin:12px 0 22px}.result-summary{color:#6a7b91;font-size:13px}.result-summary strong{color:#1f3553}.search-chips{display:flex;gap:7px;flex-wrap:wrap;justify-content:flex-end}.chip{padding:7px 11px;border-radius:999px;background:#fff;border:1px solid #dce6f1;color:#60728a;font-size:12px}.chip.active,.chip:hover{background:#edf6ff;border-color:#c5def7;color:#256bb2}.search-results{grid-template-columns:repeat(4,minmax(0,1fr))}.search-empty{padding:60px 20px;text-align:center}.empty-icon{font-size:44px;color:#85a8ca}
.community-topline{display:flex;justify-content:space-between;align-items:center;margin:-6px 0 18px;padding:12px 16px;border-radius:15px;background:#eef7ff;border:1px solid #d7e9fb}.community-topline strong{display:block}.community-topline span{display:flex;align-items:center;gap:7px;font-size:12px;color:#6a7f98}.feed-list{max-width:900px!important;margin-left:auto;margin-right:auto}.feed-card{padding:20px;margin-bottom:14px}.feed-meta{display:flex;justify-content:space-between;gap:12px}.feed-author{display:flex;gap:12px;align-items:center}.post-more{color:#8797aa}.post-body{font-size:15px;line-height:1.7;margin:18px 0 15px}.post-actions{display:flex;gap:10px;align-items:center;padding:10px 0;border-top:1px solid #edf2f7}.reaction-btn{display:inline-flex;gap:7px;align-items:center;border:1px solid #d8e3ef;background:#fff;padding:8px 11px;border-radius:999px;color:#536982;font-weight:750;transition:.18s ease}.reaction-btn:hover,.reaction-btn.liked{background:#edf6ff;border-color:#c7e0f7;color:#216bb3}.reaction-icon{transition:transform .25s ease}.reaction-btn.liked .reaction-icon{transform:scale(1.18)}.comment-count{font-size:13px;color:#72839a}.comment-form{padding-top:8px}.comment-form input{flex:1;min-width:0;height:42px;border:1px solid #d7e2ee;border-radius:12px;padding:0 12px;outline:0;background:#fafcff}.comment-form input:focus{border-color:#9fc8eb;box-shadow:0 0 0 4px rgba(47,128,237,.06)}
.referral-hero,.leaderboard-hero{margin-bottom:18px;padding:32px;border-radius:24px;border:1px solid #d4e6f8;background:linear-gradient(120deg,#eef6ff,#ffffff 58%);display:flex;justify-content:space-between;gap:20px;align-items:center;box-shadow:var(--ck-shadow)}.referral-hero h2{font-size:38px;margin:5px 0}.referral-link{display:inline-block;max-width:100%;margin:10px 0 14px;padding:10px 12px;background:#fff;border:1px dashed #bdd7f1;border-radius:11px;color:#467198;font-size:13px;word-break:break-all}.referral-gift{font-size:90px;filter:drop-shadow(0 14px 20px rgba(47,128,237,.12));animation:floatCard 5s ease-in-out infinite}.referral-stats{grid-template-columns:repeat(4,minmax(0,1fr));margin-bottom:18px}.referral-rules{background:#fbfdff}.leaderboard-hero{overflow:hidden}.leaderboard-hero h2{font-size:32px;margin:5px 0}.podium-mini{display:flex;align-items:flex-end;gap:14px;min-width:360px;justify-content:center}.podium-mini>div{width:92px;padding:15px 8px;border:1px solid #d8e7f6;background:#fff;border-radius:16px;text-align:center;box-shadow:0 8px 18px rgba(43,89,136,.06)}.podium-mini>div span{display:block;font-size:28px}.podium-mini>div b{font-size:12px;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.podium-first{transform:translateY(-12px);background:#f5fbff!important;border-color:#bedcf8!important}.my-rank-strip{margin-bottom:15px;padding:12px 16px;border-radius:14px;background:#eaf5ff;border:1px solid #cce2f8;color:#3a6790}.leaderboard-card{padding:10px}.leaderboard-row{display:grid;grid-template-columns:60px minmax(220px,1fr) 110px 90px 100px;gap:10px;align-items:center;padding:12px;border-bottom:1px solid #edf2f7}.leaderboard-row:last-child{border-bottom:0}.leaderboard-row.me{background:#f1f8ff;border-radius:13px}.leaderboard-header{font-size:11px;text-transform:uppercase;letter-spacing:.08em;color:#8a9bb0;font-weight:800}.leader-user{display:flex;gap:10px;align-items:center}.leader-user small{display:block;color:#8997a9;font-size:11px}.rank-number{font-weight:800;color:#6d8098}.score-number{font-weight:850;text-align:right}.type-pill,.level-pill{font-size:11px;font-weight:800;padding:5px 8px;border-radius:999px;background:#f1f5f9;width:max-content}.type-pill.creator{background:#eef4ff;color:#356fb0}.type-pill.reader{background:#f3f7fb;color:#60758e}.level-pill{background:#eaf6ff;color:#2a70b6}.frame-starter{box-shadow:0 0 0 3px #e8eef5}.frame-silver{box-shadow:0 0 0 3px #c6d2df,0 0 0 5px #eff3f7}.frame-gold{box-shadow:0 0 0 3px #e5c56c,0 0 0 5px #fff4d4}.frame-diamond{box-shadow:0 0 0 3px #8fd1ff,0 0 0 5px #eaf8ff}.frame-legendary{box-shadow:0 0 0 3px #9aa9ff,0 0 0 5px #fff0f9,0 0 24px rgba(106,125,255,.25)}.avatar-verified{box-shadow:0 0 0 3px #bcdcff,0 0 0 5px #edf6ff}.verified-badge{display:inline-grid;place-items:center;width:17px;height:17px;border-radius:50%;margin-left:4px;color:#fff;background:#2f80ed;font-size:10px;font-weight:900}.avatar.sm{width:40px;height:40px}.avatar.md{width:48px;height:48px}.avatar.lg{width:82px;height:82px}
.auth-modern{max-width:1080px;margin:7vh auto 0;display:grid;grid-template-columns:1.05fr .95fr;gap:28px;align-items:center}.auth-showcase{padding:20px 10px}.auth-showcase h1{font-size:clamp(40px,4.2vw,58px);line-height:1;max-width:590px;margin:10px 0 16px}.auth-showcase p{font-size:17px;max-width:560px}.auth-feature-list{display:grid;gap:9px;margin-top:22px;color:#51718f;font-size:13px;font-weight:700}.auth-panel{padding:30px;box-shadow:0 24px 60px rgba(38,79,126,.11)}.auth-panel h2{font-size:31px;margin:4px 0}.auth-form{display:grid;gap:14px;margin-top:20px}.auth-form label{display:grid;gap:7px;font-size:13px;font-weight:750}.auth-form input{width:100%;height:46px;border:1px solid #d7e1ec;border-radius:12px;padding:0 12px;outline:0;background:#fff}.auth-form input:focus{border-color:#9ec9ed;box-shadow:0 0 0 4px rgba(47,128,237,.07)}.input-with-action{position:relative}.input-with-action input{padding-right:82px}.input-action{position:absolute;right:7px;top:7px;border:0;background:#eef5fb;color:#4b7194;border-radius:9px;padding:6px 8px;font-size:11px;font-weight:800}.auth-divider{display:flex;align-items:center;gap:10px;margin:18px 0;color:#8a9aab;font-size:11px}.auth-divider:before,.auth-divider:after{content:"";height:1px;background:#e6edf4;flex:1}.password-meter{height:6px;background:#edf2f7;border-radius:999px;overflow:hidden}.password-meter span{display:block;height:100%;width:0;background:#91b8dc;border-radius:999px;transition:.3s ease}.optional-label{font-weight:600;color:#9aa8b8}.check-row{display:flex!important;grid-template-columns:none!important;align-items:flex-start!important;gap:8px}.check-row input{width:auto!important;height:auto!important;margin-top:4px}.check-row span{font-weight:600!important;color:#72839a}
.error-stats{grid-template-columns:repeat(4,minmax(0,1fr));margin-bottom:16px}.success-badge{background:#eaf8f1;color:#21845a}.danger-badge{background:#fff1f1;color:#bd4c4c}.notice{font-size:12px;color:#7a8b9e}
.creator-shell .main-content,.creator-content{background:linear-gradient(180deg,#f8fbff 0,#f5f8fc 70%)}.creator-sidebar .side-item.active{background:linear-gradient(100deg,#e7f2ff,#f3f9ff)}.admin-app .main-content{background:linear-gradient(180deg,#f6f8fb,#f2f5f9)}.sidebar-dark{background:#132136;border-right-color:#22364f}.sidebar-dark .side-item{color:#c9d6e7}.sidebar-dark .side-item:hover{background:#1b304b}.sidebar-dark .side-item.active{background:linear-gradient(100deg,#1f61b8,#274f86)}
@keyframes floatCard{0%,100%{transform:translateY(0) rotate(-4deg)}50%{transform:translateY(-9px) rotate(-2deg)}}@keyframes orb{0%,100%{transform:translate3d(0,0,0)}50%{transform:translate3d(9px,-8px,0)}}@keyframes pulseDot{0%,100%{opacity:1}50%{opacity:.45}}
@media(max-width:1100px){.home-hero-premium{grid-template-columns:1fr;padding:38px}.hero-orbit{min-height:240px}.story-grid,.story-grid-compact,.search-results{grid-template-columns:repeat(3,minmax(0,1fr))}.auth-modern{grid-template-columns:1fr;max-width:680px}.auth-showcase{display:none}.search-hero-panel{grid-template-columns:1fr 180px}.referral-stats,.error-stats{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.topbar,.topbar-inner{height:64px}.topbar-inner{padding:0 14px}.sidebar{top:64px;height:calc(100vh - 64px);width:280px;flex-basis:280px;transform:translateX(-102%);transition:transform .25s ease}.sidebar-open .sidebar{transform:translateX(0)}.sidebar-backdrop{display:none!important}.sidebar-open .sidebar-backdrop{display:block!important}.main-content{padding:22px 12px 92px}.main-content>*{max-width:none}.page-heading h1{font-size:31px}.home-hero-premium{padding:26px 20px;border-radius:22px}.hero-copy h1{font-size:42px}.hero-search{flex-wrap:wrap}.hero-search input{min-width:180px}.hero-search .btn{width:100%}.hero-orbit{min-height:230px}.story-grid,.story-grid-compact,.search-results{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.story-body{padding:13px}.story-body h3{font-size:16px}.social-teasers{grid-template-columns:1fr}.search-hero-panel{grid-template-columns:1fr}.search-hero-panel select{width:100%}.search-toolbar{display:grid}.search-chips{justify-content:flex-start;overflow:auto;flex-wrap:nowrap;padding-bottom:3px}.community-topline{display:grid}.podium-mini{min-width:0;width:100%;gap:7px}.podium-mini>div{width:30%}.leaderboard-hero{display:grid;padding:24px}.leaderboard-row{grid-template-columns:40px minmax(170px,1fr) 70px 65px}.leaderboard-row>:last-child{display:none}.referral-hero{padding:24px}.referral-gift{font-size:64px}.auth-modern{margin-top:3vh}.auth-panel{padding:22px}.mobile-only{display:grid}.desktop-search{display:none!important}}
@media(max-width:520px){.story-grid,.story-grid-compact,.search-results{grid-template-columns:1fr 1fr}.hero-copy h1{font-size:36px}.referral-stats,.error-stats{grid-template-columns:1fr 1fr}.spotlight-card{grid-template-columns:1fr}.spotlight-art{display:none}.leaderboard-header{display:none}.leaderboard-row{grid-template-columns:36px minmax(150px,1fr) 62px}.leaderboard-row .type-pill{display:none}.profile-name{display:none}.footer-inner{flex-direction:column}}
.toast-stack{position:fixed;right:22px;bottom:22px;z-index:300;display:grid;gap:8px}.toast{padding:12px 14px;border:1px solid #d5e4f3;background:#fff;border-radius:12px;box-shadow:0 14px 30px rgba(37,77,120,.14);font-size:13px;font-weight:700;color:#27425f;animation:toastIn .25s ease}.toast.success{border-color:#c7e7d9;background:#f5fcf8}.toast.error{border-color:#f0d1d1;background:#fff7f7}@keyframes toastIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
/* CeritaKita V20 premium refinement */
:root{--ck-blue:#1877f2;--ck-ink:#13233a;--ck-muted:#6b7b91;--ck-line:#e1e8f0;--ck-soft:#eef6ff;--ck-bg:#f5f8fc;--ck-shadow:0 16px 48px rgba(48,92,138,.09)}
body{background:var(--ck-bg);color:var(--ck-ink)}
.topbar{box-shadow:0 1px 0 rgba(30,60,90,.03)}
.lift-card,.story-card,.panel,.stat,.wallet-card,.package,.feed-card{transition:transform .22s ease,box-shadow .22s ease,border-color .22s ease}.lift-card:hover,.story-card:hover,.package:hover{transform:translateY(-4px);box-shadow:var(--ck-shadow);border-color:#d2e3f4}.panel-heading,.creator-book-top,.creator-book-actions,.comment-compose{display:flex;align-items:center;justify-content:space-between;gap:12px}.creator-hero{display:grid;grid-template-columns:1.25fr .75fr;gap:24px;padding:36px;border:1px solid #d9e7f5;border-radius:24px;background:radial-gradient(circle at 100% 10%,#e8f3ff,transparent 45%),linear-gradient(135deg,#fff,#f1f7ff);box-shadow:var(--ck-shadow);margin-bottom:22px}.creator-hero h1{font-size:42px;line-height:1.06;letter-spacing:-1px;margin:8px 0 12px}.creator-hero p{font-size:16px;color:var(--ck-muted);max-width:650px}.creator-hero-art{min-height:190px;border-radius:20px;background:linear-gradient(135deg,#d9ecff,#f6fbff);display:flex;flex-direction:column;justify-content:center;padding:30px;position:relative;overflow:hidden}.creator-hero-art span{font-size:58px;color:#1877f2;line-height:1}.creator-hero-art strong{font-size:24px}.creator-hero-art small{color:var(--ck-muted)}.creator-dashboard-grid{display:grid;grid-template-columns:1.35fr .65fr;gap:16px}.workflow{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.workflow>div{padding:18px;border:1px solid var(--ck-line);border-radius:16px;background:#f9fbfd}.workflow b{display:block;color:var(--ck-blue);font-size:12px}.workflow strong{display:block;font-size:18px;margin:6px 0}.workflow span{font-size:13px;color:var(--ck-muted)}.creator-book-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.creator-book-card{padding:0;overflow:hidden}.creator-book-top{padding:14px 16px;border-bottom:1px solid #edf1f5;color:var(--ck-muted);font-size:12px}.creator-book-body{display:flex;gap:16px;padding:18px}.creator-cover{width:105px;aspect-ratio:3/4;flex:none;border-radius:14px;overflow:hidden;background:linear-gradient(135deg,#eaf3ff,#f7fbff);display:grid;place-items:center;font-weight:900;color:#5c8fc6;font-size:24px}.creator-cover img{width:100%;height:100%;object-fit:cover}.creator-book-copy{min-width:0;flex:1}.creator-book-copy h3{margin:0 0 7px;font-size:21px}.creator-book-copy p{margin:0}.book-progress{height:8px;background:#edf2f7;border-radius:999px;overflow:hidden;margin-top:14px}.book-progress span{height:100%;display:block;background:linear-gradient(90deg,#6caaf4,#1877f2);border-radius:inherit}.creator-book-actions{padding:14px 16px;border-top:1px solid #edf1f5;justify-content:flex-start;flex-wrap:wrap}.chapter-manager{display:grid;gap:12px}.chapter-manager-row{display:grid;grid-template-columns:54px minmax(0,1fr) auto;align-items:center;gap:16px;padding:16px}.chapter-index span{width:44px;height:44px;border-radius:14px;display:grid;place-items:center;background:#edf5ff;color:#1877f2;font-weight:800}.chapter-main h3{margin:5px 0 3px}.chapter-actions{display:flex;gap:8px;align-items:center}.status-chip{display:inline-flex;align-items:center;border-radius:999px;padding:5px 8px;font-size:11px;font-weight:800;background:#eff3f7;color:#5f7085}.status-chip.published,.status-chip.approved,.status-chip.active{background:#e7f8ef;color:#21764d}.status-chip.pending_review,.status-chip.pending,.status-chip.investigating{background:#fff5dc;color:#946719}.status-chip.rejected,.status-chip.hidden,.status-chip.banned{background:#fff0f0;color:#a84646}.status-chip.revision{background:#eef1ff;color:#5964a4}.reader-shell{max-width:1180px;margin:0 auto}.reader-topline{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}.reader-live-meta{font-size:12px;color:var(--ck-muted)}.reader-layout{display:grid;grid-template-columns:minmax(0,1fr) 260px;gap:18px}.reader-title{margin-bottom:14px;background:linear-gradient(180deg,#fff,#fbfdff)}.reader-title h1{font-size:36px;letter-spacing:-.7px;margin:6px 0}.reader-submeta{display:flex;gap:8px;color:var(--ck-muted);font-size:13px}.reader-content{padding:clamp(24px,4vw,48px);font-family:Georgia,serif;font-size:19px;line-height:1.9;letter-spacing:.01em;background:#fffdfb}.reader-content p{margin:0 0 1.15em}.reader-aside{display:grid;gap:12px;align-content:start}.reader-side-card strong{display:block;font-size:31px;margin:8px 0}.chapter-nav{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:14px}.chapter-next{display:flex;flex-direction:column;gap:4px;padding:4px}.chapter-next small{color:var(--ck-muted)}.chapter-next.next{text-align:right}.premium-lock{display:flex;align-items:center;gap:18px;padding:28px;background:linear-gradient(135deg,#eef6ff,#fff)}.premium-lock h2{margin:3px 0}.lock-orb{width:56px;height:56px;border-radius:18px;display:grid;place-items:center;background:#ddecff;color:#1877f2;font-size:26px;flex:none}.profile-premium-head,.creator-profile-hero{display:flex;gap:24px;align-items:center;padding:26px;border:1px solid #dce8f4;border-radius:22px;background:linear-gradient(135deg,#fff,#f1f7ff);margin-bottom:18px;box-shadow:var(--ck-shadow)}.profile-premium-head h1,.creator-profile-hero h1{margin:5px 0;font-size:34px}.profile-avatar-stack{position:relative;flex:none}.profile-badge{position:absolute;right:-2px;bottom:3px;border:3px solid #fff}.profile-mini-stats,.profile-stats{display:flex;gap:14px;flex-wrap:wrap;color:var(--ck-muted);font-size:12px;margin-top:12px}.profile-mini-stats b,.profile-stats b{color:var(--ck-ink)}.avatar-frame{display:inline-grid;place-items:center;padding:3px;border-radius:50%;background:#dbe8f7}.avatar-frame .avatar{border:2px solid #fff}.avatar-frame.frame-silver{background:linear-gradient(135deg,#bcc8d5,#eef2f6)}.avatar-frame.frame-gold{background:linear-gradient(135deg,#dfb34f,#fff0a8)}.avatar-frame.frame-diamond{background:linear-gradient(135deg,#67aee8,#d9f3ff)}.avatar-frame.frame-legendary{background:linear-gradient(135deg,#7c6cf1,#ffc8ec,#8bd9ff)}.avatar.xl{width:96px;height:96px;font-size:29px}.level-badge{display:inline-flex;align-items:center;justify-content:center;border-radius:999px;padding:7px 10px;background:#eaf3ff;color:#1769cf;font-size:12px;font-weight:900}.level-mini{padding:3px 6px;font-size:10px}.verified-badge{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;border-radius:50%;background:#1877f2;color:#fff;font-size:11px;font-weight:900;vertical-align:middle}.verified-badge.large{width:auto;height:auto;padding:6px 10px;border-radius:999px}.admin-live-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:16px 0}.online-list{display:grid;gap:4px}.online-row{display:flex;align-items:center;gap:10px;padding:10px;border-radius:12px}.online-row:hover{background:#f6f9fc}.online-row strong,.online-row small{display:block}.online-row small{color:var(--ck-muted);font-size:11px}.online-avatar{width:34px;height:34px;border-radius:12px;background:#e9f3ff;color:#1976ed;display:grid;place-items:center;font-weight:900}.online-dot{margin-left:auto;width:8px;height:8px;border-radius:50%;background:#39ad79;box-shadow:0 0 0 5px #e9f8f0}.health-meter{padding:16px;border-radius:15px;background:linear-gradient(135deg,#f4f9ff,#fff);border:1px solid #e4eef7;margin-bottom:12px}.health-meter strong{display:block;font-size:22px}.health-meter span{color:var(--ck-muted);font-size:12px}.provider-pills{display:flex;gap:8px;flex-wrap:wrap}.provider-pill,.integration-status{display:inline-flex;align-items:center;gap:7px;padding:7px 10px;border-radius:999px;background:#f4f6f8;font-size:12px;font-weight:800}.provider-pill.ready,.integration-status.ready{background:#eaf8f0;color:#23784e}.provider-pill.warn,.integration-status.warn{background:#fff6e4;color:#8b671e}.provider-pill i,.live-chip i{width:7px;height:7px;border-radius:50%;background:currentColor;animation:pulseDot 1.8s infinite}.settings-v20{display:grid;gap:16px}.settings-columns{display:grid;grid-template-columns:minmax(0,1fr) 330px;gap:16px}.settings-main,.settings-side{display:grid;gap:16px}.setting-stack{display:grid}.setting-row{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:13px 0;border-bottom:1px solid #edf1f5}.setting-row:last-child{border-bottom:0}.setting-row span{display:grid;gap:2px}.setting-row small{color:var(--ck-muted);font-size:12px}.feature-list{display:grid;grid-template-columns:1fr 1fr;gap:8px}.feature-list label{font-size:12px;color:var(--ck-muted)}.method-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.method-card{padding:16px;border:1px solid var(--ck-line);border-radius:15px;background:linear-gradient(180deg,#fff,#f9fbfd)}.method-card h3{margin:10px 0 4px}.auth-modern{box-shadow:var(--ck-shadow)}.auth-panel{border-radius:22px}.google-auth{margin-top:14px;display:grid;justify-items:center}.google-auth .g_id_signin{max-width:100%;width:100%}.package-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.package{position:relative;padding:18px;border-radius:17px}.package strong{font-size:22px;display:block}.package span,.package small{display:block;color:var(--ck-muted);margin-top:5px}.wallet-card{border-radius:20px;background:linear-gradient(135deg,#fff,#eef6ff);box-shadow:var(--ck-shadow)}.wallet-card.alt{background:linear-gradient(135deg,#fff,#f3f6fb)}.toast{backdrop-filter:blur(10px)}.reaction-btn{transition:transform .15s ease,background .18s ease,color .18s ease}.reaction-btn.liked{background:#eaf3ff;color:#1769cf;border-color:#bcd9fb}.reaction-btn:active{transform:scale(.94)}.comment-count{color:var(--ck-muted);font-size:13px}.empty-inline{padding:18px;color:var(--ck-muted);text-align:center}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}.user-cell{display:flex;gap:10px;align-items:center}.user-cell small,.user-cell em{display:block;font-size:11px;color:var(--ck-muted);font-style:normal}.user-actions{display:grid;gap:6px}.user-actions form{display:flex;gap:5px}.user-actions select{min-width:100px}.premium-filter{max-width:760px;margin-bottom:16px}.premium-filter input{flex:1;height:44px}.admin-overview-grid{margin-top:16px}
@media(max-width:980px){.creator-hero,.creator-dashboard-grid,.settings-columns,.reader-layout,.admin-live-grid{grid-template-columns:1fr}.reader-aside{grid-template-columns:1fr 1fr}.creator-book-grid{grid-template-columns:1fr}.method-grid,.package-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.workflow{grid-template-columns:1fr}.hero-orbit{display:none}}
@media(max-width:680px){.creator-hero{padding:24px}.creator-hero h1{font-size:34px}.creator-hero-art{display:none}.profile-premium-head,.creator-profile-hero{align-items:flex-start;flex-direction:column}.profile-premium-head h1,.creator-profile-hero h1{font-size:28px}.reader-topline{gap:8px;align-items:flex-start}.reader-live-meta{display:none}.reader-title h1{font-size:29px}.reader-content{font-size:17px;line-height:1.8;padding:22px}.chapter-manager-row{grid-template-columns:46px 1fr}.chapter-actions{grid-column:2}.reader-aside{display:none}.chapter-nav{grid-template-columns:1fr}.chapter-next.next{text-align:left}.premium-lock{align-items:flex-start;flex-direction:column}.settings-hero{padding:20px}.feature-list{grid-template-columns:1fr}.method-grid,.package-grid{grid-template-columns:1fr 1fr}.user-table{min-width:980px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;transition-duration:.01ms!important}}
/* CeritaKita V20 premium refinement */
:root{--ck-blue:#1877f2;--ck-ink:#13233a;--ck-muted:#6b7b91;--ck-line:#e1e8f0;--ck-soft:#eef6ff;--ck-bg:#f5f8fc;--ck-shadow:0 16px 48px rgba(48,92,138,.09)}
body{background:var(--ck-bg);color:var(--ck-ink)}
.lift-card,.story-card,.panel,.stat,.wallet-card,.package,.feed-card{transition:transform .22s ease,box-shadow .22s ease,border-color .22s ease}.lift-card:hover,.story-card:hover,.package:hover{transform:translateY(-4px);box-shadow:var(--ck-shadow);border-color:#d2e3f4}.panel-heading,.creator-book-top,.creator-book-actions,.comment-compose{display:flex;align-items:center;justify-content:space-between;gap:12px}
.creator-hero{display:grid;grid-template-columns:1.25fr .75fr;gap:24px;padding:36px;border:1px solid #d9e7f5;border-radius:24px;background:radial-gradient(circle at 100% 10%,#e8f3ff,transparent 45%),linear-gradient(135deg,#fff,#f1f7ff);box-shadow:var(--ck-shadow);margin-bottom:22px}.creator-hero h1{font-size:42px;line-height:1.06;letter-spacing:-1px;margin:8px 0 12px}.creator-hero p{font-size:16px;color:var(--ck-muted);max-width:650px}.creator-hero-art{min-height:190px;border-radius:20px;background:linear-gradient(135deg,#d9ecff,#f6fbff);display:flex;flex-direction:column;justify-content:center;padding:30px}.creator-hero-art span{font-size:58px;color:#1877f2;line-height:1}.creator-hero-art strong{font-size:24px}.creator-hero-art small{color:var(--ck-muted)}.creator-dashboard-grid{display:grid;grid-template-columns:1.35fr .65fr;gap:16px}.workflow{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.workflow>div{padding:18px;border:1px solid var(--ck-line);border-radius:16px;background:#f9fbfd}.workflow b{display:block;color:var(--ck-blue);font-size:12px}.workflow strong{display:block;font-size:18px;margin:6px 0}.workflow span{font-size:13px;color:var(--ck-muted)}
.creator-book-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.creator-book-card{padding:0;overflow:hidden}.creator-book-top{padding:14px 16px;border-bottom:1px solid #edf1f5;color:var(--ck-muted);font-size:12px}.creator-book-body{display:flex;gap:16px;padding:18px}.creator-cover{width:105px;aspect-ratio:3/4;flex:none;border-radius:14px;overflow:hidden;background:linear-gradient(135deg,#eaf3ff,#f7fbff);display:grid;place-items:center;font-weight:900;color:#5c8fc6;font-size:24px}.creator-cover img{width:100%;height:100%;object-fit:cover}.creator-book-copy{min-width:0;flex:1}.creator-book-copy h3{margin:0 0 7px;font-size:21px}.creator-book-copy p{margin:0}.book-progress{height:8px;background:#edf2f7;border-radius:999px;overflow:hidden;margin-top:14px}.book-progress span{height:100%;display:block;background:linear-gradient(90deg,#6caaf4,#1877f2);border-radius:inherit}.creator-book-actions{padding:14px 16px;border-top:1px solid #edf1f5;justify-content:flex-start;flex-wrap:wrap}
.chapter-manager{display:grid;gap:12px}.chapter-manager-row{display:grid;grid-template-columns:54px minmax(0,1fr) auto;align-items:center;gap:16px;padding:16px}.chapter-index span{width:44px;height:44px;border-radius:14px;display:grid;place-items:center;background:#edf5ff;color:#1877f2;font-weight:800}.chapter-main h3{margin:5px 0 3px}.chapter-actions{display:flex;gap:8px;align-items:center}.status-chip{display:inline-flex;align-items:center;border-radius:999px;padding:5px 8px;font-size:11px;font-weight:800;background:#eff3f7;color:#5f7085}.status-chip.published,.status-chip.approved,.status-chip.active{background:#e7f8ef;color:#21764d}.status-chip.pending_review,.status-chip.pending,.status-chip.investigating{background:#fff5dc;color:#946719}.status-chip.rejected,.status-chip.hidden,.status-chip.banned{background:#fff0f0;color:#a84646}.status-chip.revision{background:#eef1ff;color:#5964a4}
.reader-shell{max-width:1180px;margin:0 auto}.reader-topline{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}.reader-live-meta{font-size:12px;color:var(--ck-muted)}.reader-layout{display:grid;grid-template-columns:minmax(0,1fr) 260px;gap:18px}.reader-title{margin-bottom:14px;background:linear-gradient(180deg,#fff,#fbfdff)}.reader-title h1{font-size:36px;letter-spacing:-.7px;margin:6px 0}.reader-submeta{display:flex;gap:8px;color:var(--ck-muted);font-size:13px}.reader-content{padding:clamp(24px,4vw,48px);font-family:Georgia,serif;font-size:19px;line-height:1.9;letter-spacing:.01em;background:#fffdfb}.reader-content p{margin:0 0 1.15em}.reader-aside{display:grid;gap:12px;align-content:start}.reader-side-card strong{display:block;font-size:31px;margin:8px 0}.chapter-nav{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:14px}.chapter-next{display:flex;flex-direction:column;gap:4px;padding:4px}.chapter-next small{color:var(--ck-muted)}.chapter-next.next{text-align:right}.premium-lock{display:flex;align-items:center;gap:18px;padding:28px;background:linear-gradient(135deg,#eef6ff,#fff)}.premium-lock h2{margin:3px 0}.lock-orb{width:56px;height:56px;border-radius:18px;display:grid;place-items:center;background:#ddecff;color:#1877f2;font-size:26px;flex:none}
.profile-premium-head,.creator-profile-hero{display:flex;gap:24px;align-items:center;padding:26px;border:1px solid #dce8f4;border-radius:22px;background:linear-gradient(135deg,#fff,#f1f7ff);margin-bottom:18px;box-shadow:var(--ck-shadow)}.profile-premium-head h1,.creator-profile-hero h1{margin:5px 0;font-size:34px}.profile-avatar-stack{position:relative;flex:none}.profile-badge{position:absolute;right:-2px;bottom:3px;border:3px solid #fff}.profile-mini-stats,.profile-stats{display:flex;gap:14px;flex-wrap:wrap;color:var(--ck-muted);font-size:12px;margin-top:12px}.profile-mini-stats b,.profile-stats b{color:var(--ck-ink)}.avatar-frame{display:inline-grid;place-items:center;padding:3px;border-radius:50%;background:#dbe8f7}.avatar-frame .avatar{border:2px solid #fff}.avatar-frame.frame-silver{background:linear-gradient(135deg,#bcc8d5,#eef2f6)}.avatar-frame.frame-gold{background:linear-gradient(135deg,#dfb34f,#fff0a8)}.avatar-frame.frame-diamond{background:linear-gradient(135deg,#67aee8,#d9f3ff)}.avatar-frame.frame-legendary{background:linear-gradient(135deg,#7c6cf1,#ffc8ec,#8bd9ff)}.avatar.xl{width:96px;height:96px;font-size:29px}.level-badge{display:inline-flex;align-items:center;justify-content:center;border-radius:999px;padding:7px 10px;background:#eaf3ff;color:#1769cf;font-size:12px;font-weight:900}.level-mini{padding:3px 6px;font-size:10px}.verified-badge{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;border-radius:50%;background:#1877f2;color:#fff;font-size:11px;font-weight:900;vertical-align:middle}.verified-badge.large{width:auto;height:auto;padding:6px 10px;border-radius:999px}
.admin-live-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:16px 0}.online-list{display:grid;gap:4px}.online-row{display:flex;align-items:center;gap:10px;padding:10px;border-radius:12px}.online-row:hover{background:#f6f9fc}.online-row strong,.online-row small{display:block}.online-row small{color:var(--ck-muted);font-size:11px}.online-avatar{width:34px;height:34px;border-radius:12px;background:#e9f3ff;color:#1976ed;display:grid;place-items:center;font-weight:900}.online-dot{margin-left:auto;width:8px;height:8px;border-radius:50%;background:#39ad79;box-shadow:0 0 0 5px #e9f8f0}.health-meter{padding:16px;border-radius:15px;background:linear-gradient(135deg,#f4f9ff,#fff);border:1px solid #e4eef7;margin-bottom:12px}.health-meter strong{display:block;font-size:22px}.health-meter span{color:var(--ck-muted);font-size:12px}
.provider-pills{display:flex;gap:8px;flex-wrap:wrap}.provider-pill,.integration-status{display:inline-flex;align-items:center;gap:7px;padding:7px 10px;border-radius:999px;background:#f4f6f8;font-size:12px;font-weight:800}.provider-pill.ready,.integration-status.ready{background:#eaf8f0;color:#23784e}.provider-pill.warn,.integration-status.warn{background:#fff6e4;color:#8b671e}.provider-pill i,.live-chip i{width:7px;height:7px;border-radius:50%;background:currentColor;animation:pulseDot 1.8s infinite}.settings-v20{display:grid;gap:16px}.settings-columns{display:grid;grid-template-columns:minmax(0,1fr) 330px;gap:16px}.settings-main,.settings-side{display:grid;gap:16px}.setting-stack{display:grid}.setting-row{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:13px 0;border-bottom:1px solid #edf1f5}.setting-row:last-child{border-bottom:0}.setting-row span{display:grid;gap:2px}.setting-row small{color:var(--ck-muted);font-size:12px}.feature-list{display:grid;grid-template-columns:1fr 1fr;gap:8px}.feature-list label{font-size:12px;color:var(--ck-muted)}.method-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.method-card{padding:16px;border:1px solid var(--ck-line);border-radius:15px;background:linear-gradient(180deg,#fff,#f9fbfd)}.method-card h3{margin:10px 0 4px}.auth-modern{box-shadow:var(--ck-shadow)}.auth-panel{border-radius:22px}.google-auth{margin-top:14px;display:grid;justify-items:center}.google-auth .g_id_signin{max-width:100%;width:100%}.package-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.package{position:relative;padding:18px;border-radius:17px}.package strong{font-size:22px;display:block}.package span,.package small{display:block;color:var(--ck-muted);margin-top:5px}.wallet-card{border-radius:20px;background:linear-gradient(135deg,#fff,#eef6ff);box-shadow:var(--ck-shadow)}.wallet-card.alt{background:linear-gradient(135deg,#fff,#f3f6fb)}.toast{backdrop-filter:blur(10px)}.reaction-btn{transition:transform .15s ease,background .18s ease,color .18s ease}.reaction-btn.liked{background:#eaf3ff;color:#1769cf;border-color:#bcd9fb}.reaction-btn:active{transform:scale(.94)}.comment-count{color:var(--ck-muted);font-size:13px}.empty-inline{padding:18px;color:var(--ck-muted);text-align:center}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}.user-cell{display:flex;gap:10px;align-items:center}.user-cell small,.user-cell em{display:block;font-size:11px;color:var(--ck-muted);font-style:normal}.user-actions{display:grid;gap:6px}.user-actions form{display:flex;gap:5px}.user-actions select{min-width:100px}.premium-filter{max-width:760px;margin-bottom:16px}.premium-filter input{flex:1;height:44px}.admin-overview-grid{margin-top:16px}
@media(max-width:980px){.creator-hero,.creator-dashboard-grid,.settings-columns,.reader-layout,.admin-live-grid{grid-template-columns:1fr}.reader-aside{grid-template-columns:1fr 1fr}.creator-book-grid{grid-template-columns:1fr}.method-grid,.package-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.workflow{grid-template-columns:1fr}}
@media(max-width:680px){.creator-hero{padding:24px}.creator-hero h1{font-size:34px}.creator-hero-art{display:none}.profile-premium-head,.creator-profile-hero{align-items:flex-start;flex-direction:column}.profile-premium-head h1,.creator-profile-hero h1{font-size:28px}.reader-topline{gap:8px;align-items:flex-start}.reader-live-meta{display:none}.reader-title h1{font-size:29px}.reader-content{font-size:17px;line-height:1.8;padding:22px}.chapter-manager-row{grid-template-columns:46px 1fr}.chapter-actions{grid-column:2}.reader-aside{display:none}.chapter-nav{grid-template-columns:1fr}.chapter-next.next{text-align:left}.premium-lock{align-items:flex-start;flex-direction:column}.feature-list{grid-template-columns:1fr}.method-grid,.package-grid{grid-template-columns:1fr 1fr}.user-table{min-width:980px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;transition-duration:.01ms!important}}
/* V26 mobile overlay safety: backdrop is hidden until sidebar is explicitly open. */
@media(max-width:760px){
  .sidebar-backdrop{display:none!important;opacity:0!important;pointer-events:none!important;background:transparent!important}
  .sidebar-open .sidebar-backdrop{display:block!important;opacity:1!important;pointer-events:auto!important;background:rgba(16,24,40,.18)!important}
}

/* ========================================================================== 
   CeritaKita V32 — Premium Soft Blue Global UI Layer
   Goal: editorial / streaming feel, calm hierarchy, compact density,
   flexible sizing, predictable responsive behavior, accessible interactions.
   ========================================================================== */
:root{
  --ck-brand:#2f80ed;
  --ck-brand-strong:#216fda;
  --ck-brand-soft:#edf5ff;
  --ck-ink-strong:#12243d;
  --ck-ink:#243954;
  --ck-muted:#71839a;
  --ck-muted-2:#96a4b5;
  --ck-bg:#f3f7fb;
  --ck-surface:#ffffff;
  --ck-surface-soft:#f8fbfe;
  --ck-line:#dfe8f2;
  --ck-line-strong:#cfdceb;
  --ck-success:#2c8d69;
  --ck-danger:#bb4755;
  --ck-warning:#ad741c;
  --ck-shadow-1:0 8px 22px rgba(38,77,119,.05);
  --ck-shadow-2:0 16px 36px rgba(38,77,119,.08);
  --ck-shadow-3:0 24px 60px rgba(38,77,119,.11);
  --ck-radius-sm:10px;
  --ck-radius-md:14px;
  --ck-radius-lg:20px;
  --ck-radius-xl:26px;
}

html{background:var(--ck-bg);text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased}
body{background:
  radial-gradient(circle at 84% -18%,rgba(112,176,247,.13),transparent 29%),
  radial-gradient(circle at 8% 105%,rgba(171,205,239,.11),transparent 24%),
  var(--ck-bg);color:var(--ck-ink);font-size:15px;line-height:1.6}
body.menu-lock{overflow:hidden}
::selection{background:#dcecff;color:var(--ck-ink-strong)}
:focus-visible{outline:3px solid rgba(47,128,237,.20);outline-offset:2px}

/* ---- Global content geometry ---- */
.main-content{flex:1 1 auto;min-width:0;max-width:none!important;padding:34px clamp(18px,3vw,48px) 90px!important}
.main-content>*{width:min(100%,1380px);max-width:1380px;margin-left:auto;margin-right:auto}
.creator-content,.admin-main{max-width:none!important}
.page-shell,.story-detail-shell,.support-shell,.feed-shell,.narrow-shell,.admin-page-shell,.reader-shell{width:min(100%,1380px);margin:0 auto}
.narrow-shell{width:min(100%,920px)}
.narrow-admin-shell{width:min(100%,1040px)}
.page-heading{margin:0 0 28px;padding-top:4px}
.page-heading h1{font-size:clamp(30px,3vw,44px);line-height:1.05;letter-spacing:-.045em;margin:7px 0 10px;color:var(--ck-ink-strong)}
.page-heading p{max-width:760px;color:var(--ck-muted);margin:0}
.eyebrow{color:#66809d;font-size:10px;line-height:1.2;font-weight:800;letter-spacing:.13em}
.section-head{align-items:center;gap:18px;margin:0 0 16px;padding:0}
.section-head h1,.section-head h2{color:var(--ck-ink-strong);letter-spacing:-.035em}
.section-head h2{font-size:clamp(22px,2vw,30px);margin:5px 0 0}
.home-section{margin-top:42px}
.first-home-section{margin-top:16px}

/* ---- Topbar / shell ---- */
.topbar{height:68px;min-height:68px;background:rgba(255,255,255,.88);backdrop-filter:saturate(130%) blur(18px);-webkit-backdrop-filter:saturate(130%) blur(18px);border-bottom:1px solid rgba(217,227,238,.95);box-shadow:0 1px 0 rgba(20,50,84,.025);z-index:1200}
.topbar-inner{height:68px;max-width:1600px;padding:0 clamp(14px,2.5vw,34px);gap:14px}
.brand{gap:10px;font-size:14px;color:var(--ck-ink-strong)}
.brand-mark{width:38px;height:38px;border-radius:12px;background:linear-gradient(145deg,#4f98f4,#2779e4);box-shadow:0 8px 20px rgba(47,128,237,.20)}
.global-search{height:42px;border:1px solid transparent;background:#eef4fa;border-radius:13px;box-shadow:none}
.global-search:focus-within{background:#fff;border-color:#cfe0f2;box-shadow:0 0 0 4px rgba(47,128,237,.07)}
.top-actions{gap:8px}
.top-icon,.icon-button{width:40px;height:40px;border-radius:12px;border-color:#d8e2ed;background:rgba(255,255,255,.95);box-shadow:var(--ck-shadow-1);color:#49637f}
.top-icon:hover,.icon-button:hover{background:#f7fbff;border-color:#cbdced;color:var(--ck-brand);transform:translateY(-1px)}
.profile-trigger{min-height:42px;border:1px solid #d7e2ee;border-radius:14px;background:#fff;color:var(--ck-ink);box-shadow:var(--ck-shadow-1);padding:4px 9px 4px 5px}
.profile-trigger:hover{background:#f9fcff}

/* Notification popover in header */
.header-notification{position:relative}
.notification-popover{position:absolute;right:0;top:calc(100% + 10px);width:min(390px,calc(100vw - 24px));padding:8px;border:1px solid var(--ck-line);border-radius:18px;background:rgba(255,255,255,.98);box-shadow:var(--ck-shadow-3);display:none;z-index:1500}
.header-notification.open .notification-popover{display:block;animation:ckDropIn .16s ease}
.notification-popover-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 10px 8px}
.notification-popover-head strong{font-size:14px;color:var(--ck-ink-strong)}
.notification-popover-head a{font-size:11px;font-weight:800;color:var(--ck-brand)}
.notification-item{display:grid;gap:3px;padding:11px 12px;border-radius:12px;color:inherit}
.notification-item:hover{background:#f5f9fd}
.notification-item.unread{background:#eef6ff}
.notification-item strong{font-size:12px;color:var(--ck-ink-strong)}
.notification-item span{font-size:12px;color:var(--ck-muted)}
.notification-item small{font-size:10px;color:var(--ck-muted-2)}
.notification-empty{text-align:center;padding:24px 12px;color:var(--ck-muted);font-size:12px}

/* ---- Sidebar: real collapse, not text-only hiding ---- */
.sidebar{width:248px!important;flex:0 0 248px!important;background:rgba(255,255,255,.92);border-right:1px solid var(--ck-line);box-shadow:8px 0 28px rgba(34,70,108,.025);transition:width .22s ease,flex-basis .22s ease,transform .24s ease;z-index:1100}
.sidebar-scroll{padding:14px 12px 20px;overscroll-behavior:contain}
.sidebar-title-row{padding:10px 9px 14px}
.side-item{min-height:42px;padding:10px 12px;border:1px solid transparent;border-radius:12px;color:#586f88;transition:background .18s ease,border-color .18s ease,color .18s ease,transform .18s ease}
.side-item:hover{background:#f6faff;color:var(--ck-ink-strong);transform:translateX(1px)}
.side-item.active{background:linear-gradient(100deg,#eaf3ff,#f4f9ff);border-color:#d6e7fb;color:var(--ck-brand);box-shadow:none}
.sidebar-collapsed .sidebar{width:78px!important;flex-basis:78px!important}
.sidebar-collapsed .sidebar-scroll{padding-inline:10px}
.sidebar-collapsed .sidebar-title-row{justify-content:center}
.sidebar-collapsed .sidebar-title-row>span,.sidebar-collapsed .side-caption,.sidebar-collapsed .side-text,.sidebar-collapsed .side-badge,.sidebar-collapsed .side-submit .side-text{display:none!important}
.sidebar-collapsed .side-item{justify-content:center;padding-inline:8px}
.sidebar-collapsed .side-icon{width:22px;flex-basis:22px}
.sidebar-collapsed .sidebar-footer{padding-top:8px}
.sidebar-collapsed .main-content{padding-left:clamp(22px,3.8vw,58px)!important;padding-right:clamp(22px,3.8vw,58px)!important}
.sidebar-backdrop{z-index:1000!important;background:rgba(21,42,68,.14)!important;backdrop-filter:blur(1px)}

/* ---- Surfaces / panels ---- */
.panel{background:rgba(255,255,255,.96);border:1px solid var(--ck-line);border-radius:var(--ck-radius-lg);box-shadow:var(--ck-shadow-1);padding:24px}
.panel:hover{border-color:#d6e3ef}
.hero,.home-hero-premium,.spotlight-card,.community-panel,.referral-hero,.leaderboard-hero{box-shadow:var(--ck-shadow-2);border-color:#d7e5f2}
.home-hero-premium{padding:42px;grid-template-columns:minmax(0,1fr) minmax(260px,.55fr);border-radius:26px;overflow:hidden}
.hero-copy h1{font-size:clamp(42px,4.4vw,66px);line-height:.98;letter-spacing:-.055em}
.hero-copy p{font-size:16px;color:var(--ck-muted)}
.spotlight-card{border-radius:20px}

/* ---- Buttons / forms ---- */
.btn{min-height:40px;padding:9px 14px;border:1px solid #d6e1ed;border-radius:11px;background:#fff;color:var(--ck-ink);font-weight:750;box-shadow:none;transition:transform .16s ease,box-shadow .16s ease,background .16s ease,border-color .16s ease,color .16s ease}
.btn:hover{transform:translateY(-1px);background:#f9fcff;border-color:#c8daeb;box-shadow:0 8px 18px rgba(36,76,117,.07)}
.btn:active{transform:translateY(0) scale(.985)}
.btn-primary{color:#fff;border-color:#2f80ed;background:linear-gradient(180deg,#3a89ef,#2879e5);box-shadow:0 8px 18px rgba(47,128,237,.18)}
.btn-primary:hover{color:#fff;background:linear-gradient(180deg,#3483ea,#216fda);box-shadow:0 10px 24px rgba(47,128,237,.22)}
.btn-soft{background:#eef6ff;border-color:#d5e7fb;color:#2869b0}
.btn-danger{background:#fff4f5!important;border-color:#f0cdd1!important;color:var(--ck-danger)!important}
.btn-success{background:#eef9f3!important;border-color:#cbe7d7!important;color:var(--ck-success)!important}
.field input,.field select,.field textarea,.searchbar input,.search-field,.filter input,.filter select,.filter-bar select,.auth-form input,.voucher-form input,.ticket-reply textarea,.support-form input,.support-form textarea{border:1px solid #d4e0eb;border-radius:12px;background:#fff;color:var(--ck-ink);box-shadow:inset 0 1px 0 rgba(18,36,61,.015);transition:border-color .16s ease,box-shadow .16s ease,background .16s ease}
.field textarea,.support-form textarea,.ticket-reply textarea{min-height:170px}
.field input:focus,.field select:focus,.field textarea:focus,.voucher-form input:focus,.ticket-reply textarea:focus,.support-form input:focus,.support-form textarea:focus{border-color:#91bdf0;background:#fff;box-shadow:0 0 0 4px rgba(47,128,237,.08)}
.field-large-textarea{min-height:260px!important;resize:vertical}
.form-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap;margin-top:14px}

/* ---- Poster cards / streaming-style catalog ---- */
.story-grid{grid-template-columns:repeat(auto-fill,minmax(188px,1fr))!important;gap:24px!important;align-items:start}
.story-grid-compact{grid-template-columns:repeat(auto-fill,minmax(188px,1fr))!important}
.story-card.poster-card{border:0;background:transparent;overflow:visible;border-radius:0;box-shadow:none;min-width:0}
.poster-card .story-cover{aspect-ratio:2/3;background:#dde8f3;border-radius:16px;box-shadow:0 8px 22px rgba(27,62,98,.08);overflow:hidden}
.poster-card .story-cover img,.poster-card .story-cover .cover-image{object-fit:cover;width:100%;height:100%;transition:transform .45s cubic-bezier(.2,.7,.2,1),filter .35s ease}
.poster-card .story-cover:before{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgba(11,33,56,.17),transparent 22%,transparent 58%,rgba(8,25,45,.10));z-index:1;pointer-events:none}
.poster-card:hover .story-cover{box-shadow:0 18px 38px rgba(33,72,112,.14);transform:translateY(-3px)}
.poster-card:hover .story-cover img{transform:scale(1.035);filter:saturate(1.02)}
.poster-shade{position:absolute;inset:45% 0 0;background:linear-gradient(to bottom,transparent,rgba(5,22,42,.62));z-index:2;pointer-events:none}
.poster-creator{position:absolute;left:12px;top:12px;z-index:3;padding:6px 8px;border:1px solid rgba(255,255,255,.20);border-radius:999px;background:rgba(20,42,67,.50);backdrop-filter:blur(9px);color:#fff;font-size:10px;font-weight:800;max-width:70%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.poster-rating{position:absolute;right:10px;top:10px;z-index:3;padding:6px 8px;border-radius:999px;background:rgba(255,255,255,.92);border:1px solid rgba(224,235,246,.9);color:#2e557a;font-size:10px;font-weight:900;box-shadow:0 4px 12px rgba(14,42,72,.08)}
.poster-rating small{font-weight:700;color:#8697a9;margin-left:3px}
.poster-card .poster-body{padding:11px 3px 0;text-align:center}
.poster-card .poster-body h3{font-size:15px;line-height:1.26;letter-spacing:-.015em;margin:0;color:var(--ck-ink-strong);display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
.poster-card .poster-body h3 a{color:inherit}
.poster-card .poster-body h3 a:hover{color:var(--ck-brand)}
.poster-card .cover-fallback{font-size:46px!important;background:linear-gradient(145deg,#dcecff,#f5f9fe)}
.poster-card .row-top,.poster-card .author,.poster-card .clamp,.poster-card .story-meta{display:none!important}
.library-actions{display:flex;gap:8px;justify-content:center;margin-top:10px}
.library-poster .poster-body{text-align:center}
.library-grid{margin-top:8px}

/* ---- Rating / comments ---- */
.story-detail-grid{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:22px;align-items:start}
.story-detail-hero{display:grid;grid-template-columns:220px minmax(0,1fr);gap:28px;align-items:center;margin-bottom:24px;padding:28px}
.story-detail-cover{aspect-ratio:2/3;border-radius:18px;overflow:hidden;background:#e6eef7;box-shadow:var(--ck-shadow-2)}
.story-detail-cover img{width:100%;height:100%;object-fit:cover;display:block}
.story-detail-main h1{font-size:clamp(34px,4vw,56px);line-height:.98;letter-spacing:-.055em;margin:7px 0 9px;color:var(--ck-ink-strong)}
.story-creator-link{font-size:13px;color:#4373a6;font-weight:750}
.story-detail-rating{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin:14px 0;color:var(--ck-muted);font-size:12px}
.rating-stars,.review-rating{color:#d2922c}
.story-detail-synopsis{max-width:760px;color:#64788f;font-size:15px;line-height:1.8;white-space:normal}
.story-detail-actions{display:flex;gap:9px;align-items:center;flex-wrap:wrap;margin-top:18px}
.story-detail-actions form{margin:0}
.story-section{margin-top:20px}
.sticky-story-card{position:sticky;top:92px}
.mini-stat{display:flex;align-items:baseline;justify-content:space-between;gap:10px;padding:10px 0;border-bottom:1px solid #edf2f7}.mini-stat strong{font-size:24px;color:var(--ck-ink-strong)}.mini-stat span{font-size:11px;color:var(--ck-muted)}.aside-divider{height:1px;background:#edf2f7;margin:14px 0}
.chapter-row{padding:15px 17px;border-color:#e9eff5;min-height:70px;align-items:center}.chapter-row>span:first-child{display:grid;gap:3px}.chapter-row strong{font-size:13px;color:var(--ck-ink-strong)}.chapter-row small{font-size:12px;color:var(--ck-muted);display:block;max-width:520px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chapter-access{font-size:11px;font-weight:800;color:#54718e;white-space:nowrap}
.rating-summary{display:grid;justify-items:end;gap:1px}.rating-summary strong{font-size:24px;color:#c98727}.rating-summary span{font-size:11px;color:var(--ck-muted)}
.review-compose{display:grid;grid-template-columns:160px minmax(0,1fr) auto;gap:10px;align-items:stretch;margin-bottom:18px;padding:16px;border:1px solid #e2ebf3;border-radius:14px;background:#f9fbfe}
.review-compose select{height:46px;border:1px solid #d5e1ed;border-radius:11px;background:#fff;padding:0 10px;font-weight:800;color:#3b5975}.review-compose textarea{min-height:90px;border:1px solid #d5e1ed;border-radius:11px;padding:11px 12px;resize:vertical}.review-list{display:grid;gap:10px}.review-card{padding:15px 0;border-top:1px solid #edf2f7}.review-card:first-child{border-top:0}.review-card-head{display:flex;justify-content:space-between;gap:12px;align-items:center}.review-author,.comment-author{display:flex;align-items:center;gap:10px}.review-author>div,.comment-author>div{display:grid;gap:2px}.review-author small,.comment-author small{font-size:10px;color:var(--ck-muted-2)}.review-card p{margin:10px 0 0;color:#52687f;line-height:1.7}
.comment-compose-form{padding:16px;border:1px solid #dce7f1;border-radius:15px;background:linear-gradient(180deg,#fbfdff,#f6faff)}.comment-compose-form textarea{width:100%;min-height:110px;border:1px solid #d5e1ed;border-radius:12px;padding:12px;resize:vertical}.comment-compose-footer{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-top:10px}.comment-thread{display:grid;gap:11px;margin-top:16px}.comment-card{padding:16px;border:1px solid #e2eaf2;border-radius:15px;background:#fff;box-shadow:0 4px 14px rgba(29,67,104,.035)}.comment-card.reply{background:#f8fbfe;border-color:#e8eef5}.comment-head{display:flex;justify-content:space-between;gap:12px;align-items:center}.comment-body{margin:11px 0;color:#405b77;white-space:normal;word-break:break-word}.comment-actions{display:flex;gap:7px;align-items:center}.comment-like-btn,.comment-reply-toggle,.ghost-more{border:1px solid #d9e4ef;background:#fff;color:#627992;border-radius:999px;padding:7px 10px;font-size:11px;font-weight:800;cursor:pointer}.comment-like-btn:hover,.comment-reply-toggle:hover,.ghost-more:hover{border-color:#c4d8eb;background:#f6faff}.comment-like-btn.liked{background:#edf5ff;color:#256db9;border-color:#c9def4}.comment-like-btn span:first-child{font-size:12px}.reply-stack{display:grid;gap:9px;margin-top:10px;margin-left:36px}.reply-box{display:none;grid-template-columns:minmax(0,1fr) auto;gap:8px;margin:12px 0 0 36px}.reply-box.open{display:grid}.reply-box input{height:40px;border:1px solid #d4e0eb;border-radius:10px;padding:0 11px}.login-prompt{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 16px;border-radius:14px;background:#f4f8fd;border:1px solid #deebf6}
.report-dialog{width:min(520px,calc(100vw - 28px));border:1px solid #dce7f1;border-radius:18px;padding:0;box-shadow:var(--ck-shadow-3)}.report-dialog::backdrop{background:rgba(20,40,62,.38);backdrop-filter:blur(2px)}.report-dialog form{display:grid;gap:12px;padding:20px}.report-dialog h3{margin:0;color:var(--ck-ink-strong)}.report-dialog label{display:grid;gap:6px;font-size:12px;font-weight:800;color:#526c86}.report-dialog select,.report-dialog textarea{border:1px solid #d4e0eb;border-radius:10px;padding:9px;background:#fff}.report-dialog textarea{min-height:110px;resize:vertical}

/* ---- Feed ---- */
.feed-list{max-width:860px!important;margin-left:auto;margin-right:auto}
.feed-card.premium-feed-card{padding:20px;border-radius:20px;background:rgba(255,255,255,.97);border:1px solid var(--ck-line);box-shadow:var(--ck-shadow-1);margin-bottom:14px}
.feed-card-head{display:flex;justify-content:space-between;gap:12px;align-items:center}.feed-author{display:flex;gap:10px;align-items:center}.feed-author-name{display:flex;gap:5px;align-items:center}.feed-author small{display:block;font-size:10px;color:var(--ck-muted-2);margin-top:2px}.post-body{font-size:15px;line-height:1.82;color:#38536f;margin:17px 0}.post-actions{display:flex;align-items:center;gap:8px;border-top:1px solid #edf2f7;padding-top:11px}.reaction-btn{min-height:36px;padding:7px 11px;border:1px solid #d9e3ee;border-radius:999px;background:#fff;color:#58708a}.reaction-btn:hover{background:#f4f8fd;border-color:#c9dbea}.inline-comments{display:grid;gap:7px;margin-top:10px}.inline-comment{padding:10px 12px;border-radius:11px;background:#f7fafe;border:1px solid #e6eef6}.inline-comment p{margin:4px 0;color:#516c87;font-size:12px}.inline-comment small{font-size:10px;color:#9aa8b8}.comment-form{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;padding-top:11px}.comment-form input{height:40px;padding:0 11px;border:1px solid #d5e1ed;border-radius:11px;background:#fbfdff}

/* ---- Wallet ---- */
.wallet-hero{display:grid;grid-template-columns:minmax(0,1fr) minmax(250px,.65fr);gap:18px;align-items:center;padding:30px;border:1px solid #d7e5f2;border-radius:22px;background:linear-gradient(135deg,#fff 0%,#f6faff 58%,#edf6ff 100%);box-shadow:var(--ck-shadow-2);margin-bottom:18px}
.wallet-hero h1{font-size:clamp(32px,3.7vw,48px);letter-spacing:-.045em;margin:7px 0}.wallet-hero p{margin:0;color:var(--ck-muted)}.wallet-total{justify-self:end;min-width:230px;padding:18px 20px;border:1px solid #d8e6f3;border-radius:18px;background:#fff;box-shadow:var(--ck-shadow-1)}.wallet-total span,.wallet-total small{display:block;color:var(--ck-muted);font-size:11px}.wallet-total strong{display:block;font-size:38px;letter-spacing:-.04em;color:var(--ck-ink-strong);margin:3px 0}
.wallet-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-bottom:18px}.wallet-card{padding:20px;border:1px solid var(--ck-line);border-radius:18px;background:linear-gradient(135deg,#fff,#f2f7fc);box-shadow:var(--ck-shadow-1)}.wallet-card.alt{background:linear-gradient(135deg,#fff,#f7fbff)}.wallet-card span{font-size:11px;color:var(--ck-muted);font-weight:800;text-transform:uppercase;letter-spacing:.09em}.wallet-card strong{display:block;margin:5px 0;font-size:32px;color:var(--ck-ink-strong)}.wallet-card small{color:var(--ck-muted)}
.topup-panel .package-grid{margin-top:22px}.package-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.package{min-width:0;padding:19px;border:1px solid #dce7f1;border-radius:17px;background:#fff;box-shadow:var(--ck-shadow-1)}.package:hover{box-shadow:var(--ck-shadow-2)}.package.featured{border-color:#c4daf0;background:linear-gradient(180deg,#fff,#f5faff)}.package strong{font-size:25px;color:var(--ck-ink-strong)}.package-ribbon{position:static;display:inline-flex!important;width:max-content;margin-bottom:8px;padding:5px 8px;border-radius:999px;background:#eaf4ff!important;color:#2c6eae!important;font-size:10px!important;font-weight:900}.voucher-form{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px}.voucher-form input{height:44px;padding:0 12px}.wallet-transaction-list{display:grid}.wallet-tx{display:flex;justify-content:space-between;gap:14px;align-items:center;padding:13px 0;border-bottom:1px solid #edf2f7}.wallet-tx:last-child{border-bottom:0}.wallet-tx strong{display:block;color:var(--ck-ink-strong);font-size:12px}.wallet-tx small{display:block;margin-top:2px;color:var(--ck-muted-2);font-size:10px}.wallet-tx b{white-space:nowrap}.wallet-tx b.positive{color:var(--ck-success)}.wallet-tx b.negative{color:var(--ck-danger)}

/* ---- Creator workspace / forms ---- */
.creator-content{padding-top:30px!important}
.creator-content .panel,.admin-main .panel{box-shadow:var(--ck-shadow-1)}
.creator-content .form-grid{gap:18px}.creator-content .field.full{grid-column:1/-1}.creator-content .field textarea{min-height:280px}
.image-upload-control{display:grid;grid-template-columns:140px minmax(0,1fr);gap:14px;align-items:center}.image-preview-box{width:140px;aspect-ratio:2/3;border:1px solid #d6e2ee;border-radius:14px;background:linear-gradient(145deg,#edf5fe,#f8fbff);display:grid;place-items:center;overflow:hidden;color:#8aa0b5;font-size:11px}.image-preview-box img{width:100%;height:100%;object-fit:cover;display:block}
.creator-content .admin-dashboard-head{display:flex;justify-content:space-between;gap:20px;align-items:flex-start;margin-bottom:20px}.chapter-manager{gap:12px}.chapter-manager-row{grid-template-columns:54px minmax(0,1fr) auto;gap:16px;padding:18px}.chapter-manager-row:hover{transform:translateY(-1px);box-shadow:var(--ck-shadow-1)}.chapter-index span{width:44px;height:44px;border-radius:13px;background:#eff6ff;color:var(--ck-brand)}
.field-hint,.notice{color:var(--ck-muted);font-size:12px}

/* ---- Support center ---- */
.support-toolbar{display:flex;justify-content:flex-end;margin:-10px 0 14px}.support-list{display:grid;gap:11px}.support-ticket-card{display:flex;justify-content:space-between;gap:18px;align-items:center;padding:18px 20px;border:1px solid var(--ck-line);border-radius:16px;background:#fff;box-shadow:var(--ck-shadow-1);transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease}.support-ticket-card:hover{transform:translateY(-2px);box-shadow:var(--ck-shadow-2);border-color:#cadceb}.support-ticket-card h3{margin:4px 0;font-size:16px;color:var(--ck-ink-strong)}.support-ticket-card p{margin:0;color:var(--ck-muted);font-size:12px}.support-ticket-id{font-size:10px;font-weight:900;color:var(--ck-brand);letter-spacing:.08em}.support-ticket-meta{display:grid;justify-items:end;gap:7px}.support-ticket-meta small{font-size:10px;color:var(--ck-muted-2)}.support-form{display:grid;gap:16px}.ticket-header-meta{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.ticket-thread{padding:0;overflow:hidden}.ticket-message-list{display:grid;gap:10px;padding:20px;background:#f9fbfe}.ticket-message{max-width:82%;padding:13px 15px;border:1px solid #dfe8f1;border-radius:15px 15px 15px 6px;background:#fff}.ticket-message.is-admin{margin-left:auto;border-radius:15px 15px 6px 15px;background:#edf6ff;border-color:#d3e7fb}.ticket-message-head{display:flex;justify-content:space-between;gap:12px;align-items:center}.ticket-message-head strong{font-size:12px;color:var(--ck-ink-strong)}.ticket-message-head small{font-size:9px;color:var(--ck-muted-2)}.ticket-message p{margin:8px 0 0;font-size:13px;line-height:1.7;color:#45607b}.ticket-reply{display:grid;gap:10px;padding:18px;border-top:1px solid #e8eef4;background:#fff}.ticket-admin-actions{display:flex;justify-content:flex-end;gap:8px;align-items:center;flex-wrap:wrap}.ticket-admin-actions select{height:40px;border:1px solid #d5e1ed;border-radius:10px;padding:0 10px;background:#fff}.ticket-closed-note{padding:15px 18px;border-top:1px solid #edf2f7;color:var(--ck-muted);font-size:12px}
.support-table td>small,.support-table a+small{display:block;color:var(--ck-muted-2);font-size:10px;margin-top:3px}.table-link{font-weight:800;color:var(--ck-ink-strong)}.priority-pill{display:inline-flex;padding:5px 8px;border-radius:999px;font-size:10px;font-weight:900}.priority-low{background:#f1f5f8;color:#65788d}.priority-normal{background:#edf6ff;color:#2a6eae}.priority-high{background:#fff6e5;color:#a16f1c}.priority-urgent{background:#fff0f2;color:#b54453}
.status-chip.waiting_admin{background:#eef6ff;color:#2c6faa}.status-chip.waiting_user{background:#f2f6fa;color:#667b91}.status-chip.open{background:#eaf8f2;color:#267b58}.status-chip.resolved,.status-chip.closed{background:#f1f5f8;color:#62768b}

/* ---- Notifications / toast ---- */
.toast-stack{position:fixed;right:18px;bottom:18px;z-index:1900;display:grid;gap:8px;width:min(380px,calc(100vw - 24px));pointer-events:none}.toast{pointer-events:auto;padding:12px 14px;border:1px solid #d7e5f2;background:rgba(255,255,255,.96);border-radius:14px;box-shadow:var(--ck-shadow-2);font-size:12px;font-weight:800;color:var(--ck-ink);animation:ckToastIn .2s ease}.toast.error{border-color:#efcfd3;background:#fff7f8;color:var(--ck-danger)}.toast.success{border-color:#cde7da;background:#f7fcf9;color:var(--ck-success)}

/* ---- Admin ---- */
.admin-app .main-content{background:linear-gradient(180deg,#f5f8fc,#f1f5f9)}
.admin-page-shell{width:min(100%,1440px)}.admin-grid{display:block}.admin-side{display:none}.admin-main{max-width:none}.admin-main>h1,.admin-page-shell h1{color:var(--ck-ink-strong);letter-spacing:-.045em}
.data-table{min-width:760px}.data-table th{background:#f7fafc;color:#71859c;text-transform:uppercase;letter-spacing:.07em;font-size:10px}.data-table td{font-size:12px;color:#4d657e}.data-table tr:hover td{background:#fbfdff}

/* ---- Footer ---- */
.site-footer{margin-top:42px;border-top:1px solid #dfe8f1;background:rgba(255,255,255,.72)}.footer-inner{max-width:1380px;padding:28px 22px;color:#71839a}.footer-inner b{color:var(--ck-ink-strong)}

/* ---- Mobile / tablet ---- */
@media(max-width:1100px){
  .story-grid,.story-grid-compact{grid-template-columns:repeat(4,minmax(0,1fr))!important}
  .story-detail-grid{grid-template-columns:1fr}.story-detail-aside{display:none}.story-detail-hero{grid-template-columns:180px minmax(0,1fr)}
  .package-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:900px){
  .topbar,.topbar-inner{height:64px;min-height:64px}.topbar-inner{padding-inline:12px}.mobile-only{display:grid!important}
  .sidebar{position:fixed;top:64px;left:0;height:calc(100dvh - 64px);width:min(84vw,300px)!important;flex-basis:min(84vw,300px)!important;transform:translate3d(-105%,0,0);box-shadow:18px 0 38px rgba(21,52,84,.18)}.sidebar-open .sidebar{transform:translate3d(0,0,0)}
  .sidebar-collapsed .sidebar{width:min(84vw,300px)!important;flex-basis:min(84vw,300px)!important}.sidebar-collapsed .side-text,.sidebar-collapsed .side-caption,.sidebar-collapsed .sidebar-title-row>span{display:block!important}.sidebar-collapsed .side-item{justify-content:flex-start;padding:10px 12px}
  .main-content{padding:22px 14px 88px!important}.main-content>*{width:100%;max-width:none}.page-heading h1{font-size:32px}.home-hero-premium{grid-template-columns:1fr;padding:30px 22px}.hero-orbit{min-height:210px}.hero-copy h1{font-size:42px}
  .story-grid,.story-grid-compact{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:18px!important}.wallet-hero{grid-template-columns:1fr}.wallet-total{justify-self:stretch}.review-compose{grid-template-columns:1fr}.image-upload-control{grid-template-columns:110px minmax(0,1fr)}.image-preview-box{width:110px}
}
@media(max-width:680px){
  .story-grid,.story-grid-compact{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:16px 12px!important}
  .poster-card .story-cover{border-radius:13px}.poster-card .poster-body h3{font-size:14px}.poster-creator{left:9px;top:9px}.poster-rating{right:8px;top:8px}
  .story-detail-hero{grid-template-columns:110px minmax(0,1fr);gap:15px;padding:17px}.story-detail-main h1{font-size:30px}.story-detail-synopsis{font-size:13px;line-height:1.65}.story-detail-actions{gap:7px}.story-detail-actions .btn{flex:0 0 auto}.comment-compose-footer{align-items:flex-start;flex-direction:column}.reply-stack,.reply-box{margin-left:17px}.ticket-message{max-width:94%}.support-ticket-card{align-items:flex-start;flex-direction:column}.support-ticket-meta{justify-items:start}.comment-form{grid-template-columns:1fr}.wallet-grid{grid-template-columns:1fr}.package-grid{grid-template-columns:1fr 1fr}.voucher-form{grid-template-columns:1fr}.wallet-total strong{font-size:34px}.footer-inner{padding:24px 14px}.notification-popover{right:-8px}.creator-content .admin-dashboard-head{flex-direction:column}.creator-content .admin-dashboard-head .actions,.creator-content .admin-dashboard-head .actions .btn{width:100%}
}
@media(max-width:430px){
  .story-grid,.story-grid-compact{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:14px 9px!important}.poster-card .poster-body{padding-inline:1px}.poster-card .poster-body h3{font-size:13px}.package-grid{grid-template-columns:1fr}.story-detail-hero{grid-template-columns:86px minmax(0,1fr);padding:14px}.story-detail-main h1{font-size:26px}.story-detail-rating{font-size:10px}.story-detail-synopsis{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:5;overflow:hidden}.section-head{align-items:flex-start}.section-head h2{font-size:22px}.panel{padding:18px}.wallet-card strong{font-size:28px}.support-list{gap:9px}.top-actions{gap:5px}.profile-name{display:none}.global-search{max-width:none}.header-notification .top-icon{width:38px;height:38px}.mobile-bottom{height:66px}.mobile-bottom a{font-size:9px}
}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}.poster-card:hover .story-cover img,.poster-card:hover .story-cover{transform:none}}

@keyframes ckDropIn{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}
@keyframes ckToastIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}

/* ======================================================================
   CeritaKita — HOME CATALOG ONLY / POSTER CARD FIX
   Target: cards shown in the home sections such as "Trending sekarang".
   Does not alter the global card system or unrelated pages.
   ====================================================================== */
.reader-app .story-card.poster-card{
  display:flex!important;
  flex-direction:column!important;
  align-items:stretch!important;
  justify-content:flex-start!important;
  width:100%!important;
  height:auto!important;
  min-height:0!important;
  min-width:0!important;
  align-self:start!important;
  justify-self:start!important;
}

.reader-app .story-card.poster-card > .story-cover{
  order:0!important;
  position:relative!important;
  display:block!important;
  flex:0 0 auto!important;
  width:100%!important;
  height:auto!important;
  min-height:0!important;
  aspect-ratio:2/3!important;
  margin:0!important;
  overflow:hidden!important;
}

.reader-app .story-card.poster-card > .story-body{
  order:1!important;
  display:block!important;
  position:static!important;
  width:100%!important;
  height:auto!important;
  min-height:0!important;
  margin:0!important;
  padding:11px 3px 0!important;
  text-align:center!important;
}

/* Generic .story-cover > span previously gives every direct span
   width/height:100%. Only the fallback and shade should keep that behavior. */
.reader-app .story-card.poster-card > .story-cover > .cover-fallback{
  position:absolute!important;
  inset:0!important;
  width:100%!important;
  height:100%!important;
  display:grid!important;
  place-items:center!important;
  z-index:0!important;
}

.reader-app .story-card.poster-card > .story-cover > .poster-shade{
  position:absolute!important;
  inset:45% 0 0!important;
  width:100%!important;
  height:auto!important;
  display:block!important;
  z-index:2!important;
  pointer-events:none!important;
}

.reader-app .story-card.poster-card > .story-cover > .poster-creator{
  position:absolute!important;
  left:12px!important;
  top:12px!important;
  right:auto!important;
  bottom:auto!important;
  width:auto!important;
  height:auto!important;
  min-width:0!important;
  min-height:0!important;
  display:inline-flex!important;
  z-index:4!important;
}

.reader-app .story-card.poster-card > .story-cover > .poster-rating{
  position:absolute!important;
  left:auto!important;
  top:10px!important;
  right:10px!important;
  bottom:auto!important;
  width:auto!important;
  height:auto!important;
  min-width:0!important;
  min-height:0!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  z-index:4!important;
  box-sizing:border-box!important;
  white-space:nowrap!important;
}

.reader-app .story-card.poster-card > .story-cover > img,
.reader-app .story-card.poster-card > .story-cover > .cover-image{
  position:relative!important;
  z-index:0!important;
  display:block!important;
  width:100%!important;
  height:100%!important;
  object-fit:cover!important;
}

@media(max-width:680px){
  .reader-app .story-card.poster-card > .story-cover > .poster-creator{
    left:9px!important;
    top:9px!important;
  }
  .reader-app .story-card.poster-card > .story-cover > .poster-rating{
    top:8px!important;
    right:8px!important;
  }
}


/* V29 premium/reader/monetization layer */
:root{--ck-bg:#f5f8fc;--ck-card:#fff;--ck-text:#142942;--ck-muted:#71839a;--ck-line:#dce7f1;--ck-blue:#2f80ed;--ck-soft:#edf5ff;--ck-danger:#c44d58;--ck-shadow:0 16px 50px rgba(35,65,95,.07)}
html[data-theme="dark"]{--ck-bg:#0f1722;--ck-card:#151f2d;--ck-text:#eef5fc;--ck-muted:#9aabc0;--ck-line:#2a3a4e;--ck-soft:#1b2a3d;--ck-shadow:0 18px 55px rgba(0,0,0,.25)}
html[data-theme="dark"] body{background:var(--ck-bg);color:var(--ck-text)}html[data-theme="dark"] .panel,html[data-theme="dark"] .stat,html[data-theme="dark"] .creator-public-hero,html[data-theme="dark"] .story-hero,html[data-theme="dark"] .chapter-manager-row,html[data-theme="dark"] .chapter-manager-stat{background:var(--ck-card);border-color:var(--ck-line);color:var(--ck-text)}
html[data-theme="dark"] input,html[data-theme="dark"] textarea,html[data-theme="dark"] select{background:#111b28;color:var(--ck-text);border-color:var(--ck-line)}
.theme-toggle{font-size:16px}.studio-page,.story-page,.creator-public-page,.leaderboard-page{max-width:1180px;margin:0 auto}.studio-heading,.leaderboard-heading,.section-heading-row,.studio-section-head{display:flex;justify-content:space-between;gap:20px;align-items:flex-end;margin-bottom:22px}.studio-heading h1,.leaderboard-heading h1{margin:.3rem 0;font-size:38px;letter-spacing:-.045em}.studio-heading p,.leaderboard-heading p{margin:0;max-width:760px;color:var(--ck-muted);line-height:1.65}
.money-hero{display:flex;justify-content:space-between;align-items:center;padding:28px;margin-bottom:14px;background:linear-gradient(135deg,#f7fbff,#edf5ff)}.money-hero strong{display:block;font-size:36px;letter-spacing:-.04em}.money-hero small{display:block;margin-top:4px;color:var(--ck-muted)}.money-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:18px}.money-stats .panel{padding:18px}.money-stats span,.money-stats small{color:var(--ck-muted);font-size:12px}.money-stats strong{display:block;margin-top:8px;font-size:22px}.money-steps{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-top:18px}.money-steps>div{padding:16px;border:1px solid var(--ck-line);border-radius:14px}.money-steps b{display:block;color:var(--ck-blue);font-size:11px}.money-steps strong{display:block;margin:7px 0}.money-steps span{font-size:12px;color:var(--ck-muted);line-height:1.55}.eligibility-card{margin-top:18px}.eligibility-list{display:grid;grid-template-columns:repeat(5,1fr);gap:8px;margin-top:16px}.eligibility-list span{display:flex;flex-direction:column;gap:4px;padding:12px;border:1px solid var(--ck-line);border-radius:12px}.eligibility-list span b{font-size:11px;color:var(--ck-muted)}.eligibility-list strong{font-size:16px}.notice-warning{margin-top:8px}.membership-layout{display:grid;grid-template-columns:minmax(300px,.8fr) 1.2fr;gap:18px}.membership-form{display:grid;grid-template-columns:1fr 1fr;gap:12px;padding:18px;border:1px solid var(--ck-line);border-radius:16px}.membership-form .full{grid-column:1/-1}.tier-list{display:grid;gap:10px}.tier-card{border:1px solid var(--ck-line);border-radius:16px;padding:16px;background:var(--ck-card)}.tier-card>div span{font-size:10px;color:var(--ck-muted);text-transform:uppercase;font-weight:800}.tier-card h3{margin:4px 0}.tier-card>strong{display:block;margin:8px 0;font-size:20px}.tier-card>strong span{font-size:12px;color:var(--ck-muted)}.tier-card p{margin:0;color:var(--ck-muted);line-height:1.5}.withdraw-grid{display:grid;grid-template-columns:1.3fr .7fr;gap:14px}.withdraw-card{padding:26px}.withdraw-card>strong{display:block;font-size:34px;margin-top:8px}.withdraw-value{font-size:15px;color:var(--ck-muted);margin-top:4px}.withdraw-rule{display:flex;justify-content:space-between;padding:14px 0;margin:18px 0;border-top:1px solid var(--ck-line);border-bottom:1px solid var(--ck-line)}.withdraw-form{margin-top:16px}.withdraw-info{padding:22px}.info-row{display:flex;justify-content:space-between;padding:12px 0;border-bottom:1px solid var(--ck-line)}.withdraw-info p{color:var(--ck-muted);line-height:1.6;font-size:13px}.withdraw-history{display:grid}.withdraw-history-row{display:flex;justify-content:space-between;align-items:center;padding:14px 0;border-bottom:1px solid var(--ck-line)}.withdraw-history-row small{display:block;color:var(--ck-muted);margin-top:4px}.status-pill{padding:6px 9px;border:1px solid var(--ck-line);border-radius:999px;font-size:11px;font-weight:800}.status-pending{background:#fff8e7;color:#8d7135}.status-paid{background:#eefaf2;color:#48835b}.status-processing{background:#edf5ff;color:#3f75a8}
.chip-grid{display:flex;flex-wrap:wrap;gap:7px}.choice-chip input{position:absolute;opacity:0}.choice-chip span{display:inline-flex;padding:8px 11px;border:1px solid var(--ck-line);border-radius:999px;font-size:12px;cursor:pointer}.choice-chip input:checked+span{background:var(--ck-soft);border-color:#b7d5f4;color:#2f6fae}.media-upload{display:grid;grid-template-columns:150px 1fr;gap:14px;align-items:center}.media-preview{width:150px;aspect-ratio:2/3;border:1px dashed #bfd3e5;border-radius:14px;overflow:hidden;background:var(--ck-soft);display:grid;place-items:center;color:var(--ck-muted);font-size:12px}.media-preview img{width:100%;height:100%;object-fit:cover}.form-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:18px}.chapter-manager-page{padding-bottom:30px}.chapter-review{display:flex;gap:8px;margin-top:10px;padding:10px 12px;border-radius:11px;background:#fff8eb;color:#745d35;font-size:12px}.chapter-manager-page .chapter-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap}.chapter-empty{text-align:center;padding:40px 20px;border:1px dashed var(--ck-line);border-radius:18px}.chapter-empty__icon{font-size:28px;color:var(--ck-blue)}
.story-hero{display:grid;grid-template-columns:240px 1fr;gap:28px;padding:26px;align-items:start}.story-cover{width:100%;aspect-ratio:2/3;object-fit:cover;border-radius:18px;display:block;box-shadow:var(--ck-shadow)}.story-cover-fallback{display:grid;place-items:center;background:linear-gradient(135deg,#1c3552,#6c89a7);color:#fff;font-size:64px;font-weight:900}.story-hero-copy h1{font-size:44px;letter-spacing:-.045em;margin:6px 0 8px;line-height:1.05}.story-author{color:var(--ck-muted)}.story-rating{display:flex;align-items:center;gap:8px;margin-top:14px;color:var(--ck-muted);font-size:13px}.rating-star{color:#d69b22}.story-rating strong{color:var(--ck-text);font-size:22px}.story-synopsis{max-width:760px;line-height:1.75;color:var(--ck-muted);font-size:16px;margin:18px 0}.story-actions{display:flex;gap:9px;flex-wrap:wrap}.btn-support{border-color:#e6cbd0;color:#a54957;background:#fff7f8}.story-trust{display:flex;gap:7px;margin-top:14px;color:var(--ck-muted);font-size:11px}.story-content-grid{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:16px;margin-top:16px}.story-main-column{display:grid;gap:16px}.panel-heading{display:flex;justify-content:space-between;align-items:center}.count-pill,.my-rank-badge{display:inline-flex;align-items:center;gap:5px;padding:8px 11px;border:1px solid var(--ck-line);border-radius:999px;color:var(--ck-muted);font-size:11px;font-weight:800}.chapter-list{margin-top:12px}.chapter-list-row{display:grid;grid-template-columns:46px 1fr auto;align-items:center;gap:12px;padding:13px 0;border-bottom:1px solid var(--ck-line)}.chapter-number{width:40px;height:40px;display:grid;place-items:center;border-radius:12px;background:var(--ck-soft);color:var(--ck-blue);font-weight:900}.chapter-list-main{min-width:0}.chapter-list-main strong{display:block;overflow-wrap:anywhere}.chapter-list-main small{color:var(--ck-muted)}.premium-badge,.free-badge,.rank-type{padding:5px 8px;border-radius:999px;border:1px solid var(--ck-line);font-size:10px;font-weight:800}.premium-badge{background:#fff9ec;color:#8b7338}.free-badge{background:#f2faf5;color:#4d8960}.review-gate{padding:11px 13px;margin:12px 0;border-radius:12px;background:#f6f8fb;color:var(--ck-muted);font-size:13px}.review-gate.ready{background:var(--ck-soft);color:#346b9e}.review-form{display:grid;gap:10px;margin-bottom:16px}.star-picker{display:flex;gap:4px}.star-picker label input{display:none}.star-picker label span{display:grid;place-items:center;width:34px;height:34px;border-radius:10px;border:1px solid var(--ck-line);cursor:pointer}.star-picker label input:checked+span{background:#fff6de;border-color:#e9cc81;color:#9b7b2d}.review-list{display:grid;gap:9px}.review-card{padding:14px;border:1px solid var(--ck-line);border-radius:14px}.review-card-head{display:flex;gap:9px;align-items:center}.review-card-head small{display:block;color:#c18f25;margin-top:3px}.review-card p{margin:10px 0 0;line-height:1.65}.rating-summary{display:flex;align-items:center;gap:8px}.rating-score{font-size:30px;font-weight:900}.rating-summary small{display:block;color:var(--ck-muted);font-size:10px}.side-card{padding:18px}.side-card p{color:var(--ck-muted);line-height:1.6}.btn-block{width:100%;justify-content:center}.side-metrics{display:grid;grid-template-columns:1fr 1fr;gap:8px}.side-metrics span{padding:12px;border:1px solid var(--ck-line);border-radius:12px;color:var(--ck-muted);font-size:11px}.side-metrics b{display:block;color:var(--ck-text);font-size:18px}
.support-dialog{border:0;border-radius:18px;padding:0;width:min(520px,calc(100vw - 24px));box-shadow:0 24px 70px rgba(0,0,0,.25)}.support-dialog::backdrop{background:rgba(15,25,40,.55)}.support-dialog form{padding:22px}.support-dialog h2{margin:5px 0}.support-dialog p{color:var(--ck-muted);line-height:1.55}.support-options{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:14px 0}.support-options input{position:absolute;opacity:0}.support-options span{display:grid;place-items:center;min-height:44px;border:1px solid var(--ck-line);border-radius:12px;font-size:12px;cursor:pointer}.support-options input:checked+span{border-color:#a8c9eb;background:var(--ck-soft);color:#2f6fae;font-weight:800}
.reading-page{max-width:900px;margin:0 auto;padding-bottom:40px}.reader-topline{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-bottom:14px}.reader-live-meta{font-size:11px;color:var(--ck-muted)}.preview-banner{display:flex;justify-content:space-between;gap:12px;padding:11px 14px;background:#edf5ff;border:1px solid #c8def5;border-radius:12px;margin-bottom:12px;color:#386b99;font-size:12px}.reader-title{padding:24px 26px}.reader-title h1{font-size:38px;letter-spacing:-.04em;margin:4px 0}.reader-meta{display:flex;gap:8px;color:var(--ck-muted);font-size:12px}.reader-body{margin-top:12px;padding:0;overflow:hidden}.reader-toolbar{display:flex;justify-content:space-between;align-items:center;padding:11px 18px;border-bottom:1px solid var(--ck-line);color:var(--ck-muted);font-size:12px}.reader-prose{padding:30px 44px 44px;font-size:18px;line-height:1.9;color:var(--ck-text);overflow-wrap:anywhere}.reader-prose p{margin:0 0 1.25em}.reader-prose h1,.reader-prose h2,.reader-prose h3{line-height:1.3;margin:1.5em 0 .7em}.reader-pagination{display:grid;grid-template-columns:1fr auto 1fr;gap:8px;align-items:center;margin-top:14px}.reader-pagination>div:last-child{text-align:right}.reader-locked{text-align:center;padding:44px 20px}.lock-icon{font-size:36px;color:#b58b2d}.unlock-price{font-size:26px;font-weight:900;margin:14px}.creator-public-hero{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:20px;align-items:center;padding:28px}.creator-public-copy h1{margin:2px 0;font-size:38px;letter-spacing:-.04em}.creator-handle{color:var(--ck-muted)}.creator-public-copy p{max-width:700px;line-height:1.65;color:var(--ck-muted)}.creator-public-metrics{display:flex;gap:14px;flex-wrap:wrap}.creator-public-metrics span{color:var(--ck-muted);font-size:12px}.creator-public-metrics b{color:var(--ck-text);font-size:16px}.creator-story-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.creator-story-card{display:grid;gap:10px}.creator-story-cover{aspect-ratio:2/3;border-radius:14px;overflow:hidden;background:var(--ck-soft);display:grid;place-items:center}.creator-story-cover img{width:100%;height:100%;object-fit:cover}.creator-story-cover span{font-size:36px;font-weight:900;color:#6e86a0}.creator-story-card h3{margin:0}.creator-story-card span{color:var(--ck-muted);font-size:11px}.leaderboard-podium{display:grid;grid-template-columns:.9fr 1.1fr;gap:25px;align-items:center;padding:28px;margin-bottom:14px}.leaderboard-podium h2{font-size:28px}.leaderboard-podium p{color:var(--ck-muted);line-height:1.6}.podium{display:grid;grid-template-columns:1fr 1.1fr 1fr;align-items:end;gap:8px;height:210px}.podium-place{display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:7px;padding:14px;border:1px solid var(--ck-line);border-radius:16px;text-align:center}.podium-place span{font-size:24px;font-weight:900;color:var(--ck-blue)}.podium-place.first{height:100%}.podium-place.second{height:80%}.podium-place.third{height:70%}.podium-place small{color:var(--ck-muted)}.leaderboard-list-head,.leaderboard-row{display:grid;grid-template-columns:75px minmax(0,1.4fr) .7fr .5fr .5fr;gap:12px;align-items:center}.leaderboard-list-head{padding:12px 14px;color:#8093a8;font-size:10px;font-weight:800;text-transform:uppercase}.leaderboard-row{padding:14px;border-top:1px solid var(--ck-line)}.leaderboard-row:hover,.leaderboard-row.is-me{background:var(--ck-soft)}.rank-number,.rank-score{font-weight:900}.rank-user{display:flex;align-items:center;gap:10px}.rank-user small{display:block;color:var(--ck-muted);margin-top:2px}.leaderboard-motivation{margin-top:14px;padding:22px}.leaderboard-motivation p{color:var(--ck-muted);line-height:1.6}
.feed-shell{max-width:1120px!important}.feed-list{width:min(760px,100%);margin:0 auto}.premium-feed-card{padding:20px!important;border-radius:18px!important}.premium-feed-card .post-body{font-size:15px;line-height:1.75}.premium-feed-card .feed-author-name strong{font-size:14px}.premium-feed-card .post-actions{padding-top:14px}
@media(max-width:900px){.money-stats,.money-steps,.eligibility-list{grid-template-columns:repeat(2,1fr)}.membership-layout,.withdraw-grid,.story-content-grid,.leaderboard-podium{grid-template-columns:1fr}.story-hero{grid-template-columns:170px 1fr}.creator-story-grid{grid-template-columns:repeat(3,1fr)}.leaderboard-list-head{display:none}.leaderboard-row{grid-template-columns:55px minmax(0,1fr) auto auto}.leaderboard-row>span:nth-child(3){display:none}}
@media(max-width:680px){.studio-heading,.leaderboard-heading,.story-hero,.creator-public-hero{display:block}.studio-heading h1,.leaderboard-heading h1{font-size:31px}.money-hero{display:block}.money-hero .btn{margin-top:15px}.money-stats,.money-steps,.eligibility-list{grid-template-columns:1fr 1fr}.membership-form{grid-template-columns:1fr}.membership-form .full{grid-column:auto}.story-hero{padding:16px}.story-cover-wrap{width:160px;margin-bottom:16px}.story-hero-copy h1{font-size:32px}.story-content-grid{display:block}.story-side{display:grid;gap:12px;margin-top:12px}.chapter-list-row{grid-template-columns:38px 1fr}.chapter-list-row .premium-badge,.chapter-list-row .free-badge{display:none}.reader-prose{padding:22px 18px 32px;font-size:18px}.reader-title{padding:20px}.reader-title h1{font-size:30px}.reader-pagination{grid-template-columns:1fr}.reader-pagination>div:last-child{text-align:left}.creator-story-grid{grid-template-columns:repeat(2,1fr)}.creator-public-avatar{margin-bottom:15px}.creator-public-actions{margin-top:14px}.support-options{grid-template-columns:repeat(2,1fr)}.chapter-manager-head{display:block}.chapter-manager-actions{margin-top:14px}.chapter-manager-row{grid-template-columns:50px 1fr}.chapter-actions{grid-column:1/-1}.media-upload{grid-template-columns:110px 1fr}.media-preview{width:110px}.leaderboard-row{grid-template-columns:45px minmax(0,1fr) auto}.leaderboard-row>span:nth-child(4){display:none}.my-rank-badge{margin-top:10px}}


/* V29 production theme layer */
:root{color-scheme:light;--ck-bg:#f4f7fb;--ck-surface:#fff;--ck-text:#182a42;--ck-muted:#70839b;--ck-line:#dce7f1;--ck-soft:#edf5ff;--ck-blue:#2f80ed;--ck-shadow:0 16px 42px rgba(29,67,104,.08)}
:root[data-theme="dark"]{color-scheme:dark;--ck-bg:#0e1724;--ck-surface:#142235;--ck-text:#edf4fb;--ck-muted:#9db0c4;--ck-line:#2a3b4f;--ck-soft:#1a3148;--ck-blue:#69a8ff;--ck-shadow:0 18px 50px rgba(0,0,0,.28)}
[data-theme="dark"] body,[data-theme="dark"] .reader-app,[data-theme="dark"] .creator-app,[data-theme="dark"] .admin-app{background:var(--ck-bg);color:var(--ck-text)}
[data-theme="dark"] .panel,[data-theme="dark"] .stat,[data-theme="dark"] .chapter-manager-stat,[data-theme="dark"] .chapter-manager-row,[data-theme="dark"] .story-hero,[data-theme="dark"] .story-chapters,[data-theme="dark"] .reviews-panel,[data-theme="dark"] .comments-section,[data-theme="dark"] .side-card,[data-theme="dark"] .reader-title,[data-theme="dark"] .reader-body,[data-theme="dark"] .reader-locked,[data-theme="dark"] .creator-public-hero,[data-theme="dark"] .leaderboard-list,[data-theme="dark"] .leaderboard-podium,[data-theme="dark"] .leaderboard-motivation{background:var(--ck-surface);border-color:var(--ck-line);box-shadow:var(--ck-shadow)}
[data-theme="dark"] input,[data-theme="dark"] textarea,[data-theme="dark"] select{background:#101b2a;color:var(--ck-text);border-color:var(--ck-line)}
[data-theme="dark"] .chapter-list-row,[data-theme="dark"] .review-card,[data-theme="dark"] .comment-card{border-color:var(--ck-line)}
[data-theme="dark"] .chapter-number,[data-theme="dark"] .count-pill,[data-theme="dark"] .my-rank-badge,[data-theme="dark"] .chapter-editor__stat{background:#192b40;border-color:var(--ck-line);color:var(--ck-text)}
.story-actions{align-items:center}.story-actions form{margin:0}.story-actions .btn{min-height:42px}.rating-summary .rating-score{letter-spacing:-.04em}.story-cover{display:block;width:100%;height:100%;object-fit:cover}.comment-compose-footer{display:flex;justify-content:space-between;align-items:center;gap:12px}.review-author{display:flex;align-items:center;gap:9px}.review-author small{display:block;color:var(--ck-muted);margin-top:2px}.report-dialog{border:0;border-radius:18px;padding:0;width:min(500px,calc(100vw - 24px));box-shadow:0 24px 70px rgba(0,0,0,.28)}.report-dialog::backdrop{background:rgba(11,20,32,.58)}.report-dialog form{padding:22px;display:grid;gap:13px}.report-dialog h3{margin:0}.report-dialog label{display:grid;gap:7px;font-size:12px;font-weight:750}.review-report-btn{border:0;background:transparent;color:#9a6470;font-size:11px;font-weight:750;padding:0;margin-top:8px;cursor:pointer}.login-prompt{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:15px;border:1px solid var(--ck-line);border-radius:14px;background:var(--ck-soft)}.comment-card{padding:14px;border:1px solid var(--ck-line);border-radius:14px}.comment-head{display:flex;justify-content:space-between;gap:10px;align-items:center}.comment-author{display:flex;align-items:center;gap:9px}.comment-author small{display:block;color:var(--ck-muted);margin-top:2px}.comment-body{margin:10px 0;line-height:1.65}.comment-actions{display:flex;align-items:center;gap:12px}.comment-like-btn,.comment-reply-toggle{border:0;background:transparent;padding:0;color:var(--ck-muted);cursor:pointer}.comment-like-btn.liked{color:#b45568}.reply-stack{margin:10px 0 0 42px;display:grid;gap:9px}.reply-box{display:none;margin-top:10px;grid-template-columns:1fr auto;gap:8px}.reply-box.open{display:grid}.empty-inline{padding:18px;color:var(--ck-muted);text-align:center;border:1px dashed var(--ck-line);border-radius:14px}
@media(max-width:680px){.comment-compose-footer{align-items:stretch;flex-direction:column}.reply-stack{margin-left:18px}.story-actions .btn{flex:1 1 auto}.story-actions form{display:contents}.support-dialog{width:min(520px,calc(100vw - 16px))}}


/* V31 global theme hardening */
html[data-theme="dark"] body,
html[data-theme="dark"] .reader-app,
html[data-theme="dark"] .creator-app,
html[data-theme="dark"] .admin-app{background:linear-gradient(180deg,#0e1724,#101a29 45%,#0d1622);color:#edf4fb}
html[data-theme="dark"] .topbar{background:rgba(14,23,36,.94);border-bottom-color:#25364a;color:#edf4fb}
html[data-theme="dark"] .sidebar{background:#101a29;border-right-color:#243449}
html[data-theme="dark"] .side-item{color:#aebed0}
html[data-theme="dark"] .side-item:hover{background:#17263a;color:#fff}
html[data-theme="dark"] .side-item.active{background:#193a63;color:#7ab5ff;border-color:#234b7a}
html[data-theme="dark"] .global-search{background:#182536;border-color:#26384d;color:#aebed0}
html[data-theme="dark"] .global-search input,
html[data-theme="dark"] .search-field input{background:transparent!important;color:#eef5fc!important;-webkit-text-fill-color:#eef5fc}
html[data-theme="dark"] .global-search input::placeholder{color:#778ca5}
html[data-theme="dark"] .global-search input:-webkit-autofill{box-shadow:0 0 0 1000px #182536 inset!important;-webkit-text-fill-color:#eef5fc!important;caret-color:#eef5fc}
html[data-theme="dark"] .top-icon,html[data-theme="dark"] .icon-button,html[data-theme="dark"] .profile-trigger{background:#142235;border-color:#2a3b4f;color:#dbe8f5}
html[data-theme="dark"] .profile-dropdown,html[data-theme="dark"] .notification-popover{background:#142235;border-color:#2a3b4f;color:#edf4fb}
html[data-theme="dark"] .notification-item:hover{background:#1a2d43}
html[data-theme="dark"] .notification-item.unread{background:#193654}
html[data-theme="dark"] .site-footer{background:#101a29;border-top-color:#25364a}
html[data-theme="dark"] .hero,
html[data-theme="dark"] .home-hero-premium,
html[data-theme="dark"] .spotlight-card,
html[data-theme="dark"] .story-card,
html[data-theme="dark"] .feed-card,
html[data-theme="dark"] .creator-story-card,
html[data-theme="dark"] .community-panel,
html[data-theme="dark"] .wallet-card,
html[data-theme="dark"] .package,
html[data-theme="dark"] .review-compose,
html[data-theme="dark"] .comment-compose-form,
html[data-theme="dark"] .chapter-list,
html[data-theme="dark"] .chapter-row,
html[data-theme="dark"] .login-prompt,
html[data-theme="dark"] .empty-state,
html[data-theme="dark"] .money-hero,
html[data-theme="dark"] .tier-card,
html[data-theme="dark"] .withdraw-card,
html[data-theme="dark"] .withdraw-info,
html[data-theme="dark"] .support-dialog{background:var(--ck-surface);border-color:var(--ck-line);color:var(--ck-text)}
html[data-theme="dark"] .story-body p,html[data-theme="dark"] .story-body .author,html[data-theme="dark"] .story-body .clamp,html[data-theme="dark"] .section-head p,html[data-theme="dark"] .page-heading p,html[data-theme="dark"] .podium-place small{color:var(--ck-muted)}
html[data-theme="dark"] .cover-fallback,html[data-theme="dark"] .creator-story-cover .cover-fallback-letter{background:radial-gradient(circle at 30% 25%,#456b99,#1b2b40 60%,#101a29);color:#e8f2fc}
html[data-theme="dark"] .genre-chip,html[data-theme="dark"] .hero-pills a,html[data-theme="dark"] .btn:not(.btn-primary){background:#142235;color:#d6e4f1;border-color:#2a3b4f}
html[data-theme="dark"] .btn:hover{background:#1a2d43}
html[data-theme="dark"] .post-actions,html[data-theme="dark"] .comment-card,html[data-theme="dark"] .inline-comment{border-color:#2a3b4f;background:#132235}
html[data-theme="dark"] .rating-summary strong,html[data-theme="dark"] .rating-score{color:#f0c76e}
html[data-theme="dark"] .report-dialog{background:#142235;color:#edf4fb}
html[data-theme="dark"] .report-dialog::backdrop{background:rgba(0,0,0,.62)}
html[data-theme="dark"] .language-switcher{background:#132235;border-color:#2a3b4f}
html[data-theme="dark"] .lang-pill{color:#9db0c4}
html[data-theme="dark"] .lang-pill.active{background:#234b7a;color:#fff}

/* Compact global language picker */
.language-switcher{display:flex;gap:2px;align-items:center;padding:3px;border:1px solid #d8e2ed;border-radius:999px;background:#f5f8fc}
.lang-pill{display:inline-flex;align-items:center;justify-content:center;min-width:29px;height:25px;padding:0 7px;border-radius:999px;color:#71839a;font-size:10px;font-weight:900;letter-spacing:.04em}
.lang-pill:hover{color:var(--ck-blue)}
.lang-pill.active{background:#fff;color:#216fda;box-shadow:0 1px 5px rgba(31,111,224,.10)}

/* Polished no-cover fallback */
.story-cover .cover-fallback,.creator-story-cover .cover-fallback-letter{display:grid;place-items:center;width:100%;height:100%;background:radial-gradient(circle at 30% 25%,#8db8e9,#3f6284 58%,#20344a);color:#fff;font-size:clamp(40px,5vw,68px);font-weight:900;letter-spacing:-.06em;text-shadow:0 4px 18px rgba(0,0,0,.22)}
.story-cover .cover-fallback::after{content:'CeritaKita';display:block;position:absolute;bottom:16px;left:16px;font-size:9px;letter-spacing:.13em;text-transform:uppercase;font-weight:800;opacity:.72}
.creator-story-cover .cover-fallback-letter{font-size:40px;border-radius:inherit}

/* Leaderboard podium: visible profile photos + stronger hierarchy */
.podium-place{position:relative;min-height:180px;padding:16px 12px 18px;background:linear-gradient(180deg,#f9fcff,#eef5fb);overflow:hidden}
.podium-place.first{min-height:214px;background:linear-gradient(180deg,#fdfcf8,#f6f4ed)}
.podium-avatar{width:72px!important;height:72px!important;border:4px solid rgba(255,255,255,.92);box-shadow:0 12px 30px rgba(38,77,119,.16);margin-bottom:3px}
.podium-place.first .podium-avatar{width:88px!important;height:88px!important;border-color:#f0cf77}
.podium-medal{display:grid;place-items:center;width:31px;height:31px;border-radius:50%;background:#eef4fb;border:1px solid #d5e1ee;color:#496c8d;font-size:11px;font-weight:900;margin-bottom:4px}
.podium-place.first .podium-medal{background:#fff0bc;border-color:#e7c66b;color:#966f18}
.podium-place.second .podium-medal{background:#edf1f5;color:#66778b}
.podium-place.third .podium-medal{background:#f8e7d6;color:#9a6848}
.podium-place strong{max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--ck-text)}
.podium-place small{max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* V31.1: prevent high-specificity legacy poster rules from leaking white cards into dark mode */
html[data-theme="dark"] .reader-app .story-card.poster-card,
html[data-theme="dark"] .reader-app .story-card.poster-card > .story-body,
html[data-theme="dark"] .reader-app .feed-card.premium-feed-card,
html[data-theme="dark"] .reader-app .search-hero-panel,
html[data-theme="dark"] .reader-app .community-panel{background:#142235!important;border-color:#2a3b4f!important;color:#edf4fb!important}
html[data-theme="dark"] .reader-app .story-card.poster-card > .story-body h3 a,
html[data-theme="dark"] .reader-app .story-card.poster-card > .story-body h3,
html[data-theme="dark"] .reader-app .feed-card.premium-feed-card .post-body{color:#edf4fb!important}
html[data-theme="dark"] .reader-app .story-card.poster-card > .story-cover{background:#1a2b40!important}


/* V32 theme consistency layer */
:root{--ck-bg:#f4f7fb;--ck-surface:#ffffff;--ck-surface-2:#fbfdff;--ck-text:#182a42;--ck-muted:#70839b;--ck-line:#dce7f1;--ck-line-strong:#cddbea;--ck-soft:#edf5ff;--ck-blue:#2f80ed;--ck-input:#ffffff;--ck-shadow:0 16px 42px rgba(29,67,104,.08)}
html[data-theme="dark"]{color-scheme:dark;--ck-bg:#0d1622;--ck-surface:#142235;--ck-surface-2:#101c2b;--ck-text:#edf4fb;--ck-muted:#9db0c4;--ck-line:#2a3b4f;--ck-line-strong:#38506a;--ck-soft:#1a3148;--ck-blue:#69a8ff;--ck-input:#101b2a;--ck-shadow:0 18px 50px rgba(0,0,0,.28)}
html[data-theme="dark"] body,
html[data-theme="dark"] body.creator-app,
html[data-theme="dark"] body.reader-app,
html[data-theme="dark"] body.admin-app{background:var(--ck-bg)!important;color:var(--ck-text)!important}
html[data-theme="dark"] .main-content,
html[data-theme="dark"] .creator-content,
html[data-theme="dark"] .reader-content-shell,
html[data-theme="dark"] .admin-content{background:var(--ck-bg)!important;color:var(--ck-text)}
html[data-theme="dark"] .creator-app .main-content{background:var(--ck-bg)!important}
html[data-theme="dark"] .panel,
html[data-theme="dark"] .stat,
html[data-theme="dark"] .package,
html[data-theme="dark"] .story-card,
html[data-theme="dark"] .feed-card,
html[data-theme="dark"] .chapter-manager-stat,
html[data-theme="dark"] .chapter-manager-row,
html[data-theme="dark"] .chapter-empty,
html[data-theme="dark"] .chapter-manager-page .panel,
html[data-theme="dark"] .creator-book-card,
html[data-theme="dark"] .creator-profile__card,
html[data-theme="dark"] .creator-profile-hero,
html[data-theme="dark"] .leaderboard-list,
html[data-theme="dark"] .leaderboard-podium,
html[data-theme="dark"] .leaderboard-motivation,
html[data-theme="dark"] .money-hero,
html[data-theme="dark"] .tier-card,
html[data-theme="dark"] .withdraw-card,
html[data-theme="dark"] .withdraw-info,
html[data-theme="dark"] .reader-title,
html[data-theme="dark"] .reader-body,
html[data-theme="dark"] .reader-locked{background:var(--ck-surface)!important;color:var(--ck-text)!important;border-color:var(--ck-line)!important;box-shadow:var(--ck-shadow)}
html[data-theme="dark"] input,
html[data-theme="dark"] textarea,
html[data-theme="dark"] select,
html[data-theme="dark"] .field input,
html[data-theme="dark"] .field textarea,
html[data-theme="dark"] .field select{background:var(--ck-input)!important;color:var(--ck-text)!important;border-color:var(--ck-line)!important;-webkit-text-fill-color:var(--ck-text)}
html[data-theme="dark"] input::placeholder,html[data-theme="dark"] textarea::placeholder{color:#6f849c!important;opacity:1}
html[data-theme="dark"] .btn:not(.btn-primary),html[data-theme="dark"] .icon-button,html[data-theme="dark"] .top-icon,html[data-theme="dark"] .profile-trigger{background:#142235!important;color:#dbe8f5!important;border-color:#2a3b4f!important}
html[data-theme="dark"] .btn:not(.btn-primary):hover{background:#1a2d43!important}
html[data-theme="dark"] .topbar{background:rgba(13,22,34,.96)!important;border-color:#25364a!important;color:var(--ck-text)}
html[data-theme="dark"] .sidebar{background:#101a29!important;border-color:#243449!important}
html[data-theme="dark"] .sidebar-title-row{color:#9db0c4!important}
html[data-theme="dark"] .side-item{color:#aebed0!important}
html[data-theme="dark"] .side-item:hover{background:#17263a!important;color:#fff!important}
html[data-theme="dark"] .side-item.active{background:#193a63!important;color:#7ab5ff!important}
html[data-theme="dark"] .global-search{background:#182536!important;border-color:#26384d!important;color:#aebed0!important}
html[data-theme="dark"] .global-search input{color:#eef5fc!important;-webkit-text-fill-color:#eef5fc!important}
html[data-theme="dark"] .chapter-main h3,html[data-theme="dark"] .chapter-manager-head h1,html[data-theme="dark"] .chapter-manager-stat__body strong,html[data-theme="dark"] .chapter-review strong{color:var(--ck-text)!important}
html[data-theme="dark"] .chapter-main__meta,html[data-theme="dark"] .chapter-manager-head p,html[data-theme="dark"] .chapter-manager-stat__body span,html[data-theme="dark"] .chapter-review span{color:var(--ck-muted)!important}
html[data-theme="dark"] .chapter-index span,html[data-theme="dark"] .chapter-manager-stat__icon{background:#192f48!important;color:#75b2ff!important}
html[data-theme="dark"] .chapter-review{background:#172b41!important;border-color:#2a3f55!important}
html[data-theme="dark"] .chapter-status{background:#223246!important;color:#b8c7d8!important}
html[data-theme="dark"] .chapter-status.published{background:#173c2d!important;color:#7cd4a5!important}
html[data-theme="dark"] .chapter-status.pending_review,html[data-theme="dark"] .chapter-status.scheduled{background:#41351f!important;color:#f0c876!important}
html[data-theme="dark"] .chapter-status.revision{background:#242b4c!important;color:#aeb8ff!important}
html[data-theme="dark"] .chapter-status.rejected{background:#41252a!important;color:#ff9ca9!important}
html[data-theme="dark"] .chapter-premium-badge{background:#3b311d!important;border-color:#604f25!important;color:#f0c873!important}
html[data-theme="dark"] .chapter-free-badge{background:#17342d!important;border-color:#245344!important;color:#8bd5bd!important}
html[data-theme="dark"] .language-switcher{background:#132235!important;border-color:#2a3b4f!important}
html[data-theme="dark"] .lang-pill{color:#9db0c4!important}
html[data-theme="dark"] .lang-pill.active{background:#234b7a!important;color:#fff!important}

/* V32.1: global semantic theme contract */

/* V33: global semantic theme contract — all shared UI follows theme tokens */
:root{
  --ck-bg:#f4f7fb;--ck-surface:#ffffff;--ck-surface-2:#fbfdff;--ck-text:#182a42;--ck-muted:#70839b;
  --ck-line:#dce7f1;--ck-line-strong:#cddbea;--ck-soft:#edf5ff;--ck-input:#ffffff;
  --ck-hover:#f5f8fc;--ck-elevated:#ffffff;--ck-selection:#dbeafe;
}
html[data-theme="dark"]{
  --ck-bg:#0b1420;--ck-surface:#121f30;--ck-surface-2:#0f1b2a;--ck-text:#edf5ff;--ck-muted:#9eb0c4;
  --ck-line:#293b50;--ck-line-strong:#3b536d;--ck-soft:#172d45;--ck-input:#0f1b2a;
  --ck-hover:#192a3e;--ck-elevated:#162638;--ck-selection:#24466c;
}
html[data-theme="light"]{color-scheme:light}
html[data-theme="dark"]{color-scheme:dark}

html[data-theme="dark"] body,
html[data-theme="dark"] body.reader-app,
html[data-theme="dark"] body.creator-app,
html[data-theme="dark"] body.admin-app,
html[data-theme="dark"] body.guest-body{background:var(--ck-bg)!important;color:var(--ck-text)!important}
html[data-theme="light"] body,
html[data-theme="light"] body.reader-app,
html[data-theme="light"] body.creator-app,
html[data-theme="light"] body.admin-app,
html[data-theme="light"] body.guest-body{background:var(--ck-bg)!important;color:var(--ck-text)!important}

html[data-theme] .main-content,
html[data-theme] .creator-content,
html[data-theme] .reader-content-shell,
html[data-theme] .admin-content,
html[data-theme] .guest-main{color:var(--ck-text)!important}
html[data-theme="dark"] .main-content,
html[data-theme="dark"] .creator-content,
html[data-theme="dark"] .reader-content-shell,
html[data-theme="dark"] .admin-content,
html[data-theme="dark"] .guest-main{background:var(--ck-bg)!important}
html[data-theme="light"] .main-content,
html[data-theme="light"] .creator-content,
html[data-theme="light"] .reader-content-shell,
html[data-theme="light"] .admin-content,
html[data-theme="light"] .guest-main{background:var(--ck-bg)!important}

html[data-theme] .topbar,
html[data-theme] .sidebar,
html[data-theme] .panel,
html[data-theme] .stat,
html[data-theme] .story-card,
html[data-theme] .feed-card,
html[data-theme] .chapter-list,
html[data-theme] .chapter-manager-stat,
html[data-theme] .chapter-manager-row,
html[data-theme] .chapter-empty,
html[data-theme] .leaderboard-list,
html[data-theme] .leaderboard-podium,
html[data-theme] .leaderboard-motivation,
html[data-theme] .hero,
html[data-theme] .hero-art,
html[data-theme] .spotlight-card,
html[data-theme] .creator-book-card,
html[data-theme] .creator-profile__card,
html[data-theme] .creator-profile-hero,
html[data-theme] .money-hero,
html[data-theme] .tier-card,
html[data-theme] .withdraw-card,
html[data-theme] .withdraw-info,
html[data-theme] .reader-title,
html[data-theme] .reader-body,
html[data-theme] .reader-locked,
html[data-theme] .search-hero-panel,
html[data-theme] .community-panel,
html[data-theme] .feed-preview-row,
html[data-theme] .notification-popover,
html[data-theme] .profile-dropdown,
html[data-theme] .mobile-search-panel,
html[data-theme] .install-card,
html[data-theme] .auth-card{background:var(--ck-surface)!important;color:var(--ck-text)!important;border-color:var(--ck-line)!important}

html[data-theme] .site-footer{background:var(--ck-surface)!important;color:var(--ck-muted)!important;border-color:var(--ck-line)!important}
html[data-theme] .page-heading p,
html[data-theme] .chapter-main__meta,
html[data-theme] .chapter-manager-head p,
html[data-theme] .chapter-manager-stat__body span,
html[data-theme] .author,
html[data-theme] .clamp,
html[data-theme] .story-meta,
html[data-theme] .row-top,
html[data-theme] .leaderboard-heading p,
html[data-theme] .leaderboard-list-head,
html[data-theme] .rank-user small,
html[data-theme] .leaderboard-motivation p,
html[data-theme] .muted,
html[data-theme] .eyebrow{color:var(--ck-muted)!important}
html[data-theme] h1,html[data-theme] h2,html[data-theme] h3,html[data-theme] h4,html[data-theme] h5,
html[data-theme] p,html[data-theme] label,html[data-theme] strong,html[data-theme] .section-head,
html[data-theme] .story-body h3,html[data-theme] .story-body h3 a,
html[data-theme] .chapter-main h3,html[data-theme] .rank-user strong,
html[data-theme] .podium-copy h2,html[data-theme] .podium-place strong{color:var(--ck-text)!important}
html[data-theme] a{color:inherit}
html[data-theme] .btn:not(.btn-primary),
html[data-theme] .top-icon,
html[data-theme] .icon-button,
html[data-theme] .profile-trigger{background:var(--ck-elevated)!important;color:var(--ck-text)!important;border-color:var(--ck-line)!important}
html[data-theme] .btn:not(.btn-primary):hover,
html[data-theme] .icon-button:hover,
html[data-theme] .top-icon:hover{background:var(--ck-hover)!important}
html[data-theme] .btn-primary{color:#fff!important}
html[data-theme] input,html[data-theme] select,html[data-theme] textarea,
html[data-theme] .searchbar input,html[data-theme] .search-field,
html[data-theme] .filter input,html[data-theme] .filter select,.field input,.field select,.field textarea{
  background:var(--ck-input)!important;color:var(--ck-text)!important;border-color:var(--ck-line)!important;-webkit-text-fill-color:var(--ck-text)
}
html[data-theme] input::placeholder,html[data-theme] textarea::placeholder{color:var(--ck-muted)!important;opacity:1}
html[data-theme] .global-search{background:var(--ck-input)!important;color:var(--ck-muted)!important;border:1px solid var(--ck-line)!important}
html[data-theme] .global-search input{color:var(--ck-text)!important;-webkit-text-fill-color:var(--ck-text)!important}
html[data-theme] .sidebar{background:var(--ck-surface)!important;border-color:var(--ck-line)!important}
html[data-theme] .sidebar-title-row,html[data-theme] .side-caption{color:var(--ck-muted)!important}
html[data-theme] .side-item{color:var(--ck-text)!important}
html[data-theme] .side-item:hover{background:var(--ck-hover)!important;color:var(--ck-text)!important}
html[data-theme] .side-item.active{background:var(--ck-soft)!important;color:var(--ck-blue)!important}
html[data-theme] .sidebar-divider{background:var(--ck-line)!important}
html[data-theme] .topbar{background:var(--ck-surface)!important;border-color:var(--ck-line)!important}
html[data-theme="dark"] .brand{color:var(--ck-text)!important}
html[data-theme="dark"] .brand-mark{color:#fff!important}
html[data-theme] .link-list a{border-color:var(--ck-line)!important}
html[data-theme] .chapter-row{border-color:var(--ck-line)!important}
html[data-theme] .chapter-row:hover{background:var(--ck-hover)!important}
html[data-theme] .leaderboard-row{border-color:var(--ck-line)!important}
html[data-theme] .leaderboard-row:hover,html[data-theme] .leaderboard-row.is-me{background:var(--ck-soft)!important}
html[data-theme="dark"] .podium-place{background:linear-gradient(180deg,#15293e,#122235)!important}
html[data-theme="dark"] .podium-place.first{background:linear-gradient(180deg,#2b2a25,#1e2528)!important}
html[data-theme="dark"] .podium-medal{background:#203146!important;border-color:#35516d!important;color:#d5e4f3!important}
html[data-theme="dark"] .podium-place.first .podium-medal{background:#594c25!important;border-color:#7b6832!important;color:#ffdc79!important}
html[data-theme="dark"] .podium-place.second .podium-medal{background:#273645!important;color:#c5d0db!important}
html[data-theme="dark"] .podium-place.third .podium-medal{background:#3c3028!important;color:#e8bca0!important}
html[data-theme] .notification-item{border-color:var(--ck-line)!important;color:var(--ck-text)!important}
html[data-theme] .notification-item span,html[data-theme] .notification-item small{color:var(--ck-muted)!important}
html[data-theme="dark"] .notification-empty{color:var(--ck-muted)!important}
html[data-theme] .profile-dropdown a,html[data-theme] .profile-dropdown button{color:var(--ck-text)!important}
html[data-theme] .profile-summary small,html[data-theme] .profile-coins span{color:var(--ck-muted)!important}
html[data-theme="dark"] .alert{background:#2a1d20!important;border-color:#56363d!important;color:#ffb5bd!important}
html[data-theme="dark"] .alert.success{background:#173028!important;border-color:#245b47!important;color:#9ce1bf!important}
html[data-theme] ::selection{background:var(--ck-selection)!important}

/* Make the light theme equally tokenized, avoiding hard-coded white surfaces after theme switches. */
html[data-theme="light"] .hero-art{background:linear-gradient(135deg,#eef5ff,#f8fafc)!important}
html[data-theme="light"] .podium-place{background:linear-gradient(180deg,#f9fcff,#eef5fb)!important}
html[data-theme="light"] .podium-place.first{background:linear-gradient(180deg,#fdfcf8,#f6f4ed)!important}

/* V33 theme asset cache marker */

/* V34 — exhaustive theme normalization */
:root{
  --ck-bg:#f4f7fb;--ck-surface:#ffffff;--ck-surface-2:#fbfdff;--ck-elevated:#ffffff;
  --ck-text:#172b45;--ck-muted:#70839a;--ck-line:#dce7f1;--ck-line-strong:#cad9e8;
  --ck-soft:#edf5ff;--ck-input:#ffffff;--ck-hover:#f5f8fc;--ck-blue:#2f80ed;
  --ck-success-bg:#eef9f3;--ck-success-text:#257653;--ck-warning-bg:#fff8eb;--ck-warning-text:#8a6728;
  --ck-danger-bg:#fff3f4;--ck-danger-text:#a7434f;--ck-info-bg:#eef6ff;--ck-info-text:#2867a6;
}
html[data-theme="dark"]{
  --ck-bg:#0a1320;--ck-surface:#121f30;--ck-surface-2:#0e1a29;--ck-elevated:#162638;
  --ck-text:#edf5ff;--ck-muted:#9fb1c6;--ck-line:#2a3d54;--ck-line-strong:#3b536d;
  --ck-soft:#17304b;--ck-input:#0f1a29;--ck-hover:#1a2c41;--ck-blue:#74b5ff;
  --ck-success-bg:#163027;--ck-success-text:#9ce0bf;--ck-warning-bg:#3c311d;--ck-warning-text:#f1ca79;
  --ck-danger-bg:#3a2026;--ck-danger-text:#ffb5c0;--ck-info-bg:#17304b;--ck-info-text:#a9d1ff;
}

html[data-theme] body,
html[data-theme] .main-content,
html[data-theme] .creator-content,
html[data-theme] .reader-content-shell,
html[data-theme] .admin-content,
html[data-theme] .guest-main,
html[data-theme] .mission-page,
html[data-theme] .studio-page,
html[data-theme] .leaderboard-page,
html[data-theme] .story-page,
html[data-theme] .creator-public-page{color:var(--ck-text);}
html[data-theme] .panel,
html[data-theme] .stat,
html[data-theme] .card,
html[data-theme] .story-card,
html[data-theme] .feed-card,
html[data-theme] .chapter-list,
html[data-theme] .chapter-row,
html[data-theme] .chapter-manager-stat,
html[data-theme] .chapter-manager-row,
html[data-theme] .chapter-empty,
html[data-theme] .money-hero,
html[data-theme] .tier-card,
html[data-theme] .withdraw-card,
html[data-theme] .withdraw-info,
html[data-theme] .leaderboard-list,
html[data-theme] .leaderboard-podium,
html[data-theme] .leaderboard-motivation,
html[data-theme] .search-hero-panel,
html[data-theme] .community-panel,
html[data-theme] .notification-popover,
html[data-theme] .profile-dropdown,
html[data-theme] .mobile-search-panel,
html[data-theme] .auth-card,
html[data-theme] .install-card,
html[data-theme] .mission-summary,
html[data-theme] .mission-summary>div,
html[data-theme] .mission-card,
html[data-theme] .mission-economy,
html[data-theme] .mission-track,
html[data-theme] .review-card,
html[data-theme] .comment-card,
html[data-theme] .review-compose,
html[data-theme] .comment-compose-form,
html[data-theme] .feed-preview-row,
html[data-theme] .package,
html[data-theme] .creator-book-card,
html[data-theme] .creator-profile__card,
html[data-theme] .creator-profile-hero,
html[data-theme] .story-hero,
html[data-theme] .story-chapters,
html[data-theme] .reading-page,
html[data-theme] .reader-article,
html[data-theme] .reader-pagination,
html[data-theme] .support-dialog,
html[data-theme] dialog,
html[data-theme] .modal,
html[data-theme] .modal-content{background:var(--ck-surface)!important;color:var(--ck-text)!important;border-color:var(--ck-line)!important;}

html[data-theme="light"] .mission-summary,
html[data-theme="light"] .mission-economy{background:linear-gradient(145deg,#ffffff,#f4f8fd)!important;}
html[data-theme="dark"] .mission-summary,
html[data-theme="dark"] .mission-economy{background:linear-gradient(145deg,#142438,#111d2d)!important;}
html[data-theme="dark"] .mission-summary>div{background:#16263a!important;border-color:#2a3d54!important;}
html[data-theme="dark"] .mission-card.is-claimed{background:linear-gradient(145deg,#142a24,#12221e)!important;}
html[data-theme="dark"] .mission-card.is-complete:not(.is-claimed){background:#142438!important;border-color:#355a7f!important;}
html[data-theme="dark"] .mission-track{background:#22364a!important;}
html[data-theme="dark"] .mission-progress>div:first-child,
html[data-theme="dark"] .mission-card p,
html[data-theme="dark"] .mission-state,
html[data-theme="dark"] .mission-summary span:last-child,
html[data-theme="dark"] .mission-economy p{color:var(--ck-muted)!important;}
html[data-theme="dark"] .mission-kicker{color:#93a8bd!important;}
html[data-theme="dark"] .mission-reward{background:#17304b!important;border-color:#355a7f!important;color:#a9d1ff!important;}
html[data-theme="dark"] .mission-state.success{color:#9ce0bf!important;}

html[data-theme] .field-hint,
html[data-theme] .hero-meta,
html[data-theme] .section-subtitle,
html[data-theme] .page-heading p,
html[data-theme] .section-head p,
html[data-theme] .story-author,
html[data-theme] .story-synopsis,
html[data-theme] .story-trust,
html[data-theme] .story-rating,
html[data-theme] .author,
html[data-theme] .clamp,
html[data-theme] .story-meta,
html[data-theme] .row-top,
html[data-theme] .meta,
html[data-theme] .muted,
html[data-theme] .withdraw-value,
html[data-theme] .withdraw-info p,
html[data-theme] .withdraw-history-row small{color:var(--ck-muted)!important;}
html[data-theme] h1,html[data-theme] h2,html[data-theme] h3,html[data-theme] h4,html[data-theme] h5,html[data-theme] h6,
html[data-theme] p,html[data-theme] label,html[data-theme] strong,html[data-theme] .section-head,
html[data-theme] .story-body h3,html[data-theme] .story-body h3 a,
html[data-theme] .mission-card h2,html[data-theme] .mission-summary strong,
html[data-theme] .rank-user strong,html[data-theme] .podium-place strong{color:var(--ck-text)!important;}
html[data-theme] .eyebrow,.ck-eyebrow{color:var(--ck-muted)!important;}
html[data-theme] .btn:not(.btn-primary),html[data-theme] .icon-button,html[data-theme] .top-icon,
html[data-theme] .profile-trigger,.ck-pill{background:var(--ck-elevated)!important;color:var(--ck-text)!important;border-color:var(--ck-line)!important;}
html[data-theme] .btn:not(.btn-primary):hover,html[data-theme] .icon-button:hover,html[data-theme] .top-icon:hover{background:var(--ck-hover)!important;}
html[data-theme] input,html[data-theme] select,html[data-theme] textarea,
html[data-theme] .searchbar input,html[data-theme] .search-field,html[data-theme] .filter input,html[data-theme] .filter select,
html[data-theme] .filter-bar select,.field input,.field select,.field textarea,.support-form input,.support-form textarea,
html[data-theme] .voucher-form input,.ticket-reply textarea{background:var(--ck-input)!important;color:var(--ck-text)!important;border-color:var(--ck-line)!important;-webkit-text-fill-color:var(--ck-text)!important;}
html[data-theme] input::placeholder,html[data-theme] textarea::placeholder{color:var(--ck-muted)!important;opacity:1;}
html[data-theme] .sidebar,html[data-theme] .topbar,html[data-theme] .site-footer{background:var(--ck-surface)!important;border-color:var(--ck-line)!important;color:var(--ck-text)!important;}
html[data-theme] .side-item{color:var(--ck-text)!important;}
html[data-theme] .side-item:hover{background:var(--ck-hover)!important;color:var(--ck-text)!important;}
html[data-theme] .side-item.active{background:var(--ck-soft)!important;color:var(--ck-blue)!important;}
html[data-theme] .sidebar-title-row,html[data-theme] .side-caption{color:var(--ck-muted)!important;}
html[data-theme] .sidebar-divider{background:var(--ck-line)!important;}
html[data-theme] .global-search{background:var(--ck-input)!important;color:var(--ck-text)!important;border-color:var(--ck-line)!important;}
html[data-theme] .global-search input{background:transparent!important;color:var(--ck-text)!important;-webkit-text-fill-color:var(--ck-text)!important;}
html[data-theme] .profile-dropdown a,html[data-theme] .profile-dropdown button{color:var(--ck-text)!important;}
html[data-theme] .profile-summary small,html[data-theme] .profile-coins span{color:var(--ck-muted)!important;}
html[data-theme] .link-list a,html[data-theme] .chapter-row,html[data-theme] .leaderboard-row,
html[data-theme] .notification-item,html[data-theme] .info-block{border-color:var(--ck-line)!important;}
html[data-theme] .chapter-row:hover,html[data-theme] .leaderboard-row:hover{background:var(--ck-hover)!important;}
html[data-theme="dark"] .status-pending{background:var(--ck-warning-bg)!important;color:var(--ck-warning-text)!important;}
html[data-theme="dark"] .status-paid{background:var(--ck-success-bg)!important;color:var(--ck-success-text)!important;}
html[data-theme="dark"] .status-processing{background:var(--ck-info-bg)!important;color:var(--ck-info-text)!important;}
html[data-theme="dark"] .premium-badge{background:#3b311d!important;color:#f0c873!important;border-color:#604f25!important;}
html[data-theme="dark"] .free-badge{background:#17342d!important;color:#8bd5bd!important;border-color:#245344!important;}
html[data-theme="dark"] .btn-support{background:#351f24!important;color:#ffb8c0!important;border-color:#61343d!important;}
html[data-theme="dark"] .review-gate{background:#18293a!important;color:var(--ck-muted)!important;}
html[data-theme="dark"] .review-gate.ready{background:#17304b!important;color:#a9d1ff!important;}
html[data-theme="dark"] .star-picker label span{background:#172638!important;color:var(--ck-text)!important;border-color:var(--ck-line)!important;}
html[data-theme="dark"] .star-picker label input:checked+span{background:#4a3a1b!important;border-color:#80672a!important;color:#f3cc76!important;}
html[data-theme="dark"] .alert{background:var(--ck-danger-bg)!important;border-color:#56363d!important;color:var(--ck-danger-text)!important;}
html[data-theme="dark"] .alert.success{background:var(--ck-success-bg)!important;border-color:#245b47!important;color:var(--ck-success-text)!important;}
html[data-theme="dark"] .banner-image-preview,.banner-row,.health-card,.quick-action,.mini-metric,.admin-kpi{background:var(--ck-surface)!important;color:var(--ck-text)!important;border-color:var(--ck-line)!important;}
html[data-theme="dark"] .banner-preview{border-color:var(--ck-line)!important;background:#18283b!important;}
html[data-theme="dark"] .media-preview{background:var(--ck-soft)!important;border-color:var(--ck-line-strong)!important;color:var(--ck-muted)!important;}
html[data-theme="dark"] .chapter-review{background:var(--ck-warning-bg)!important;color:var(--ck-warning-text)!important;border-color:#604f25!important;}
html[data-theme="dark"] .notice-warning{background:var(--ck-warning-bg)!important;color:var(--ck-warning-text)!important;border-color:#604f25!important;}
html[data-theme="dark"] .empty-state{background:var(--ck-surface)!important;color:var(--ck-text)!important;border-color:var(--ck-line)!important;}
html[data-theme="dark"] .cover-fallback,html[data-theme="dark"] .story-cover-fallback{background:linear-gradient(145deg,#294766,#122235)!important;color:#edf5ff!important;}

/* Prevent page-specific light declarations from punching through the active theme. */
html[data-theme="dark"] [class*="mission"],
html[data-theme="dark"] [class*="withdraw"],
html[data-theme="dark"] [class*="money"],
html[data-theme="dark"] [class*="tier"],
html[data-theme="dark"] [class*="review"],
html[data-theme="dark"] [class*="comment"],
html[data-theme="dark"] [class*="leaderboard"]{--local-text:var(--ck-text);--local-muted:var(--ck-muted);}

/* V34 cache marker */

/* ======================================================================
   V35 — THEME CONTRACT
   Last stylesheet layer: no page is allowed to override active semantic
   surfaces/text with legacy light-only colors.
   ====================================================================== */
html[data-theme]{color-scheme:light;}
html[data-theme="dark"]{color-scheme:dark;background:var(--ck-bg)!important;}
html[data-theme="dark"],html[data-theme="dark"] body{background:var(--ck-bg)!important;color:var(--ck-text)!important;}
html[data-theme="dark"] .main-content,
html[data-theme="dark"] .guest-main,
html[data-theme="dark"] .creator-content,
html[data-theme="dark"] .admin-main,
html[data-theme="dark"] .site-footer,
html[data-theme="dark"] .mobile-bottom{background:transparent!important;color:var(--ck-text)!important;}
html[data-theme="dark"] .panel,
html[data-theme="dark"] .card,
html[data-theme="dark"] [class*="card"],
html[data-theme="dark"] [class*="panel"],
html[data-theme="dark"] [class*="tile"],
html[data-theme="dark"] [class*="summary"],
html[data-theme="dark"] [class*="box"],
html[data-theme="dark"] [class*="composer"],
html[data-theme="dark"] [class*="table-wrap"],
html[data-theme="dark"] [class*="info-block"],
html[data-theme="dark"] [class*="field-card"],
html[data-theme="dark"] [class*="security"],
html[data-theme="dark"] [class*="account"],
html[data-theme="dark"] [class*="settings"]{
  background:var(--ck-surface)!important;
  color:var(--ck-text)!important;
  border-color:var(--ck-line)!important;
}
html[data-theme="dark"] [style*="background"],
html[data-theme="dark"] [style*="background-color"]{
  background-color:var(--ck-surface)!important;
  color:var(--ck-text)!important;
}
html[data-theme="dark"] input,
html[data-theme="dark"] textarea,
html[data-theme="dark"] select,
html[data-theme="dark"] option,
html[data-theme="dark"] button:not(.btn-primary),
html[data-theme="dark"] .form-control{
  color:var(--ck-text)!important;
  background:var(--ck-input)!important;
  border-color:var(--ck-line)!important;
  -webkit-text-fill-color:var(--ck-text)!important;
}
html[data-theme="dark"] option{background-color:var(--ck-input)!important;}
html[data-theme="dark"] ::placeholder{color:var(--ck-muted)!important;opacity:1!important;}
html[data-theme="dark"] a{color:var(--ck-blue);}
html[data-theme="dark"] h1,html[data-theme="dark"] h2,html[data-theme="dark"] h3,html[data-theme="dark"] h4,html[data-theme="dark"] h5,html[data-theme="dark"] h6,
html[data-theme="dark"] p,html[data-theme="dark"] label,html[data-theme="dark"] legend,html[data-theme="dark"] dt,html[data-theme="dark"] dd,html[data-theme="dark"] th,html[data-theme="dark"] td,
html[data-theme="dark"] strong,html[data-theme="dark"] b{color:var(--ck-text)!important;}
html[data-theme="dark"] small,html[data-theme="dark"] em,.muted,html[data-theme="dark"] .muted,html[data-theme="dark"] .hint,html[data-theme="dark"] .field-hint{color:var(--ck-muted)!important;}
html[data-theme="dark"] table{color:var(--ck-text)!important;border-color:var(--ck-line)!important;}
html[data-theme="dark"] thead,html[data-theme="dark"] th{background:var(--ck-surface-2)!important;color:var(--ck-muted)!important;}
html[data-theme="dark"] tr:hover td{background:var(--ck-hover)!important;}
html[data-theme="dark"] hr{border-color:var(--ck-line)!important;background:var(--ck-line)!important;}
html[data-theme="dark"] .topbar{background:rgba(14,26,41,.92)!important;border-color:var(--ck-line)!important;}
html[data-theme="dark"] .sidebar{background:var(--ck-surface-2)!important;border-color:var(--ck-line)!important;}
html[data-theme="dark"] .global-search{background:var(--ck-input)!important;}
html[data-theme="dark"] .global-search input{background:transparent!important;}
html[data-theme="dark"] .notification-popover,html[data-theme="dark"] .profile-dropdown{background:var(--ck-surface)!important;color:var(--ck-text)!important;}
html[data-theme="dark"] .toast{background:var(--ck-surface)!important;color:var(--ck-text)!important;border-color:var(--ck-line)!important;}
html[data-theme="dark"] .toast.error{background:var(--ck-danger-bg)!important;color:var(--ck-danger-text)!important;}
html[data-theme="dark"] .toast.success{background:var(--ck-success-bg)!important;color:var(--ck-success-text)!important;}
html[data-theme="dark"] .reader-prose{background:var(--ck-surface)!important;color:var(--ck-text)!important;}
html[data-theme="dark"] .reader-prose p,html[data-theme="dark"] .reader-prose li,html[data-theme="dark"] .reader-prose blockquote,
html[data-theme="dark"] .reader-prose h1,html[data-theme="dark"] .reader-prose h2,html[data-theme="dark"] .reader-prose h3{color:var(--ck-text)!important;}
html[data-theme="dark"] .reader-translate{border-color:var(--ck-line)!important;color:var(--ck-muted)!important;}
html[data-theme="dark"] .reader-translate .btn.active{background:var(--ck-soft)!important;color:var(--ck-blue)!important;border-color:var(--ck-line-strong)!important;}

/* V35.1 — page-local light CSS neutralization */
html[data-theme="dark"] .profile-premium-head,
html[data-theme="dark"] .profile-hero-card,
html[data-theme="dark"] .profile-account-card,
html[data-theme="dark"] .profile-account-item,
html[data-theme="dark"] .profile-form,
html[data-theme="dark"] .profile-status-pill,
html[data-theme="dark"] .image-preview-box,
html[data-theme="dark"] .creator-profile__card,
html[data-theme="dark"] .creator-profile__hero,
html[data-theme="dark"] .auth-card,
html[data-theme="dark"] .auth-panel,
html[data-theme="dark"] .auth-status,
html[data-theme="dark"] .auth-step,
html[data-theme="dark"] .auth-showcase,
html[data-theme="dark"] .auth-feature-list span,
html[data-theme="dark"] .auth-security-note,
html[data-theme="dark"] .ck-settings .ck-readiness,
html[data-theme="dark"] .ck-settings .ck-integration,
html[data-theme="dark"] .ck-settings .ck-feature-group,
html[data-theme="dark"] .ck-settings .ck-field,
html[data-theme="dark"] .ck-settings .ck-note,
html[data-theme="dark"] .ck-settings .ck-savebar,
html[data-theme="dark"] .chapter-form-card,
html[data-theme="dark"] .chapter-editor,
html[data-theme="dark"] .chapter-editor__side,
html[data-theme="dark"] .chapter-editor__panel{
  background:var(--ck-surface)!important;color:var(--ck-text)!important;border-color:var(--ck-line)!important;
}
html[data-theme="dark"] .profile-hero-card,
html[data-theme="dark"] .profile-account-item,
html[data-theme="dark"] .auth-status,
html[data-theme="dark"] .auth-step{
  background:var(--ck-elevated)!important;
}
html[data-theme="dark"] .profile-hero-copy h1,
html[data-theme="dark"] .profile-display-name,
html[data-theme="dark"] .profile-account-value,
html[data-theme="dark"] .profile-account-item strong,
html[data-theme="dark"] .auth-showcase h1,
html[data-theme="dark"] .auth-showcase h2,
html[data-theme="dark"] .auth-feature-list strong,
html[data-theme="dark"] .auth-card h1,
html[data-theme="dark"] .auth-card h2,
html[data-theme="dark"] .auth-card label{color:var(--ck-text)!important;}
html[data-theme="dark"] .profile-account-label,
html[data-theme="dark"] .profile-account-hint,
html[data-theme="dark"] .auth-showcase p,
html[data-theme="dark"] .auth-feature-list small,
html[data-theme="dark"] .auth-security-note,
html[data-theme="dark"] .auth-password-score{color:var(--ck-muted)!important;}
html[data-theme="dark"] .profile-status-google{background:#17304b!important;color:#a9d1ff!important;border-color:#355a7f!important;}
html[data-theme="dark"] .profile-status-password{background:#18283a!important;color:#c1cede!important;border-color:var(--ck-line)!important;}
html[data-theme="dark"] .ck-settings .ck-state.warn{background:var(--ck-warning-bg)!important;color:var(--ck-warning-text)!important;}
html[data-theme="dark"] .ck-settings .ck-switch span:after{background:#eef5ff!important;}
html[data-theme="dark"] .ck-settings .ck-note{background:var(--ck-soft)!important;color:var(--ck-muted)!important;}
html[data-theme="dark"] .ck-settings .ck-tag{background:var(--ck-soft)!important;color:var(--ck-blue)!important;}
html[data-theme="dark"] .image-preview-box span{color:var(--ck-muted)!important;}
html[data-theme="dark"] .avatar{color:var(--ck-text)!important;}

/* V36 — global responsive + dark surface contract */
html[data-theme="dark"]{
  color-scheme:dark;
  --ck-page-bg:#09111d;
  --ck-surface-deep:#0d1929;
  --ck-surface-soft:#122238;
  --ck-surface-raised:#16283f;
  --ck-text-strong:#f3f7fc;
  --ck-text-body:#d5dfeb;
  --ck-text-muted:#95a7bc;
  --ck-border-dark:#263a53;
}

html[data-theme="dark"] body,
html[data-theme="dark"] .admin-app .main-content,
html[data-theme="dark"] .guest-main,
html[data-theme="dark"] .creator-content,
html[data-theme="dark"] .main-content{
  background:var(--ck-page-bg)!important;
  color:var(--ck-text-body)!important;
}

html[data-theme="dark"] .panel,
html[data-theme="dark"] .card,
html[data-theme="dark"] .hero,
html[data-theme="dark"] .chapter-list,
html[data-theme="dark"] .story-card,
html[data-theme="dark"] .feed-preview-row,
html[data-theme="dark"] .chapter-row,
html[data-theme="dark"] .field-card,
html[data-theme="dark"] .info-panel,
html[data-theme="dark"] .info-block,
html[data-theme="dark"] .setting-row,
html[data-theme="dark"] .settings-grid > *,
html[data-theme="dark"] .mission-summary,
html[data-theme="dark"] .mission-summary > div,
html[data-theme="dark"] .mission-card,
html[data-theme="dark"] .mission-economy,
html[data-theme="dark"] .leaderboard-podium,
html[data-theme="dark"] .leaderboard-list,
html[data-theme="dark"] .leaderboard-motivation,
html[data-theme="dark"] .profile-premium-head,
html[data-theme="dark"] .profile-hero-card,
html[data-theme="dark"] .profile-account-card,
html[data-theme="dark"] .profile-account-item,
html[data-theme="dark"] .profile-form,
html[data-theme="dark"] .profile-status-pill,
html[data-theme="dark"] .creator-profile__card,
html[data-theme="dark"] .creator-profile__hero,
html[data-theme="dark"] .auth-card,
html[data-theme="dark"] .auth-panel,
html[data-theme="dark"] .auth-status,
html[data-theme="dark"] .auth-step,
html[data-theme="dark"] .auth-showcase,
html[data-theme="dark"] .auth-security-note,
html[data-theme="dark"] .chapter-form-card,
html[data-theme="dark"] .chapter-editor,
html[data-theme="dark"] .chapter-editor__side,
html[data-theme="dark"] .chapter-editor__panel{
  background:var(--ck-surface-raised)!important;
  color:var(--ck-text-body)!important;
  border-color:var(--ck-border-dark)!important;
}

html[data-theme="dark"] .mission-summary,
html[data-theme="dark"] .mission-economy{
  background:var(--ck-surface-deep)!important;
}
html[data-theme="dark"] .mission-summary > div,
html[data-theme="dark"] .mission-card.is-claimed{
  background:var(--ck-surface-raised)!important;
}

html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4,
html[data-theme="dark"] h5,
html[data-theme="dark"] h6,
html[data-theme="dark"] strong,
html[data-theme="dark"] b,
html[data-theme="dark"] label,
html[data-theme="dark"] legend,
html[data-theme="dark"] dt,
html[data-theme="dark"] dd,
html[data-theme="dark"] th,
html[data-theme="dark"] td,
html[data-theme="dark"] .story-body h3,
html[data-theme="dark"] .chapter-main h3,
html[data-theme="dark"] .podium-copy h2,
html[data-theme="dark"] .mission-card h2,
html[data-theme="dark"] .page-heading h1,
html[data-theme="dark"] .section-head h1,
html[data-theme="dark"] .section-head h2,
html[data-theme="dark"] .profile-display-name,
html[data-theme="dark"] .profile-hero-copy h1,
html[data-theme="dark"] .profile-account-value,
html[data-theme="dark"] .auth-showcase h1,
html[data-theme="dark"] .auth-showcase h2,
html[data-theme="dark"] .auth-card h1,
html[data-theme="dark"] .auth-card h2{
  color:var(--ck-text-strong)!important;
  text-shadow:none!important;
}

html[data-theme="dark"] p,
html[data-theme="dark"] .page-heading p,
html[data-theme="dark"] .clamp,
html[data-theme="dark"] .author,
html[data-theme="dark"] .story-meta,
html[data-theme="dark"] .chapter-main__meta,
html[data-theme="dark"] .mission-card p,
html[data-theme="dark"] .mission-card-foot,
html[data-theme="dark"] .mission-economy p,
html[data-theme="dark"] .leaderboard-heading p,
html[data-theme="dark"] .leaderboard-motivation p,
html[data-theme="dark"] .podium-copy p,
html[data-theme="dark"] .comment .meta,
html[data-theme="dark"] .muted,
html[data-theme="dark"] .hint,
html[data-theme="dark"] .field-hint,
html[data-theme="dark"] .history-label,
html[data-theme="dark"] small,
html[data-theme="dark"] em{
  color:var(--ck-text-muted)!important;
}

html[data-theme="dark"] a:not(.btn),
html[data-theme="dark"] .verified,
html[data-theme="dark"] .link-list a{
  color:#8ebcff!important;
}
html[data-theme="dark"] a:not(.btn):hover{color:#b6d4ff!important}

html[data-theme="dark"] input,
html[data-theme="dark"] textarea,
html[data-theme="dark"] select,
html[data-theme="dark"] .search-field,
html[data-theme="dark"] .global-search,
html[data-theme="dark"] .searchbar input,
html[data-theme="dark"] .voucher-form input,
html[data-theme="dark"] .install-form input{
  background:#0b1727!important;
  color:var(--ck-text-strong)!important;
  border-color:var(--ck-border-dark)!important;
  -webkit-text-fill-color:var(--ck-text-strong)!important;
}
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder{color:#7f94ab!important;opacity:1!important}
html[data-theme="dark"] option{background:#0b1727!important;color:#f3f7fc!important}

html[data-theme="dark"] .topbar,
html[data-theme="dark"] .sidebar,
html[data-theme="dark"] .notification-popover,
html[data-theme="dark"] .profile-dropdown,
html[data-theme="dark"] .mobile-search-panel{
  background:#0f1c2d!important;
  border-color:var(--ck-border-dark)!important;
  color:var(--ck-text-body)!important;
}
html[data-theme="dark"] .top-icon,
html[data-theme="dark"] .icon-button,
html[data-theme="dark"] .btn:not(.btn-primary),
html[data-theme="dark"] .profile-trigger{
  background:#122238!important;
  color:var(--ck-text-body)!important;
  border-color:var(--ck-border-dark)!important;
}
html[data-theme="dark"] .btn:not(.btn-primary):hover,
html[data-theme="dark"] .side-item:hover{background:#1a2c43!important;color:#fff!important}
html[data-theme="dark"] .side-item{color:#c6d3e2!important}
html[data-theme="dark"] .side-item.active{background:#153d6e!important;color:#eaf4ff!important}
html[data-theme="dark"] .sidebar-title-row,
html[data-theme="dark"] .side-caption,
html[data-theme="dark"] .eyebrow{color:#90a6bd!important}
html[data-theme="dark"] .sidebar-divider,
html[data-theme="dark"] hr{background:var(--ck-border-dark)!important;border-color:var(--ck-border-dark)!important}

html[data-theme="dark"] .alert,
html[data-theme="dark"] .install-note,
html[data-theme="dark"] .highlight-card,
html[data-theme="dark"] .chapter-review,
html[data-theme="dark"] .image-preview-box,
html[data-theme="dark"] .comment.reply,
html[data-theme="dark"] .voucher-history-chip{
  background:#132237!important;
  color:var(--ck-text-body)!important;
  border-color:var(--ck-border-dark)!important;
}
html[data-theme="dark"] .alert.success{background:#0f2c22!important;color:#9ce4c0!important;border-color:#1f5a45!important}
html[data-theme="dark"] .alert.error{background:#34191e!important;color:#ffc0c8!important;border-color:#73313b!important}

html[data-theme="dark"] .mission-track{background:#24364c!important}
html[data-theme="dark"] .mission-reward{background:#173a62!important;color:#abd0ff!important;border-color:#315b85!important}
html[data-theme="dark"] .chapter-status{background:#223245!important;color:#bdcad7!important}
html[data-theme="dark"] .chapter-status.published{background:#123326!important;color:#8fe1bc!important}
html[data-theme="dark"] .chapter-status.pending_review,
html[data-theme="dark"] .chapter-status.scheduled{background:#3a2d16!important;color:#e8c77c!important}
html[data-theme="dark"] .chapter-status.revision{background:#28234c!important;color:#b8b4ff!important}
html[data-theme="dark"] .chapter-status.rejected{background:#3b2025!important;color:#f2aab3!important}
html[data-theme="dark"] .chapter-premium-badge{background:#3b2c13!important;color:#f2cd78!important;border-color:#6c5420!important}
html[data-theme="dark"] .chapter-free-badge{background:#16312c!important;color:#a5d8ca!important;border-color:#28584f!important}

/* Responsive contract — all app pages */
html,body{max-width:100%;overflow-x:hidden}
img,svg,video,canvas,iframe{max-width:100%}
button,input,select,textarea{max-width:100%}
.main-content{min-width:0}
.story-grid,.stats-grid,.form-grid,.install-grid,.grid-2,.mission-grid,.mission-summary{min-width:0}
.table-wrap,.data-table-wrap,.table-responsive{width:100%;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
.data-table{min-width:680px}

@media (max-width:1050px){
  .topbar-inner{padding-inline:14px;gap:10px}
  .global-search{width:min(360px,44vw)}
  .main-content{padding:22px 18px 76px}
  .story-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .hero{grid-template-columns:1fr;padding:26px}
}

@media (max-width:900px){
  .mobile-only{display:grid!important}
  .topbar-inner{height:58px}
  .topbar{height:58px}
  .app-shell{min-height:calc(100vh - 58px)}
  .sidebar{position:fixed!important;left:0;top:58px;height:calc(100vh - 58px);transform:translateX(-105%);transition:transform .2s ease;box-shadow:18px 0 40px rgba(0,0,0,.18);z-index:120}
  body.sidebar-open .sidebar{transform:translateX(0)}
  .sidebar-backdrop{display:block;position:fixed;inset:58px 0 0;background:rgba(3,10,18,.54);opacity:0;pointer-events:none;transition:opacity .2s ease;z-index:110}
  body.sidebar-open .sidebar-backdrop{opacity:1;pointer-events:auto}
  .main-content{width:100%;padding:20px 16px 78px}
  .hero{gap:18px}
  .story-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .grid-2,.form-grid,.install-grid{grid-template-columns:1fr}
  .field.full{grid-column:auto}
  .section-head,.setting-row{align-items:flex-start}
  .top-actions{gap:6px}
  .global-search{display:none}
  .mobile-search-toggle{display:grid!important}
}

@media (max-width:680px){
  .brand span:last-child{font-size:14px}
  .topbar-inner{padding-inline:10px}
  .top-actions .btn{display:none}
  .language-switcher{display:flex}
  .main-content{padding:18px 12px 82px}
  .page-heading h1{font-size:30px}
  .hero{padding:20px;border-radius:18px}
  .hero h1{font-size:clamp(30px,9vw,42px)}
  .story-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .story-body{padding:11px}
  .story-body h3{font-size:15px}
  .stats-grid{grid-template-columns:1fr}
  .mission-summary{grid-template-columns:1fr}
  .mission-card,.panel,.card{padding:15px}
  .mission-card-head,.mission-card-foot{gap:10px}
  .mission-card-foot{flex-direction:column;align-items:stretch}
  .mission-card-foot .btn{width:100%}
  .leaderboard-podium{padding:16px}
  .podium{min-height:190px}
  .leaderboard-row{grid-template-columns:44px minmax(0,1fr) auto;padding-inline:8px}
  .chapter-manager-row{grid-template-columns:44px minmax(0,1fr);gap:10px;padding:12px}
  .chapter-actions{grid-column:1/-1;justify-content:stretch}
  .chapter-actions .btn{flex:1 1 0}
  .actions{width:100%}
  .actions .btn{flex:1 1 auto}
  .form-grid .btn,.form-grid button{width:100%}
  .profile-trigger .profile-name{max-width:90px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .notification-popover,.profile-dropdown{max-width:calc(100vw - 20px);right:0}
  .mobile-bottom{display:flex!important}
}

@media (max-width:430px){
  .story-grid{grid-template-columns:1fr 1fr;gap:8px}
  .story-cover{aspect-ratio:3/4}
  .page-heading h1{font-size:27px}
  .section-head{display:block}
  .section-head .btn{margin-top:10px}
  .language-switcher .lang-pill{padding-inline:8px}
}

@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{scroll-behavior:auto!important;transition-duration:.001ms!important;animation-duration:.001ms!important;animation-iteration-count:1!important}
}

/* V36 settings/cache and mobile finishing touches */
.settings-cache-panel .setting-row{align-items:center}
.settings-cache-panel .muted{max-width:760px}
html[data-theme="dark"] .settings-cache-panel{background:var(--ck-surface-raised)!important}
html[data-theme="dark"] .settings-cache-panel .btn{background:#132a46!important;color:#dcecff!important;border-color:#2f5275!important}

@media(max-width:760px){
  .settings-cache-panel .setting-row{flex-direction:column;align-items:stretch}
  .settings-cache-panel .btn{width:100%}
  .install-card{padding:20px}
  .auth-card{margin:24px 12px}
  .hero-art{min-height:150px;padding:20px}
  .footer-inner,.footer-links{flex-direction:column;align-items:flex-start;gap:10px}
  .reader-pagination{grid-template-columns:1fr!important;gap:8px!important}
  .reader-pagination > *{width:100%}
  .reader-pagination .btn{width:100%}
}

/* Final responsive contract — resolves legacy overrides */
@media (min-width: 681px){
  .mobile-only{display:none!important}
  .mobile-search-toggle{display:none!important}
  .sidebar-backdrop{display:none!important;opacity:0!important;pointer-events:none!important;backdrop-filter:none!important}
}
@media (min-width: 681px) and (max-width: 900px){
  .app-shell{min-height:calc(100vh - 64px)}
  .sidebar{position:sticky!important;top:64px!important;height:calc(100vh - 64px)!important;transform:none!important;width:220px!important;flex-basis:220px!important;box-shadow:none!important}
  .topbar,.topbar-inner{height:64px}
  .main-content{padding:22px 18px 76px}
  .global-search{display:flex;width:min(360px,42vw)}
}
@media (max-width: 680px){
  .topbar,.topbar-inner{height:60px}
  .topbar{position:sticky;top:0;z-index:1400}
  .topbar-inner{padding:0 10px;gap:8px;width:100%;min-width:0}
  .mobile-only{display:grid!important;flex:0 0 38px}
  .brand{min-width:0;gap:8px;overflow:hidden}
  .brand span:last-child{font-size:15px;overflow:hidden;text-overflow:ellipsis}
  .top-actions{margin-left:auto;min-width:0;gap:5px;flex:0 0 auto}
  .top-actions .language-switcher{display:flex}
  .top-actions .btn,.desktop-search{display:none!important}
  .top-icon,.icon-button{width:36px;height:36px}
  .profile-trigger{width:36px!important;height:36px!important;padding:3px!important}
  .profile-trigger .profile-name,.profile-trigger .icon{display:none!important}
  .sidebar{position:fixed!important;left:0!important;top:60px!important;height:calc(100dvh - 60px)!important;width:min(84vw,290px)!important;flex-basis:min(84vw,290px)!important;transform:translate3d(-105%,0,0)!important;transition:transform .22s ease!important;z-index:1500!important;box-shadow:16px 0 34px rgba(12,31,54,.20)!important;backdrop-filter:none!important}
  body.sidebar-open .sidebar{transform:translate3d(0,0,0)!important}
  .sidebar-backdrop{display:block!important;position:fixed!important;left:0!important;right:0!important;top:60px!important;bottom:0!important;background:rgba(10,24,40,.34)!important;opacity:0!important;pointer-events:none!important;z-index:1490!important;backdrop-filter:none!important}
  body.sidebar-open .sidebar-backdrop{opacity:1!important;pointer-events:auto!important}
  .main-content{width:100%!important;min-width:0!important;padding:18px 12px 86px!important}
  .reader-auto-translate{display:inline-flex;align-items:center;min-height:28px;padding:0 9px;border-radius:999px;background:#edf6ff;color:#276aa8;font-size:11px;font-weight:800;white-space:nowrap}
  .reader-toolbar{gap:10px;align-items:center}
  .reader-toolbar-actions{min-width:0;display:flex;align-items:center;justify-content:flex-end;gap:7px}
  .notification-popover,.profile-dropdown{z-index:1600!important;max-width:calc(100vw - 20px)!important}
  .mobile-bottom{z-index:1300!important}
}
@media (prefers-reduced-motion:reduce){
  .sidebar{transition:none!important}
}


/* V41 — Premium mobile shell and safe overlays */
@media (max-width:680px){
  html,body{max-width:100%;overflow-x:hidden}
  body.menu-lock{overflow:hidden;overscroll-behavior:none}
  .topbar{height:64px;z-index:1400}
  .topbar-inner{height:64px;display:grid;grid-template-columns:40px minmax(0,1fr) 40px 40px;align-items:center;gap:6px;padding:0 10px}
  .mobile-only{display:grid!important;grid-column:1;grid-row:1;width:40px;height:40px;border:0;background:transparent;border-radius:14px}
  .brand{grid-column:2;grid-row:1;justify-self:center;min-width:0;max-width:100%;gap:8px}
  .brand-mark{width:34px;height:34px;border-radius:11px;box-shadow:0 6px 18px rgba(24,119,242,.22)}
  .brand span:last-child{font-size:15px;letter-spacing:-.25px}
  .mobile-search-toggle{display:none!important}
  .top-actions{display:contents;margin:0}
  .top-actions>a,.top-actions>.btn{display:none!important}
  .header-notification{grid-column:3;grid-row:1;justify-self:end}
  .profile-menu{grid-column:4;grid-row:1;justify-self:end}
  .language-switcher,.theme-toggle{display:none!important}
  .top-icon,.profile-trigger{width:38px!important;height:38px!important;border-radius:13px!important}
  .profile-trigger{padding:3px!important;border:1px solid #e1e8f1!important;background:#fff!important}
  .profile-trigger .profile-name,.profile-trigger > svg{display:none!important}
  .mobile-search-panel{position:fixed;left:10px;right:10px;top:70px;z-index:1450;padding:8px;border:1px solid #dce8f5;border-radius:18px;background:rgba(255,255,255,.96);box-shadow:0 18px 48px rgba(19,42,68,.18);backdrop-filter:blur(16px)}
  .mobile-search-panel form{display:flex;align-items:center;gap:8px}
  .mobile-search-panel input{min-width:0;flex:1;height:42px;border:0;outline:0;background:transparent}
  .sidebar{top:64px!important;height:calc(100dvh - 64px)!important;width:min(86vw,310px)!important;border:1px solid #e1e9f2!important;border-left:0!important;border-radius:0 24px 24px 0!important;box-shadow:24px 0 60px rgba(14,35,58,.20)!important;background:rgba(255,255,255,.98)!important}
  .sidebar-scroll{padding:14px 12px 28px}
  .sidebar-title-row{padding:10px 8px 12px;font-size:10px}
  .side-item{min-height:48px;padding:10px 13px;border-radius:14px;gap:12px}
  .side-item.active{box-shadow:inset 3px 0 0 #1877f2,0 4px 14px rgba(24,119,242,.08)}
  .sidebar-backdrop{top:64px!important;background:rgba(8,22,38,.28)!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;z-index:1390!important}
  .sidebar{z-index:1400!important}
  .notification-popover,.profile-dropdown{position:fixed!important;top:72px!important;right:10px!important;left:auto!important;width:min(360px,calc(100vw - 20px))!important;max-width:none!important;max-height:min(70dvh,560px)!important;overflow:auto!important;margin:0!important;border-radius:20px!important;box-shadow:0 24px 70px rgba(8,28,49,.22)!important;z-index:1600!important}
  .profile-dropdown{width:min(320px,calc(100vw - 20px))!important}
  .notification-popover-head{position:sticky;top:0;background:inherit;z-index:1}
  .main-content{padding:18px 12px 102px!important}
  .panel,.card,.hero{border-radius:18px}
  .mobile-bottom{position:fixed!important;left:10px;right:10px;bottom:10px;height:68px;display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr));gap:4px;padding:6px;border:1px solid #dbe6f1;border-radius:22px;background:rgba(255,255,255,.92);box-shadow:0 16px 44px rgba(20,43,68,.18);backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);z-index:1300}
  .mobile-bottom a{min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;border-radius:16px;color:#73839a;font-size:10px;font-weight:800;line-height:1;overflow:hidden}
  .mobile-bottom a.active{color:#1877f2;background:#edf5ff;box-shadow:inset 0 0 0 1px #d4e7ff}
  .mobile-bottom svg{width:19px;height:19px;flex:none}
  .mobile-bottom-studio{background:rgba(248,251,255,.94)}
  .mobile-bottom-studio a.active{background:#eaf3ff}
}
@media (max-width:390px){
  .topbar-inner{grid-template-columns:38px minmax(0,1fr) 38px 38px;padding-inline:8px}
  .mobile-only,.top-icon,.profile-trigger{width:36px!important;height:36px!important}
  .brand span:last-child{font-size:14px}
  .mobile-bottom{left:8px;right:8px;bottom:8px}
  .mobile-bottom a{font-size:9px}
}

/* V41 — leaderboard mobile card system */
@media (max-width:900px){
  .leaderboard-page{max-width:780px}
  .leaderboard-heading{align-items:flex-start}
  .leaderboard-podium{gap:16px}
  .leaderboard-list{padding:0;overflow:visible;background:transparent;border:0;box-shadow:none}
  .leaderboard-list-head{display:none}
  .leaderboard-row{grid-template-columns:42px minmax(0,1fr) auto;gap:10px;margin-bottom:9px;padding:12px 13px;border:1px solid var(--ck-line);border-radius:16px;background:var(--ck-surface)}
  .leaderboard-row>span:nth-child(3),.leaderboard-row>span:nth-child(4){display:none}
}
@media (max-width:680px){
  .leaderboard-heading{margin-bottom:14px}
  .leaderboard-heading h1{font-size:32px}
  .leaderboard-heading p{font-size:13px}
  .leaderboard-podium{padding:16px;border-radius:18px;margin-bottom:12px}
  .podium-copy h2{font-size:22px}
  .podium{min-height:190px;grid-template-columns:repeat(3,minmax(0,1fr));align-items:end;gap:4px}
  .podium-place{min-height:132px;padding:8px 2px;border-radius:16px;background:var(--ck-soft)}
  .podium-place.first{min-height:164px;background:linear-gradient(180deg,#edf5ff,#f7fbff)}
  .podium-medal{width:28px;height:28px;border-radius:50%;display:grid;place-items:center;font-weight:900;background:#fff;border:1px solid #dbe7f3;box-shadow:0 5px 14px rgba(18,45,74,.08)}
  .podium-place strong{max-width:100%;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .podium-place small{font-size:9px;color:var(--ck-muted);max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .leaderboard-row{grid-template-columns:40px minmax(0,1fr) auto;min-height:64px;padding:10px}
  .rank-score{font-size:12px;white-space:nowrap}
  .rank-user strong{font-size:13px}
  .rank-user small{font-size:10px}
  .leaderboard-motivation{padding:16px;margin-top:8px;border-radius:18px}
}


/* V42 — mobile profile preferences, dark avatar contrast, premium loading */
.profile-mobile-preferences{display:none;margin:8px 0 4px;padding:10px 0 2px;border-top:1px solid var(--ck-line,#e1e8f1)}
.profile-pref-title{font-size:10px;font-weight:900;letter-spacing:.12em;text-transform:uppercase;color:var(--ck-muted,#73839a);margin-bottom:8px}
.profile-pref-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.profile-pref-group{display:grid;gap:6px;min-width:0}
.profile-pref-group>span{font-size:10px;font-weight:800;color:var(--ck-muted,#73839a)}
.profile-pref-pills{display:grid;grid-template-columns:1fr 1fr;gap:5px;background:var(--ck-soft,#f2f6fa);padding:3px;border-radius:10px}
.profile-pref-pill{display:flex;align-items:center;justify-content:center;min-height:30px;border-radius:8px;font-size:11px;font-weight:900;color:var(--ck-muted,#66758a)}
.profile-pref-pill.active{background:var(--ck-surface,#fff);color:var(--ck-blue,#1877f2);box-shadow:0 3px 10px rgba(17,48,80,.10)}
.profile-pref-theme{display:flex;align-items:center;justify-content:center;gap:6px;min-height:36px;width:100%;padding:6px 8px;border:1px solid var(--ck-line,#dbe5ef);border-radius:10px;background:var(--ck-soft,#f2f6fa);color:var(--ck-text,#24324a);font-size:11px;font-weight:900}
.premium-loading{position:fixed;inset:0;display:grid;place-items:center;background:rgba(7,20,35,.18);backdrop-filter:blur(7px);-webkit-backdrop-filter:blur(7px);opacity:0;visibility:hidden;pointer-events:none;transition:opacity .18s ease,visibility .18s ease;z-index:3000}
.premium-loading.is-visible{opacity:1;visibility:visible;pointer-events:auto}
.premium-loading-card{display:flex;align-items:center;gap:12px;padding:14px 18px;border:1px solid rgba(255,255,255,.58);border-radius:18px;background:rgba(255,255,255,.93);box-shadow:0 24px 70px rgba(4,20,39,.24);color:#152842;font-size:13px;font-weight:850}
.premium-spinner{width:22px;height:22px;border:2px solid #d9e6f4;border-top-color:#1877f2;border-radius:50%;animation:ck-spin .72s linear infinite}
@keyframes ck-spin{to{transform:rotate(360deg)}}
html[data-theme="dark"] .profile-mobile-preferences{border-top-color:var(--ck-border-dark)}
html[data-theme="dark"] .profile-pref-pills{background:#0b1727}
html[data-theme="dark"] .profile-pref-pill{color:#91a7bf}
html[data-theme="dark"] .profile-pref-pill.active{background:#17314e;color:#79b4ff;box-shadow:none}
html[data-theme="dark"] .profile-pref-theme{background:#13243a;border-color:#2c4864;color:#e7eff8}
html[data-theme="dark"] .premium-loading{background:rgba(0,0,0,.34)}
html[data-theme="dark"] .premium-loading-card{background:rgba(15,28,45,.96);border-color:#31506e;color:#f1f6fb}
html[data-theme="dark"] .premium-spinner{border-color:#28435e;border-top-color:#5ea3ff}
html[data-theme="dark"] .profile-trigger .avatar,
html[data-theme="dark"] .profile-trigger .avatar-frame .avatar,
html[data-theme="dark"] .profile-summary .avatar{background:#203b5c!important;color:#fff!important;border-color:#3b6086!important}
html[data-theme="dark"] .profile-trigger .avatar img,
html[data-theme="dark"] .profile-summary .avatar img{filter:none!important;opacity:1!important}
html[data-theme="dark"] .avatar{color:#f2f7fc!important}

@media (max-width:680px){
  .profile-mobile-preferences{display:block}
  .notification-popover,.profile-dropdown{left:auto!important;right:max(10px,env(safe-area-inset-right))!important;width:min(360px,calc(100vw - 20px))!important;box-sizing:border-box!important}
  .profile-dropdown{width:min(328px,calc(100vw - 20px))!important}
  .profile-dropdown a,.profile-dropdown form button{min-height:42px}
  .topbar-inner{grid-template-columns:38px minmax(0,1fr) 40px 40px;padding-inline:max(8px,env(safe-area-inset-left)) max(8px,env(safe-area-inset-right));gap:5px}
  .brand{justify-self:start;max-width:100%}
  .brand-mark{width:34px;height:34px;flex:none}
  .header-notification,.profile-menu{min-width:0}
  .leaderboard-page{width:100%;min-width:0;overflow:hidden}
  .leaderboard-podium{width:100%;min-width:0;overflow:hidden}
  .podium{width:100%;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
  .podium-place{min-width:0;overflow:hidden}
  .podium-place strong,.podium-place small{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .leaderboard-list{width:100%;min-width:0}
  .leaderboard-row{width:100%;min-width:0;grid-template-columns:38px minmax(0,1fr) auto;box-sizing:border-box;overflow:hidden}
  .rank-user{min-width:0;overflow:hidden;display:flex!important;gap:8px;align-items:center}
  .rank-user>span:last-child{min-width:0;overflow:hidden}
  .rank-user strong,.rank-user small{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .rank-score{justify-self:end;max-width:76px;overflow:hidden;text-overflow:ellipsis}
}
@media(max-width:390px){
  .topbar-inner{grid-template-columns:36px minmax(0,1fr) 38px 38px}
  .brand span:last-child{font-size:14px}
  .profile-mobile-preferences .profile-pref-grid{grid-template-columns:1fr}
  .notification-popover,.profile-dropdown{right:8px!important;width:calc(100vw - 16px)!important}
}
@media(prefers-reduced-motion:reduce){.premium-spinner{animation:none}.premium-loading{transition:none}}

/* V42.1 — admin dark-mode form controls */
html[data-theme="dark"] .ck-settings .ck-brand-grid input,
html[data-theme="dark"] .ck-settings .ck-brand-grid select,
html[data-theme="dark"] .ck-settings .ck-brand-grid textarea {
  background:var(--ck-surface)!important;
  color:var(--ck-text)!important;
  border-color:var(--ck-line)!important;
}
html[data-theme="dark"] .ck-settings .ck-brand-grid input::placeholder,
html[data-theme="dark"] .ck-settings .ck-brand-grid textarea::placeholder {
  color:var(--ck-muted)!important;
}

