/* ==========================================================================
   BAO! Arcade — layout.css
   Page scaffolding: header rail, brand block, navigation, footer, hero
   collage, section rhythm, broken game grid, ranking board, category hub,
   detail spread and the editorial sheet used by the static pages.
   ========================================================================== */

/* ==========================================================================
   Header
   ========================================================================== */

.bao-header {
  /* Scrolls away with the page: no sticky/fixed positioning, so the nav never
     covers content and parked ad slots are not obscured while reading. */
  position: static;
  background: var(--paper);
  border-bottom: var(--rule-thick) solid var(--ink);
}

.bao-header__rail {
  background: var(--ink);
  color: var(--signal);
}

.bao-header__rail-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: 24px;
  font-family: var(--font-display);
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.bao-header__rail-mid {
  opacity: 0.72;
  text-align: center;
}

.bao-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  min-height: var(--header-h);
}

.bao-brand {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
}

.bao-brand__mark {
  position: relative;
  display: grid;
  width: 42px;
  height: 42px;
  flex: none;
  place-items: center;
  background: var(--ink);
  border: var(--rule) solid var(--ink);
  transform: rotate(-5deg);
  transition: transform var(--dur) var(--ease-out);
}

.bao-brand__mark::after {
  content: "";
  position: absolute;
  inset: 5px;
  border: 2px solid var(--signal);
}

.bao-brand__initial {
  position: relative;
  z-index: 1;
  color: var(--blaze);
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1;
  transform: rotate(5deg);
}

.bao-brand:hover .bao-brand__mark {
  transform: rotate(3deg) scale(1.04);
}

.bao-brand__text {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 1px;
}

.bao-brand__name {
  overflow: hidden;
  max-width: 46vw;
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bao-brand__sub {
  font-family: var(--font-display);
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
}

.bao-nav {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  margin-left: auto;
}

.bao-nav a {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 0.3rem;
  padding: 0.5rem 0.75rem;
  border: 2px solid transparent;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  transition:
    background var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out);
}

.bao-nav a span {
  font-size: 0.5rem;
  letter-spacing: 0.04em;
  color: var(--ink);
  opacity: 0.55;
}

.bao-nav a:hover,
.bao-nav a.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.bao-nav a.is-active span {
  color: var(--signal);
}

.bao-header__actions {
  display: flex;
  flex: none;
  align-items: center;
  gap: 0.5rem;
}

.bao-iconbtn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-width: 42px;
  height: 42px;
  padding: 0 0.65rem;
  background: var(--paper);
  border: 2px solid var(--ink);
  box-shadow: var(--shadow-sm);
  font-family: var(--font-display);
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition:
    transform var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-fast) var(--ease-out),
    background var(--dur-fast) var(--ease-out);
}

.bao-iconbtn:hover {
  background: var(--signal);
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--ink);
}

.bao-iconbtn:active {
  transform: translate(2px, 2px);
  box-shadow: 0 0 0 var(--ink);
}

.bao-iconbtn__count {
  display: none;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  place-items: center;
  background: var(--blaze);
  color: var(--paper);
  font-size: 0.5625rem;
  line-height: 1;
  border: 2px solid var(--ink);
}

.bao-iconbtn__count.is-on {
  display: inline-grid;
}

.bao-iconbtn--menu {
  display: none;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.bao-foot {
  margin-top: clamp(2rem, 5vw, 4rem);
  background: var(--ink);
  color: var(--paper);
}

.bao-foot__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  padding-block: clamp(2.5rem, 6vw, 4.5rem);
}

.bao-foot__word {
  margin: 0.75rem 0 1rem;
  overflow-wrap: anywhere;
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 5.5vw, 4.5rem);
  font-weight: 800;
  line-height: 0.86;
  letter-spacing: -0.05em;
  color: var(--signal);
}

.bao-foot__tag {
  max-width: 34ch;
  font-size: var(--text-sm);
  line-height: 1.65;
  color: var(--paper);
  opacity: 0.78;
}

.bao-foot__mail {
  display: inline-block;
  margin-top: 1.25rem;
  padding-bottom: 2px;
  border-bottom: 2px solid var(--blaze);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.bao-foot__mail:hover {
  color: var(--blaze);
}

.bao-foot__nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-5);
  align-content: start;
}

.bao-foot__label {
  margin-bottom: 0.85rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--signal);
  font-family: var(--font-display);
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: var(--signal);
}

.bao-foot__nav ul {
  display: grid;
  gap: 0.5rem;
}

.bao-foot__nav a {
  display: inline-block;
  font-size: var(--text-sm);
  color: var(--paper);
  opacity: 0.82;
  transition:
    color var(--dur-fast) var(--ease-out),
    opacity var(--dur-fast) var(--ease-out);
}

.bao-foot__nav a:hover {
  color: var(--signal);
  opacity: 1;
}

.bao-foot__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding-block: 1rem 1.25rem;
  border-top: 2px solid var(--paper-ghost);
  font-family: var(--font-display);
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--paper);
  opacity: 0.72;
}

.bao-foot__bottom button {
  padding: 0.35rem 0.6rem;
  border: 2px solid var(--signal);
  color: var(--signal);
  font-family: inherit;
  font-size: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
}

.bao-foot__bottom button:hover {
  background: var(--signal);
  color: var(--ink);
}

/* ==========================================================================
   Home · hero
   ========================================================================== */

.bao-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
  padding-block: clamp(2rem, 5vw, 4rem) clamp(1.5rem, 4vw, 3rem);
}

.bao-hero__title {
  margin: 0.9rem 0 0;
  font-size: var(--display);
  line-height: 0.84;
  letter-spacing: -0.055em;
  text-transform: uppercase;
}

.bao-hero__title span {
  display: block;
}

.bao-hero__title .is-marked {
  position: relative;
  display: inline-block;
  margin-top: 0.18em;
  padding: 0.02em 0.14em 0.06em;
  background: var(--blaze);
  color: var(--paper);
  border: var(--rule) solid var(--ink);
  box-shadow: var(--shadow);
  transform: rotate(-1.4deg);
}

.bao-hero__lede {
  max-width: 46ch;
  margin-top: 1.35rem;
  font-size: var(--text-md);
  line-height: 1.65;
}

.bao-hero__form {
  margin-top: 1.6rem;
}

.bao-hero__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.9rem;
}

.bao-hero__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 1.9rem;
  border-top: var(--rule) solid var(--ink);
  border-bottom: var(--rule) solid var(--ink);
}

.bao-hero__stat {
  padding: 0.8rem 0.4rem;
  border-right: 2px solid var(--ink);
}

.bao-hero__stat:last-child {
  border-right: 0;
}

.bao-hero__stat b {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.2vw, 2.1rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
}

.bao-hero__stat span {
  display: block;
  margin-top: 0.25rem;
  font-family: var(--font-display);
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Collage of tilted covers on the right of the hero. */
.bao-collage {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1.02;
  isolation: isolate;
}

.bao-collage::before {
  content: "";
  position: absolute;
  inset: 8% 4% 6% 8%;
  background: var(--signal);
  border: var(--rule) solid var(--ink);
  transform: rotate(-3deg);
  z-index: -1;
}

.bao-collage__card {
  position: absolute;
  width: 56%;
  padding: 0.5rem;
  background: var(--paper);
  border: var(--rule) solid var(--ink);
  box-shadow: var(--shadow);
}

.bao-collage__card img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 2px solid var(--ink);
}

.bao-collage__card--a {
  top: 2%;
  left: 0;
  transform: rotate(-6deg);
  z-index: 2;
}

.bao-collage__card--b {
  top: 24%;
  right: 0;
  transform: rotate(4.5deg);
  z-index: 3;
}

.bao-collage__card--c {
  bottom: 2%;
  left: 10%;
  transform: rotate(-2deg);
  z-index: 1;
}

.bao-collage__label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  padding-top: 0.4rem;
  font-family: var(--font-display);
  font-size: 0.5625rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.bao-collage__label span:last-child {
  color: var(--ink);
  opacity: 0.7;
}

.bao-collage__badge {
  position: absolute;
  right: 2%;
  bottom: 6%;
  z-index: 4;
  display: grid;
  width: clamp(88px, 22%, 118px);
  aspect-ratio: 1;
  place-items: center;
  background: var(--ink);
  color: var(--signal);
  border: var(--rule) solid var(--paper);
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 0.5625rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-align: center;
  line-height: 1.35;
  text-transform: uppercase;
  box-shadow: 0 0 0 3px var(--ink);
}

.bao-collage__badge span {
  display: block;
}

.bao-collage__stamp {
  position: absolute;
  top: 4%;
  right: 6%;
  z-index: 4;
  padding: 0.2rem 0.4rem;
  background: var(--paper);
  border: 2px solid var(--ink);
  font-family: var(--font-display);
  font-size: 0.5rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  transform: rotate(7deg);
}

