/* Playful World — components: buttons, cards, mood tiles, bento modules */

/* ============ Buttons ============ */
.pw-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: var(--pw-r-sm);
  font-family: var(--pw-font-ui);
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  transition: transform var(--pw-dur) var(--pw-ease), background-color var(--pw-dur) var(--pw-ease),
    box-shadow var(--pw-dur) var(--pw-ease), border-color var(--pw-dur) var(--pw-ease);
}

.pw-btn svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

.pw-btn--primary {
  background: var(--pw-pink);
  color: #fff;
  box-shadow: var(--pw-shadow-pink);
}

.pw-btn--primary:hover {
  background: var(--pw-pink-deep);
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(244, 111, 145, 0.3);
}

.pw-btn--primary:active {
  transform: translateY(0);
  background: #E75F82;
}

.pw-btn--secondary {
  background: #fff;
  color: var(--pw-ink);
  border-color: var(--pw-border-strong);
}

.pw-btn--secondary:hover {
  border-color: #E2D3C0;
  background: #FFFDF9;
  transform: translateY(-1px);
}

.pw-btn--secondary:active {
  transform: translateY(0);
}

.pw-btn--ghost {
  background: transparent;
  color: var(--pw-ink-soft);
  border-color: transparent;
}

.pw-btn--ghost:hover {
  background: #fff;
}

.pw-btn--sm {
  min-height: 40px;
  padding: 9px 15px;
  font-size: 13px;
}

.pw-btn--block {
  width: 100%;
}

.pw-btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ============ Icon button ============ */
.pw-icon-btn {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--pw-border);
  border-radius: 14px;
  background: #fff;
  color: var(--pw-ink);
  flex-shrink: 0;
  transition: background-color var(--pw-dur) var(--pw-ease), border-color var(--pw-dur) var(--pw-ease),
    transform var(--pw-dur) var(--pw-ease);
}

.pw-icon-btn:hover {
  background: var(--pw-surface-warm);
  border-color: var(--pw-border-strong);
}

.pw-icon-btn:active {
  transform: scale(0.96);
}

.pw-icon-btn svg {
  width: 20px;
  height: 20px;
}

.pw-icon-btn.is-active {
  color: var(--pw-pink-deep);
  border-color: #FFD4DF;
  background: var(--pw-pink-soft);
}

.pw-icon-btn__count {
  position: absolute;
  top: -4px;
  right: -4px;
  display: grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: var(--pw-r-pill);
  background: var(--pw-pink-deep);
  color: #fff;
  font-family: var(--pw-font-body);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}

/* ============ Search field ============ */
.pw-field {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0;
  width: 100%;
  border: 1px solid var(--pw-border);
  border-radius: var(--pw-r-pill);
  background: #fff;
  transition: border-color var(--pw-dur) var(--pw-ease), box-shadow var(--pw-dur) var(--pw-ease);
}

.pw-field:focus-within {
  border-color: #FFC0CE;
  box-shadow: 0 0 0 4px rgba(255, 139, 167, 0.16);
}

.pw-field__icon {
  display: grid;
  place-items: center;
  padding-left: 14px;
  color: var(--pw-muted);
  flex-shrink: 0;
}

.pw-field__icon svg {
  width: 17px;
  height: 17px;
}

