*{box-sizing:border-box}
body{margin:0;background:#06152e;color:#fff;font:1rem/1.5 system-ui,sans-serif}
.wrap{max-width:1300px;margin:auto}
.banner,.panel img,.holiday img,.comics img{display:block;width:100%;height:auto}
.layout{display:grid;grid-template-columns:minmax(155px,21%) 1fr;gap:10px;padding:10px}
.sidebar{border:1px solid #78eaff;border-radius:16px;background:#061c3d;padding:12px;display:flex;flex-direction:column;gap:10px}
.sidebar nav{display:grid;gap:2px}
.sidebar nav a{padding:7px;border-bottom:1px solid #285372}
a{color:inherit}
.holiday img{border-radius:10px}
.mosaic{display:grid;align-self:start;grid-template-columns:minmax(0,1.7fr) minmax(0,1fr);grid-template-rows:repeat(2,minmax(0,1fr));gap:8px;background:#e6f5ff;padding:8px;border-radius:16px}
.panel{border-radius:10px;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:clamp(10px,2vw,26px);text-decoration:none;border:2px solid var(--accent);min-width:0}
.panel:hover span,.panel:focus-visible span{text-decoration:underline}
.panel span{font-weight:800;font-size:clamp(1rem,2vw,1.45rem)}
.uranus{grid-row:span 2;background:radial-gradient(ellipse at 30% 35%,#173465,#071733 70%);--accent:#52e7ff}
.soup{background:#fff2d9;color:#1b1612;--accent:#47362b}
.sports{background:#103822;color:#ffe096;--accent:#e9b94c}
.panel .logo{width:min(62%,230px);max-height:145px;object-fit:contain}
.panel .preview{width:min(100%,360px);max-height:175px;object-fit:contain}
.panel.uranus{justify-content:flex-start;gap:0;padding:0;overflow:hidden}
.panel.uranus span{padding:10px}
.mosaic>.soup,.mosaic>.sports{min-height:0;gap:6px;padding:8px}
.mosaic>.soup img,.mosaic>.sports img{min-height:0;flex:0 1 auto}
.mosaic .logo{max-height:78px}
.mosaic .preview{max-height:120px}
footer{padding:10px 18px 24px;display:flex;gap:16px;flex-wrap:wrap}
.gallery{width:min(1030px,100% - 30px);margin:18px auto 54px}
.gallery h1{font-size:clamp(1.8rem,4vw,3rem);line-height:1.1}
.comics{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
.comics figure{margin:0;padding:12px;border-radius:12px;background:#0e2547;align-self:start}
.comics img{border-radius:3px}
.comics a{display:block}
figcaption{padding-top:8px;font-weight:700}
.gallery.sports,.gallery.soup{padding:20px;border-radius:16px}
.gallery.soup figure{background:#fffaf0}
.gallery.sports figure{background:#18492f}
@media(max-width:760px){.layout{grid-template-columns:1fr}.sidebar{grid-row:2}.sidebar nav{display:flex;flex-wrap:wrap}.sidebar .holiday{max-width:250px}.mosaic,.comics{grid-template-columns:1fr;grid-template-rows:auto}.panel.uranus{grid-row:auto}.panel .preview{max-height:220px}}

@media(max-width:760px){.mosaic .logo{max-height:120px}.mosaic .preview{max-height:180px}}

.gallery.soup .comics img, .soup-viewer img { filter: grayscale(1); }
.soup-viewer { max-width: 96vw; max-height: 94vh; padding: 12px; border: 1px solid #888; background: #fff; }
.soup-viewer::backdrop { background: #000c; }
.soup-viewer img { display: block; max-width: 100%; max-height: 82vh; object-fit: contain; }
.soup-viewer button { margin-bottom: 8px; padding: 6px 12px; }

.gallery .comics figure > a[data-sport],
.planet-gallery .comics figure > a { position: relative; }
.gallery .comics figure > a[data-sport]::after,
.planet-gallery .comics figure > a::after {
  content: "";
  position: absolute;
  left: 2%;
  bottom: 2%;
  width: 12%;
  aspect-ratio: 1;
  background: var(--uc-mark, url('/assets/uc-football.webp')) left bottom / contain no-repeat;
  pointer-events: none;
}
.gallery [data-sport="basketball"] { --uc-mark: url('/assets/uc-basketball.webp'); }
.gallery [data-sport="baseball"] { --uc-mark: url('/assets/uc-baseball.webp'); }
.gallery [data-sport="hockey"] { --uc-mark: url('/assets/uc-hockey.webp'); }
.gallery [data-sport="soccer"] { --uc-mark: url('/assets/uc-soccer.webp'); }
.planet-gallery .comics figure > a::after {
  width: 9%;
  opacity: .58;
  background-image: url('/assets/uranus-corner-planet.webp');
}

.cartoon-pagination:not([hidden]) { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 18px; }
.cartoon-pagination button { padding: 8px 12px; font: inherit; }

.planet-gallery header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px;
  margin-bottom: 12px;
  border: 1px solid #52e7ff;
  border-radius: 12px;
  background: #102c4e;
}
.planet-gallery header img { width: clamp(58px, 15vw, 115px); height: auto; border-radius: 6px; }
.planet-gallery h1 { margin: 0 0 6px; }
.planet-gallery nav { display: flex; flex-wrap: wrap; gap: 5px 14px; }
.planet-gallery .comics { gap: 8px; }
.planet-gallery .comics figure { align-self: stretch; display: flex; flex-direction: column; padding: 7px; }
.planet-gallery .comics figure a { flex: 1; display: grid; align-content: center; }

.gallery.soup, .gallery.soup figure { background: #f8f8f8; color: #141414; }

.gallery .comics figure[hidden] { display: none; }

.uranus-gallery { width: min(1200px, 100% - 12px); margin: 4px auto 20px; }
.uranus-gallery .gallery-banner { display: block; width: 100%; height: auto; }
.uranus-gallery .uranus-gallery-heading { display: flex; gap: 6px; align-items: stretch; margin: 8px 0 12px; }
.uranus-gallery-heading a, .uranus-gallery-heading h1 { display: grid; align-content: center; text-align: center; padding: 6px; border: 1px solid #72f8ff; border-radius: 12px; }
.uranus-gallery-heading a { color: white; background: #102d52; text-decoration: none; font-weight: 750; font-size: clamp(.65rem, 2.4vw, 1rem); }
.uranus-gallery .uranus-gallery-heading h1 { flex: 1; margin: 0; background: #34eaff; color: #071735; text-transform: uppercase; font-size: clamp(.9rem, 4vw, 2.4rem); box-shadow: 0 0 9px #38deff88; }
.uranus-gallery .comics { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(4px, 1vw, 12px); }
.uranus-gallery .comics figure { min-width: 0; padding: 0; border: 1px solid #45eaff; border-radius: 9px; overflow: hidden; background: #d8faff; color: #071735; }
.uranus-gallery .comics figure > a { background: #071735; display: block; }
.uranus-gallery .comics figure > a img { width: 100%; height: auto; }
.uranus-gallery figcaption { padding: 3px 2px; text-align: center; font-size: clamp(.58rem, 1.6vw, .92rem); line-height: 1.15; }
.uranus-gallery .cartoon-reactions { gap: 2px; padding: 2px; }
.uranus-gallery .cartoon-reactions button { min-height: 25px; padding: 2px 3px; font-size: clamp(.5rem, 1.58vw, .78rem); white-space: nowrap; }
.uranus-gallery .cartoon-pagination { gap: 4px; padding: 5px; border-radius: 12px; background: #34eaff; color: #071735; font-size: clamp(.62rem, 2.8vw, 1rem); font-weight: 800; }
.uranus-gallery .cartoon-pagination button, .uranus-gallery .cartoon-pagination select { padding: 4px; font: inherit; white-space: nowrap; }
.uranus-gallery .cartoon-pagination button:disabled { display: none; }