/* ==========================================================================
   Home · marquee rail
   ========================================================================== */

.bao-rail {
  display: grid;
  border-block: var(--rule) solid var(--ink);
}

.bao-rail .marquee {
  border: 0;
  border-bottom: 2px solid var(--ink);
}

.bao-rail .marquee:last-child {
  border-bottom: 0;
}

/* ==========================================================================
   Section heads
   ========================================================================== */

.bao-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
}

.bao-section-head__title {
  margin-top: 0.45rem;
  font-size: var(--text-2xl);
  line-height: 0.95;
  letter-spacing: -0.045em;
  text-transform: uppercase;
}

.bao-section-head__note {
  max-width: 42ch;
  margin-top: 0.6rem;
  font-size: var(--text-sm);
}

.bao-section-head__link {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.75rem;
  border: 2px solid var(--ink);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
  font-family: var(--font-display);
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition:
    background var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out);
}

.bao-section-head__link:hover {
  background: var(--ink);
  color: var(--signal);
}

/* ==========================================================================
   Home · broken hot grid
   ========================================================================== */

.bao-burn-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(1rem, 2.2vw, 1.6rem);
  align-items: start;
}

.bao-burn-grid > :nth-child(1) {
  grid-column: span 7;
}

.bao-burn-grid > :nth-child(2) {
  grid-column: span 5;
}

.bao-burn-grid > :nth-child(3) {
  grid-column: span 4;
}

.bao-burn-grid > :nth-child(4) {
  grid-column: span 4;
  margin-top: clamp(0.75rem, 2vw, 1.75rem);
}

.bao-burn-grid > :nth-child(5) {
  grid-column: span 4;
  margin-top: clamp(1.5rem, 4vw, 3rem);
}

.bao-burn-grid > :nth-child(even) {
  transform: translateY(clamp(0.5rem, 1.5vw, 1.25rem)) rotate(var(--tilt, 0deg));
}

.bao-burn-grid > :nth-child(odd) {
  transform: rotate(var(--tilt, 0deg));
}

.bao-burn-grid > *:hover {
  transform: translateY(0) rotate(0);
}

/* ==========================================================================
   Home · category scatter
   ========================================================================== */

.bao-scatter {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: clamp(0.65rem, 1.6vw, 1.1rem);
  padding: clamp(1.25rem, 3vw, 2.25rem);
  background: var(--signal);
  border: var(--rule-thick) solid var(--ink);
  box-shadow: var(--shadow-lg);
}

.bao-scatter::before {
  content: "BROWSE BY GENRE";
  position: absolute;
  top: -13px;
  left: clamp(1rem, 3vw, 2.25rem);
  padding: 0.15rem 0.6rem;
  background: var(--ink);
  color: var(--signal);
  font-family: var(--font-display);
  font-size: 0.5625rem;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.bao-scatter > :nth-child(3n + 1) {
  transform: rotate(-2.5deg);
}

.bao-scatter > :nth-child(3n + 2) {
  transform: rotate(1.5deg) translateY(0.5rem);
}

.bao-scatter > :nth-child(3n) {
  transform: rotate(-0.75deg) translateY(-0.25rem);
}

.bao-scatter > *:hover {
  transform: translateY(0) rotate(0);
}

/* ==========================================================================
   Home · ranking board
   ========================================================================== */

.bao-board {
  background: var(--ink);
  color: var(--paper);
  border: var(--rule-thick) solid var(--ink);
  box-shadow: var(--shadow-lg);
}

.bao-board__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-3);
  padding: clamp(1.1rem, 3vw, 1.8rem) clamp(1.1rem, 3vw, 2rem);
  border-bottom: var(--rule) solid var(--paper);
}

.bao-board__head h2 {
  font-size: clamp(1.6rem, 3.4vw, 2.5rem);
  line-height: 0.92;
  text-transform: uppercase;
}

.bao-board__head p {
  max-width: 34ch;
  font-size: var(--text-xs);
  line-height: 1.5;
  opacity: 0.66;
}

.bao-board__row {
  display: grid;
  grid-template-columns: 4.25rem minmax(0, 1.3fr) minmax(0, 0.8fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(0.6rem, 2vw, 1.5rem);
  padding: 0.9rem clamp(1.1rem, 3vw, 2rem);
  border-bottom: 2px solid var(--paper-ghost);
  transition: background var(--dur-fast) var(--ease-out);
}

.bao-board__row:last-child {
  border-bottom: 0;
}

.bao-board__row:hover {
  background: var(--blaze);
  color: var(--ink);
}

.bao-board__rank {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  line-height: 0.85;
  letter-spacing: -0.06em;
}

.bao-board__row:nth-child(2) .bao-board__rank {
  color: var(--signal);
}

.bao-board__row:hover .bao-board__rank {
  color: var(--ink);
}

.bao-board__title {
  overflow: hidden;
  font-family: var(--font-display);
  font-size: clamp(1rem, 2vw, 1.35rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.bao-board__cat {
  font-family: var(--font-display);
  font-size: 0.5625rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.72;
}

.bao-board__bar {
  position: relative;
  height: 10px;
  background: var(--paper-ghost);
  border: 2px solid currentColor;
}

.bao-board__bar i {
  display: block;
  height: 100%;
  background: var(--signal);
  transition: width var(--dur-slow) var(--ease-out);
}

.bao-board__row:hover .bao-board__bar i {
  background: var(--ink);
}

.bao-board__plays {
  font-family: var(--font-display);
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.bao-board__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 1rem clamp(1.1rem, 3vw, 2rem);
  border-top: var(--rule) solid var(--paper);
  font-size: 0.625rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.bao-board__foot a {
  color: var(--signal);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ==========================================================================
   Home · fresh strip + drop panel
   ========================================================================== */

.bao-fresh {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2.4vw, 1.75rem);
}

.bao-drop {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(1.25rem, 3vw, 2.5rem);
  align-items: center;
  padding: clamp(1.35rem, 3.5vw, 2.5rem);
  background: var(--blaze);
  border: var(--rule-thick) solid var(--ink);
  box-shadow: var(--shadow-lg);
}

.bao-drop h2 {
  font-size: clamp(1.5rem, 3.2vw, 2.25rem);
  line-height: 0.94;
  text-transform: uppercase;
}

.bao-drop p {
  max-width: 46ch;
  margin-top: 0.6rem;
  font-size: var(--text-sm);
}

.bao-drop__timer {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 0.4rem;
  align-items: end;
}

.bao-drop__unit {
  min-width: 62px;
  padding: 0.5rem 0.35rem;
  background: var(--ink);
  color: var(--signal);
  text-align: center;
  border: 2px solid var(--ink);
}

.bao-drop__unit b {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 3vw, 1.75rem);
  font-weight: 800;
  line-height: 1;
}

.bao-drop__unit span {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.7;
}

.bao-drop__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.1rem;
}

/* ==========================================================================
   Inner page head
   ========================================================================== */

.bao-crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-display);
  font-size: 0.5625rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.bao-crumb a:hover {
  color: var(--blaze);
}

.bao-crumb [aria-current="page"] {
  color: var(--blaze);
}

.bao-crumb span[aria-hidden] {
  opacity: 0.5;
}

/* ==========================================================================
   Games index · hub rows
   ========================================================================== */

/* ==========================================================================
   Games index · filtered grid
   ========================================================================== */

.bao-game-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2.4vw, 1.75rem);
}

.bao-empty {
  display: grid;
  justify-items: start;
  gap: 0.85rem;
  padding: clamp(1.5rem, 4vw, 2.75rem);
  background: var(--signal);
  border: var(--rule-thick) solid var(--ink);
  box-shadow: var(--shadow-lg);
}

.bao-empty h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  text-transform: uppercase;
}

.bao-empty p {
  max-width: 52ch;
  font-size: var(--text-sm);
}

/* ==========================================================================
   Detail page
   ========================================================================== */

.bao-detail {
  padding-block: clamp(1.25rem, 3vw, 2rem) clamp(2rem, 5vw, 3rem);
}

.bao-detail__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
}

.bao-detail__cover {
  position: sticky;
  top: 1.5rem;
}

.bao-detail__art {
  position: relative;
  padding: 0.6rem;
  background: var(--paper);
  border: var(--rule-thick) solid var(--ink);
  box-shadow: var(--shadow-lg);
  transform: rotate(-1.2deg);
}

.bao-detail__art img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 2px solid var(--ink);
}

.bao-detail__art .bao-tape {
  top: -12px;
  left: 50%;
  transform: translateX(-50%) rotate(-3deg);
}