.pw-field__input {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 10px 12px;
  border: 0;
  border-radius: var(--pw-r-pill);
  background: transparent;
  color: var(--pw-ink);
  font-family: var(--pw-font-body);
  font-size: 14px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.pw-field__input::placeholder {
  color: #9AA5AD;
}

.pw-field__input::-webkit-search-cancel-button {
  -webkit-appearance: none;
}

.pw-field__submit {
  flex-shrink: 0;
  min-height: 38px;
  margin-right: 4px;
  padding: 8px 15px;
  border: 0;
  border-radius: var(--pw-r-pill);
  background: var(--pw-ink);
  color: #fff;
  font-family: var(--pw-font-ui);
  font-size: 12.5px;
  font-weight: 600;
  transition: background-color var(--pw-dur) var(--pw-ease);
}

.pw-field__submit:hover {
  background: #162126;
}

.pw-field--header {
  width: 250px;
}

.pw-field--header .pw-field__input {
  min-height: 40px;
  font-size: 13px;
}

.pw-field--header .pw-field__icon {
  padding-left: 12px;
}

/* ============ Game card ============ */
.pw-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: 260px;
  padding: 6px;
  border: 1px solid var(--pw-border);
  border-radius: var(--pw-r-md);
  background: #fff;
  box-shadow: var(--pw-shadow-1);
  transition: transform var(--pw-dur) var(--pw-ease), box-shadow var(--pw-dur) var(--pw-ease),
    border-color var(--pw-dur) var(--pw-ease);
}

.pw-card:hover,
.pw-card:focus-visible {
  transform: translateY(-3px);
  box-shadow: var(--pw-shadow-2);
  border-color: #EFE2D2;
}

.pw-card:active {
  transform: translateY(-1px);
}

.pw-card__media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--pw-r-sm);
  background: var(--pw-surface-warm);
  overflow: hidden;
  isolation: isolate;
}

.pw-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 320ms var(--pw-ease);
}

.pw-card:hover .pw-card__media img {
  transform: scale(1.04);
}

.pw-card__media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(22, 32, 37, 0.2) 0%, rgba(22, 32, 37, 0) 42%);
  opacity: 0;
  transition: opacity var(--pw-dur) var(--pw-ease);
  pointer-events: none;
}

.pw-card:hover .pw-card__media::after {
  opacity: 1;
}

.pw-card__play {
  position: absolute;
  right: 8px;
  bottom: 8px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: var(--pw-ink);
  box-shadow: 0 3px 10px rgba(22, 32, 37, 0.2);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity var(--pw-dur) var(--pw-ease), transform var(--pw-dur) var(--pw-ease);
}

.pw-card__play svg {
  width: 13px;
  height: 13px;
  margin-left: 1px;
}

.pw-card:hover .pw-card__play,
.pw-card:focus-visible .pw-card__play {
  opacity: 1;
  transform: translateY(0);
}

.pw-card__body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 9px 5px 3px;
  min-width: 0;
}

.pw-card__name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--pw-ink);
  font-family: var(--pw-font-ui);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.32;
  letter-spacing: -0.005em;
  overflow-wrap: anywhere;
  min-height: 2.64em;
}

.pw-card__cat {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--pw-muted);
  font-family: var(--pw-font-body);
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.4;
}

.pw-card__cat-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.pw-card__cat-dot--pink { background: var(--pw-pink); }
.pw-card__cat-dot--blue { background: var(--pw-blue); }
.pw-card__cat-dot--yellow { background: var(--pw-yellow); }
.pw-card__cat-dot--green { background: var(--pw-green); }
.pw-card__cat-dot--purple { background: var(--pw-purple); }
.pw-card__cat-dot--orange { background: var(--pw-orange); }

/* ============ Trending grid ============ */
.pw-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@media (min-width: 620px) {
  .pw-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
  }
}

@media (min-width: 1000px) {
  .pw-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
  }
}

/* Wide desktop: one more column keeps the covers from growing oversized. */
@media (min-width: 1320px) {
  .pw-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
  }
}

/* ============ Mood row ============ */
.pw-moods {
  display: flex;
  gap: 10px;
  margin-inline: calc(var(--pw-gutter) * -1);
  padding: 4px var(--pw-gutter) 12px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.pw-moods::-webkit-scrollbar {
  display: none;
}

.pw-mood {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  flex: 0 0 auto;
  width: 164px;
  min-height: 132px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--pw-r-md);
  background: #fff;
  scroll-snap-align: start;
  overflow: hidden;
  transition: transform var(--pw-dur) var(--pw-ease), box-shadow var(--pw-dur) var(--pw-ease);
}

