/*
  Viclog Top Page UI (Fortnite-like)
  Scope: body.viclog-top and .viclog-stage
*/

:root {
  --viclog-bg0: #070b18;
  --viclog-bg1: #0a1026;
  --viclog-txt: rgba(255,255,255,.92);
  --viclog-txt-dim: rgba(255,255,255,.68);
  --viclog-txt-dimmer: rgba(255,255,255,.55);
  --viclog-border: rgba(255,255,255,.10);
  --viclog-card: rgba(255,255,255,.06);
  --viclog-shadow: 0 22px 70px rgba(0,0,0,.45);
  --viclog-radius-lg: 22px;
  --viclog-radius-md: 16px;
  --viclog-maxw: 1440px;
}

body.viclog-top {
  background: radial-gradient(1200px 700px at 12% 12%, rgba(130,80,255,.22), transparent 55%),
              radial-gradient(900px 500px at 78% 28%, rgba(0,229,255,.18), transparent 55%),
              linear-gradient(180deg, var(--viclog-bg0), var(--viclog-bg1));
  margin: 0;
}

/* Avoid parent theme defaults leaking */
body.viclog-top a { text-decoration: none; }
body.viclog-top img { max-width: 100%; height: auto; }

.viclog-stage {
  min-height: 100vh;
  color: var(--viclog-txt);
  font-family: "Barlow Condensed", "Noto Sans JP", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

.viclog-shell {
  max-width: var(--viclog-maxw);
  margin: 0 auto;
  padding: 0 22px;
}

.viclog-top-brandbar {
  display: flex;
  justify-content: center;
  padding: 10px 0 8px;
}

.viclog-top-brandbar__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.viclog-top-brandbar__logo {
  display: block;
  width: auto;
  height: auto;
  max-height: 36px;
  max-width: min(68vw, 360px);
}

/* Header (v10)
 * - Hero header is now image-only. No fixed top nav.
 */

/* Header banner (v21: image below separate brand bar) */
.header-banner {
  margin-top: 0;
  aspect-ratio: 3 / 1;
  height: auto;
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 18px 48px rgba(0,0,0,.28);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: transparent;
}

.header-banner::before,
.header-banner::after {
  content: none;
}

.header-banner__media {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
  min-width: 0;
  min-height: 0;
}

.header-banner__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.header-banner__logo-link,
.header-banner__logo {
  display: none;
}

/* Placeholder (only visible when logged-in) */
.banner-inner {
  position: relative;
  z-index: 2;
  max-width: 72ch;
  padding: 18px 18px 20px;
  border-radius: 16px;
  background: rgba(0,0,0,.32);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 18px 44px rgba(0,0,0,.38);
  display: grid;
  gap: 10px;
}

.banner-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--viclog-txt);
  font-weight: 700;
  letter-spacing: .06em;
  font-size: 16px;
}

.banner-kicker .dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.85);
  box-shadow: 0 0 0 4px rgba(255,255,255,.18);
}

.banner-desc {
  color: var(--viclog-txt-dim);
  font-size: 14px;
  letter-spacing: .03em;
}

/* Content wrapper */
.wrapper {
  padding: 14px 0 84px;
}

.section {
  margin-top: 24px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 12px;
  min-width: 0;
}

.section-title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: .04em;
  line-height: 1.1;
  min-width: 0;
}

.section-sub {
  font-size: 14px;
  letter-spacing: .03em;
  color: var(--viclog-txt-dimmer);
  flex: 0 0 auto;
}

/* Horizontal shelf */
.shelf {
  position: relative;
  isolation: isolate;
}
/* Shelf scroll hint (v10) */
.shelf.can-scroll::before,
.shelf.can-scroll::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 34px;
  pointer-events: none;
  z-index: 10;
  opacity: .85;
}
.shelf.can-scroll:not(.at-start)::before {
  left: -2px;
  background: linear-gradient(90deg, rgba(7,11,24,.92), rgba(7,11,24,.0));
}
.shelf.can-scroll:not(.at-end)::after {
  right: -2px;
  background: linear-gradient(270deg, rgba(7,11,24,.92), rgba(7,11,24,.0));
}


.rail {
  display: grid;
  grid-auto-flow: column;
  /* Wider cards = more “game UI” feel */
  grid-auto-columns: minmax(340px, 1fr);
  gap: 14px;
  overflow-x: auto;
  padding: 6px 2px 14px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  min-width: 0;
}

.rail::-webkit-scrollbar { display: none; }