.bao-detail__caption {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  margin-top: 0.85rem;
  padding-top: 0.55rem;
  border-top: 2px solid var(--ink);
  font-family: var(--font-display);
  font-size: 0.5625rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.bao-detail__title {
  margin-top: 0.75rem;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 0.86;
  letter-spacing: -0.055em;
  text-transform: uppercase;
}

.bao-detail__tagline {
  max-width: 44ch;
  margin-top: 0.9rem;
  font-size: var(--text-lg);
  font-weight: 600;
  line-height: 1.45;
}

.bao-detail__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.9rem;
}

.bao-detail__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.6rem;
  margin-top: 1.4rem;
}

.bao-detail__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 1.5rem;
  border: var(--rule) solid var(--ink);
}

.bao-detail__stat {
  padding: 0.7rem 0.75rem;
  border-right: 2px solid var(--ink);
}

.bao-detail__stat:last-child {
  border-right: 0;
}

.bao-detail__stat b {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.4vw, 1.5rem);
  font-weight: 800;
  line-height: 1;
}

.bao-detail__stat span {
  display: block;
  margin-top: 0.2rem;
  font-family: var(--font-display);
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.65;
}

.bao-detail__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
  margin-top: clamp(2.5rem, 6vw, 4rem);
  padding-top: clamp(1.5rem, 4vw, 2.5rem);
  border-top: var(--rule-thick) solid var(--ink);
}

.bao-prose-block {
  margin-bottom: clamp(1.75rem, 4vw, 2.5rem);
}

.bao-prose-block h2 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.55rem;
  margin-bottom: 0.85rem;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  text-transform: uppercase;
}

.bao-prose-block h2 i {
  font-family: var(--font-display);
  font-size: 0.625rem;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--blaze);
}

.bao-prose-block p + p {
  margin-top: 0.75rem;
}

.bao-prose-block > p {
  max-width: 66ch;
}

.bao-steps {
  display: grid;
  gap: 0.5rem;
  counter-reset: bao-step;
}

.bao-steps li {
  display: grid;
  grid-template-columns: 2.1rem minmax(0, 1fr);
  align-items: start;
  gap: 0.7rem;
  padding: 0.65rem 0.75rem;
  background: var(--paper);
  border: 2px solid var(--ink);
  box-shadow: var(--shadow-sm);
  font-size: var(--text-sm);
  counter-increment: bao-step;
}

.bao-steps li::before {
  content: counter(bao-step, decimal-leading-zero);
  display: grid;
  width: 2.1rem;
  height: 2.1rem;
  place-items: center;
  background: var(--ink);
  color: var(--signal);
  font-family: var(--font-display);
  font-size: 0.625rem;
  font-weight: 800;
}

.bao-tips {
  display: grid;
  gap: 0.5rem;
}

.bao-tips li {
  position: relative;
  padding-left: 1.5rem;
  font-size: var(--text-sm);
}

.bao-tips li::before {
  content: "→";
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--blaze);
}

.bao-aside {
  position: sticky;
  top: 1.5rem;
  display: grid;
  gap: 1rem;
}

.bao-facts {
  border: var(--rule) solid var(--ink);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.bao-facts__head {
  padding: 0.55rem 0.75rem;
  background: var(--ink);
  color: var(--signal);
  font-family: var(--font-display);
  font-size: 0.5625rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.bao-facts dl {
  display: grid;
}

.bao-facts__row {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-bottom: 2px solid var(--ink-ghost);
  font-size: 0.75rem;
}

.bao-facts__row:last-child {
  border-bottom: 0;
}

.bao-facts dt {
  font-family: var(--font-display);
  font-size: 0.5rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.6;
}

.bao-facts dd {
  font-weight: 600;
}

.bao-aside__note {
  padding: 0.75rem;
  background: var(--signal);
  border: 2px solid var(--ink);
  font-size: 0.7rem;
  line-height: 1.5;
}

.bao-related {
  margin-top: clamp(2.25rem, 5vw, 3.5rem);
  padding-top: clamp(1.5rem, 4vw, 2.25rem);
  border-top: var(--rule-thick) solid var(--ink);
}

.bao-related__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2.4vw, 1.75rem);
}

/* ==========================================================================
   Play page
   ========================================================================== */

.bao-play {
  padding-block: clamp(1rem, 3vw, 1.75rem) clamp(2rem, 5vw, 3rem);
}

.bao-play__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: 1rem;
}

.bao-play__title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
  font-size: clamp(1.3rem, 3vw, 2rem);
  text-transform: uppercase;
}

.bao-play__title small {
  font-family: var(--font-display);
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--blaze);
}

.bao-play__frame {
  border: var(--rule-thick) solid var(--ink);
  background: var(--ink);
  box-shadow: var(--shadow-lg);
}

.bao-play__frame iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  background: var(--paper);
}

.bao-play__below {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(1.25rem, 3vw, 2.5rem);
  margin-top: clamp(1.5rem, 4vw, 2.5rem);
}

