:root {
  --bg:#080806;
  --panel:rgba(13,12,10,.88);
  --panel-strong:rgba(10,10,8,.94);
  --paper:#fff6df;
  --paper-2:#f5e8c6;
  --ink:#fff7df;
  --muted:#d5caa9;
  --black:#080806;
  --red:#d83d32;
  --green:#50a36c;
  --yellow:#ffcc3e;
  --gold:#b68d2d;
  --blue:#5864ee;
  --radius:14px;
  --shadow:0 18px 40px rgba(0,0,0,.45);
  color-scheme:dark;
}
body.light-mode {
  --bg:#f7f2e5;
  --panel:rgba(255,250,235,.9);
  --panel-strong:rgba(255,247,224,.96);
  --paper:#fffaf0;
  --paper-2:#f5e8c6;
  --ink:#181511;
  --muted:#5c5444;
  color-scheme:light;
}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;min-height:100vh;background:var(--bg);color:var(--ink);font-family:Arial,Helvetica,sans-serif;overflow-x:hidden}.page-bg{position:fixed;inset:0;background:linear-gradient(rgba(0,0,0,.68),rgba(0,0,0,.74)),url('assets/comic-background-2k.webp') center/cover no-repeat;filter:saturate(1.08);z-index:-2}body.light-mode .page-bg{background:linear-gradient(rgba(255,255,255,.55),rgba(255,255,255,.62)),url('assets/comic-background-2k.webp') center/cover no-repeat}.app-shell{min-height:100vh}.site-header{position:sticky;top:0;z-index:10;display:grid;grid-template-columns:230px 1fr;gap:20px;align-items:center;min-height:190px;padding:20px 28px;background:linear-gradient(90deg,rgba(0,0,0,.86),rgba(20,18,14,.72),rgba(0,0,0,.82));box-shadow:0 10px 28px rgba(0,0,0,.5);backdrop-filter:blur(10px)}body.light-mode .site-header{background:linear-gradient(90deg,rgba(255,250,235,.94),rgba(255,250,235,.72),rgba(255,250,235,.92))}.brand-zone{display:flex;flex-direction:column;align-items:flex-start;gap:10px}.brand-banner{width:140px;max-width:100%;filter:drop-shadow(0 6px 0 rgba(0,0,0,.6))}.auth-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;width:220px}.auth-action,.segmented button,.ghost-action,.primary-action,.pagination-button,.icon-button,.social-button{border:3px solid #070707;border-radius:8px;box-shadow:3px 4px 0 #000;font-weight:900;cursor:pointer;transition:.18s transform,.18s filter}.auth-action{background:var(--yellow);color:#111;padding:10px}.logout-action{grid-column:1/-1;background:var(--red);color:#fff}.current-user-badge{grid-column:1/-1;border:1px solid var(--gold);border-radius:7px;padding:8px;text-align:center;color:var(--yellow);font-weight:900;background:rgba(0,0,0,.45)}.toolbar{display:flex;justify-content:space-between;align-items:center;gap:24px}.reader-circle{width:145px;height:145px;border-radius:50%;background:radial-gradient(circle at 35% 30%,#ffe680 0 14%,#c42824 15% 55%,#8d1716 56%);border:9px solid #d7ab39;box-shadow:7px 8px 0 #050505;color:#fff;transform:rotate(-5deg)}.reader-circle span{font-size:22px;font-weight:1000;text-transform:uppercase;text-shadow:3px 3px #000}.segmented{display:flex;align-items:center;background:rgba(0,0,0,.75);border:3px solid #080806;border-radius:10px;padding:6px;box-shadow:6px 6px 0 rgba(0,0,0,.55)}.segmented button{background:#111;color:#f3dfab;padding:16px 25px;border-radius:7px;box-shadow:none}.segmented button.is-active{background:var(--yellow);color:#111}.segmented .moderator-tab{background:var(--green);color:#061408}.segmented #uploadView{background:var(--red);color:white}.segmented #themeToggle{background:#fff6df;color:#111}.content{max-width:1320px;margin:0 auto;padding:42px 24px 120px}.content-panel{background:var(--panel);border:1px solid rgba(255,204,62,.32);border-radius:var(--radius);box-shadow:var(--shadow);padding:28px;backdrop-filter:blur(9px)}.section-heading,.panel-title,.mini-heading{display:flex;justify-content:space-between;gap:18px;align-items:center}.section-heading h2{font-size:46px;line-height:.9;margin:0;text-transform:uppercase;letter-spacing:-2px;text-shadow:4px 4px 0 #000}.eyebrow{margin:0 0 6px;color:var(--yellow);text-transform:uppercase;font-weight:1000;font-size:13px}.library-tools{display:flex;flex-wrap:wrap;gap:14px;margin-bottom:22px}.search{display:flex;align-items:center;gap:9px;background:var(--paper);color:#111;border:3px solid #111;border-radius:9px;padding:4px 12px;box-shadow:4px 5px 0 #000}.search input,.field input,.field select{width:100%;border:0;background:rgba(255,255,255,.78);border-radius:6px;padding:13px 14px;font-size:16px;color:#1a1713}.wide-search{flex:1 1 520px}.library-tools select{background:var(--paper);border:3px solid #111;border-radius:9px;padding:13px;color:#111;font-weight:800;box-shadow:4px 5px 0 #000}.comic-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:20px}.comic-card{background:linear-gradient(180deg,var(--paper),var(--paper-2));color:#16120d;border:3px solid #111;border-radius:12px;overflow:hidden;box-shadow:7px 8px 0 #000;display:flex;flex-direction:column}.comic-cover{position:relative;width:100%;aspect-ratio:3/4;border:0;padding:0;background:#111;cursor:pointer;overflow:hidden}.comic-cover img{width:100%;height:100%;object-fit:cover;display:block;transition:.2s transform}.comic-cover:hover img{transform:scale(1.04)}.comic-badge{position:absolute;top:10px;left:10px;background:var(--yellow);border:2px solid #111;border-radius:999px;padding:4px 8px;font-weight:900;font-size:12px}.comic-info{padding:14px;display:grid;gap:10px}.comic-info h3{font-size:23px;margin:0;text-transform:uppercase}.comic-info p{margin:0;color:#4b4335;font-weight:700}.comic-tags{display:flex;flex-wrap:wrap;gap:5px}.tag{background:#111;color:#fff6df;border-radius:999px;padding:4px 8px;font-size:12px;font-weight:800}.comic-actions{display:flex;gap:8px;flex-wrap:wrap}.comic-actions button,.review-actions button{padding:9px 12px;border:2px solid #111;border-radius:7px;font-weight:900;cursor:pointer}.open-comic,.approve-comic{background:var(--yellow);color:#111}.favorite-comic{background:#fff;color:#111}.favorite-comic.is-favorite,.favorite-reader.is-favorite{background:var(--yellow)!important;color:#111!important}.report-comic,.reject-comic,.danger{background:var(--red)!important;color:#fff!important}.edit-comic{background:var(--green);color:#08170c}.reader-topbar{display:flex;align-items:center;gap:14px;background:var(--panel-strong);border:2px solid rgba(255,204,62,.35);border-radius:12px;padding:12px;margin-bottom:18px;position:sticky;top:210px;z-index:5}.reader-meta{display:flex;flex-direction:column;min-width:0;flex:1}.reader-controls{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.icon-button{background:var(--yellow);color:#111;min-width:42px;height:42px}.reader-stage{overflow:auto;min-height:65vh;background:rgba(0,0,0,.5);border-radius:12px;padding:20px}.reader-pages{display:flex;justify-content:center;gap:18px;transform-origin:top center}.reader-pages img{max-width:min(900px,92vw);max-height:78vh;object-fit:contain;border:4px solid #111;box-shadow:8px 8px 0 #000;background:#fff}.reader-pages.is-spread img{max-width:min(46vw,700px)}.reader-pages.is-vertical{display:grid;justify-items:center}.reader-pages.is-vertical img{max-height:none;width:min(920px,95%);margin-bottom:22px}.reader-community{margin-top:20px;display:grid;gap:16px;background:rgba(0,0,0,.4);border:1px solid rgba(255,204,62,.25);border-radius:12px;padding:18px}.rating-buttons{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}.rating-buttons button{background:#111;color:var(--yellow);border:2px solid var(--yellow);border-radius:8px;padding:8px 11px;font-weight:900}.comment-card{background:rgba(255,246,223,.92);color:#111;border:2px solid #111;border-radius:10px;padding:12px}.comment-card.pending{opacity:.72}.quick-section{margin:18px 0;padding:16px;background:rgba(0,0,0,.42);border:1px solid rgba(255,204,62,.26);border-radius:12px}.mini-list{display:flex;gap:10px;flex-wrap:wrap}.mini-item{border:2px solid #111;background:var(--paper);color:#111;border-radius:9px;padding:8px 10px;font-weight:900;cursor:pointer}.upload-panel,.register-panel,.login-panel,.review-panel{display:grid;gap:16px}.upload-grid-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.field{display:grid;gap:7px;font-weight:900;color:var(--muted)}.field-full{grid-column:1/-1}.field small{font-weight:400;color:var(--muted)}.checkbox-field{display:flex;gap:10px;align-items:center}.moderation-note,.upload-details,.drop-zone{border:1px solid rgba(255,204,62,.32);border-radius:12px;background:rgba(0,0,0,.36);padding:16px}.moderation-note{display:grid;gap:6px}.upload-details{display:grid;grid-template-columns:1fr 1fr;gap:10px}.upload-details div{display:grid;gap:6px}.upload-details span{color:var(--yellow);font-weight:900;text-transform:uppercase;font-size:12px}.drop-zone{display:grid;place-items:center;min-height:150px;border:2px dashed var(--gold);cursor:pointer;text-align:center}.drop-zone input{display:none}.drop-zone.is-dragging{background:rgba(255,204,62,.18)}.file-list{border:1px solid rgba(255,255,255,.15);padding:14px;border-radius:10px}.primary-action{background:var(--red);color:#fff;padding:16px;font-size:18px}.ghost-action{background:var(--yellow);color:#111;padding:11px 14px}.news-grid{display:grid;gap:16px}.news-card{background:linear-gradient(180deg,var(--paper),var(--paper-2));color:#111;border:3px solid #111;border-radius:12px;box-shadow:6px 7px 0 #000;padding:18px}.news-card h3{margin:0 0 8px;text-transform:uppercase}.register-layout{display:grid;grid-template-columns:minmax(0,1.2fr) 360px;gap:22px}.social-register{display:grid;gap:10px}.social-button{color:#fff;padding:13px;text-align:center}.google{background:#4285f4}.discord{background:#5865f2}.facebook{background:#1877f2}.human-captcha{display:grid;gap:8px}.human-captcha input{position:absolute;opacity:0;pointer-events:none}.human-button{display:inline-flex;align-items:center;justify-content:center;gap:10px;background:#16a34a;color:#fff;border:3px solid #111;border-radius:10px;box-shadow:4px 5px 0 #000;font-weight:1000;padding:14px;text-transform:uppercase}.human-captcha input:checked + .human-button{filter:brightness(1.2);outline:3px solid #b8ffcc}.user-list{display:grid;gap:10px}.user-mini{background:rgba(255,246,223,.95);color:#111;border:2px solid #111;border-radius:10px;padding:12px}.discord-link{display:block;text-align:center;color:var(--yellow);font-weight:900}.review-panel{margin-top:20px;background:rgba(0,0,0,.34);border:1px solid rgba(255,204,62,.25);border-radius:12px;padding:18px}.review-list{display:grid;gap:13px}.review-card{display:grid;grid-template-columns:90px 1fr;gap:14px;align-items:center;background:rgba(255,246,223,.95);color:#111;border:3px solid #111;border-radius:12px;padding:12px;box-shadow:5px 6px 0 #000}.review-card img{width:90px;height:120px;object-fit:cover;background:#222;border:2px solid #111;border-radius:8px}.review-card h3{margin:0 0 5px;text-transform:uppercase}.review-card p{margin:0 0 10px;color:#4b4335;font-weight:700}.review-actions{display:flex;gap:8px;flex-wrap:wrap}.stats-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:12px}.stat-card{background:var(--paper);color:#111;border:3px solid #111;border-radius:12px;box-shadow:4px 5px 0 #000;padding:14px}.stat-card strong{display:block;font-size:28px}.pagination-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:18px;flex-wrap:wrap}.pagination-controls{display:flex;gap:7px;flex-wrap:wrap}.pagination-button{background:var(--paper);color:#111;padding:8px 11px}.pagination-button.is-active{background:var(--yellow)}.pagination-button:disabled{opacity:.45;cursor:not-allowed}.empty-state{text-align:center;padding:42px}.site-footer{position:relative;display:flex;align-items:center;gap:20px;justify-content:space-between;padding:18px 36px;background:linear-gradient(90deg,#e8f7ff,#ecfff4,#f0efff);color:#222;border-top:3px solid #111}.footer-mascot{background:#7c3db8;color:#fff;border:3px solid #111;box-shadow:4px 5px 0 #000;border-radius:12px;padding:18px 45px;font-weight:1000}.footer-info{display:grid;text-align:center;gap:4px;flex:1}.footer-info a{color:#111;font-weight:900}.is-saving{opacity:.68;pointer-events:none}.hidden{display:none!important}
@media(max-width:980px){.site-header{grid-template-columns:1fr;position:relative}.toolbar{flex-direction:column}.segmented{flex-wrap:wrap;justify-content:center}.register-layout{grid-template-columns:1fr}.upload-grid-fields{grid-template-columns:1fr}.upload-details{grid-template-columns:1fr}.reader-topbar{position:relative;top:auto;flex-wrap:wrap}.site-footer{flex-direction:column}.auth-actions{width:100%}.content{padding:22px 12px 90px}.section-heading h2{font-size:34px}}

/* ===== IMAGO.PL classic style restore (v11) ===== */
:root{
  --paper:#f3ead7;
  --paper-2:#fff7e6;
  --gold:#f4bd3f;
  --red:#cf3325;
  --green:#4f8c65;
  --line:#201e1a;
  --display-font: Impact, Haettenschweiler, "Arial Narrow Bold", "Arial Unicode MS", "Segoe UI", sans-serif;
  --ui-font: Inter, "Segoe UI", Arial, Helvetica, sans-serif;
}

body{
  font-family:var(--display-font);
  background:
    linear-gradient(115deg, rgba(207, 51, 37, 0.42), transparent 38%),
    linear-gradient(245deg, rgba(36, 111, 147, 0.34), transparent 42%),
    #191815;
}

.page-bg{
  background:
    linear-gradient(rgba(7,7,6,.62), rgba(7,7,6,.78)),
    url('assets/comic-background-2k.webp') center/cover no-repeat;
  filter:contrast(1.04) saturate(.9);
}

body.light-mode .page-bg{
  background:
    linear-gradient(rgba(250,244,230,.76), rgba(250,244,230,.84)),
    url('assets/comic-background-2k.webp') center/cover no-repeat;
}

button,
.auth-action,
.segmented button,
.reader-circle,
.section-heading h2,
.panel-title,
.footer-mascot,
.pagination-button,
.icon-button,
.primary-action,
.ghost-action{
  font-family:var(--display-font);
}

input,
select,
textarea,
small,
.field small,
.footer-info,
.footer-info a,
.news-card p,
.comic-info p,
.comment-card,
.reader-community,
.user-mini,
.upload-details strong,
.upload-details span,
.empty-state p,
.moderation-note span,
.moderation-note strong,
.discord-link,
#libraryStats,
#loginStatus,
#userStats,
#continueStats,
#favoritesStats,
#historyStats,
#ratingSummary,
#pageIndicator,
.file-list,
.quick-section,
.stat-card,
.review-card p,
.user-mini p,
.user-mini span{
  font-family:var(--ui-font);
}

.site-header{
  position:sticky;
  top:0;
  z-index:20;
  display:grid;
  grid-template-columns:minmax(230px,300px) minmax(0,1fr);
  align-items:center;
  gap:24px;
  min-height:182px;
  padding:14px 24px 14px 16px;
  background:linear-gradient(90deg, rgba(5,5,4,.94), rgba(5,5,4,.66));
  border-bottom:4px solid #050504;
  box-shadow:0 16px 40px rgba(0,0,0,.42);
  backdrop-filter:blur(10px);
}

body.light-mode .site-header{
  background:linear-gradient(90deg, rgba(255,250,235,.96), rgba(255,250,235,.76));
}

.brand-zone{
  display:grid;
  justify-items:start;
  align-content:start;
  gap:10px;
  padding-left:10px;
}

.brand-banner{
  display:block;
  width:min(100%, 220px);
  max-height:128px;
  margin-left:8px;
  object-fit:contain;
  filter:drop-shadow(0 4px 0 rgba(0,0,0,.55));
}

.auth-actions{
  width:min(100%, 240px);
}

.auth-action,
.pagination-button,
.icon-button,
.social-button,
.primary-action,
.ghost-action{
  border:2px solid #050504;
  border-radius:6px;
  box-shadow:2px 2px 0 #050504;
}

.auth-action{
  min-height:42px;
  padding:8px 10px;
}

.current-user-badge{
  border:1px solid rgba(244,189,63,.75);
  color:#f4dca0;
}

.toolbar{
  position:relative;
  min-height:150px;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:24px;
  padding-right:2px;
}

.reader-circle{
  position:absolute;
  left:50%;
  top:50%;
  display:grid;
  place-items:center;
  width:142px;
  height:142px;
  color:#fff7e6;
  background:
    radial-gradient(circle at 33% 28%, #ffe58b 0 17%, transparent 18%),
    linear-gradient(135deg, var(--red), #7c1711);
  border:6px solid #050504;
  border-radius:50%;
  box-shadow:9px 9px 0 rgba(0,0,0,.56), 0 0 0 9px rgba(244,189,63,.82);
  text-transform:uppercase;
  transform:translate(-50%, -50%) rotate(-8deg);
}

.reader-circle span{
  display:block;
  font-size:24px;
  line-height:1;
  text-shadow:2px 2px 0 #050504;
}

.reader-circle:hover{
  transform:translate(-50%, -50%) rotate(-3deg) scale(1.04);
}

.segmented{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:wrap;
  gap:0;
  padding:5px;
  background:rgba(12,12,10,.86);
  border:3px solid #050504;
  border-radius:8px;
  box-shadow:5px 5px 0 rgba(0,0,0,.34);
}

.segmented button{
  min-height:40px;
  padding:0 18px;
  color:#f4dca0;
  background:transparent;
  border:0;
  border-radius:6px;
  box-shadow:none;
  transform:none;
}

.segmented button:hover{
  transform:none;
  filter:brightness(1.06);
}

.segmented button.is-active{
  color:#11100e;
  background:var(--gold);
  box-shadow:2px 2px 0 #050504;
}

.segmented .moderator-tab{
  color:#11100e !important;
  background:var(--green) !important;
}

.segmented #uploadView{
  color:#fff7e6;
  background:var(--red);
  box-shadow:2px 2px 0 #050504;
}

.segmented #themeToggle{
  color:#11100e;
  background:#efe1bf;
}

.content{
  max-width:1320px;
  padding:30px 24px 120px;
}

.content-panel{
  background:rgba(17,16,14,.74);
  border:2px solid rgba(244,189,63,.22);
  border-radius:12px;
  box-shadow:0 22px 70px rgba(0,0,0,.32);
  backdrop-filter:blur(8px);
}

.section-heading,
.panel-title,
.mini-heading{
  display:flex;
  justify-content:space-between;
  gap:18px;
  align-items:center;
  padding:18px;
  color:#fff7e6;
  background:rgba(12,12,10,.88);
  border:3px solid #050504;
  border-radius:8px;
  box-shadow:7px 7px 0 rgba(21,20,17,.45);
}

.section-heading h2{
  margin:0;
  font-size:clamp(34px, 5vw, 66px);
  line-height:.95;
  letter-spacing:0;
  text-shadow:4px 4px 0 #050504;
}

.eyebrow{
  color:var(--gold);
  font-size:13px;
  font-weight:900;
  text-transform:uppercase;
}

.search,
.library-tools select,
.field input,
.field select,
.drop-zone,
.file-list,
.moderation-note,
.upload-details,
.review-panel,
.reader-topbar,
.reader-stage,
.reader-community,
.quick-section{
  border-radius:8px;
}

.site-footer{
  background:linear-gradient(90deg, #ecf7ff, #f4efe4, #eef5ff);
}

@media(max-width:980px){
  .site-header{
    grid-template-columns:1fr;
    gap:18px;
    padding:12px 14px;
  }

  .brand-zone{
    justify-items:center;
    padding-left:0;
  }

  .brand-banner{
    margin-left:0;
  }

  .toolbar{
    min-height:auto;
    flex-direction:column;
    justify-content:center;
    padding-right:0;
  }

  .reader-circle{
    position:static;
    transform:rotate(-8deg);
    margin:0 auto 6px;
  }

  .reader-circle:hover{
    transform:rotate(-3deg) scale(1.04);
  }

  .segmented{
    justify-content:center;
  }
}

/* ===== Visual polish v12 ===== */
.segmented{
  gap:8px;
  padding:8px;
}

.segmented button{
  padding:0 20px;
  min-width:92px;
  transition:transform .18s ease, filter .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
}

.auth-action,
.primary-action,
.ghost-action,
.pagination-button,
.icon-button,
.social-button,
.comic-actions button,
.review-actions button,
.mini-item,
.reader-circle,
.brand-banner{
  transition:transform .18s ease, filter .18s ease, box-shadow .18s ease, opacity .18s ease;
}

.auth-action:hover,
.primary-action:hover,
.ghost-action:hover,
.pagination-button:hover,
.icon-button:hover,
.social-button:hover,
.comic-actions button:hover,
.review-actions button:hover,
.mini-item:hover{
  transform:translateY(-2px) scale(1.03);
  filter:brightness(1.08);
  box-shadow:4px 4px 0 #050504;
}

.segmented button:hover{
  transform:translateY(-2px) scale(1.04);
  filter:brightness(1.12);
  box-shadow:0 0 0 2px rgba(244,189,63,.28), 3px 3px 0 #050504;
}

.segmented button.is-active:hover,
.segmented .moderator-tab:hover,
.segmented #uploadView:hover,
.segmented #themeToggle:hover{
  filter:brightness(1.08);
}

.reader-circle:hover{
  filter:brightness(1.08);
  box-shadow:11px 11px 0 rgba(0,0,0,.58), 0 0 0 10px rgba(244,189,63,.92);
}

.brand-banner:hover{
  transform:translateY(-2px) scale(1.015);
  filter:drop-shadow(0 6px 0 rgba(0,0,0,.6)) brightness(1.04);
}

.comic-card:hover{
  transform:translateY(-4px);
  box-shadow:10px 11px 0 #000;
}

.comic-card,
.news-card,
.review-card,
.stat-card{
  transition:transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.news-card:hover,
.review-card:hover,
.stat-card:hover{
  transform:translateY(-3px);
  box-shadow:8px 9px 0 #000;
}

.search input:focus,
.field input:focus,
.field select:focus{
  outline:2px solid rgba(244,189,63,.85);
  box-shadow:0 0 0 3px rgba(244,189,63,.2);
}

@media (max-width: 980px){
  .content{
    padding:20px 12px 90px;
  }

  .site-header{
    padding:12px 12px 16px;
  }

  .toolbar{
    gap:16px;
  }

  .segmented{
    width:100%;
    justify-content:center;
    gap:10px;
    padding:10px;
  }

  .segmented button{
    min-width:120px;
    flex:1 1 calc(50% - 10px);
    min-height:44px;
    padding:0 14px;
  }

  #themeToggle{
    flex:1 1 100%;
  }

  .reader-topbar{
    gap:10px;
    padding:10px;
  }

  .reader-controls{
    width:100%;
    justify-content:center;
  }

  .register-layout{
    grid-template-columns:1fr;
    gap:16px;
  }

  .library-tools{
    gap:10px;
  }

  .wide-search,
  .library-tools select{
    flex:1 1 100%;
  }

  .comic-grid{
    grid-template-columns:repeat(auto-fill, minmax(180px, 1fr));
    gap:16px;
  }
}

@media (max-width: 640px){
  .site-header{
    gap:14px;
    min-height:auto;
  }

  .brand-zone{
    width:100%;
  }

  .brand-banner{
    width:min(100%, 180px);
  }

  .auth-actions{
    width:100%;
    grid-template-columns:1fr 1fr;
  }

  .auth-action,
  .logout-action,
  .current-user-badge{
    min-height:44px;
  }

  .reader-circle{
    width:116px;
    height:116px;
    box-shadow:7px 7px 0 rgba(0,0,0,.56), 0 0 0 7px rgba(244,189,63,.82);
  }

  .reader-circle span{
    font-size:20px;
  }

  .segmented{
    display:grid;
    grid-template-columns:1fr 1fr;
    width:100%;
  }

  .segmented button{
    min-width:0;
    width:100%;
    min-height:46px;
    font-size:15px;
  }

  #themeToggle{
    grid-column:1 / -1;
  }

  .section-heading,
  .panel-title,
  .mini-heading{
    padding:14px;
    gap:10px;
  }

  .section-heading{
    flex-direction:column;
    align-items:flex-start;
  }

  .section-heading h2{
    font-size:clamp(28px, 10vw, 42px);
  }

  .content-panel{
    padding:16px;
  }

  .upload-grid-fields{
    grid-template-columns:1fr;
  }

  .upload-details{
    grid-template-columns:1fr;
  }

  .comic-grid{
    grid-template-columns:1fr;
  }

  .reader-pages img{
    max-width:100%;
  }

  .site-footer{
    padding:18px 14px;
    gap:12px;
  }

  .footer-mascot{
    padding:14px 22px;
  }
}