.pw-mood:hover,
.pw-mood:focus-visible {
  transform: translateY(-3px);
  box-shadow: var(--pw-shadow-2);
}

.pw-mood__icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 2px 8px rgba(38, 50, 56, 0.07);
  font-size: 21px;
  line-height: 1;
}

.pw-mood__name {
  font-family: var(--pw-font-ui);
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.pw-mood__count {
  margin-top: 2px;
  font-family: var(--pw-font-body);
  font-size: 11.5px;
  font-weight: 500;
  opacity: 0.72;
  line-height: 1.3;
}

.pw-mood__glow {
  position: absolute;
  top: -22px;
  right: -22px;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.42);
  pointer-events: none;
}

.pw-mood--purple { background: var(--pw-purple-soft); }
.pw-mood--blue { background: var(--pw-blue-soft); }
.pw-mood--yellow { background: var(--pw-yellow-soft); }
.pw-mood--green { background: var(--pw-green-soft); }
.pw-mood--pink { background: var(--pw-pink-soft); }
.pw-mood--orange { background: var(--pw-orange-soft); }

@media (min-width: 720px) {
  /* Three tracks: six collections fill exactly two rows, with no orphan cell. */
  .pw-moods {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-inline: 0;
    padding-inline: 0;
    overflow: visible;
  }

  .pw-mood {
    width: auto;
    min-height: 142px;
  }
}

@media (min-width: 1100px) {
  /* Six collections fill a single row exactly. */
  .pw-moods {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
  }
}

/* ============ Just Added rail ============ */
.pw-rail {
  display: flex;
  gap: 12px;
  margin-inline: calc(var(--pw-gutter) * -1);
  padding: 4px var(--pw-gutter) 14px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

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

.pw-wide {
  position: relative;
  display: flex;
  flex: 0 0 auto;
  width: 262px;
  min-width: 0;
  border: 1px solid var(--pw-border);
  border-radius: var(--pw-r-md);
  background: #fff;
  box-shadow: var(--pw-shadow-1);
  overflow: hidden;
  scroll-snap-align: start;
  transition: transform var(--pw-dur) var(--pw-ease), box-shadow var(--pw-dur) var(--pw-ease);
}

.pw-wide:hover,
.pw-wide:focus-visible {
  transform: translateY(-3px);
  box-shadow: var(--pw-shadow-2);
}

.pw-wide__media {
  position: relative;
  flex: 0 0 42%;
  min-width: 0;
  background: var(--pw-surface-warm);
  overflow: hidden;
}

.pw-wide__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 3 / 4;
}

.pw-wide__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  flex: 1;
  min-width: 0;
  padding: 12px 13px;
}

.pw-wide__name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-family: var(--pw-font-ui);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.pw-wide__cat {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--pw-muted);
  font-size: 11.5px;
  font-weight: 500;
}

.pw-wide__play {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  color: var(--pw-pink-ink);
  font-size: 12px;
  font-weight: 600;
}

.pw-wide__play svg {
  width: 13px;
  height: 13px;
}

@media (min-width: 900px) {
  .pw-rail {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-inline: 0;
    padding-inline: 0;
    overflow: visible;
  }

  .pw-wide {
    width: auto;
  }

  .pw-wide--lead {
    grid-column: span 1;
    grid-row: span 1;
  }
}