.card {
  position: relative;
  border-radius: var(--viclog-radius-md);
  overflow: hidden;
  background: var(--viclog-card);
  border: 1px solid rgba(255,255,255,.10);
  /* Eyecatch tuning (v8): make cards horizontal like 16:9 */
  aspect-ratio: 16 / 9;
  height: auto;
  scroll-snap-align: start;
  transform: translateZ(0);
}

.card-img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: saturate(1.05) contrast(1.06);
  transform: scale(1.02);
}

.card-grad {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0,0,0,.02) 40%,
    rgba(0,0,0,.75) 85%,
    rgba(0,0,0,.92) 100%
  );
}

.cbadge {
  position: absolute;
  top: 9px;
  left: 9px;
  z-index: 2;
  font-family: 'Barlow Condensed', system-ui, -apple-system, Segoe UI, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.10);
  color: rgba(255,255,255,.88);
  border: 1px solid rgba(255,255,255,.12);
  backdrop-filter: blur(6px);
}

.card-body {
  position: absolute;
  inset: auto 0 0 0;
  padding: 9px 11px 10px;
  display: grid;
  gap: 5px;
}

/* White only for title overlay */
.card-title {
  color: rgba(255,255,255,.94);
  font-family: 'Noto Sans JP', system-ui, -apple-system, Segoe UI, sans-serif;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: .02em;
  text-shadow: 0 8px 22px rgba(0,0,0,.55);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.card-date {
  font-family: 'Barlow Condensed', system-ui, -apple-system, Segoe UI, sans-serif;
  font-size: 11px;
  letter-spacing: .5px;
  color: rgba(255,255,255,.52);
}

.ctag {
  font-family: 'Barlow Condensed', system-ui, -apple-system, Segoe UI, sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 1px 7px;
  border-radius: 4px;
  border: none;
  background: rgba(255,255,255,.80);
  color: rgba(7,11,18,.92);
}

.card:hover {
  border-color: var(--hover-col, rgba(255,255,255,.22));
  box-shadow: 0 18px 60px rgba(0,0,0,.45);
}

.card:hover .card-img {
  transform: scale(1.06);
}

/* Arrow buttons (v26: restore visible chevrons with CSS pseudo-elements) */
.shelf-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 80;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  border: 1px solid rgba(255,245,241,.34);
  background: linear-gradient(180deg, rgba(255,224,216,.84), rgba(243,194,183,.84));
  color: rgba(10,10,12,.98);
  display: grid;
  place-items: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  overflow: visible;
  isolation: isolate;
  transition: opacity .18s ease, box-shadow .18s ease, transform .18s ease, background .18s ease;
  box-shadow: 0 12px 24px rgba(0,0,0,.24), inset 0 1px 0 rgba(255,255,255,.36), inset 0 -2px 0 rgba(161,113,103,.22);
  backdrop-filter: blur(6px) saturate(1.02);
  -webkit-backdrop-filter: blur(6px) saturate(1.02);
}

.shelf-btn::before {
  content: '›';
  position: relative;
  z-index: 2;
  display: block;
  color: rgba(10,10,12,.98);
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 1px 0 rgba(255,255,255,.12);
  transform: translateY(-1px) scaleX(1.05);
  -webkit-text-stroke: .35px rgba(10,10,12,.98);
}

.shelf-btn.left::before {
  content: '‹';
  transform: translateY(-1px) scaleX(1.05);
}

/* show arrows whenever the rail can scroll (JS adds .can-scroll) */
.shelf.can-scroll .shelf-btn {
  opacity: .82;
  pointer-events: auto;
}

.shelf:hover .shelf-btn {
  opacity: .9;
}

.shelf-btn:hover {
  background: linear-gradient(180deg, rgba(255,229,222,.88), rgba(246,203,191,.88));
  box-shadow: 0 14px 28px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.4), inset 0 -2px 0 rgba(161,113,103,.26);
}

.shelf-btn.left { left: -8px; }
.shelf-btn.right { right: -8px; }

.shelf-btn[disabled] {
  opacity: 0 !important;
  pointer-events: none !important;
}

/* v31: guarantee visible chevrons via SVG (instead of pseudo-element)
   - Some environments showed an empty button (pseudo-element not rendered)
   - SVG is already in markup and uses stroke="currentColor".
*/
.shelf-btn::before{
  content: '' !important;
  display: none !important;
}
.shelf-btn svg{
  display: block !important;
  width: 20px !important;
  height: 20px !important;
}
.shelf-btn svg path{
  stroke: currentColor !important;
}

/* Bottom bar (Fortnite-ish) */
.bottom-bar {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 1100;
  display: flex;
  justify-content: center;
  background: linear-gradient(180deg, rgba(0,0,0,0), rgba(0,0,0,.82));
  padding: 10px 0 calc(10px + env(safe-area-inset-bottom));
  pointer-events: none;
}