/* ===== Moderator news create panel + register resend ===== */
.moderator-news-create-panel .news-form{display:grid;gap:16px}.moderator-news-create-panel .ghost-action{justify-self:start}.register-panel #registerResendVerification{justify-self:start;margin-top:-2px}


/* ===== v14: remove social registration, emphasize Discord CTA ===== */
.social-register{display:none!important}
.discord-cta{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:16px;
  padding:16px 18px;
  margin-top:8px;
  color:#fff7e6;
  text-decoration:none;
  background:linear-gradient(135deg,#5865f2,#4752c4);
  border:3px solid #050504;
  border-radius:10px;
  box-shadow:5px 5px 0 #050504;
  transition:transform .18s ease, filter .18s ease, box-shadow .18s ease;
}
.discord-cta:hover{
  transform:translateY(-2px) scale(1.02);
  filter:brightness(1.08);
  box-shadow:7px 7px 0 #050504;
}
.discord-cta-icon{
  flex:0 0 auto;
  width:54px;
  height:54px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:rgba(255,255,255,.12);
  border:2px solid rgba(255,255,255,.35);
}
.discord-cta-icon svg{
  width:30px;
  height:30px;
  display:block;
}
.discord-cta-copy{
  display:grid;
  gap:4px;
  text-align:left;
}
.discord-cta-copy strong{
  display:block;
  font-size:24px;
  line-height:1;
  color:#fff;
}
.discord-cta-copy small{
  font-family:var(--ui-font);
  font-size:14px;
  color:#eef1ff;
}
@media (max-width:640px){
  .discord-cta{
    flex-direction:column;
    text-align:center;
    gap:10px;
    padding:14px 12px;
  }
  .discord-cta-copy{
    text-align:center;
  }
  .discord-cta-copy strong{
    font-size:20px;
  }
}


/* ===== v15: new logo + exact center reader button + mobile hardening ===== */
.site-header{
  min-height:230px;
  grid-template-columns:minmax(260px,330px) minmax(0,1fr);
  position:sticky;
}
.brand-banner{
  width:min(100%, 300px);
  max-height:190px;
  object-fit:contain;
  object-position:center;
  margin-left:0;
  border-radius:8px;
}
.brand-zone{
  padding-left:0;
  justify-items:center;
  align-content:center;
}
.auth-actions{
  width:min(100%, 260px);
}
.toolbar{
  position:static;
  min-height:170px;
  justify-content:flex-end;
  padding-left:220px;
}
.reader-circle{
  position:absolute;
  left:50%;
  top:50%;
  width:178px;
  height:178px;
  z-index:3;
  transform:translate(-50%,-50%) rotate(-8deg);
}
.reader-circle span{
  font-size:30px;
}
.reader-circle:hover{
  transform:translate(-50%,-50%) rotate(-3deg) scale(1.05);
}
.segmented{
  max-width:min(100%, 720px);
}
.discord-cta{
  margin-top:12px;
  margin-bottom:4px;
}
@media (max-width:1200px){
  .site-header{
    grid-template-columns:minmax(230px,300px) minmax(0,1fr);
  }
  .toolbar{
    padding-left:190px;
  }
  .reader-circle{
    width:158px;
    height:158px;
  }
  .reader-circle span{
    font-size:26px;
  }
  .segmented button{
    min-width:84px;
    padding:0 14px;
  }
}
@media (max-width:980px){
  .site-header{
    grid-template-columns:1fr;
    min-height:auto;
    position:relative;
  }
  .brand-banner{
    width:min(92vw, 260px);
    max-height:180px;
  }
  .toolbar{
    position:relative;
    min-height:auto;
    padding-left:0;
  }
  .reader-circle{
    position:static;
    width:138px;
    height:138px;
    transform:rotate(-8deg);
    margin:2px auto 8px;
  }
  .reader-circle:hover{
    transform:rotate(-3deg) scale(1.04);
  }
  .reader-circle span{
    font-size:23px;
  }
  .segmented{
    max-width:100%;
  }
}
@media (max-width:640px){
  body{
    min-width:0;
  }
  .site-header{
    padding:10px 10px 14px;
  }
  .brand-banner{
    width:min(92vw, 220px);
    max-height:155px;
  }
  .auth-actions{
    width:100%;
    max-width:320px;
  }
  .reader-circle{
    width:124px;
    height:124px;
    margin-top:4px;
  }
  .reader-circle span{
    font-size:21px;
  }
  .segmented{
    grid-template-columns:1fr 1fr;
    gap:8px;
  }
  .segmented button{
    min-height:48px;
    min-width:0;
    padding:0 8px;
    white-space:nowrap;
  }
  .content{
    padding-left:10px;
    padding-right:10px;
  }
  .register-panel,
  .login-panel,
  .upload-panel,
  .review-panel{
    min-width:0;
  }
  .field input,
  .field select,
  .search input{
    min-width:0;
  }
  .discord-cta{
    width:100%;
  }
  .discord-cta-icon{
    width:48px;
    height:48px;
  }
}


/* ===== v16: moderator sub-tabs and clean upload panel ===== */
.moderator-panel{display:none!important}.moderator-panel:empty{display:none!important}.moderator-subtabs{display:flex;flex-wrap:wrap;gap:10px;margin:0 0 18px;padding:10px;background:rgba(12,12,10,.88);border:3px solid #050504;border-radius:10px;box-shadow:7px 7px 0 rgba(21,20,17,.45)}.moderator-subtab{min-height:42px;padding:0 16px;color:#f4dca0;background:rgba(255,255,255,.04);border:2px solid #050504;border-radius:8px;box-shadow:2px 2px 0 #050504;font-weight:900;transition:transform .18s ease,filter .18s ease,box-shadow .18s ease,background .18s ease}.moderator-subtab:hover{transform:translateY(-2px) scale(1.03);filter:brightness(1.12);box-shadow:4px 4px 0 #050504}.moderator-subtab.is-active{color:#11100e;background:var(--gold)}.moderator-tab-panel{margin-top:0}.moderator-news-create-panel .news-form{display:grid;gap:16px}.moderator-news-create-panel .ghost-action{justify-self:start}@media(max-width:760px){.moderator-subtabs{display:grid;grid-template-columns:1fr 1fr;gap:8px}.moderator-subtab{width:100%;min-width:0;font-size:14px;padding:0 10px}}@media(max-width:420px){.moderator-subtabs{grid-template-columns:1fr}}


/* ===== v17 critical fixes: real hidden tabs + stronger light/dark theme ===== */
[hidden],
.hidden {
  display: none !important;
}

.moderator-tab-panel[hidden] {
  display: none !important;
}

.moderator-tab-panel.is-open {
  display: block;
}

.moderator-subtabs {
  position: sticky;
  top: 245px;
  z-index: 6;
}

.moderator-subtab.is-active {
  background: var(--gold) !important;
  color: #11100e !important;
}

.moderator-subtab:not(.is-active) {
  background: rgba(10, 10, 8, 0.92) !important;
  color: #f4dca0 !important;
}

body.light-mode {
  color: #17130e !important;
  background:
    linear-gradient(115deg, rgba(255, 214, 98, 0.32), transparent 38%),
    linear-gradient(245deg, rgba(116, 168, 202, 0.28), transparent 42%),
    #f3ead7 !important;
}

body.light-mode .page-bg {
  background:
    linear-gradient(rgba(255, 248, 229, 0.80), rgba(255, 248, 229, 0.88)),
    url("assets/comic-background-2k.webp") center / cover no-repeat !important;
  filter: contrast(1.02) saturate(.72) brightness(1.05) !important;
}

body.light-mode .site-header,
body.light-mode .content-panel,
body.light-mode .review-panel,
body.light-mode .quick-section,
body.light-mode .reader-community,
body.light-mode .moderator-subtabs {
  background: rgba(255, 247, 230, 0.88) !important;
  color: #17130e !important;
  border-color: rgba(32, 30, 26, .75) !important;
}

body.light-mode .section-heading,
body.light-mode .panel-title,
body.light-mode .mini-heading,
body.light-mode .reader-topbar {
  background: rgba(255, 238, 196, 0.94) !important;
  color: #17130e !important;
}

body.light-mode .section-heading h2,
body.light-mode .panel-title span,
body.light-mode .eyebrow,
body.light-mode .field,
body.light-mode .field span,
body.light-mode .moderation-note,
body.light-mode .moderation-note strong,
body.light-mode .moderation-note span,
body.light-mode .upload-details,
body.light-mode .upload-details strong,
body.light-mode .upload-details span,
body.light-mode .file-list,
body.light-mode .empty-state,
body.light-mode .reader-meta,
body.light-mode #libraryStats,
body.light-mode #loginStatus,
body.light-mode #userStats {
  color: #17130e !important;
  text-shadow: none !important;
}

body.light-mode .moderator-subtab:not(.is-active),
body.light-mode .segmented {
  background: rgba(255, 247, 230, 0.94) !important;
  color: #17130e !important;
}

body.light-mode .segmented button {
  color: #17130e !important;
}

body.light-mode .segmented button.is-active,
body.light-mode .moderator-subtab.is-active {
  background: var(--gold) !important;
  color: #11100e !important;
}

body.light-mode input,
body.light-mode select,
body.light-mode textarea,
body.light-mode .search,
body.light-mode .drop-zone {
  background: rgba(255, 255, 255, .92) !important;
  color: #17130e !important;
}

body.light-mode .comic-card,
body.light-mode .news-card,
body.light-mode .comment-card,
body.light-mode .user-mini,
body.light-mode .review-card,
body.light-mode .stat-card {
  background: linear-gradient(180deg, #fff7e6, #f3ead7) !important;
  color: #17130e !important;
}

@media (max-width: 980px) {
  .moderator-subtabs {
    position: static;
  }
}


/* ===== v18 fullscreen reader ===== */
.reader-fullscreen-active {
  overflow: hidden !important;
}

.reader-view.is-fullscreen {
  position: fixed !important;
  inset: 0 !important;
  z-index: 9999 !important;
  width: 100vw !important;
  max-width: none !important;
  height: 100vh !important;
  margin: 0 !important;
  padding: 14px !important;
  border-radius: 0 !important;
  border: 0 !important;
  background:
    linear-gradient(rgba(0,0,0,.86), rgba(0,0,0,.94)),
    url("assets/comic-background-2k.webp") center / cover no-repeat !important;
  display: grid !important;
  grid-template-rows: auto 1fr !important;
  overflow: hidden !important;
}

.reader-view.is-fullscreen .reader-topbar {
  position: relative !important;
  top: auto !important;
  z-index: 3 !important;
  margin-bottom: 12px !important;
  background: rgba(8,8,7,.95) !important;
  border: 2px solid rgba(244,189,63,.65) !important;
}

.reader-view.is-fullscreen .reader-stage {
  min-height: 0 !important;
  height: 100% !important;
  max-height: none !important;
  overflow: auto !important;
  display: grid !important;
  place-items: center !important;
  padding: 18px !important;
  background: rgba(0,0,0,.72) !important;
  border: 2px solid rgba(244,189,63,.25) !important;
}

.reader-view.is-fullscreen .reader-pages {
  max-width: 100%;
}

.reader-view.is-fullscreen .reader-pages img {
  max-width: min(96vw, 1280px) !important;
  max-height: calc(100vh - 150px) !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
}

.reader-view.is-fullscreen .reader-pages.is-spread img {
  max-width: min(47vw, 980px) !important;
}

.reader-view.is-fullscreen .reader-pages.is-vertical {
  align-self: start !important;
}

.reader-view.is-fullscreen .reader-pages.is-vertical img {
  width: min(1100px, 96vw) !important;
  max-height: none !important;
}

.reader-view.is-fullscreen .reader-community {
  display: none !important;
}

.reader-fullscreen-toggle,
.reader-fullscreen-close {
  background: #f4bd3f !important;
  color: #11100e !important;
}

.reader-fullscreen-close {
  font-size: 28px !important;
  line-height: 1 !important;
  background: #cf3325 !important;
  color: #fff7e6 !important;
}

body.light-mode .reader-view.is-fullscreen {
  background:
    linear-gradient(rgba(255,247,230,.90), rgba(255,247,230,.96)),
    url("assets/comic-background-2k.webp") center / cover no-repeat !important;
}

body.light-mode .reader-view.is-fullscreen .reader-stage {
  background: rgba(255,255,255,.72) !important;
}

@media (max-width: 760px) {
  .reader-view.is-fullscreen {
    padding: 8px !important;
  }

  .reader-view.is-fullscreen .reader-topbar {
    gap: 8px !important;
  }

  .reader-view.is-fullscreen .reader-meta {
    width: 100% !important;
    order: -1 !important;
  }

  .reader-view.is-fullscreen .reader-controls {
    width: 100% !important;
    justify-content: center !important;
  }

  .reader-view.is-fullscreen .reader-stage {
    padding: 8px !important;
  }

  .reader-view.is-fullscreen .reader-pages img {
    max-width: 98vw !important;
    max-height: calc(100vh - 190px) !important;
  }

  .reader-view.is-fullscreen .reader-pages.is-spread img {
    max-width: 98vw !important;
  }
}


/* ===== v20: Discord CTA above tabs in the top-right header ===== */
.toolbar-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 14px;
  min-width: 0;
}

.header-discord-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  max-width: 100%;
  padding: 11px 18px;
  color: #fff7e6;
  text-decoration: none;
  background: linear-gradient(135deg, #5865f2, #4752c4);
  border: 3px solid #050504;
  border-radius: 10px;
  box-shadow: 5px 5px 0 rgba(0, 0, 0, .62);
  font-weight: 1000;
  text-transform: uppercase;
  line-height: 1;
  transition: transform .18s ease, filter .18s ease, box-shadow .18s ease;
}

.header-discord-cta:hover {
  transform: translateY(-2px) scale(1.03);
  filter: brightness(1.12);
  box-shadow: 7px 7px 0 rgba(0, 0, 0, .72);
}

.header-discord-icon {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(255, 255, 255, .13);
  border: 2px solid rgba(255, 255, 255, .35);
  border-radius: 50%;
}

.header-discord-icon svg {
  width: 22px;
  height: 22px;
  display: block;
}

.header-discord-text {
  white-space: nowrap;
  text-shadow: 2px 2px 0 #050504;
}

body.light-mode .header-discord-cta {
  color: #fff !important;
  background: linear-gradient(135deg, #5865f2, #4752c4) !important;
}

body.light-mode .header-discord-text {
  color: #fff !important;
  text-shadow: 2px 2px 0 rgba(0,0,0,.45) !important;
}

@media (max-width: 1200px) {
  .toolbar-right {
    gap: 12px;
  }

  .header-discord-cta {
    padding: 10px 14px;
    font-size: 14px;
  }

  .header-discord-icon {
    width: 30px;
    height: 30px;
  }

  .header-discord-icon svg {
    width: 20px;
    height: 20px;
  }
}

@media (max-width: 980px) {
  .toolbar-right {
    width: 100%;
    align-items: center;
  }

  .header-discord-cta {
    width: min(100%, 520px);
  }
}

@media (max-width: 640px) {
  .header-discord-cta {
    width: 100%;
    padding: 12px 10px;
    gap: 9px;
    font-size: 13px;
  }

  .header-discord-text {
    white-space: normal;
    text-align: center;
  }
}