.bao-play__panel {
  padding: clamp(1rem, 2.5vw, 1.5rem);
  border: var(--rule) solid var(--ink);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.bao-play__panel h2 {
  margin-bottom: 0.6rem;
  font-size: 1.15rem;
  text-transform: uppercase;
}

/* ==========================================================================
   Static / editorial pages
   ========================================================================== */

.bao-sheet {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
  padding-block: clamp(1.75rem, 4vw, 3rem) clamp(2.5rem, 6vw, 4rem);
}

.bao-toc {
  position: sticky;
  top: 1.5rem;
  padding: 1rem;
  border: var(--rule) solid var(--ink);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.bao-toc p {
  margin-bottom: 0.65rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--ink);
  font-family: var(--font-display);
  font-size: 0.5625rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.bao-toc ol {
  display: grid;
  gap: 0.3rem;
  counter-reset: bao-toc;
}

.bao-toc a {
  display: grid;
  grid-template-columns: 1.4rem minmax(0, 1fr);
  gap: 0.35rem;
  padding: 0.2rem 0;
  font-size: 0.75rem;
  line-height: 1.35;
  counter-increment: bao-toc;
}

.bao-toc a::before {
  content: counter(bao-toc, decimal-leading-zero);
  font-family: var(--font-display);
  font-size: 0.5rem;
  font-weight: 800;
  color: var(--blaze);
}

.bao-toc a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.bao-article {
  max-width: 76ch;
}

.bao-article__stamp {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1rem;
  padding: 0.3rem 0.55rem;
  background: var(--ink);
  color: var(--signal);
  font-family: var(--font-display);
  font-size: 0.5625rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.bao-article h1 {
  margin-bottom: 1rem;
  font-size: clamp(2.1rem, 5.5vw, 3.5rem);
  line-height: 0.9;
  text-transform: uppercase;
}

.bao-article .bao-lede {
  padding-bottom: 1.1rem;
  border-bottom: var(--rule) solid var(--ink);
}

.bao-article h2 {
  margin: 2rem 0 0.6rem;
  font-size: clamp(1.2rem, 2.6vw, 1.55rem);
  text-transform: uppercase;
}

.bao-article h3 {
  margin: 1.25rem 0 0.4rem;
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.bao-article p,
.bao-article li {
  font-size: var(--text-sm);
  line-height: 1.75;
}

.bao-article p + p {
  margin-top: 0.75rem;
}

.bao-article ul,
.bao-article ol {
  display: grid;
  gap: 0.4rem;
  margin: 0.6rem 0 0.9rem;
  padding-left: 1.1rem;
  list-style: disc;
}

.bao-article ol {
  list-style: decimal;
}

.bao-article a {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.bao-article a:hover {
  background: var(--signal);
}

.bao-callout {
  margin: 1.25rem 0;
  padding: 0.9rem 1rem;
  background: var(--signal);
  border: var(--rule) solid var(--ink);
  box-shadow: var(--shadow-sm);
  font-size: var(--text-sm);
  line-height: 1.65;
}

.bao-callout strong {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.bao-contact {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}

.bao-contact__card {
  padding: 1rem;
  border: var(--rule) solid var(--ink);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}

.bao-contact__card b {
  display: block;
  margin-bottom: 0.25rem;
  font-family: var(--font-display);
  font-size: 0.625rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blaze);
}

.bao-contact__card p,
.bao-contact__card a {
  font-size: var(--text-sm);
  overflow-wrap: anywhere;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1024px) {
  .bao-hero {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
    gap: 1.5rem;
  }

  .bao-detail__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1.75rem;
  }

  .bao-detail__body {
    grid-template-columns: minmax(0, 1fr) 240px;
  }

  .bao-board__row {
    grid-template-columns: 3.25rem minmax(0, 1.4fr) minmax(0, 0.7fr) minmax(0, 0.9fr) auto;
  }
}

@media (max-width: 900px) {
  .bao-header__rail {
    display: none;
  }

  :root {
    --header-h: 60px;
  }

  .bao-nav {
    display: none;
  }

  .bao-iconbtn--menu {
    display: inline-flex;
  }

  .bao-iconbtn__text {
    display: none;
  }

  .bao-iconbtn {
    min-width: 42px;
    padding: 0 0.55rem;
  }

  .bao-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.75rem;
    padding-block: 1.5rem 2rem;
  }

  .bao-collage {
    aspect-ratio: auto;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.6rem;
  }

  .bao-collage::before,
  .bao-collage__badge,
  .bao-collage__stamp {
    display: none;
  }

  .bao-collage__card {
    position: static;
    width: auto;
    padding: 0.35rem;
    transform: rotate(var(--r, 0deg));
    box-shadow: var(--shadow-sm);
  }

  .bao-collage__card--a {
    --r: -2deg;
  }

  .bao-collage__card--b {
    --r: 1.5deg;
  }

  .bao-collage__card--c {
    --r: -1deg;
  }

  .bao-collage__label {
    display: none;
  }

  .bao-burn-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bao-burn-grid > :nth-child(n) {
    grid-column: span 1;
    margin-top: 0;
  }

  .bao-burn-grid > :nth-child(1) {
    grid-column: span 2;
  }

  .bao-fresh {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bao-fresh > :last-child {
    grid-column: span 2;
  }

  .bao-game-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bao-detail__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .bao-detail__cover {
    position: static;
    max-width: 540px;
  }

  .bao-detail__body {
    grid-template-columns: minmax(0, 1fr);
  }

  .bao-aside {
    position: static;
    order: -1;
  }

  .bao-play__below {
    grid-template-columns: minmax(0, 1fr);
  }

  .bao-sheet {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
  }

  .bao-toc {
    position: static;
  }

  .bao-foot__inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
  }

  .bao-foot__nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  :root {
    --header-h: 58px;
    --dot-size: 7px;
    --grid-size: 20px;
  }

  .bao-brand__mark {
    width: 38px;
    height: 38px;
  }

  .bao-brand__name {
    max-width: 42vw;
  }

  .bao-header__actions {
    gap: 0.35rem;
  }

  .bao-hero__title {
    font-size: clamp(2.85rem, 13vw, 4rem);
  }

  .bao-hero__stats {
    margin-top: 1.5rem;
  }

  .bao-collage {
    gap: 0.4rem;
  }

  .bao-burn-grid,
  .bao-fresh,
  .bao-game-grid,
  .bao-related__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .bao-burn-grid > :nth-child(1),
  .bao-fresh > :last-child {
    grid-column: span 1;
  }

  .bao-board__row {
    grid-template-columns: 2.5rem minmax(0, 1fr) auto;
    gap: 0.6rem;
    padding: 0.75rem 0.85rem;
  }

  .bao-board__cat,
  .bao-board__bar {
    display: none;
  }

  .bao-board__title {
    white-space: normal;
  }

  .bao-board__head {
    padding: 1rem 0.85rem;
  }

  .bao-board__foot {
    padding: 0.85rem;
  }

  .bao-drop {
    grid-template-columns: minmax(0, 1fr);
  }

  .bao-drop__timer {
    justify-content: start;
  }

  .bao-detail__stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .bao-detail__stat {
    padding: 0.6rem 0.5rem;
  }

  .bao-contact {
    grid-template-columns: minmax(0, 1fr);
  }

  .bao-foot__nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
  }

  .bao-foot__bottom {
    justify-content: flex-start;
  }

  .bao-sheet {
    padding-block: 1.25rem 2.5rem;
  }
}

@media (max-width: 380px) {
  .bao-iconbtn__count {
    position: absolute;
    top: -6px;
    right: -6px;
  }

  .bao-hero__stat {
    padding: 0.65rem 0.25rem;
  }

  .bao-hero__stat span {
    font-size: 0.5rem;
    letter-spacing: 0.08em;
  }
}

/* ==========================================================================
   Games index · genre stamp board
   ========================================================================== */

.bao-genre-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(0.6rem, 1.6vw, 1rem);
  padding-block: clamp(1.25rem, 3vw, 2rem);
}

.bao-genre-card {
  position: relative;
  display: grid;
  justify-items: start;
  gap: 0.15rem;
  padding: 0.8rem;
  background: var(--paper);
  border: var(--rule) solid var(--ink);
  box-shadow: var(--shadow-sm);
  transition:
    transform var(--dur-fast) var(--ease-out),
    background var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-fast) var(--ease-out);
}

.bao-genre-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow);
  background: var(--signal);
}

.bao-genre-card.is-active {
  background: var(--ink);
  color: var(--paper);
}

.bao-genre-card__emoji {
  font-size: 1.25rem;
  line-height: 1;
}

.bao-genre-card__name {
  margin-top: 0.3rem;
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.bao-genre-card__zh {
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  opacity: 0.6;
}

.bao-genre-card__count {
  margin-top: 0.25rem;
  padding: 0.05rem 0.3rem;
  border: 1.5px solid currentColor;
  font-family: var(--font-display);
  font-size: 0.5rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.75;
}

@media (max-width: 900px) {
  .bao-genre-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 420px) {
  .bao-genre-board {
    gap: 0.4rem;
  }

  .bao-genre-card {
    padding: 0.6rem;
  }
}

/* ==========================================================================
   FAQ accordion
   ========================================================================== */

.bao-faq {
  border: 2px solid var(--ink);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}

.bao-faq + .bao-faq {
  margin-top: 0.45rem;
}

.bao-faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.8rem;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
  list-style: none;
}

.bao-faq summary::-webkit-details-marker {
  display: none;
}

.bao-faq summary::after {
  content: "+";
  flex: none;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--signal);
  font-size: 0.75rem;
  line-height: 1;
}

.bao-faq[open] summary {
  background: var(--signal);
}

.bao-faq[open] summary::after {
  content: "−";
}

.bao-faq p {
  padding: 0 0.8rem 0.8rem;
  font-size: var(--text-sm);
  line-height: 1.65;
}

/* ==========================================================================
   Category page · layout
   ========================================================================== */

.bao-cat-head {
  padding-block: clamp(1.25rem, 3vw, 2rem) 0;
}

.bao-cat-head__row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-4);
}

.bao-cat-head__title {
  margin-top: 0.5rem;
  font-size: clamp(2rem, 5.5vw, 3.5rem);
  line-height: 0.9;
  text-transform: uppercase;
}

.bao-cat-head__count {
  font-family: var(--font-display);
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

.bao-cat-tools {
  display: grid;
  gap: 0.7rem;
  margin-top: 1.25rem;
}

.bao-cat-tools__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.bao-cat-tools .bao-field {
  flex: 1 1 260px;
}

.bao-cat-body {
  padding-block: clamp(1.5rem, 4vw, 2.5rem) clamp(2rem, 5vw, 3.5rem);
}

.bao-cat-body .bao-game-grid {
  margin-bottom: 1.5rem;
}

@media (max-width: 640px) {
  .bao-cat-tools__row .bao-field {
    flex-basis: 100%;
  }
}

/* ==========================================================================
   Ranking view (served by category.html?view=rank)
   ========================================================================== */

.bao-podium {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(0.75rem, 2vw, 1.25rem);
  align-items: end;
}

.bao-podium__card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.65rem;
  background: var(--paper);
  border: var(--rule) solid var(--ink);
  box-shadow: var(--shadow);
  transform: rotate(var(--tilt, 0deg));
}

.bao-podium__card--1 {
  --tilt: -1.2deg;
  grid-column: 2;
  grid-row: 1;
  padding-top: 1rem;
  background: var(--signal);
  border-width: var(--rule-thick);
  box-shadow: var(--shadow-lg);
  z-index: 3;
}

.bao-podium__card--2 {
  --tilt: 1.4deg;
  grid-column: 1;
  grid-row: 1;
  background: var(--paper);
  z-index: 2;
}

.bao-podium__card--3 {
  --tilt: -2deg;
  grid-column: 3;
  grid-row: 1;
  background: var(--blaze);
  z-index: 1;
}

.bao-podium__card > a:first-of-type {
  display: block;
  border: 2px solid var(--ink);
  background: var(--paper);
}