.bottom-bar .bottom-inner {
  width: fit-content;
  max-width: calc(100vw - 28px);
  margin: 0 auto;
  padding: 0 12px;
  display: flex;
  gap: 8px;
}

@media (min-width: 900px) {
  .bottom-bar { justify-content: flex-end; }
  .bottom-bar .bottom-inner { margin: 0; padding-right: 22px; }
}

.bb-btn {
  pointer-events: auto;
  flex: 0 1 auto;     /* do NOT stretch equally */
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;  /* smaller */
  border-radius: 10px;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.82);
  font-size: 12px;
  letter-spacing: .02em;
  text-decoration: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;

  white-space: nowrap;
  overflow: hidden;
}

.bb-btn:hover {
  background: rgba(255,255,255,.14);
}

.bb-key {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 22px;
  border-radius: 7px;
  background: rgba(0,0,0,.28);
  border: 1px solid rgba(255,255,255,.10);
  color: rgba(255,255,255,.90);
  font-weight: 700;
  font-size: 11px;
}

.bb-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}


/* WP admin bar offset */
body.admin-bar .hero-nav { top: 32px; }
@media (max-width: 782px) {
  body.admin-bar .hero-nav { top: 46px; }
}


/* v22: SP tuning (peek cards + lighter headings + smaller top logo) */
@media (max-width: 768px) {
  .viclog-shell { padding: 0 18px; }
  .viclog-top-brandbar { padding: 8px 0 6px; }
  .viclog-top-brandbar__logo { max-height: 32px; max-width: min(72vw, 320px); }
  .header-banner { aspect-ratio: 15 / 11; height: auto; border-radius: 16px; box-shadow: 0 14px 34px rgba(0,0,0,.22); }

  .section-head {
    align-items: baseline;
    gap: 8px;
    margin-bottom: 10px;
  }

  .section-title {
    font-size: 20px;
    letter-spacing: .02em;
  }

  .section-sub {
    font-size: 12px;
    letter-spacing: .01em;
  }

  .section[aria-label="Season"] .section-head {
    flex-wrap: nowrap;
    justify-content: space-between;
  }

  .section[aria-label="Season"] .section-title {
    font-size: clamp(15px, 5vw, 18px);
    letter-spacing: .01em;
    white-space: nowrap;
  }

  .section[aria-label="Season"] .section-sub {
    white-space: nowrap;
    font-size: clamp(11px, 3.3vw, 12px);
  }

  .rail {
    grid-auto-columns: minmax(274px, 84vw);
    gap: 12px;
    padding-right: 32px;
  }

  .shelf-btn {
    top: 44%;
    width: 50px;
    height: 50px;
    opacity: .84;
  }

  .shelf-btn::before {
    font-size: 31px;
  }

  .shelf-btn.left { left: -2px; }
  .shelf-btn.right { right: -2px; }
}

@media (max-width: 420px) {
  .section-title {
    font-size: 18px;
  }

  .section[aria-label="Season"] .section-title {
    font-size: 14px;
  }

  .section[aria-label="Season"] .section-sub {
    font-size: 11px;
  }

  .rail {
    grid-auto-columns: minmax(258px, 82vw);
    padding-right: 26px;
  }
}


/* ─────────────────────────────────────────
   AdSense (Viclog Top) — footer sponsor slot
   ───────────────────────────────────────── */
body.viclog-top .vlg-ad{
  margin: 22px auto 18px;
  padding: 14px 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--viclog-border);
  background: rgba(255,255,255,.03);
  box-shadow: 0 16px 40px rgba(0,0,0,.25);
}
body.viclog-top .vlg-ad__label{
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--viclog-txt-dimmer);
  margin: 0 0 10px;
}
body.viclog-top .vlg-ad__box{
  display:flex;
  justify-content:center;
  align-items:center;
  min-height: 100px;
}
body.viclog-top .vlg-ad--top-footer{
  max-width: var(--viclog-maxw);
}

/* v30 fix: Multiplex (Matched Content) must have non-zero width at push time.
   - In flex containers, <ins.adsbygoogle> can collapse to 0px (content-less flex item)
   - Force block layout + width:100% for the footer sponsor slot.
*/
body.viclog-top .vlg-ad--top-footer{
  width: 100%;
}
body.viclog-top .vlg-ad--top-footer .vlg-ad__box{
  display: block !important;
  width: 100% !important;
  min-width: 320px;
  max-width: 970px;
  margin-left: auto;
  margin-right: auto;
  min-height: 0;
}
body.viclog-top .vlg-ad--top-footer ins.adsbygoogle{
  display: block !important;
  width: 100% !important;
  min-width: 320px;
}