@media (min-width: 1160px) {
  .pw-rail {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

/* ============ Explore bento ============ */
.pw-bento {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.pw-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--pw-r-lg);
  overflow: hidden;
  min-width: 0;
  transition: transform var(--pw-dur) var(--pw-ease), box-shadow var(--pw-dur) var(--pw-ease);
}

.pw-panel:hover {
  transform: translateY(-2px);
  box-shadow: var(--pw-shadow-2);
}

.pw-panel--purple { background: var(--pw-purple-soft); }
.pw-panel--blue { background: var(--pw-blue-soft); }
.pw-panel--yellow { background: var(--pw-yellow-soft); }
.pw-panel--green { background: var(--pw-green-soft); }
.pw-panel--pink { background: var(--pw-pink-soft); }
.pw-panel--orange { background: var(--pw-orange-soft); }

.pw-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.pw-panel__titlewrap {
  min-width: 0;
}

.pw-panel__title {
  font-family: var(--pw-font-ui);
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.pw-panel__meta {
  margin-top: 3px;
  color: var(--pw-muted-strong);
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.35;
}

.pw-panel__go {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.8);
  color: var(--pw-ink-soft);
  flex-shrink: 0;
  transition: background-color var(--pw-dur) var(--pw-ease), transform var(--pw-dur) var(--pw-ease);
}

.pw-panel__go svg {
  width: 14px;
  height: 14px;
}

.pw-panel:hover .pw-panel__go {
  background: #fff;
  transform: translateX(2px);
}

.pw-panel__covers {
  display: grid;
  gap: 10px;
  min-width: 0;
}

/* Supporting panels show six covers, always two-up: a third column inside a
   ~200px panel squeezes each tile to ~60px, too narrow for a game name. */
.pw-panel__covers,
.pw-panel__covers--2,
.pw-panel__covers--3,
.pw-panel__covers--row,
.pw-panel__covers--grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pw-panel__covers--3 > :only-child {
  grid-column: span 2;
}

/* Only the wide feature panel has room for a four-across row of square covers
   (the lead pair sits above them). */
@media (min-width: 700px) {
  .pw-panel--feature .pw-panel__covers--3 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Bento mini card: artwork + name in its own white card, so neighbouring tiles
   never read as one continuous board. */
.pw-mini {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  padding: 5px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 1px 3px rgba(38, 50, 56, 0.06);
  transition: transform var(--pw-dur) var(--pw-ease), box-shadow var(--pw-dur) var(--pw-ease);
}

.pw-mini:hover,
.pw-mini:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(38, 50, 56, 0.12);
}

.pw-mini__art {
  position: relative;
  display: block;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: rgba(255, 255, 255, 0.55);
}

.pw-mini__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 260ms var(--pw-ease);
}

.pw-panel:hover .pw-mini__art img {
  transform: scale(1.03);
}

/* Two-line clamp keeps every tile the same height whatever the title length. */
.pw-mini__name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  padding: 0 1px 2px;
  color: var(--pw-ink);
  font-family: var(--pw-font-ui);
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.005em;
  overflow-wrap: anywhere;
  min-height: 2.6em;
}

.pw-mini--wide .pw-mini__art {
  aspect-ratio: 4 / 3;
}

/* The feature panel spans two tracks, so its lead covers would otherwise grow
   to nearly 3× the size of the square covers beside them. */
.pw-panel--feature .pw-panel__covers--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 340px;
}

.pw-panel--feature .pw-panel__covers--3 {
  max-width: 460px;
}

.pw-panel--feature .pw-mini__name {
  font-size: 11px;
}

.pw-panel--feature .pw-panel__covers {
  gap: 10px;
}

.pw-panel__names {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
}