.bao-podium__card img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.bao-podium__place {
  position: absolute;
  top: -0.75rem;
  left: 0.75rem;
  z-index: 2;
  display: grid;
  min-width: 44px;
  height: 34px;
  padding: 0 0.4rem;
  place-items: center;
  background: var(--ink);
  color: var(--signal);
  border: 2px solid var(--ink);
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.bao-podium__card h3 {
  margin-top: 0.25rem;
  font-size: clamp(1.15rem, 2.6vw, 1.6rem);
  text-transform: uppercase;
}

.bao-podium__card p {
  font-size: 0.75rem;
  line-height: 1.45;
}

.bao-podium__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: auto;
  font-family: var(--font-display);
  font-size: 0.5rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bao-podium__meta span {
  padding: 0.15rem 0.3rem;
  border: 1.5px solid currentColor;
}

.bao-rank-list {
  display: grid;
  border-top: var(--rule) solid var(--ink);
}

.bao-rank-row {
  display: grid;
  grid-template-columns: 2.5rem 72px minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(0.65rem, 2vw, 1.25rem);
  padding: 0.7rem clamp(0.5rem, 2vw, 1rem);
  border-bottom: var(--rule) solid var(--ink);
  transition: background var(--dur-fast) var(--ease-out);
}

.bao-rank-row:nth-child(even) {
  padding-left: clamp(1rem, 4vw, 2.25rem);
}

.bao-rank-row:hover {
  background: var(--signal);
}

.bao-rank-row__num {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.bao-rank-row img {
  width: 72px;
  height: 54px;
  object-fit: cover;
  border: 2px solid var(--ink);
}

.bao-rank-row__title {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(0.95rem, 2.2vw, 1.25rem);
  font-weight: 800;
  line-height: 1.1;
  text-transform: uppercase;
}

.bao-rank-row__meta {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.625rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.65;
}

.bao-rank-row__plays {
  font-family: var(--font-display);
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-align: right;
  white-space: nowrap;
}

.bao-rank-row__plays small {
  display: block;
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  opacity: 0.6;
}

@media (max-width: 720px) {
  .bao-podium {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.25rem;
  }

  .bao-podium__card--1,
  .bao-podium__card--2,
  .bao-podium__card--3 {
    grid-column: 1;
    grid-row: auto;
    transform: rotate(var(--tilt, 0deg));
  }

  .bao-podium__card--1 {
    order: -1;
  }

  .bao-rank-row {
    grid-template-columns: 1.8rem 52px minmax(0, 1fr);
    gap: 0.55rem;
  }

  .bao-rank-row img {
    width: 52px;
    height: 40px;
  }

  .bao-rank-row__plays {
    grid-column: 3;
    grid-row: 2;
    text-align: left;
    margin-top: -0.2rem;
  }

  .bao-rank-row__plays small {
    display: inline;
    margin-left: 0.25rem;
  }
}

/* ==========================================================================
   Home extras: mascot stickers, section slots, CLS guards
   ========================================================================== */

.bao-collage__mascot {
  position: absolute;
  left: -5%;
  bottom: -4%;
  z-index: 5;
  width: clamp(76px, 21%, 126px);
  height: auto;
  padding: 0.35rem;
  background: var(--paper);
  border: var(--rule) solid var(--ink);
  box-shadow: var(--shadow);
  transform: rotate(5deg);
  transition: transform var(--dur) var(--ease-out);
}

.bao-collage__mascot:hover {
  transform: rotate(-2deg) scale(1.03);
}

.bao-detail__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin-top: 0.85rem;
  padding-top: 0.65rem;
  border-top: 2px solid var(--ink);
  font-family: var(--font-display);
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bao-detail__meta span + span::before {
  content: "·";
  margin-right: 0.65rem;
  color: var(--blaze);
}

.bao-crumb-row {
  padding-top: clamp(0.9rem, 2vw, 1.35rem);
}

.bao-back-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding-top: clamp(0.9rem, 2vw, 1.35rem);
}

/* Reserve the first row of JS-rendered grids so late rendering cannot push
   the footer around (CLS guard). Heights are released once content exists. */
#bao-hot-grid,
#bao-fresh-list,
#bao-cat-grid,
#bao-related-grid {
  min-height: 380px;
}

#bao-hot-grid:not(:empty),
#bao-fresh-list:not(:empty),
#bao-cat-grid:not(:empty),
#bao-related-grid:not(:empty) {
  min-height: 0;
}

#bao-scatter,
#bao-rank-preview {
  min-height: 64px;
}

@media (max-width: 900px) {
  .bao-collage__mascot {
    display: none;
  }

  #bao-hot-grid,
  #bao-fresh-list,
  #bao-cat-grid,
  #bao-related-grid {
    min-height: 320px;
  }
}

@media (max-width: 640px) {
  #bao-hot-grid,
  #bao-fresh-list,
  #bao-cat-grid,
  #bao-related-grid {
    min-height: 0;
  }
}

/* ==========================================================================
   Review fixes
   ========================================================================== */

/* Mobile hero collage: reserve height with aspect-ratio so the JS-injected
   covers cannot shift the page (CLS), and let the cards fill their track. */
@media (max-width: 900px) {
  .bao-collage {
    aspect-ratio: 4 / 3.5;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
    align-items: stretch;
  }

  .bao-collage__card {
    position: static;
    display: flex;
    width: auto;
    height: 100%;
    min-width: 0;
    min-height: 0;
    flex-direction: column;
    overflow: hidden;
    padding: 0.3rem;
    box-shadow: var(--shadow-sm);
  }

  .bao-collage__card img {
    flex: 1;
    min-height: 0;
    height: 100%;
    aspect-ratio: auto;
    object-fit: cover;
  }
}

@media (max-width: 400px) {
  .bao-brand__mark {
    width: 34px;
    height: 34px;
  }

  .bao-brand__initial {
    font-size: 1rem;
  }

  .bao-brand__name {
    max-width: 46vw;
    font-size: 0.95rem;
  }

  .bao-brand__sub {
    display: none;
  }
}

/* Footer link targets: 32px minimum for standalone links (inline prose links
   keep the WCAG inline-text exception). */
.bao-foot__nav a {
  display: block;
  min-height: 32px;
  padding: 0.3rem 0;
  line-height: 1.5;
}

.bao-foot__mail {
  min-height: 32px;
  padding-block: 0.25rem;
  line-height: 1.5;
}

.bao-toc a {
  min-height: 28px;
  padding: 0.2rem 0;
  align-items: center;
}

.bao-article p a,
.bao-article li a {
  display: inline;
}

/* Narrow-phone hero: keep the marked line on one line so a late font swap
   cannot wrap it and push the page down (CLS). 11.5vw at 320px is ~37px,
   which leaves comfortable room inside the gutter. */
@media (max-width: 400px) {
  .bao-hero__title {
    font-size: clamp(2.1rem, 10.4vw, 2.75rem);
  }

  /* The marked line carries a border and hard shadow, so it needs to fit
     inside the gutter at 320px. One step down keeps it on one line without
     clipping the border. */
  .bao-hero__title .is-marked {
    font-size: 0.92em;
    letter-spacing: -0.05em;
  }

  .bao-hero__lede {
    font-size: var(--text-base);
  }
}

/* The header is in normal flow, so its height is known before paint and cannot
   shift the content below it. contain keeps its internal layout isolated. */
.bao-header {
  contain: layout paint;
}

@media (max-width: 900px) {
  .bao-header {
    min-height: var(--header-h);
  }
}

/* Standalone utility links get a real tap target; inline prose links keep the
   WCAG inline-text exception. */
.bao-board__foot a,
.bao-foot__bottom a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding-block: 0.15rem;
}

.bao-crumb a {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
}

/* ==========================================================================
   Play stage: embedded game frame + missing-build note
   ========================================================================== */

.bao-play__frame iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 420px;
  border: 0;
  background: var(--ink);
  display: block;
}

.bao-play__frame-note {
  margin: 0;
  padding: 0.6rem 0.85rem;
  background: var(--signal);
  color: var(--ink);
  border-top: 2px solid var(--ink);
  font-size: 0.6875rem;
  line-height: 1.5;
}

.bao-play__frame-note code {
  padding: 0 0.2rem;
  background: var(--paper);
  border: 1px solid var(--ink);
  font-size: 0.625rem;
}

/* Overlay stage: the iframe replaces the progress panel once ready. */
.bao-stage__panel:has(.bao-stage__frame) {
  width: min(1200px, 100%);
  padding: 0;
  border-color: var(--paper);
}

.bao-stage__panel .bao-stage__frame {
  width: 100%;
  height: min(72vh, 760px);
  border: 0;
  background: var(--paper);
  display: block;
}

@media (max-width: 640px) {
  .bao-play__frame iframe {
    min-height: 260px;
  }

  .bao-stage__panel .bao-stage__frame {
    height: 66vh;
  }
}

/* ==========================================================================
   Catalogue load-more
   ========================================================================== */

.bao-loadmore {
  display: flex;
  justify-content: center;
  padding-block: clamp(1.25rem, 3vw, 2rem) 0.5rem;
}

.bao-loadmore .bao-btn[hidden] {
  display: none;
}

/* Rank view: the podium cards rotate slightly, and at 320px that rotation can
   nudge a card past the viewport while fonts settle. Clip the rail so a
   half-degree of rotation can never create a horizontal scrollbar. */
#bao-rank-view,
.bao-podium,
.bao-rank-list {
  max-width: 100%;
  overflow-x: clip;
}

.bao-podium__card {
  min-width: 0;
}

