/* B-O-B: site styles */
:root {
  --bg: #0B0B0D;
  --bg-2: #111114;
  --panel: #1C1C22;
  --panel-2: #232329;
  --line: #2A2A31;
  --line-2: #3A3A42;
  --text: #F3EBDD;
  --text-2: #D9D2C5;
  --muted: #B5B1BC;
  --dim: #8A8794;
  --accent: #E8833A;
  --accent-hover: #F4A465;
  --on-accent: #111114;
  --display: "Oswald", "Arial Narrow", sans-serif;
  --body: "Source Serif 4", Georgia, serif;
  --wrap: 1240px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.55;
  border-top: 4px solid var(--accent);
}
img { max-width: 100%; display: block; }
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
h1, h2, h3 { font-family: var(--display); font-weight: 700; margin: 0; line-height: 1; }
p { margin: 0; }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: 24px; }
.eyebrow { font-family: var(--display); font-size: 14px; letter-spacing: .24em; color: var(--accent); text-transform: uppercase; }
.lead { font-size: 20px; color: var(--text-2); max-width: 560px; }
.muted { color: var(--muted); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 14px 26px;
  font-family: var(--display); font-weight: 600; font-size: 17px; letter-spacing: .1em; text-transform: uppercase;
  text-decoration: none; border: 2px solid var(--accent); cursor: pointer;
  transition: background .15s, color .15s;
}
.btn--solid { background: var(--accent); color: var(--on-accent); }
.btn--solid:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-accent); }
.btn--ghost { background: transparent; color: var(--text); }
.btn--ghost:hover { background: var(--accent); color: var(--on-accent); }
.btn--dark { background: var(--on-accent); color: var(--text); border-color: var(--on-accent); }
.btn--dark:hover { color: var(--accent); }
.btn--muted { border-color: var(--line-2); background: transparent; color: var(--text); }
.btn--muted:hover { border-color: var(--accent); color: var(--text); }

/* Pills (filters, chapters) */
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  min-height: 44px; padding: 10px 18px;
  font-family: var(--display); font-weight: 600; font-size: 15px; letter-spacing: .12em; text-transform: uppercase;
  background: transparent; color: var(--text); border: 2px solid var(--line-2); cursor: pointer;
}
.pill:hover { border-color: var(--accent); }
.pill[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

/* Badges */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px; font-family: var(--display); font-weight: 700; font-size: 13px; letter-spacing: .12em; text-transform: uppercase;
}
.badge--free { background: var(--text); color: var(--on-accent); }
.badge--paid { background: var(--accent); color: var(--on-accent); }
.badge--outline { border: 1px solid var(--line-2); color: var(--text-2); font-weight: 500; }
.badge--soon { border: 1px dashed var(--accent); color: var(--accent); }
.badge svg { width: 13px; height: 13px; }
/* half free, half Patreon */
.badge--split { padding: 0; gap: 0; }
.badge--split > span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; }
.badge--split > span:first-child { background: var(--text); color: var(--on-accent); }
.badge--split > span:last-child { background: var(--accent); color: var(--on-accent); }

/* Age bar + header */
.agebar { position: relative; overflow: hidden; background: #16161A; border-bottom: 1px solid var(--line); padding: 8px 24px; text-align: center; font-family: var(--display); font-size: 13px; letter-spacing: .18em; color: var(--muted); }
/* Ticker: items stack in one line; the active one sits in place, the next waits below, the old one leaves upward */
.agebar__item { display: block; text-transform: uppercase; color: inherit; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
a.agebar__item { color: var(--accent); }
a.agebar__item:hover { color: var(--accent-hover); }
.agebar[data-ticker] .agebar__item:not(.is-active) { position: absolute; inset: 8px 24px auto; transform: translateY(160%); opacity: 0; }
.agebar[data-ticker] .agebar__item { transition: transform .55s cubic-bezier(.2,.7,.2,1), opacity .55s; }
.agebar[data-ticker] .agebar__item.is-leaving { position: absolute; inset: 8px 24px auto; transform: translateY(-160%); opacity: 0; }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-block: 20px; }
.logo { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.logo img { width: 48px; height: 48px; object-fit: contain; border: 2px solid var(--accent); }
.logo span { font-family: var(--display); font-weight: 700; font-size: 32px; color: var(--accent); line-height: 1; }
.nav { display: flex; align-items: center; gap: 2px; }
.nav a { font-family: var(--display); font-size: 15px; letter-spacing: .12em; text-transform: uppercase; color: var(--text); text-decoration: none; padding: 12px 10px; white-space: nowrap; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--accent); }
.nav .btn { min-height: 44px; padding: 10px 20px; font-size: 15px; }
.nav__search { display: inline-flex; align-items: center; gap: 10px; }
.nav__search svg { width: 20px; height: 20px; }
.nav__label { display: none; }
.auth { margin-left: 8px; }
.account { display: flex; align-items: center; gap: 10px; padding: 4px 4px 4px 4px; border: 2px solid var(--accent); }
.account img { width: 36px; height: 36px; object-fit: contain; }
.account__who { display: block; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--display); font-weight: 700; font-size: 15px; letter-spacing: .08em; line-height: 1.1; color: var(--accent); }
.account__who small { font-weight: 500; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.account__out { min-height: 36px; padding: 6px 12px; background: none; border: 1px solid var(--line-2); color: var(--text); font-family: var(--display); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; cursor: pointer; }
.account__out:hover { border-color: var(--accent); color: var(--accent); }
/* Account dropdown */
.account { position: relative; }
.account__toggle { display: flex; align-items: center; gap: 10px; width: 100%; padding: 0 8px 0 0; background: none; border: 0; color: inherit; cursor: pointer; text-align: left; }
.account__chev { width: 16px; height: 16px; margin-left: auto; color: var(--accent); transition: transform .2s; }
.account__toggle[aria-expanded="true"] .account__chev { transform: rotate(180deg); }
.account__menu { position: absolute; z-index: 50; top: calc(100% + 6px); right: -2px; min-width: max(calc(100% + 4px), 240px); background: var(--bg-2); border: 2px solid var(--accent); }
.account__menu[hidden] { display: none; }
.account__menu form { margin: 0; }
.nav .account__item, .account__item { white-space: nowrap; display: block; width: 100%; padding: 12px 16px; background: none; border: 0; color: var(--text); font-family: var(--display); font-size: 14px; letter-spacing: .12em; text-transform: uppercase; text-align: left; text-decoration: none; cursor: pointer; }
.account__item + .account__item, .account__menu form + form, .account__menu a + form { border-top: 1px solid var(--line); }
.nav .account__item:hover, .account__item:hover { color: var(--accent); }
.nav-toggle { display: none; background: none; border: 2px solid var(--line-2); color: var(--text); width: 48px; height: 48px; cursor: pointer; align-items: center; justify-content: center; }
.nav-toggle svg { width: 22px; height: 22px; }

@media (max-width: 1100px) {
  .nav-toggle { display: inline-flex; }
  .nav { display: none; width: 100%; flex-direction: column; align-items: stretch; border-top: 1px solid var(--line); padding-top: 8px; }
  .nav.is-open { display: flex; }
  .auth { margin: 8px 0 0; }
  .auth .btn, .account { width: 100%; }
  .account__out { margin-left: auto; }
  .account { flex-wrap: wrap; }
  .account__menu { position: static; flex: 1 0 100%; min-width: 0; margin: 4px -4px -4px; border-width: 2px 0 0; }
  .nav__label { display: inline; }
}
.account__switch { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.account__switch span { padding: 2px 8px; border: 1px solid var(--line-2); font-size: 12px; color: var(--muted); }
.account__switch span.is-on { border-color: var(--accent); color: var(--accent); }

/* Sections */
.section { padding-block: 72px; }
.section--alt { background: var(--bg-2); border-block: 1px solid var(--line); }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 32px; }
.section-head h2 { font-size: clamp(40px, 6vw, 56px); }
.section-head p { margin-top: 8px; }

/* Cover / placeholder */
/* Images are never cropped: fixed page ratio, picture fitted inside */
.cover { position: relative; aspect-ratio: 832 / 1216; background-color: var(--panel-2); overflow: hidden; }
.cover img { width: 100%; height: 100%; object-fit: contain; }
/* Blurred preview behind an image while it loads (inline background-image), then the image fades in */
.cover, .page { background-size: cover; background-position: center; }
.cover img, .page img, .timeline__card img { transition: opacity .45s ease; }
img.is-loading { opacity: 0; }
.placeholder {
  background-color: var(--panel-2);
  background-image: repeating-linear-gradient(135deg, rgba(232,131,58,.09) 0 2px, transparent 2px 18px);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--display); letter-spacing: .2em; font-size: 13px; color: #9A97A3;
}
.card__badges { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }

/* Comic grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 24px; }
/* Home: as wide as the hero carousel */
.section--wide .wrap { max-width: 1520px; }
/* Home: Cards and Free to read columns */
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); gap: 28px; align-items: start; }
.col { padding: 26px 26px 10px; background: var(--panel); border: 1px solid var(--line-2); }
.col__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding-bottom: 12px; border-bottom: 2px solid var(--accent); }
.col__head h2 { font-size: 30px; letter-spacing: .04em; text-transform: uppercase; }
.col__head a { font-family: var(--display); font-weight: 600; font-size: 13px; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); text-decoration: none; }
.col__head a:hover { color: var(--accent-hover); }
.rows { margin: 0; padding: 0; list-style: none; }
.row { display: flex; align-items: center; gap: 18px; padding: 16px 0; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; }
.rows li:last-child .row { border-bottom: 0; }
.row:hover b { color: var(--accent); }
.row__thumb { flex: none; width: 68px; height: 96px; overflow: hidden; background: var(--panel-2); border: 1px solid var(--line-2); }
.row__thumb img { width: 100%; height: 100%; object-fit: cover; }
.row__thumb.is-locked img { filter: blur(4px) brightness(.6); transform: scale(1.15); }
.row__body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.row__body small { font-family: var(--display); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.row__body b { font-family: var(--display); font-weight: 600; font-size: 20px; line-height: 1.15; letter-spacing: .02em; text-transform: uppercase; transition: color .15s; }
.row__badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.card { display: flex; flex-direction: column; text-decoration: none; color: var(--text); background: var(--panel); border: 1px solid #34343C; transition: border-color .15s, transform .15s; }
.card:hover { color: var(--text); border-color: var(--accent); transform: translateY(-3px); }
.card__body { padding: 14px 16px 18px; }
.card__series { font-family: var(--display); font-size: 13px; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); margin-bottom: 4px; }
.card__title { font-family: var(--display); font-weight: 600; font-size: 21px; line-height: 1.15; text-transform: uppercase; }
.card__meta { font-size: 15px; color: var(--muted); margin-top: 4px; }
.empty { color: var(--muted); padding: 32px 0; }

/* Banner (current Patreon banner, shown whole) */
.banner { border-bottom: 2px solid var(--accent); background: var(--bg-2); }
.banner img { width: 100%; height: auto; }

/* Latest releases: full-width hero carousel */
.hero { position: relative; overflow: hidden; background: var(--bg); border-bottom: 1px solid var(--line); }
.hero__slides { display: grid; }
.hero__slide { grid-area: 1 / 1; position: relative; display: flex; align-items: center; min-height: clamp(520px, 46vw, 660px); opacity: 0; visibility: hidden; transition: opacity .7s ease, visibility .7s; }
.hero__slide.is-active { opacity: 1; visibility: visible; }
.hero__bg { position: absolute; inset: -20px; overflow: hidden; transform: translate3d(calc(var(--mx, 0) * -10px), calc(var(--my, 0) * -8px), 0); transition: transform .4s ease-out; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; }
.hero__bg .hero__blur { filter: blur(30px) brightness(.5) saturate(1.2); transform: scale(1.25); }
.hero__bg::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(11, 11, 13, .96) 0%, rgba(11, 11, 13, .78) 38%, rgba(11, 11, 13, .2) 72%, rgba(11, 11, 13, .35) 100%),
              linear-gradient(0deg, var(--bg) 0%, transparent 35%); }