.pw-name-pill {
  padding: 3px 9px;
  border-radius: var(--pw-r-pill);
  background: rgba(255, 255, 255, 0.68);
  color: var(--pw-ink-soft);
  font-size: 10.5px;
  font-weight: 500;
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* Tablet: two tracks, so the feature panel runs full width and the four
   supporting panels sit two per row — each wide enough for 6 readable covers. */
@media (min-width: 700px) {
  .pw-bento {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .pw-panel--feature {
    grid-column: span 2;
  }
}

@media (min-width: 1080px) {
  /* 3 tracks: the feature panel spans 2×2 and the five supporting panels wrap
     round it, completing a 3×3 block. A 4-track grid left one cell empty with
     the six collections that ship in data.js. */
  .pw-bento {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }

  .pw-panel--feature {
    grid-column: span 2;
    grid-row: span 2;
  }
}

/* ============ SEO band ============ */
.pw-seo {
  padding: 24px;
  border: 1px solid var(--pw-border);
  border-radius: var(--pw-r-lg);
  background: #fff;
}

.pw-seo__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
}

.pw-seo__title {
  font-size: clamp(1.35rem, 4.2vw, 1.8rem);
  font-weight: 900;
  letter-spacing: -0.025em;
}

.pw-seo__body p {
  margin-top: 10px;
  color: var(--pw-muted-strong);
  font-size: 14.5px;
  line-height: 1.72;
}

.pw-seo__cards {
  display: grid;
  gap: 10px;
}

.pw-seo__card {
  padding: 14px 16px;
  border-radius: var(--pw-r-md);
  background: var(--pw-surface-warm);
}

.pw-seo__card h3 {
  font-family: var(--pw-font-ui);
  font-size: 13.5px;
  font-weight: 600;
}

.pw-seo__card p {
  margin-top: 4px;
  color: var(--pw-muted);
  font-size: 12.5px;
  line-height: 1.6;
}

@media (min-width: 880px) {
  .pw-seo {
    padding: 34px;
  }

  .pw-seo__grid {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    gap: 34px;
  }

  .pw-seo__cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ============ Category hub cards ============ */
.pw-hub {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.pw-hubcard {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 16px;
  border: 1px solid var(--pw-border);
  border-radius: var(--pw-r-md);
  background: #fff;
  box-shadow: var(--pw-shadow-1);
  transition: transform var(--pw-dur) var(--pw-ease), box-shadow var(--pw-dur) var(--pw-ease);
}

.pw-hubcard:hover {
  transform: translateY(-2px);
  box-shadow: var(--pw-shadow-2);
}

.pw-hubcard__icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  font-size: 22px;
  line-height: 1;
  flex-shrink: 0;
}

.pw-hubcard__body {
  min-width: 0;
  flex: 1;
}

.pw-hubcard__name {
  font-family: var(--pw-font-ui);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
}

.pw-hubcard__meta {
  margin-top: 2px;
  color: var(--pw-muted);
  font-size: 12px;
}

.pw-hubcard__go {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--pw-surface-warm);
  color: var(--pw-muted);
  flex-shrink: 0;
}

.pw-hubcard__go svg {
  width: 13px;
  height: 13px;
}

.pw-hubcard__thumbs {
  display: none;
  gap: 5px;
  flex-shrink: 0;
}

.pw-hubcard__thumbs img {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  object-fit: cover;
  background: var(--pw-surface-warm);
}

@media (min-width: 620px) {
  .pw-hub {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .pw-hubcard__thumbs {
    display: flex;
  }
}

@media (min-width: 1060px) {
  .pw-hub {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ============ Category grid view ============ */
.pw-crumb {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 14px;
  color: var(--pw-muted);
  font-size: 12.5px;
  font-weight: 500;
  flex-wrap: wrap;
}

.pw-crumb a {
  color: var(--pw-muted-strong);
  text-decoration: underline;
  text-decoration-color: var(--pw-border-strong);
  text-underline-offset: 2px;
}

.pw-crumb a:hover {
  color: var(--pw-pink-ink);
}

.pw-crumb svg {
  width: 12px;
  height: 12px;
  color: #B9C2C8;
}

.pw-catview__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.pw-catview__title {
  font-size: clamp(1.75rem, 5vw, 2.4rem);
  font-weight: 900;
  letter-spacing: -0.03em;
}

.pw-catview__count {
  margin-top: 4px;
  color: var(--pw-muted);
  font-size: 13.5px;
}

.pw-sentinel {
  display: grid;
  place-items: center;
  padding: 22px;
  color: var(--pw-muted);
  font-size: 12.5px;
}

/* ============ Favorites panel ============ */
.pw-fav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: rgba(38, 50, 56, 0.42);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--pw-dur) var(--pw-ease);
}

.pw-fav-backdrop.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.pw-fav {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 160;
  display: flex;
  flex-direction: column;
  width: min(400px, 92vw);
  padding: 18px;
  background: var(--pw-bg);
  box-shadow: -18px 0 40px rgba(38, 50, 56, 0.14);
  transform: translateX(103%);
  transition: transform 260ms var(--pw-ease);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.pw-fav.is-open {
  transform: translateX(0);
}

.pw-fav__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.pw-fav__title {
  font-size: 1.15rem;
  font-weight: 900;
}

.pw-fav__sub {
  margin-bottom: 16px;
  color: var(--pw-muted);
  font-size: 12.5px;
}

.pw-fav__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.pw-fav__empty {
  padding: 34px 18px;
  border: 1px dashed var(--pw-border-strong);
  border-radius: var(--pw-r-md);
  color: var(--pw-muted);
  font-size: 13.5px;
  line-height: 1.6;
  text-align: center;
}

/* ============ Detail page ============ */
.pw-detail {
  padding-bottom: calc(84px + env(safe-area-inset-bottom));
}

.pw-detail__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 0 4px;
}

.pw-detail__top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pw-detail__hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  padding-top: 6px;
}

.pw-detail__preview {
  position: relative;
  border-radius: var(--pw-r-lg);
  overflow: hidden;
  background: var(--pw-surface-warm);
  /* Capped on phones so the title, tags and first ad stay above the fold. */
  aspect-ratio: 16 / 9;
  max-height: 200px;
  box-shadow: var(--pw-shadow-1);
}

.pw-detail__preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pw-detail__preview-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(22, 32, 37, 0.18);
  transition: background-color var(--pw-dur) var(--pw-ease);
}