@media (max-width: 400px) {
  .bao-podium__card h3 {
    font-size: 1.05rem;
  }

  .bao-podium__meta {
    font-size: 0.46rem;
  }
}


/* ==========================================================================
   Small layout utilities
   Replaces the one-off inline styles that had drifted into the markup, so
   spacing and colour stay on the same scale as the rest of the sheets.
   ========================================================================== */

.bao-tint-signal {
  color: var(--signal);
}

.bao-mt-2 { margin-top: var(--space-2); }
.bao-mt-3 { margin-top: var(--space-3); }
.bao-mt-4 { margin-top: var(--space-4); }
.bao-note {
  max-width: 60ch;
  opacity: 0.7;
}

.bao-play__panel--flush {
  border: 0;
  box-shadow: none;
}

/* Ranking section spacing used to be inline on the list element. */
.bao-rank-list--spaced {
  margin-top: clamp(1.5rem, 4vw, 2.5rem);
}

.bao-marquee-slow {
  --marquee-duration: 32s;
}

/* ==========================================================================
   Advertising slots

   The templates inject raw 336x250 banner markup with no wrapper styling of
   their own, so these rules only reserve and centre the space. The injected
   markup is never restyled.

   Constraint: slot 1 must be fully visible without scrolling, and consecutive
   slots must sit 1.5-3 viewport heights apart. Because the content between
   slots has a fixed pixel height while the viewport does not, the layout is
   tuned per breakpoint below. Measurements for each breakpoint are recorded
   above its rule.
   ========================================================================== */

.bao-ad-slot {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-height: 250px;
  margin-block: clamp(1.5rem, 4vw, 2.5rem);
  padding-inline: var(--gutter);
}

/* A 336px banner keeps its true width; it is never scaled to fit. */
.bao-ad-placeholder {
  display: grid;
  place-items: center;
  flex: 0 0 336px;
  width: 336px;
  height: 250px;
  background: var(--signal);
  border: var(--rule) solid var(--ink);
  box-shadow: var(--shadow);
  font-family: var(--font-display);
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
}

/* --------------------------------------------------------------------------
   Compact hero
   The fold must hold: header + hero + a 250px banner. On phones the hero drops
   its decorative collage and tightens its type; on short desktop viewports the
   same applies so 1024x768 still seats the banner.
   -------------------------------------------------------------------------- */

@media (max-width: 900px) {
  .bao-hero {
    padding-block: 0.75rem 1rem;
    gap: 0.85rem;
    grid-template-columns: minmax(0, 1fr);
  }

  .bao-hero__title {
    font-size: clamp(2rem, 9.4vw, 2.9rem);
    line-height: 0.86;
    margin-top: 0.35rem;
  }

  .bao-hero__lede {
    margin-top: 0.6rem;
    font-size: var(--text-sm);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .bao-hero__form {
    margin-top: 0.75rem;
  }

  .bao-field__input {
    height: 44px;
  }

  .bao-hero__tags {
    margin-top: 0.5rem;
    gap: 0.3rem;
  }

  .bao-hero__tags .bao-chip {
    min-height: 30px;
    padding: 0.3rem 0.5rem;
    font-size: 0.5625rem;
  }

  .bao-hero__stats {
    margin-top: 0.75rem;
  }

  .bao-hero__stat {
    padding: 0.5rem 0.3rem;
  }

  .bao-hero__stat b {
    font-size: 1.25rem;
  }

  .bao-hero__visual {
    display: none;
  }
}

/* Short desktop viewports (<= 940px tall) also need the collage dropped so a
   1440x900 window keeps the banner above the fold. */
@media (min-width: 901px) {
  .bao-hero {
    padding-block: 1.25rem 1rem;
    gap: clamp(1.25rem, 2.5vw, 2rem);
  }

  .bao-hero__title {
    font-size: clamp(2.75rem, 5.4vw, 4.5rem);
    line-height: 0.86;
  }

  .bao-hero__lede {
    margin-top: 0.9rem;
    font-size: var(--text-base);
    line-height: 1.55;
  }

  .bao-hero__form {
    margin-top: 1rem;
  }

  .bao-hero__tags {
    margin-top: 0.6rem;
  }

  .bao-hero__stats {
    margin-top: 1rem;
  }

  .bao-hero__stat {
    padding: 0.6rem 0.4rem;
  }

  .bao-hero__stat b {
    font-size: clamp(1.25rem, 2.2vw, 1.6rem);
  }

  .bao-collage {
    max-height: 380px;
  }

  .bao-collage__mascot {
    width: clamp(64px, 14%, 96px);
  }
}

@media (min-width: 901px) and (max-height: 940px) {
  .bao-hero {
    padding-block: 0.75rem 0.75rem;
  }

  .bao-hero__title {
    font-size: clamp(2.35rem, 4.2vw, 3.4rem);
  }

  .bao-hero__title .is-marked {
    margin-top: 0.1em;
  }

  .bao-hero__lede {
    margin-top: 0.65rem;
    font-size: var(--text-sm);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .bao-hero__form {
    margin-top: 0.75rem;
  }

  .bao-hero__tags {
    margin-top: 0.45rem;
  }

  .bao-hero__stats {
    margin-top: 0.7rem;
  }

  .bao-hero__stat {
    padding: 0.45rem 0.35rem;
  }

  .bao-hero__visual {
    display: none;
  }

  .bao-ad-slot {
    margin-block: 0.75rem;
  }
}

/* Tablet landscape (1024x768): hero trimmed further so the banner fits. */
@media (min-width: 901px) and (max-width: 1280px) and (max-height: 820px) {
  .bao-hero {
    padding-block: 0.25rem 0.25rem;
    align-items: start;
  }

  .bao-hero__title {
    font-size: clamp(2.1rem, 3.6vw, 3rem);
  }

  .bao-hero__lede {
    margin-top: 0.5rem;
  }

  .bao-hero__form {
    margin-top: 0.6rem;
  }

  .bao-hero__tags {
    margin-top: 0.4rem;
  }

  .bao-hero__stats {
    margin-top: 0.45rem;
  }

  .bao-hero__stat {
    padding: 0.4rem 0.3rem;
  }
}

/* --------------------------------------------------------------------------
   Content density between slots (index)

   Measured gaps at the default placement, before these rules:
     390x844  2.62 / 2.70 screens
     375x667  3.19 / 3.34
     320x568  3.70 / 3.90
   The rules below compress the hot grid and genre scatter on small screens
   until both gaps return under 3 screens.
   -------------------------------------------------------------------------- */

@media (max-width: 640px) {
  #bao-hot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
  }

  #bao-hot-grid > :nth-child(1) {
    grid-column: span 2;
  }

  #bao-hot-grid .bao-card {
    padding: 0.45rem;
  }

  #bao-hot-grid .bao-card__media img,
  #bao-hot-grid .bao-card--wide .bao-card__media img {
    aspect-ratio: 1 / 1;
  }

  #bao-hot-grid > :nth-child(1) .bao-card__media img {
    aspect-ratio: 16 / 9;
  }

  #bao-hot-grid .bao-card__body {
    padding: 0.45rem 0.1rem 0.1rem;
  }

  #bao-hot-grid .bao-card__title {
    font-size: 0.95rem;
    line-height: 1.02;
    margin-top: 0.2rem;
  }

  #bao-hot-grid .bao-card__tag {
    font-size: 0.625rem;
    line-height: 1.4;
    margin-top: 0.2rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  #bao-hot-grid .bao-card__foot {
    padding-top: 0.4rem;
    padding-right: 1.9rem;
  }

  #bao-hot-grid .bao-card__go {
    display: none;
  }

  #bao-hot-grid .bao-card__meta {
    font-size: 0.5rem;
    gap: 0.3rem;
  }

  #bao-hot-grid .bao-card__save {
    width: 26px;
    height: 26px;
    right: 0.5rem;
    bottom: 0.45rem;
  }

  #bao-hot-grid .bao-card__save svg {
    width: 12px;
    height: 12px;
  }

  .bao-section-head {
    margin-bottom: 1rem;
  }

  .bao-section-head__note {
    display: none;
  }

  .bao-section-head__title {
    font-size: clamp(1.45rem, 6.6vw, 1.85rem);
  }
}

/* Short phones (<= 720px tall): tighter fold and shorter sections. */
@media (max-width: 640px) and (max-height: 720px) {
  .bao-hero {
    padding-block: 0.35rem 0.5rem;
  }

  .bao-hero__title {
    font-size: clamp(1.7rem, 8vw, 2.1rem);
  }

  .bao-hero__lede {
    font-size: 0.75rem;
    line-height: 1.45;
  }

  .bao-hero__form {
    margin-top: 0.5rem;
  }

  .bao-field__input {
    height: 40px;
    font-size: 0.75rem;
  }

  .bao-field__submit {
    font-size: 0.5rem;
    padding: 0 0.55rem;
  }

  .bao-hero__tags {
    display: none;
  }

  .bao-hero__stats {
    margin-top: 0.4rem;
  }

  .bao-hero__stat {
    padding: 0.35rem 0.25rem;
  }

  .bao-hero__stat b {
    font-size: 1.05rem;
  }

  .bao-hero__stat span {
    font-size: 0.44rem;
  }

  .bao-ad-slot {
    margin-block: 0.5rem;
    min-height: 250px;
  }

  .bao-section-head {
    margin-bottom: 0.75rem;
  }

  .bao-section-head__title {
    font-size: 1.35rem;
  }
}