.hero__wrap { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 40px; width: 100%; padding-block: 56px 150px; }
/* Wider than the site column (--wrap): the hero spans the screen */
.hero__wrap, .hero__tabs { max-width: 1520px; }
.hero__info { max-width: 780px; min-width: 0; }
.hero__title { margin: 0 0 22px; font-size: clamp(48px, 6.5vw, 96px); line-height: .95; text-transform: uppercase; color: var(--accent); text-shadow: 0 4px 30px rgba(0, 0, 0, .6); }
.hero__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.hero__pill { padding: 6px 12px; border: 1px solid var(--line-2); background: rgba(17, 17, 20, .75); font-family: var(--display); font-size: 14px; letter-spacing: .06em; color: var(--text); }
.hero .actions { margin-top: 28px; }
.hero__art { flex: none; display: block; transform: translate3d(calc(var(--mx, 0) * 16px), calc(var(--my, 0) * 10px), 0); transition: transform .4s ease-out; }
.hero__art img { display: block; }
.hero__art--cover img { width: clamp(220px, 22vw, 320px); height: auto; border: 2px solid var(--accent); box-shadow: 14px 14px 0 var(--accent); }
.hero__art--cutout { align-self: flex-end; margin-bottom: -230px; }
.hero__art--cutout img { max-height: 680px; width: auto; max-width: 42vw;
  -webkit-mask-image: linear-gradient(to bottom, #000 78%, transparent 97%); mask-image: linear-gradient(to bottom, #000 78%, transparent 97%); }
.hero__slide.is-active .hero__info > * { animation: hero-in .6s cubic-bezier(.2, .8, .2, 1) both; }
.hero__slide.is-active .hero__info > :nth-child(2) { animation-delay: .06s; }
.hero__slide.is-active .hero__info > :nth-child(3) { animation-delay: .12s; }
@keyframes hero-in { from { opacity: 0; transform: translateY(14px); } }
/* Active slide: the background slowly zooms out, the art slides in from the right */
.hero__slide.is-active .hero__bg img { animation: hero-zoom 9s ease-out both; }
.hero__slide.is-active .hero__bg .hero__blur { animation-name: hero-zoom-blur; }
@keyframes hero-zoom { from { transform: scale(1.12); } to { transform: scale(1); } }
@keyframes hero-zoom-blur { from { transform: scale(1.4); } to { transform: scale(1.25); } }
.hero__slide.is-active .hero__art > img { animation: hero-art .9s cubic-bezier(.2, .8, .2, 1) .12s both; }
@keyframes hero-art { from { opacity: 0; transform: translateX(70px) scale(.96); } }
.hero__title { transition: letter-spacing .4s ease; }
.hero__arrow { position: absolute; z-index: 4; top: calc(50% - 60px); width: 52px; height: 52px; display: inline-flex; align-items: center; justify-content: center;
  background: rgba(17, 17, 20, .7); color: var(--text); border: 2px solid var(--accent); cursor: pointer; opacity: 0; transition: opacity .25s, background .2s, color .2s, transform .25s; }
.hero__arrow svg { width: 22px; height: 22px; }
.hero__arrow--prev { left: 20px; transform: translateX(-10px); }
.hero__arrow--next { right: 20px; transform: translateX(10px); }
.hero:hover .hero__arrow, .hero__arrow:focus-visible { opacity: 1; transform: none; }
.hero__arrow:hover { background: var(--accent); color: var(--on-accent); }
.hero__tabs { position: absolute; z-index: 3; left: 0; right: 0; bottom: 32px; display: flex; gap: 12px; }
.hero__tab { position: relative; display: flex; align-items: center; gap: 12px; flex: 0 1 230px; min-width: 0; padding: 10px; overflow: hidden;
  background: rgba(17, 17, 20, .85); border: 1px solid var(--line-2); color: var(--text); text-align: left; cursor: pointer; backdrop-filter: blur(6px); }
.hero__tab { transition: transform .2s ease, border-color .2s, background .2s; }
.hero__tab:hover, .hero__tab.is-active { border-color: var(--accent); }
.hero__tab:hover { transform: translateY(-4px); }
.hero__tab.is-active { background: rgba(28, 28, 34, .95); }
.hero__tab img { transition: transform .3s ease; }
.hero__tab:hover img, .hero__tab.is-active img { transform: scale(1.06); }
.hero__tab img { flex: none; width: 44px; height: 60px; object-fit: cover; }
.hero__tab span { min-width: 0; }
.hero__tab b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--display); font-weight: 600; font-size: 15px; letter-spacing: .04em; }
.hero__tab small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--muted); }
.hero__tab i { position: absolute; left: 0; bottom: 0; width: 0; height: 3px; background: var(--accent); }
.hero__tab.is-active i { animation: hero-fill 7s linear forwards; }
@keyframes hero-fill { to { width: 100%; } }
@media (max-width: 900px) {
  .hero__slide { min-height: 0; }
  .hero__wrap { flex-direction: column-reverse; align-items: flex-start; gap: 28px; padding-block: 40px 130px; }
  .hero__art--cutout { align-self: center; margin-bottom: 0; }
  .hero__art--cutout img { max-height: 360px; max-width: 80vw; }
  .hero__art--cover img { width: 200px; box-shadow: 8px 8px 0 var(--accent); }
    .hero__tabs { overflow-x: auto; scrollbar-width: none; bottom: 24px; }
  .hero__tab { flex: 0 0 200px; }
  .hero__arrow { display: none; }
}

/* Library filters + pages */
.filters { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-bottom: 28px; }
.pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 40px; }
.pager .pill { min-width: 48px; }
.pager .pill[disabled] { opacity: .35; cursor: default; }

/* Schedule */
.plan { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 20px; align-items: stretch; }
.plan__panel { display: flex; flex-direction: column; gap: 32px; padding: 28px 26px; background: var(--panel); border: 1px solid var(--line-2); }
.plan__head { margin: 0; padding-bottom: 12px; border-bottom: 2px solid var(--accent); font-family: var(--display); font-weight: 600; font-size: 16px; letter-spacing: .22em; text-transform: uppercase; color: var(--accent); }
.plan__row { display: flex; align-items: center; gap: 28px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.plan__day { flex: 0 0 96px; font-family: var(--display); font-weight: 700; font-size: 46px; line-height: 1; color: var(--accent); }
.plan__row--today .plan__day { color: var(--text); }
.plan__what { font-family: var(--display); font-weight: 600; font-size: 34px; line-height: 1.1; text-transform: uppercase; color: var(--text); }
.plan__tag { display: inline-block; margin-top: 8px; padding: 4px 9px; border: 1px solid var(--line-2); background: var(--bg-2); font-family: var(--display); font-weight: 600; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-2); }
@media (max-width: 560px) {
  .plan__panel { padding: 20px 16px; }
  .plan__row { gap: 16px; }
  .plan__day { flex-basis: 64px; font-size: 32px; }
  .plan__what { font-size: 24px; }
}