.pw-detail__preview-play:hover {
  background: rgba(22, 32, 37, 0.3);
}

.pw-detail__preview-btn {
  display: grid;
  place-items: center;
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: #fff;
  color: var(--pw-ink);
  box-shadow: 0 10px 26px rgba(22, 32, 37, 0.28);
  transition: transform var(--pw-dur) var(--pw-ease);
}

.pw-detail__preview-play:hover .pw-detail__preview-btn {
  transform: scale(1.05);
}

.pw-detail__preview-btn svg {
  width: 26px;
  height: 26px;
  margin-left: 3px;
}

.pw-detail__info {
  min-width: 0;
}

.pw-detail__title {
  margin-top: 8px;
  font-size: clamp(1.6rem, 5.4vw, 2.3rem);
  font-weight: 900;
  letter-spacing: -0.03em;
}

.pw-detail__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.pw-tag {
  padding: 5px 11px;
  border-radius: var(--pw-r-pill);
  background: #fff;
  border: 1px solid var(--pw-border);
  color: var(--pw-muted-strong);
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.5;
}

.pw-tag--accent {
  background: var(--pw-pink-soft);
  border-color: #FFD3DF;
  color: var(--pw-pink-ink);
}

.pw-detail__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.pw-detail__actions .pw-btn {
  flex: 1 1 auto;
  min-width: 132px;
}

.pw-detail__note {
  margin-top: 12px;
  color: var(--pw-muted);
  font-size: 12px;
  line-height: 1.55;
}

.pw-detail__section {
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid var(--pw-border);
}

/* Desktop has more vertical room per section, so the spacing opens up and the
   second ad lands 1.5+ screens below the first. */
@media (min-width: 900px) {
  .pw-detail__section {
    margin-top: 56px;
    padding-top: 40px;
  }
}

.pw-detail__section-title {
  margin-bottom: 10px;
  font-size: 1.12rem;
  font-weight: 800;
}

.pw-detail__body {
  color: var(--pw-muted-strong);
  font-size: 14.5px;
  line-height: 1.75;
}

.pw-detail__body p {
  margin-bottom: 10px;
}

.pw-clamp {
  position: relative;
  overflow: hidden;
}

.pw-clamp.is-collapsed {
  max-height: 132px;
}

.pw-clamp__fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 46px;
  background: linear-gradient(to top, var(--pw-bg) 8%, transparent 100%);
  pointer-events: none;
}