/* Narrow phones: the fixed 336px banner is wider than the text column, so the
   slot scrolls horizontally rather than squashing the ad. */
@media (max-width: 400px) {
  .bao-ad-slot {
    display: flex;
    justify-content: flex-start;
    overflow-x: auto;
    padding-inline: 0;
    scrollbar-width: none;
  }

  .bao-ad-slot::-webkit-scrollbar {
    display: none;
  }
}

/* Ultra-wide tall screens: the gap before slot 3 needed a little more, and the
   fresh strip is what sits between slots 2 and 3. */
@media (min-width: 1600px) and (min-height: 1000px) {
  .bao-fresh .bao-card--wide {
    grid-template-columns: 46% minmax(0, 1fr);
  }

  .bao-fresh .bao-card--wide .bao-card__media img {
    min-height: 210px;
  }

  .bao-ad-slot {
    margin-block: clamp(2rem, 5.5vw, 3.5rem);
  }
}

/* --------------------------------------------------------------------------
   Detail page: density between slots

   Slot 2 follows the About block, so the gap is set by the cover + summary +
   About stack. Short phones compress it; ultra-wide tall screens extend it.
   -------------------------------------------------------------------------- */

@media (max-width: 480px) and (max-height: 700px) {
  .bao-detail {
    padding-block: 0.75rem 1rem;
  }

  .bao-detail__art {
    padding: 0.35rem;
  }

  .bao-detail__title {
    font-size: clamp(1.6rem, 8vw, 2.1rem);
    margin-top: 0.4rem;
  }

  .bao-detail__tagline {
    margin-top: 0.5rem;
    font-size: var(--text-base);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .bao-detail__meta {
    margin-top: 0.5rem;
    padding-top: 0.4rem;
    font-size: 0.5rem;
  }

  .bao-detail__tags {
    margin-top: 0.5rem;
  }

  .bao-detail__tags .bao-chip {
    min-height: 28px;
    font-size: 0.5rem;
    padding: 0.25rem 0.4rem;
  }

  .bao-detail__actions {
    margin-top: 0.7rem;
    gap: 0.4rem;
  }

  .bao-detail__actions .bao-btn--xl {
    min-height: 46px;
    padding: 0.6rem 0.9rem;
    font-size: 0.625rem;
  }

  .bao-detail__actions .bao-btn--lg {
    min-height: 42px;
    padding: 0.5rem 0.75rem;
    font-size: 0.5625rem;
  }

  .bao-detail__stats {
    margin-top: 0.7rem;
  }

  .bao-detail__stat {
    padding: 0.45rem 0.4rem;
  }

  .bao-detail__stat b {
    font-size: 0.95rem;
  }

  .bao-detail__body {
    margin-top: 1rem;
    padding-top: 0.75rem;
  }

  .bao-prose-block {
    margin-bottom: 1rem;
  }

  .bao-prose-block h2 {
    margin-bottom: 0.5rem;
    font-size: 1.15rem;
  }

  .bao-prose-block > p {
    font-size: 0.75rem;
    line-height: 1.6;
  }

  .bao-crumb-row {
    padding-top: 0.5rem;
  }

  .bao-ad-slot {
    margin-block: 0.75rem;
  }
}

/* 320x568 detail: cover media capped so the summary starts sooner. */
@media (max-width: 400px) and (max-height: 620px) {
  .bao-detail__art img {
    aspect-ratio: 16 / 9;
    max-height: 150px;
    object-fit: cover;
  }

  .bao-detail__art {
    padding: 0.3rem;
  }

  .bao-detail__caption {
    margin-top: 0.35rem;
    padding-top: 0.3rem;
    font-size: 0.44rem;
  }

  .bao-detail__title {
    font-size: 1.45rem;
  }

  .bao-detail__summary {
    min-width: 0;
  }

  .bao-detail__meta {
    flex-wrap: wrap;
    gap: 0.3rem;
  }

  .bao-detail__tags {
    display: none;
  }

  .bao-detail__stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 0.55rem;
  }
}

/* 360-480px wide and <=700px tall: between the 640px rules and the 340px
   rules, this band still needs the hot grid and fresh strip compressed before
   both ad gaps return under 3 screens. */
@media (max-width: 480px) and (max-height: 700px) {
  #bao-hot-grid .bao-card {
    padding: 0.35rem;
  }

  #bao-hot-grid .bao-card__media img,
  #bao-hot-grid .bao-card--wide .bao-card__media img {
    aspect-ratio: 4 / 3;
  }

  #bao-hot-grid > :nth-child(1) .bao-card__media img {
    aspect-ratio: 16 / 9;
  }

  #bao-hot-grid .bao-card__title {
    font-size: 0.85rem;
  }

  #bao-hot-grid .bao-card__tag {
    display: none;
  }

  #bao-hot-grid .bao-card__foot {
    padding-top: 0.3rem;
    padding-right: 1.7rem;
  }

  .bao-scatter {
    padding: 0.75rem;
    gap: 0.4rem;
  }

  .bao-cat-stamp {
    padding: 0.35rem 0.5rem;
  }

  .bao-cat-stamp__emoji {
    width: 26px;
    height: 26px;
    font-size: 0.85rem;
  }

  .bao-cat-stamp__en {
    font-size: 0.7rem;
  }

  .bao-cat-stamp__zh {
    display: none;
  }

  .bao-board__row {
    padding: 0.5rem 0.6rem;
    gap: 0.45rem;
  }

  .bao-board__rank {
    font-size: 1.35rem;
  }

  .bao-board__title {
    font-size: 0.85rem;
  }

  .bao-board__head {
    padding: 0.75rem 0.6rem;
  }

  .bao-board__head h2 {
    font-size: 1.3rem;
  }

  .bao-board__head p {
    display: none;
  }

  .bao-section {
    padding-block: 1.25rem;
  }

  .bao-section--tight {
    padding-block: 1rem;
  }

  .bao-ad-slot {
    margin-block: 1rem;
  }

  .bao-drop {
    padding: 1rem;
  }

  .bao-drop__timer {
    display: none;
  }

  .bao-fresh .bao-card__tag {
    display: none;
  }

  .bao-fresh {
    gap: 0.6rem;
  }

  .bao-fresh .bao-card--wide .bao-card__media img {
    min-height: 110px;
  }
}

/* 320x568: the tightest supported phone. Hero keeps only its headline and
   search so slot 1 starts inside the fold, and the sections between slots are
   compressed until both gaps fall under 3 screens. */