.page-title { font-size: clamp(56px, 9vw, 112px); color: var(--accent); text-transform: uppercase; }
.next-drop { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 32px; }
.next-drop > div:first-child { flex: 1 1 420px; display: flex; flex-direction: column; gap: 12px; }
.next-drop__date { font-size: clamp(40px, 6vw, 72px); text-transform: uppercase; }
.countdown { display: flex; gap: 10px; }
.countdown__cell { min-width: 84px; padding: 14px 10px 10px; text-align: center; background: var(--panel); border: 2px solid var(--accent); }
.countdown__cell b { display: block; font-family: var(--display); font-size: 44px; line-height: 1; font-variant-numeric: tabular-nums; }
.countdown__cell small { font-family: var(--display); font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.timeline__item { display: grid; grid-template-columns: 88px 1fr; gap: 16px; align-items: stretch; }
.timeline__date { display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--accent); color: var(--on-accent); font-family: var(--display); text-transform: uppercase; }
.timeline__date b { font-size: 40px; line-height: 1; }
.timeline__date span { font-size: 15px; letter-spacing: .2em; }
.timeline__card { display: grid; grid-template-columns: 72px 1fr; gap: 18px; align-items: center; padding: 12px; background: var(--panel); border: 1px solid #34343C; color: var(--text); text-decoration: none; }
.timeline__card:hover { border-color: var(--accent); color: var(--text); }
.timeline__card img { width: 72px; aspect-ratio: 832 / 1216; object-fit: contain; background: var(--panel-2); }
/* Tapestry: the character map */
.tapestry {
  position: relative; height: calc(100svh - 138px); min-height: 460px; overflow: hidden; cursor: grab; touch-action: none; user-select: none;
  background: #0B0B0D radial-gradient(rgba(232,131,58,.13) 1.5px, transparent 1.7px) 0 0 / 26px 26px;
  border-bottom: 1px solid var(--line);
}
.tapestry.is-panning { cursor: grabbing; }
.tapestry__world { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
.tapestry__links { position: absolute; left: 0; top: 0; width: 1px; height: 1px; overflow: visible; }
/* Same line width whatever the zoom; labels always visible */
.tlink path { fill: none; stroke: var(--c); stroke-width: 4; vector-effect: non-scaling-stroke; opacity: .6; transition: opacity .25s, stroke-width .25s; }
.tlink__label { transition: opacity .2s; pointer-events: none; }
.tlink rect { fill: rgba(11,11,13,.92); stroke: var(--c); stroke-width: 1.5; }
.tlink text { fill: var(--text); font-family: var(--display); font-size: 13px; letter-spacing: .12em; }
.tapestry.has-focus .tlink:not(.is-on) { opacity: .06; }
.tapestry.has-focus .tlink.is-on path { opacity: 1; stroke-width: 6; }
.tcard {
  position: absolute; width: 140px; padding: 0; transform: translate(-50%, -50%); background: none; border: 0; color: var(--text);
  cursor: pointer; transition: opacity .25s, transform .25s;
}
.tcard__img {
  display: block; aspect-ratio: 832 / 1216; overflow: hidden; background: var(--panel-2);
  border: 4px solid #111; outline: 3px solid var(--c); box-shadow: 6px 6px 0 #111; transition: box-shadow .25s;
}
.tcard__img img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.tcard__name {
  display: block; margin: -14px auto 0; position: relative; width: max-content; max-width: 170px; padding: 4px 10px;
  font-family: var(--display); font-size: 15px; letter-spacing: .1em; text-transform: uppercase; line-height: 1.2;
  background: #111; border: 2px solid var(--c);
  /* Counter-scaled with the zoom: readable names even when the whole map is in view */
  transform: scale(var(--k, 1)); transform-origin: 50% 0;
}
.tcard:hover, .tcard:focus-visible { transform: translate(-50%, -50%) scale(1.06); z-index: 2; outline: none; }
.tcard:hover .tcard__img, .tcard:focus-visible .tcard__img { box-shadow: 6px 6px 0 #111, 0 0 22px -6px var(--c); }
.tapestry.has-focus .tcard:not(.is-near) { opacity: .25; }
.tcard.is-found .tcard__img { animation: tcard-found .6s ease-in-out 3; }
@keyframes tcard-found { 50% { box-shadow: 6px 6px 0 #111, 0 0 40px 4px var(--c); } }
.tapestry__controls { position: absolute; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 3; }
.tapestry__btn { display: grid; place-items: center; width: 46px; height: 46px; background: rgba(11,11,13,.85); color: var(--text); border: 2px solid var(--accent); cursor: pointer; }
.tapestry__btn:hover { background: var(--accent); color: var(--on-accent); }
.tapestry__btn svg { width: 20px; height: 20px; }
.tapestry__empty { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; color: var(--muted); }

/* Character sheet */
.sheet { position: fixed; inset: 0; z-index: 120; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(5,5,7,.88); overscroll-behavior: contain; }
.sheet[hidden] { display: none; }
.sheet__panel {
  position: relative; display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 28px; width: min(1000px, 100%); max-height: calc(100svh - 40px); overflow-y: auto;
  padding: 28px; background: var(--bg) radial-gradient(rgba(232,131,58,.1) 1.4px, transparent 1.6px) 0 0 / 16px 16px;
  border: 4px solid #111; outline: 3px solid var(--c); box-shadow: 10px 10px 0 #111;
}
.sheet__close { position: absolute; top: 12px; right: 12px; z-index: 2; display: grid; place-items: center; width: 44px; height: 44px; background: var(--bg); color: var(--text); border: 2px solid var(--accent); cursor: pointer; }
.sheet__close:hover { background: var(--accent); color: var(--on-accent); }
.sheet__close svg { width: 20px; height: 20px; }
.sheet__main { aspect-ratio: 832 / 1216; background: var(--panel-2); border: 3px solid #111; outline: 2px solid var(--c); overflow: hidden; }
.sheet__main[hidden] { display: none; }
.sheet__main img { width: 100%; height: 100%; object-fit: cover; }
.sheet__thumbs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.sheet__thumbs button { width: 52px; aspect-ratio: 832 / 1216; padding: 0; background: var(--panel-2); border: 2px solid transparent; opacity: .5; cursor: pointer; transition: opacity .2s, border-color .2s; }
.sheet__thumbs button:hover, .sheet__thumbs button.is-current { opacity: 1; border-color: var(--c); }
.sheet__thumbs img { width: 100%; height: 100%; object-fit: cover; }
.sheet__name { font-size: clamp(36px, 5vw, 60px); line-height: .95; color: var(--c); text-transform: uppercase; text-shadow: 4px 4px 0 #111; margin: 4px 0 16px; padding-right: 48px; }
.sheet__lore { color: var(--text-2); font-size: 17px; line-height: 1.7; }
.sheet__lore p { margin: 0 0 12px; }
.sheet__title { margin: 26px 0 12px; font-size: 20px; letter-spacing: .1em; text-transform: uppercase; }
.sheet__comics { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.sheet__comic { display: grid; grid-template-columns: 52px 1fr; gap: 12px; align-items: center; padding: 8px; color: var(--text); text-decoration: none; background: var(--panel); border: 1px solid #34343C; transition: border-color .15s; }
.sheet__comic:hover { color: var(--text); border-color: var(--accent); }
.sheet__comic img { width: 52px; aspect-ratio: 832 / 1216; object-fit: cover; }
.sheet__comic small, .sheet__bonds small { display: block; font-family: var(--display); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.sheet__bonds { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.sheet__bonds button { display: grid; grid-template-columns: 40px 1fr; gap: 10px; align-items: center; width: 100%; padding: 6px; font: inherit; text-align: left; color: var(--text); background: var(--panel); border: 1px solid #34343C; cursor: pointer; transition: border-color .15s; }
.sheet__bonds button:hover { border-color: var(--c); }
.sheet__bonds img, .sheet__bonds i { width: 40px; aspect-ratio: 832 / 1216; object-fit: cover; background: var(--panel-2); border: 2px solid var(--c); }
@media (max-width: 760px) {
  .tapestry { height: calc(100svh - 120px); }
  .sheet { padding: 0; align-items: stretch; }
  .sheet__panel { grid-template-columns: 1fr; max-height: none; height: 100%; padding: 20px 16px 32px; outline: 0; border: 0; }
  .sheet__gallery { max-width: 300px; }
}

/* Legal pages */
.legal-page { max-width: 820px; }
.legal-page__nav { margin-bottom: 36px; }
a.pill { display: inline-flex; align-items: center; text-decoration: none; }
a.pill[aria-current="page"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.prose { color: var(--text-2); font-size: 18px; line-height: 1.7; }
.prose h2 { margin: 36px 0 10px; font-size: 28px; color: var(--text); text-transform: uppercase; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose ul, .prose ol { margin: 0 0 14px; }
.prose li { margin-bottom: 6px; }
.prose strong { color: var(--text); }
.prose__contact { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line-2); font-family: var(--display); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.legal-links { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-bottom: 14px; }
.legal-links a { font-family: var(--display); font-size: 14px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); text-decoration: none; }
.legal-links a:hover { color: var(--accent); }

/* Search page */
.search-box { position: relative; display: flex; align-items: center; margin-top: 8px; max-width: 760px; }
.search-box svg { position: absolute; left: 18px; width: 24px; height: 24px; color: var(--muted); pointer-events: none; }
.search-box input {
  width: 100%; min-height: 64px; padding: 14px 64px 14px 56px;
  font: inherit; font-size: 20px; color: var(--text); background: var(--panel); border: 2px solid var(--line-2);
  transition: border-color .15s;
}
.search-box input:focus { border-color: var(--accent); outline: none; }
.search-box input::-webkit-search-cancel-button { display: none; }
.search-box kbd { position: absolute; right: 16px; padding: 2px 9px; font-family: var(--display); font-size: 14px; color: var(--muted); border: 1px solid var(--line-2); }
.search-box input:focus ~ kbd { display: none; }
@media (hover: none) { .search-box kbd { display: none; } .search-box input { padding-right: 16px; } }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; margin: -12px 0 28px; }
.tag {
  min-height: 36px; padding: 6px 12px; font: inherit; font-size: 15px; color: var(--muted);
  background: transparent; border: 1px solid var(--line-2); cursor: pointer; transition: color .15s, border-color .15s;
}
.tag span { margin-left: 4px; font-size: 12px; opacity: .7; }
.tag:hover { color: var(--text); border-color: var(--accent); }
.tag[aria-pressed="true"] { color: var(--on-accent); background: var(--accent); border-color: var(--accent); }
.tag[hidden] { display: none; }
.tag-cloud--inline { margin: 0; padding: 0; list-style: none; }
a.tag { display: inline-flex; align-items: center; text-decoration: none; }
.search-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.search-count { margin: 0; font-family: var(--display); font-size: 15px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.search-sort { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-size: 14px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.search-sort select { min-height: 40px; padding: 6px 10px; font: inherit; color: var(--text); background: var(--panel); border: 2px solid var(--line-2); cursor: pointer; }
.search-sort select:focus { border-color: var(--accent); outline: none; }
.card mark { color: var(--on-accent); background: var(--accent); padding: 0 2px; }

/* Schedule motion: blocks rise in one after another as they scroll into view (set by main.js) */
.js-reveal:not(.is-in) { opacity: 0; }
/* backwards, not both: a held end frame would block the card hover lift */
.js-reveal.is-in { animation: sched-in .6s cubic-bezier(.2,.7,.2,1) calc(var(--i, 0) * 70ms) backwards; }
.countdown__cell b.is-tick { animation: cd-tick .45s cubic-bezier(.2,.7,.2,1); }
@keyframes sched-in { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes cd-tick { from { opacity: 0; transform: translateY(-45%); } }
@media (max-width: 560px) {
  .countdown { width: 100%; }
  .countdown__cell { min-width: 0; flex: 1; }
  .countdown__cell b { font-size: 32px; }
  .timeline__item { grid-template-columns: 64px 1fr; gap: 10px; }
  .timeline__date b { font-size: 30px; }
}

.actions { display: flex; flex-wrap: wrap; align-items: stretch; gap: 12px; }
.actions form { display: contents; }

/* Reading modes */
.reader__bar { display: flex; justify-content: flex-end; }
.reader[data-mode="scroll"] .reader__grid { grid-template-columns: minmax(0, 860px); justify-content: center; gap: 8px; }
.reader[data-mode="page"] .reader__grid { grid-template-columns: minmax(0, min(860px, calc((100svh - 230px) * 832 / 1216))); justify-content: center; }
.reader[data-mode="page"] .page:not(.is-current) { display: none; }
.reader[data-mode="page"] .page:not(.page--tile-locked) { cursor: pointer; }
.reader[data-mode="scroll"] .page:hover, .reader[data-mode="page"] .page:hover { transform: none; }
.reader[data-mode="page"] .page.js-reveal { opacity: 1; animation: none; }
.reader-progress { position: fixed; top: 0; left: 0; right: 0; z-index: 60; height: 3px; background: rgba(255, 255, 255, .06); opacity: 0; transition: opacity .3s; pointer-events: none; }
.reader-progress i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s linear; }
.reader-progress.is-on { opacity: 1; }
.reader-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 60; padding: 8px 14px;
  font-family: var(--display); font-size: 15px; letter-spacing: .14em; color: var(--text);
  background: rgba(11, 11, 13, .85); border: 2px solid var(--accent);
  opacity: 0; transform: translateY(10px); transition: opacity .3s, transform .3s; pointer-events: none;
}
.reader-float.is-on { opacity: 1; transform: none; }
.reader__pager { display: flex; align-items: center; justify-content: center; gap: 16px; }
.reader__pager[hidden] { display: none; }
.reader__pager .btn:disabled { opacity: .4; cursor: default; }
.reader__count { font-family: var(--display); letter-spacing: .12em; min-width: 72px; text-align: center; }
@media (max-width: 640px) {
  .reader__bar { justify-content: center; }
  .reader[data-mode="scroll"] .reader__grid, .reader[data-mode="page"] .reader__grid { grid-template-columns: minmax(0, 1fr); }
}

/* Comment replies and badges */
.comment-thread { display: flex; flex-direction: column; gap: 10px; }
.comments__replies { list-style: none; margin: 0 0 0 32px; padding: 0 0 0 16px; border-left: 2px solid var(--line-2); display: flex; flex-direction: column; gap: 10px; }
.comment--creator { border-color: var(--accent); }
.comment__meta .badge { padding: 3px 8px; font-size: 12px; }
.comment__reply { margin-left: 64px; }
.comment__reply summary { cursor: pointer; width: max-content; font-family: var(--display); font-size: 14px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.comment__reply .comment-form { margin-top: 10px; }
@media (max-width: 640px) {
  .comments__replies { margin-left: 12px; padding-left: 10px; }
  .comment__reply { margin-left: 0; }
}

/* Like button */
.like-form { display: contents; }
.like { padding-inline: 20px; }
.like__icon { width: 20px; height: 20px; fill: none; color: var(--accent); transition: fill .15s; }
.like[aria-pressed="true"] { border-color: var(--accent); }
.like[aria-pressed="true"] .like__icon { fill: var(--accent); }
.like:disabled { opacity: .7; cursor: progress; }

/* Comments */
.comments { max-width: 860px; display: flex; flex-direction: column; gap: 24px; }
.comments h2 { font-size: clamp(32px, 4vw, 44px); text-transform: uppercase; display: flex; align-items: baseline; gap: 14px; }
.comment-form { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.comment-form textarea {
  width: 100%; min-height: 110px; padding: 14px 16px; resize: vertical;
  font: inherit; font-size: 17px; color: var(--text); background: var(--panel); border: 2px solid var(--line-2);
}
.comment-form textarea:focus { border-color: var(--accent); outline: none; }
.comment-form__error { color: var(--accent-hover); font-size: 15px; }
.comments__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.comment { display: grid; grid-template-columns: 48px 1fr; gap: 16px; padding: 16px; background: var(--panel); border: 1px solid #34343C; }
.comment img { width: 48px; height: 48px; object-fit: cover; border: 2px solid var(--accent); background: var(--panel-2); }
.comment__meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-bottom: 6px; }
.comment__meta b { font-family: var(--display); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.comment__meta time { font-size: 14px; color: var(--dim); }
.comment__body { color: var(--text-2); white-space: pre-line; overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .comment { grid-template-columns: 36px 1fr; gap: 12px; padding: 12px; }
  .comment img { width: 36px; height: 36px; }
}

/* Footer */
.site-footer .wrap { padding-block: 56px 40px; display: flex; flex-direction: column; gap: 28px; }
.socials { display: flex; flex-wrap: wrap; gap: 10px; }
.social { width: 52px; height: 52px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line-2); color: var(--text); text-decoration: none; transition: border-color .15s, color .15s; }
.social:hover { border-color: var(--accent); color: var(--accent); }
.social__icon { width: 24px; height: 24px; background: currentColor; -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat; }
.social__mono { font-family: var(--display); font-weight: 700; font-size: 18px; letter-spacing: .04em; }
.credit { color: #9A97A3; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.credit:hover { color: var(--accent); }
.credit__heart { width: 15px; height: 15px; color: #E5484D; }
.legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 14px; color: #9A97A3; border-top: 1px solid var(--line); padding-top: 20px; }

/* Comics page + series page */
.page-intro { padding-block: 40px 32px; }
.page-intro .wrap { display: flex; flex-direction: column; gap: 12px; }
.series-head { padding-block: 40px 56px; }
.series-head__wrap { display: grid; grid-template-columns: minmax(200px, 300px) minmax(0, 1fr); gap: 48px; align-items: start; }
.series-head__cover { display: block; border: 2px solid var(--accent); }
.series-head__info { display: flex; flex-direction: column; gap: 16px; }
.parts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 28px; }
.ep { display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: var(--text); }
.ep:hover { color: var(--text); }
.ep .cover { border: 2px solid var(--line-2); transition: border-color .15s, transform .15s; }
.ep:hover .cover { border-color: var(--accent); transform: translateY(-3px); }
.ep__num { font-family: var(--display); font-weight: 700; font-size: 44px; line-height: .85; color: transparent; -webkit-text-stroke: 1.5px var(--accent); }
.ep__title { font-family: var(--display); font-weight: 600; font-size: 19px; letter-spacing: .04em; text-transform: uppercase; line-height: 1.15; }
.ep__date { font-size: 14px; color: var(--muted); }
@media (max-width: 760px) {
  .series-head__wrap { grid-template-columns: 1fr; gap: 28px; }
  .series-head__cover { max-width: 240px; }
  .parts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
}

/* Comic page */
.comic-head { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; padding-block: 32px 56px; }
.comic-head .cover { flex: 1 1 280px; max-width: 340px; border: 2px solid var(--accent); }
.comic-head__info { flex: 999 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.comic-head h1 { font-size: clamp(48px, 7vw, 88px); line-height: .95; text-transform: uppercase; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; }

.reader { max-width: 860px; margin: 0 auto; padding: 56px 24px 72px; display: flex; flex-direction: column; gap: 20px; }
.page { position: relative; aspect-ratio: 832 / 1216; border: 1px solid #34343C; overflow: hidden; }
.page img { width: 100%; height: 100%; object-fit: contain; }
.page--locked img, .page--locked .placeholder-inner { filter: blur(18px); }
.lock {
  position: absolute; inset: 0; background: rgba(11,11,13,.88);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 24px; text-align: center;
}
.lock svg { width: 44px; height: 44px; stroke: var(--accent); }
.lock h2 { font-size: clamp(26px, 4vw, 34px); letter-spacing: .04em; }
.lock p { color: var(--text-2); max-width: 420px; }
/* Reader as a page grid + lightbox */
.reader--grid { max-width: 1240px; }
.reader__grid { display: grid; grid-template-columns: repeat(var(--per-row, 4), minmax(0, 1fr)); gap: 16px; }
.reader__grid .page { display: block; cursor: zoom-in; transition: border-color .2s, transform .2s; }
.reader__grid .page:hover, .reader__grid .page:focus-visible { border-color: var(--accent); transform: translateY(-3px); outline: none; }
.reader__grid .page--tile-locked { cursor: pointer; background: var(--bg-2); }
.page--tile-locked img { filter: blur(14px) brightness(.5); transform: scale(1.15); }
.page__lock { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; font-family: var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--text); }
.page__lock svg { width: 36px; height: 36px; stroke: var(--accent); margin-bottom: 4px; }
.page__lock span { font-size: 15px; }
.page__lock small { font-size: 12px; color: var(--accent); }
.page--tile-locked:hover .page__lock small { text-decoration: underline; }
.reader__locked-note { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin: 8px 0 0; color: var(--text-2); text-align: center; }
.reader__locked-note svg { width: 16px; height: 16px; stroke: var(--accent); }
.reader__locked-note a { color: var(--accent); font-family: var(--display); letter-spacing: .1em; text-transform: uppercase; }
@media (max-width: 640px) { .page__lock svg { width: 26px; height: 26px; } .page__lock span { font-size: 12px; } }
@media (max-width: 980px) { .reader__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .reader__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }

.lightbox { position: fixed; inset: 0; z-index: 120; display: flex; flex-direction: column; background: rgba(5, 5, 7, .96); overscroll-behavior: contain; }
.lightbox[hidden] { display: none; }
.lightbox__progress { position: absolute; top: 0; left: 0; right: 0; height: 3px; background: rgba(255, 255, 255, .08); z-index: 2; }
.lightbox__progress i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .35s cubic-bezier(.2,.7,.2,1); }
.lightbox__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px 6px; z-index: 2; }
.lightbox__count { font-family: var(--display); font-size: 16px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-2); }
.lightbox__tools { display: flex; gap: 8px; }
.lightbox__tool { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; background: transparent; color: var(--text); border: 2px solid var(--line-2); cursor: pointer; transition: border-color .15s, background .15s, color .15s; }
.lightbox__tool:hover, .lightbox__tool:focus-visible { border-color: var(--accent); color: var(--accent); outline: none; }
.lightbox__close { border-color: var(--accent); }
.lightbox__close:hover { background: var(--accent); color: var(--on-accent); }
.lightbox__tool svg { width: 20px; height: 20px; }
.lightbox__stage { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; touch-action: none; cursor: zoom-out; }
.lightbox__stage[hidden] { display: none; }
.lightbox__img { max-width: calc(100% - 160px); max-height: calc(100% - 16px); object-fit: contain; border: 2px solid var(--accent); background: var(--bg-2); user-select: none; -webkit-user-drag: none; cursor: zoom-in; will-change: transform; }
.lightbox.is-zoomed .lightbox__img { cursor: grab; }
.lightbox.is-zoomed .lightbox__img:active { cursor: grabbing; }
.lightbox__btn { position: absolute; top: 50%; margin-top: -28px; z-index: 2; display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; background: rgba(11, 11, 13, .7); color: var(--text); border: 2px solid var(--accent); cursor: pointer; transition: background .15s, color .15s, opacity .2s, transform .2s; }
.lightbox__btn:hover { background: var(--accent); color: var(--on-accent); }
.lightbox__prev:hover { transform: translateX(-3px); }
.lightbox__next:hover { transform: translateX(3px); }
.lightbox__btn svg { width: 24px; height: 24px; }
.lightbox__btn[disabled] { opacity: 0; pointer-events: none; }
.lightbox__prev { left: 24px; }
.lightbox__next { right: 24px; }
.lightbox__strip { display: flex; gap: 6px; padding: 8px 20px 14px; overflow-x: auto; scrollbar-width: none; z-index: 2; }
.lightbox__strip::-webkit-scrollbar { display: none; }
.lightbox__strip button:first-child { margin-left: auto; } /* centred, yet scrollable when it overflows */
.lightbox__strip button:last-child { margin-right: auto; }
.lightbox__strip button { flex: 0 0 auto; width: 44px; aspect-ratio: 832 / 1216; padding: 0; background: var(--bg-2); border: 2px solid transparent; opacity: .45; cursor: pointer; transition: opacity .2s, border-color .2s, transform .2s; }
.lightbox__strip button:hover { opacity: .85; transform: translateY(-2px); }
.lightbox__strip button.is-current { opacity: 1; border-color: var(--accent); }
.lightbox__strip img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.lightbox__end { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 24px; text-align: center; }
.lightbox__end[hidden] { display: none; }
.lightbox__end h2 { font-size: clamp(40px, 7vw, 80px); color: var(--accent); text-transform: uppercase; }
.lightbox__end-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 8px; }
/* Idle mouse: controls fade away, the page stays */
.lightbox .lightbox__bar, .lightbox .lightbox__strip { transition: opacity .4s; }
.lightbox.is-idle .lightbox__bar, .lightbox.is-idle .lightbox__strip, .lightbox.is-idle .lightbox__btn { opacity: 0; }
.lightbox.is-idle { cursor: none; }
@media (max-width: 640px) {
  .lightbox__bar { padding: 12px 12px 4px; }
  .lightbox__tool[data-zoom] { display: none; }
  .lightbox__img { max-width: 100%; border-width: 2px 0; }
  .lightbox__btn { width: 44px; height: 44px; margin-top: -22px; opacity: .8; }
  .lightbox__prev { left: 8px; } .lightbox__next { right: 8px; }
  .lightbox__strip { padding: 6px 12px 12px; }
  .lightbox__strip button { width: 36px; }
}
html.lightbox-open { overflow: hidden; }

.reader-nav {display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 16px; }

/* Age gate: a comic page. Paper gutters, slanted panels, speech bubbles. */
@font-face { font-family: "AnimeAce"; src: local("Anime Ace 2.0 BB"), local("AnimeAce2.0BB"), url("../assets/fonts/animeace2_reg.ttf") format("truetype"); font-display: swap; }
.agegate {
  position: fixed; inset: 0; z-index: 100; overflow-y: auto;
  background: #F3EBDD; /* opaque: no cover visible before the gate */
  display: flex; align-items: center; justify-content: center; padding: 18px;
}
.agegate[hidden] { display: none; }
/* Set by an inline <head> script before first paint, so the site never flashes before the gate */
html.age-pending .agegate[hidden] { display: flex; }
html.age-pending body { overflow: hidden; }
.gate {
  --gut: 14px;
  --gate-h: max(560px, min(720px, calc(100vh - 36px)));
  width: min(1100px, 100%); height: var(--gate-h);
  display: grid; grid-template-columns: calc((var(--gate-h) - 8px) * 832 / 1216 + 8px) minmax(0, 1fr); grid-template-rows: 1.15fr 1fr; gap: var(--gut);
}
.gate__panel { position: relative; border: 4px solid #111; overflow: hidden; animation: gate-in .7s cubic-bezier(.2,.8,.2,1) both; }
.gate__num { position: absolute; right: 0; bottom: 0; width: 30px; height: 30px; display: grid; place-items: center; background: #F3EBDD; border-left: 3px solid #111; border-top: 3px solid #111; font-family: var(--display); font-weight: 700; font-size: 15px; color: #111; }

.gate__panel--vesta {
  grid-row: 1 / 3;
  background: linear-gradient(160deg, #2A1B47 0%, #5B2E7A 55%, #E8833A 140%);
  display: flex; flex-direction: column; justify-content: flex-end;
}
.gate__panel--vesta img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; } /* cover: no bands, at most a few px trimmed */
.gate__panel--logo {
  background: var(--bg) radial-gradient(rgba(232,131,58,.18) 1.6px, transparent 1.8px) 0 0 / 14px 14px;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 40px), 0 100%);
  padding: 34px 34px 56px; display: flex; flex-direction: column; justify-content: center; gap: 10px;
  animation-delay: .12s;
}
.gate__panel--answer {
  background: var(--panel);
  clip-path: polygon(0 40px, 100% 0, 100% 100%, 0 100%);
  margin-top: -40px; padding: 56px 34px 26px;
  display: flex; flex-direction: column; justify-content: center; gap: 14px;
  animation-delay: .24s;
}
.gate__logo { font-size: clamp(72px, 10vw, 128px); line-height: .85; color: var(--accent); text-shadow: 6px 6px 0 #111; }
.gate__tagline { font-family: var(--display); font-weight: 600; font-size: 17px; letter-spacing: .3em; text-transform: uppercase; }

/* Vesta speaks from panel 1: the tail leaves panel 2 by its left edge, toward her */
.gate__bubble {
  position: relative; align-self: flex-start; max-width: 400px; margin: 0 0 18px;
  padding: 16px 20px; background: #fff; color: #111; border: 3px solid #111; border-radius: 26px;
  font-family: "AnimeAce", var(--display); font-size: clamp(13px, 1.25vw, 16px); line-height: 1.4; text-transform: uppercase;
}
.gate__bubble::before, .gate__bubble::after { content: ""; position: absolute; border-style: solid; }
.gate__bubble::before { left: -26px; top: 22px; border-width: 8px 26px 14px 0; border-color: transparent #111 transparent transparent; }
.gate__bubble::after { left: -17px; top: 26px; border-width: 5px 18px 9px 0; border-color: transparent #fff transparent transparent; }

/* plain buttons: readable first */
.gate__btn {
  display: flex; align-items: center; justify-content: center; width: 100%; max-width: 420px; min-height: 56px; padding: 14px 22px;
  font-family: var(--display); font-weight: 700; font-size: 18px; letter-spacing: .1em; text-transform: uppercase; text-decoration: none;
  border: 3px solid var(--accent); cursor: pointer; transition: background .15s, color .15s;
}
.gate__btn--yes { background: var(--accent); color: #111; }
.gate__btn--yes:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #111; }
.gate__btn--no { background: transparent; color: var(--text); border-color: var(--line-2); }
.gate__btn--no:hover { border-color: var(--text); color: var(--text); }
.gate__small { font-size: 14px; color: var(--muted); max-width: 420px; }
/* Error pages reuse the gate panels inside the page, on the same paper background */
.error-gate { display: flex; justify-content: center; padding: 32px 18px 48px; background: #F3EBDD; }
.error-gate .gate { --gate-h: max(520px, min(680px, calc(100vh - 200px))); }
.error-gate .gate__tagline { color: var(--text); }
/* Phones: a shorter Vesta panel so the message is visible without scrolling far */
@media (max-width: 760px) {
  .error-gate { padding: 12px 12px 32px; }
  .error-gate .gate__panel--vesta { height: 42svh; }
  .error-gate .gate__panel--vesta img { object-position: center 15%; }
}

.gate__panel--logo .gate__num { bottom: 40px; border-bottom: 3px solid #111; }
@keyframes gate-in { from { opacity: 0; transform: translateY(28px) scale(.97); } to { opacity: 1; transform: none; } }
.agegate.is-leaving { background: transparent; transition: background .6s; }
.agegate.is-leaving .gate__panel { transition: transform .6s cubic-bezier(.6,0,.8,.4), opacity .6s; opacity: 0; animation: none; }
.agegate.is-leaving .gate__panel--vesta { transform: translateX(-110%) rotate(-6deg); }
.agegate.is-leaving .gate__panel--logo { transform: translateY(-120%) rotate(4deg); }
.agegate.is-leaving .gate__panel--answer { transform: translateY(120%) rotate(-3deg); }

@media (max-width: 760px) {
  .agegate { align-items: flex-start; padding: 12px; }
  .gate { --gut: 10px; height: auto; grid-template-columns: 1fr; grid-template-rows: auto; }
  .gate__panel--vesta { grid-row: auto; aspect-ratio: auto; height: calc((100vw - 32px) * 1216 / 832 + 8px); }
  .gate__panel--logo { padding: 30px 22px 62px; }
  .gate__panel--answer { padding: 52px 22px 34px; }
  /* Vesta is above on mobile: the tail goes up */
  .gate__bubble::before { left: 34px; top: -26px; border-width: 0 6px 26px 14px; border-color: transparent transparent #111 transparent; }
  .gate__bubble::after { left: 38px; top: -17px; border-width: 0 4px 18px 9px; border-color: transparent transparent #fff transparent; }
  .gate__logo { font-size: 72px; }
}
@media (prefers-reduced-motion: reduce) {
  .gate__panel { animation: none; }
  .gate__btn { transition: none; }
}
body.is-gated { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card, .btn, .hero__slide { transition: none; }
  .hero__slide.is-active .hero__info > * { animation: none; }
  .hero__tab.is-active i { animation: none; width: 100%; }
  .hero__slide.is-active .hero__bg img, .hero__slide.is-active .hero__art > img { animation: none; }
  .hero__bg, .hero__art { transform: none; transition: none; }
  .card:hover { transform: none; }
}

/* Cards (TCG): same cards and covers as the library, rarity colours on top */
.rarity-common { color: #cd7f32; }
.rarity-rare { color: #c0c0c0; }
.rarity-legendary { color: #f5c542; }
.badge.rarity-common, .badge.rarity-rare, .badge.rarity-legendary { border-color: currentColor; color: inherit; }
.badge.rarity-common { color: #cd7f32; } .badge.rarity-rare { color: #c0c0c0; } .badge.rarity-legendary { color: #f5c542; }
/* Card art: the image alone, no blurred backdrop, no letterbox */
.cover--card, .page--card { aspect-ratio: auto; align-self: start; background: none; border: 0; }
.cover--card img, .page--card img { display: block; height: auto; }
.cover--locked img { filter: blur(8px) brightness(.5); transform: scale(1.1); }