.pw-clamp__toggle {
  margin-top: 6px;
  padding: 6px 0;
  border: 0;
  background: none;
  color: var(--pw-pink-ink);
  font-family: var(--pw-font-body);
  font-size: 13px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.pw-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.pw-step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.pw-step__num {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: var(--pw-yellow-soft);
  color: var(--pw-yellow-ink);
  font-family: var(--pw-font-ui);
  font-size: 12.5px;
  font-weight: 600;
  flex-shrink: 0;
}

.pw-step__text {
  color: var(--pw-muted-strong);
  font-size: 14px;
  line-height: 1.65;
  min-width: 0;
}

.pw-faq__item {
  padding: 12px 0;
  border-bottom: 1px solid var(--pw-border);
}

.pw-faq__item:last-child {
  border-bottom: 0;
}

.pw-faq__q {
  color: var(--pw-ink);
  font-family: var(--pw-font-ui);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.45;
}

.pw-faq__a {
  margin-top: 5px;
  color: var(--pw-muted-strong);
  font-size: 13.5px;
  line-height: 1.7;
}

.pw-related {
  margin-top: 30px;
}

.pw-related__title {
  margin-bottom: 14px;
  font-size: 1.12rem;
  font-weight: 800;
}

.pw-related__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@media (min-width: 620px) {
  .pw-related__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1000px) {
  .pw-related__grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
  }
}

.pw-stickybar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  padding: 10px var(--pw-gutter) calc(10px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, rgba(255, 249, 239, 0.98) 62%, rgba(255, 249, 239, 0));
}

.pw-stickybar__inner {
  display: flex;
  gap: 10px;
  width: min(100%, 640px);
  margin-inline: auto;
}

.pw-stickybar .pw-btn {
  flex: 1;
}

@media (min-width: 900px) {
  .pw-detail__hero {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
    gap: 34px;
    align-items: center;
    padding-top: 12px;
  }

  .pw-detail__preview {
    aspect-ratio: 16 / 11;
    max-height: none;
  }

  .pw-detail__actions .pw-btn {
    flex: 0 1 auto;
  }

  .pw-stickybar {
    display: none;
  }
}

/* ============ Search results (overlay + header panel) ============ */
.pw-search-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@media (min-width: 560px) {
  .pw-search-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 900px) {
  .pw-search-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.pw-search-hit {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 7px;
  border-radius: 12px;
  transition: background-color var(--pw-dur) var(--pw-ease);
}

.pw-search-hit:hover {
  background: var(--pw-surface-warm);
}

.pw-search-hit__thumb {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--pw-surface-warm);
}

.pw-search-hit__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pw-search-hit__body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.pw-search-hit__name {
  font-family: var(--pw-font-ui);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pw-search-hit__cat {
  color: var(--pw-muted);
  font-size: 11px;
  line-height: 1.4;
}

.pw-search-panel__empty {
  padding: 16px 12px;
  color: var(--pw-muted);
  font-size: 13px;
}

.pw-search-panel__all {
  display: block;
  margin-top: 4px;
  padding: 10px 12px;
  border-top: 1px solid var(--pw-border);
  color: var(--pw-pink-ink);
  font-size: 12.5px;
  font-weight: 600;
}

/* ============ Explore split around the in-section ad slot ============ */
/* The section is one visual bento, but the DOM is split so an ad can sit
   between the two halves. Both grids share the same tracks so the panels keep
   their column positions; the gap between them matches the row gap. */
.pw-bento + .pw-ad-slot--inline {
  margin-block: 16px;
}

.pw-ad-slot--inline {
  width: 100%;
}

.pw-ad-slot--inline .pw-ad-slot__placeholder {
  min-height: 90px;
}

.pw-bento:empty {
  display: none;
}

/* The second half keeps the desktop column count so panels do not reflow. */
@media (min-width: 700px) {
  #pw-bento-after {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1080px) {
  #pw-bento-after {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