@media (max-width: 340px) and (max-height: 600px) {
  .bao-hero {
    padding-block: 0.25rem 0.25rem;
  }

  .bao-hero__title {
    font-size: clamp(1.5rem, 7.4vw, 1.9rem);
  }

  .bao-hero__lede {
    display: none;
  }

  .bao-hero__stats {
    display: none;
  }

  #bao-hot-grid {
    gap: 0.4rem;
  }

  #bao-hot-grid .bao-card {
    padding: 0.28rem;
  }

  #bao-hot-grid .bao-card__media img,
  #bao-hot-grid .bao-card--wide .bao-card__media img {
    aspect-ratio: 16 / 9;
  }

  #bao-hot-grid .bao-card__title {
    font-size: 0.75rem;
    line-height: 1;
  }

  #bao-hot-grid .bao-card__eyebrow {
    font-size: 0.42rem;
  }

  #bao-hot-grid .bao-card__tag {
    display: none;
  }

  #bao-hot-grid .bao-card__foot {
    padding-top: 0.2rem;
    padding-right: 1.5rem;
  }

  #bao-hot-grid .bao-card__save {
    width: 20px;
    height: 20px;
    right: 0.35rem;
    bottom: 0.3rem;
  }

  #bao-hot-grid .bao-card__save svg {
    width: 9px;
    height: 9px;
  }

  .bao-scatter {
    padding: 0.6rem;
    gap: 0.3rem;
  }

  .bao-scatter > * {
    transform: none;
  }

  .bao-cat-stamp {
    padding: 0.28rem 0.4rem;
    gap: 0.35rem;
  }

  .bao-cat-stamp__emoji {
    width: 22px;
    height: 22px;
    font-size: 0.7rem;
  }

  .bao-cat-stamp__en {
    font-size: 0.625rem;
  }

  .bao-cat-stamp__zh {
    display: none;
  }

  .bao-section {
    padding-block: 0.85rem;
  }

  .bao-section--tight {
    padding-block: 0.7rem;
  }

  .bao-section-head {
    margin-bottom: 0.6rem;
  }

  .bao-section-head__title {
    font-size: 1.15rem;
  }

  .bao-section-head__link {
    font-size: 0.5rem;
    padding: 0.35rem 0.5rem;
  }

  .bao-board__row {
    padding: 0.4rem 0.5rem;
    gap: 0.35rem;
  }

  .bao-board__rank {
    font-size: 1.1rem;
  }

  .bao-board__title {
    font-size: 0.75rem;
  }

  .bao-board__head {
    padding: 0.6rem 0.5rem;
  }

  .bao-board__head h2 {
    font-size: 1.1rem;
  }

  .bao-board__head p {
    display: none;
  }

  .bao-board__foot {
    padding: 0.6rem 0.5rem;
    font-size: 0.5rem;
  }

  .bao-ad-slot {
    margin-block: 0.5rem;
  }

  .bao-fresh {
    gap: 0.45rem;
  }

  .bao-fresh .bao-card--wide {
    grid-template-columns: 38% minmax(0, 1fr);
    gap: 0.4rem;
    padding: 0.35rem;
  }

  .bao-fresh .bao-card--wide .bao-card__media img {
    min-height: 0;
    height: 100%;
    aspect-ratio: auto;
  }

  .bao-fresh .bao-card__title {
    font-size: 0.8rem;
  }

  .bao-fresh .bao-card__eyebrow {
    font-size: 0.42rem;
  }

  .bao-fresh .bao-card__tag {
    display: none;
  }

  .bao-fresh .bao-card__foot {
    padding-top: 0.2rem;
    padding-right: 1.6rem;
  }

  .bao-fresh .bao-card__go {
    font-size: 0.42rem;
    padding: 0.25rem 0.35rem;
  }

  .bao-drop {
    padding: 0.75rem;
    gap: 0.5rem;
  }

  .bao-drop h2 {
    font-size: 1.15rem;
  }

  .bao-drop p {
    display: none;
  }

  .bao-drop__actions {
    margin-top: 0.6rem;
    gap: 0.35rem;
  }

  .bao-drop__actions .bao-btn {
    min-height: 36px;
    padding: 0.5rem 0.7rem;
    font-size: 0.5625rem;
  }

  .bao-drop__timer {
    display: none;
  }
}

@media (min-width: 1200px) and (max-height: 940px) {
  .bao-detail__cover {
    padding-top: 0.75rem;
  }

  .bao-detail__art img {
    max-height: 560px;
    object-fit: cover;
  }

  .bao-detail__title {
    font-size: clamp(2.75rem, 4.4vw, 3.6rem);
  }

  .bao-detail__tagline {
    margin-top: 1rem;
    font-size: var(--text-md);
    line-height: 1.55;
    max-width: 44ch;
  }

  .bao-detail__body {
    margin-top: 2.5rem;
    padding-top: 1.75rem;
  }
}

@media (min-width: 1600px) and (min-height: 1000px) {
  .bao-detail__art img {
    max-height: 620px;
  }

  .bao-detail__title {
    font-size: clamp(3.5rem, 4.8vw, 4.8rem);
  }

  .bao-detail__body {
    margin-top: 4.75rem;
    padding-top: 3.5rem;
  }

  .bao-prose-block {
    margin-bottom: 3rem;
  }
}


/* Detail page, phones: slot 2 follows Controls, and the About + Controls stack
   runs long relative to a 568-844px viewport. Tighten the prose so the gap
   returns under 3 screens. */
@media (max-width: 900px) {
  .bao-detail__body {
    margin-top: 1.5rem;
    padding-top: 1rem;
  }

  .bao-prose-block {
    margin-bottom: 1.1rem;
  }

  .bao-prose-block h2 {
    margin-bottom: 0.5rem;
    font-size: 1.15rem;
  }

  .bao-prose-block > p {
    font-size: 0.78rem;
    line-height: 1.6;
  }

  .bao-prose-block p + p {
    margin-top: 0.5rem;
  }

  .bao-steps li {
    padding: 0.45rem 0.55rem;
    font-size: 0.72rem;
  }

  .bao-steps li::before {
    width: 1.7rem;
    height: 1.7rem;
    font-size: 0.55rem;
  }

  .bao-detail__stat {
    padding: 0.45rem 0.4rem;
  }

  .bao-detail__stat b {
    font-size: 0.9rem;
  }

  .bao-detail__stat span {
    font-size: 0.42rem;
  }

  .bao-detail__actions {
    margin-top: 0.85rem;
  }

  .bao-detail__tags {
    margin-top: 0.6rem;
  }

  .bao-detail__meta {
    margin-top: 0.6rem;
    padding-top: 0.5rem;
  }

  .bao-ad-slot {
    margin-block: 0.85rem;
  }
}

/* Short phones: the About + Controls stack still runs long. Collapse the
   detail chrome (tags, stat rail, secondary actions) and tighten prose again
   so slot 2 lands inside 3 screens. */
@media (max-width: 480px) and (max-height: 700px) {
  .bao-detail {
    padding-block: 0.5rem 0.75rem;
  }

  .bao-crumb-row {
    padding-top: 0.4rem;
  }

  .bao-detail__art img {
    aspect-ratio: 16 / 9;
    max-height: 170px;
    object-fit: cover;
  }

  .bao-detail__art {
    padding: 0.3rem;
  }

  .bao-detail__caption {
    display: none;
  }

  .bao-detail__title {
    font-size: 1.5rem;
    margin-top: 0.3rem;
    line-height: 0.95;
  }

  .bao-detail__tagline {
    margin-top: 0.4rem;
    font-size: 0.78rem;
    line-height: 1.4;
    -webkit-line-clamp: 2;
  }

  .bao-detail__tags {
    display: none;
  }

  .bao-detail__meta {
    margin-top: 0.4rem;
    padding-top: 0.35rem;
    font-size: 0.5rem;
    gap: 0.4rem;
  }

  .bao-detail__actions {
    margin-top: 0.55rem;
    gap: 0.35rem;
  }

  .bao-detail__actions .bao-btn--xl {
    min-height: 42px;
    padding: 0.55rem 0.8rem;
    font-size: 0.5625rem;
  }

  .bao-detail__actions .bao-btn--lg {
    min-height: 38px;
    padding: 0.45rem 0.65rem;
    font-size: 0.5rem;
  }

  .bao-detail__actions:last-of-type {
    display: none;
  }

  .bao-detail__stats {
    margin-top: 0.45rem;
  }

  .bao-detail__body {
    margin-top: 0.85rem;
    padding-top: 0.6rem;
    border-top-width: 3px;
  }

  .bao-prose-block {
    margin-bottom: 0.8rem;
  }

  .bao-prose-block h2 {
    margin-bottom: 0.4rem;
    font-size: 1.05rem;
  }

  .bao-prose-block > p {
    font-size: 0.72rem;
    line-height: 1.55;
  }

  .bao-steps li {
    padding: 0.35rem 0.45rem;
    font-size: 0.68rem;
    gap: 0.5rem;
  }

  .bao-steps li::before {
    width: 1.5rem;
    height: 1.5rem;
    font-size: 0.5rem;
  }

  .bao-ad-slot {
    margin-block: 0.6rem;
  }
}

/* 320x568 detail: the smallest supported phone. Collapse the summary column
   further so slot 1 and slot 2 sit within 3 screens of each other. */
@media (max-width: 340px) and (max-height: 620px) {
  .bao-detail__art img {
    max-height: 120px;
  }

  .bao-detail__title {
    font-size: 1.3rem;
  }

  .bao-detail__tagline {
    -webkit-line-clamp: 1;
  }

  .bao-detail__stats {
    display: none;
  }

  .bao-detail__actions:last-of-type {
    display: none;
  }

  .bao-detail__body {
    margin-top: 0.6rem;
    padding-top: 0.5rem;
  }

  .bao-prose-block {
    margin-bottom: 0.6rem;
  }

  .bao-prose-block > p {
    font-size: 0.7rem;
    line-height: 1.5;
  }

  .bao-steps li {
    padding: 0.3rem 0.4rem;
    font-size: 0.65rem;
  }
}

/* The secondary action row (share / fullscreen) is the second
   .bao-detail__actions block. Selecting it by :last-of-type failed because the
   stats panel is the last div, so target it structurally instead. */
@media (max-width: 480px) and (max-height: 700px) {
  .bao-detail__actions + .bao-detail__actions {
    display: none;
  }
}

@media (max-width: 340px) and (max-height: 620px) {
  .bao-detail__actions + .bao-detail__actions {
    display: none;
  }
}
