/* KiraRift single home tab and card-accessed Fan Art gallery. */

.stage > [hidden] { display: none !important; }
.fanart-browser-tabs[hidden],
.fanart-page[hidden] { display: none !important; }

/* Render the KIRARIFT label and pixel heart in the browser chrome. */
.stage > .tab-title { display: none !important; }

.fanart-browser-tabs {
  position: absolute;
  z-index: 10;
  inset: 0 0 auto;
  height: calc(230 * var(--u));
  pointer-events: none;
}

/* Crisp Pixel Heart Icon (No Circle Around It) */
.pixel-heart-icon {
  width: calc(64 * var(--u));
  height: calc(58 * var(--u));
  display: block;
  overflow: visible;
  filter: drop-shadow(0 calc(4 * var(--u)) 0 rgba(62, 29, 46, .16));
  transition: transform .2s cubic-bezier(.34, 1.56, .64, 1);
}
.pixel-heart-icon .px-heart-fill {
  transition: fill .18s ease;
}

/* Tab 1 (KIRARIFT) interactive button — centered inside x=80..1131, y=97..207 */
.fanart-home-tab {
  position: absolute;
  z-index: 2;
  left: calc(160 * var(--u));
  top: calc(104 * var(--u));
  width: calc(905 * var(--u));
  height: calc(96 * var(--u));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: calc(16 * var(--u));
  background: transparent;
  color: var(--ink);
  font-family: var(--px);
  font-size: calc(74 * var(--u));
  line-height: 1;
  letter-spacing: calc(10 * var(--u));
  border-radius: calc(20 * var(--u));
  text-align: left;
  pointer-events: auto;
  cursor: pointer;
  transition: opacity .2s ease, transform .2s cubic-bezier(.22, 1, .36, 1);
}
.stage.fanart-active .fanart-home-tab {
  opacity: .84;
}
.stage.fanart-active .fanart-home-tab:hover,
.stage.fanart-active .fanart-home-tab:focus-visible {
  opacity: 1;
  transform: translateY(calc(-2 * var(--u)));
}
.fanart-home-name {
  flex: 0 1 auto;
  white-space: nowrap;
}
.fanart-home-close {
  flex: none;
  display: grid;
  place-items: center;
  width: calc(74 * var(--u));
  height: calc(74 * var(--u));
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
}
.fanart-home-tab:hover .pixel-heart-icon {
  transform: scale(1.16) rotate(-6deg);
}
.fanart-home-tab:hover .pixel-heart-icon .px-heart-fill {
  fill: #ff4d94;
}

.fanart-home-tab:focus-visible {
  outline: calc(6 * var(--u)) solid #a03267;
  outline-offset: calc(2 * var(--u));
}

/* ---- Home Page Fanart Card (100% unchanged at rest; smooth lift on hover) ---- */
.card[data-key="fanart"] {
  transition: transform .24s cubic-bezier(.22, 1, .36, 1);
}
.card[data-key="fanart"]:has([data-open-fanart]:hover),
.card[data-key="fanart"]:has([data-open-fanart]:focus-visible) {
  transform: translateY(calc(-5 * var(--u)));
}
.card[data-key="fanart"] > [data-open-fanart] {
  z-index: 3;
  cursor: pointer;
}
.card[data-key="fanart"] > [data-like="fanart"] {
  z-index: 4;
}
.card[data-key="fanart"] > [data-open-fanart]:focus-visible {
  outline: 3px solid #a03267;
  outline-offset: -5px;
}

/* ---- Choreographed Gallery View Animations ---- */
@keyframes fanartPageIn {
  0% {
    opacity: 0;
    transform: translateY(calc(24 * var(--u))) scale(.985);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@keyframes fanartPageOut {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(calc(14 * var(--u))) scale(.988);
  }
}
@keyframes fanartCardIn {
  0% {
    opacity: 0;
    transform: translateY(calc(32 * var(--u))) scale(.955);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@keyframes homePieceReturn {
  0% {
    opacity: 0;
    transform: translateY(calc(16 * var(--u))) scale(.988);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@keyframes fanartFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(calc(-7 * var(--u))) rotate(5deg); }
}

.fanart-page.is-entering {
  animation: fanartPageIn .36s cubic-bezier(.22, 1, .36, 1) both;
}
.fanart-page.is-leaving {
  animation: fanartPageOut .18s ease-out both;
  pointer-events: none;
}
.fanart-page.is-entering .fanart-card {
  animation: fanartCardIn .44s cubic-bezier(.22, 1, .36, 1) both;
  animation-delay: calc(50ms + var(--stagger, 0) * 65ms);
}
.stage.home-returning > .card,
.stage.home-returning > .art,
.stage.home-returning > .date-tile,
.stage.home-returning > .week,
.stage.home-returning > .bubble-text {
  animation: homePieceReturn .28s cubic-bezier(.22, 1, .36, 1) both;
}

/* ---- Tidy In-Browser Fan Art Gallery Window ---- */
.fanart-page {
  position: absolute;
  z-index: 7;
  /* Keep the gallery outline visually separate from the native PSD border.
     Previously its lower edge was only ~10 design pixels from the shell frame. */
  left: calc(142 * var(--u));
  top: calc(411 * var(--u));
  width: calc(3717 * var(--u));
  height: calc(1657 * var(--u));
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: #d786ab #ffe7f0;
  border: calc(7 * var(--u)) solid var(--ink);
  border-radius: calc(64 * var(--u));
  background:
    radial-gradient(circle at 8px 8px, #f5bfd7 1.4px, transparent 2.1px) 0 0 / 26px 26px,
    linear-gradient(145deg, #fff9fc 0%, #ffe3ef 100%);
  box-shadow: 0 calc(15 * var(--u)) 0 #f6b7d1;
  padding: calc(52 * var(--u)) calc(72 * var(--u)) calc(42 * var(--u));
  display: flex;
  flex-direction: column;
  gap: calc(32 * var(--u));
}
.fanart-page button:focus-visible,
.fanart-page a:focus-visible {
  outline: 3px solid #a03267;
  outline-offset: 3px;
}

/* Compact, Tidy Header Row */
.fanart-page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: calc(30 * var(--u));
  flex: 0 0 auto;
  padding-bottom: calc(22 * var(--u));
  border-bottom: calc(4 * var(--u)) dashed rgba(62, 29, 46, .18);
}
.fanart-heading-copy {
  display: flex;
  flex-direction: column;
  gap: calc(8 * var(--u));
  min-width: 0;
}
.fanart-eyebrow-row {
  display: flex;
  align-items: center;
  gap: calc(16 * var(--u));
  flex-wrap: wrap;
}
.fanart-eyebrow {
  font-family: var(--px);
  font-size: clamp(9px, calc(24 * var(--u)), 14px);
  letter-spacing: .05em;
  color: #8f3962;
}
.fanart-count-pill {
  display: inline-flex;
  align-items: center;
  padding: calc(6 * var(--u)) calc(18 * var(--u));
  border: calc(3.5 * var(--u)) solid var(--ink);
  border-radius: 999px;
  background: #ffd1e6;
  font-family: var(--px);
  font-size: clamp(8px, calc(20 * var(--u)), 11px);
  letter-spacing: .04em;
}
.fanart-title-row {
  display: flex;
  align-items: baseline;
  gap: calc(22 * var(--u));
  flex-wrap: wrap;
}
.fanart-page h2 {
  font-size: clamp(24px, calc(76 * var(--u)), 42px);
  line-height: 1.05;
  font-weight: 1000;
  letter-spacing: -.04em;
  margin: 0;
}
.fanart-page h2 span { color: #df6fa0; }
.fanart-page-heading p {
  font-size: clamp(12px, calc(34 * var(--u)), 18px);
  font-weight: 750;
  color: #69384f;
}

.fanart-header-actions {
  display: flex;
  align-items: center;
  gap: calc(18 * var(--u));
  flex: 0 0 auto;
}
.fanart-heading-stamp {
  padding: calc(14 * var(--u)) calc(24 * var(--u));
  background: #ffe1ee;
  border: calc(4 * var(--u)) dashed #a45679;
  border-radius: 999px;
  font-family: var(--px);
  font-size: clamp(8px, calc(21 * var(--u)), 12px);
  white-space: nowrap;
}
.fanart-heading-stamp span { color: #b54278; }

.fanart-top-back {
  display: inline-flex;
  align-items: center;
  gap: calc(10 * var(--u));
  padding: calc(14 * var(--u)) calc(28 * var(--u));
  border: calc(4.5 * var(--u)) solid var(--ink);
  border-radius: 999px;
  background: var(--cream);
  box-shadow: 0 calc(5 * var(--u)) 0 #f3b2cf;
  font-size: clamp(11px, calc(30 * var(--u)), 16px);
  font-weight: 900;
  white-space: nowrap;
  transition: background .16s ease, transform .16s ease;
}
.fanart-top-back:hover {
  background: #ffd4e7;
  transform: translateY(-2px);
}

/* ---- Tidy 3-Column Gallery Grid ---- */
.fanart-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: calc(42 * var(--u));
  flex: 1 1 auto;
  min-height: 0;
  align-items: stretch;
}

.fanart-card {
  border: calc(5 * var(--u)) solid var(--ink);
  border-radius: calc(36 * var(--u));
  background: var(--cream);
  box-shadow: 0 calc(10 * var(--u)) 0 #f4b0ce;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
  transition: transform .24s cubic-bezier(.22, 1, .36, 1), box-shadow .24s ease;
}
.fanart-card:hover {
  transform: translateY(calc(-6 * var(--u)));
  box-shadow: 0 calc(16 * var(--u)) 0 #ee9ec1;
}

/* Uniform Card Header Strip */
.fanart-card-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: calc(12 * var(--u));
  padding: calc(16 * var(--u)) calc(24 * var(--u));
  background: #ffe8f2;
  border-bottom: calc(4 * var(--u)) solid var(--ink);
  flex: 0 0 auto;
}
.fanart-card-slot {
  display: inline-flex;
  align-items: center;
  gap: calc(10 * var(--u));
  font-family: var(--px);
  font-size: clamp(8px, calc(21 * var(--u)), 12px);
  letter-spacing: .04em;
}
.fanart-card-dot {
  width: calc(18 * var(--u));
  height: calc(18 * var(--u));
  min-width: 8px;
  min-height: 8px;
  border-radius: 50%;
  background: #ff85b6;
  border: calc(3 * var(--u)) solid var(--ink);
}
.fanart-feature-label {
  border-radius: 999px;
  padding: calc(5 * var(--u)) calc(15 * var(--u));
  border: calc(3.5 * var(--u)) solid var(--ink);
  background: #ffc2dc;
  font-size: clamp(9px, calc(22 * var(--u)), 12px);
  font-weight: 900;
  white-space: nowrap;
}

/* Artwork Card Viewport — matches #f8e1f1 -> #e2e1eb artwork backdrop seamlessly */
.fanart-art-button {
  display: block;
  width: 100%;
  flex: 1 1 auto;
  min-height: calc(780 * var(--u));
  overflow: hidden;
  background: linear-gradient(180deg, #f8e1f1 0%, #e2e1eb 100%);
  position: relative;
}
.fanart-art-button::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, .42) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform .65s ease;
  pointer-events: none;
  z-index: 1;
}
.fanart-art-button:hover::before {
  transform: translateX(120%);
}
.fanart-art-button img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center;
  transition: transform .34s cubic-bezier(.22, 1, .36, 1);
}
.fanart-art-button:hover img {
  transform: scale(1.035);
}
.fanart-zoom-hint {
  position: absolute;
  z-index: 2;
  bottom: calc(16 * var(--u));
  right: calc(16 * var(--u));
  padding: calc(9 * var(--u)) calc(20 * var(--u));
  background: rgba(255, 249, 252, .94);
  border: calc(4 * var(--u)) solid var(--ink);
  border-radius: 999px;
  font-size: clamp(10px, calc(26 * var(--u)), 14px);
  font-weight: 900;
  box-shadow: 0 calc(4 * var(--u)) 0 rgba(62, 29, 46, .14);
  transition: background .18s ease, transform .18s ease;
}
.fanart-art-button:hover .fanart-zoom-hint {
  background: #ffc8e0;
  transform: scale(1.05);
}

.fanart-feature-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: calc(16 * var(--u));
  padding: calc(20 * var(--u)) calc(26 * var(--u));
  background: #fff5f9;
  border-top: calc(4 * var(--u)) solid var(--ink);
  flex: 0 0 auto;
}
.fanart-feature-caption > div {
  display: flex;
  flex-direction: column;
  gap: calc(4 * var(--u));
  min-width: 0;
}
.fanart-feature-caption strong {
  font-size: clamp(13px, calc(35 * var(--u)), 19px);
  font-weight: 950;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fanart-feature-caption div span {
  font-size: clamp(10px, calc(26 * var(--u)), 14px);
  color: #6b3950;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fanart-artist-link {
  text-decoration: underline;
  text-decoration-color: #df6fa0;
  font-weight: 900;
}

/* Community Invite Card (Tidy Column 2) */
.fanart-invite-body {
  flex: 1 1 auto;
  padding: calc(32 * var(--u)) calc(32 * var(--u)) calc(26 * var(--u));
  display: flex;
  flex-direction: column;
  gap: calc(16 * var(--u));
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #fff9fc 0%, #fff0f6 100%);
}
.fanart-side-symbol {
  position: absolute;
  right: calc(26 * var(--u));
  top: calc(14 * var(--u));
  color: #ffd3e6;
  font-size: calc(175 * var(--u));
  line-height: 1;
  pointer-events: none;
  animation: fanartFloat 4.5s ease-in-out infinite;
}
.fanart-mini-tag {
  align-self: flex-start;
  background: #4a2337;
  color: #ffe2ef;
  border-radius: 999px;
  padding: calc(8 * var(--u)) calc(18 * var(--u));
  font-size: clamp(9px, calc(22 * var(--u)), 12px);
  font-weight: 900;
  position: relative;
}
.fanart-invite h3 {
  font-size: clamp(19px, calc(56 * var(--u)), 29px);
  line-height: 1.08;
  font-weight: 1000;
  margin: calc(2 * var(--u)) 0 0;
  position: relative;
}
.fanart-invite p {
  font-size: clamp(12px, calc(31 * var(--u)), 15.5px);
  line-height: 1.38;
  color: #5b2e43;
  position: relative;
}
.fanart-step-list {
  display: flex;
  flex-direction: column;
  gap: calc(12 * var(--u));
  margin: auto 0;
  position: relative;
}
.fanart-step-pill {
  display: flex;
  align-items: center;
  gap: calc(14 * var(--u));
  padding: calc(12 * var(--u)) calc(18 * var(--u));
  border: calc(3.5 * var(--u)) solid var(--ink);
  border-radius: 999px;
  background: var(--cream);
  font-size: clamp(10px, calc(26 * var(--u)), 13.5px);
  font-weight: 850;
  color: var(--ink);
}
.fanart-step-pill b {
  display: inline-grid;
  place-items: center;
  padding: calc(3 * var(--u)) calc(11 * var(--u));
  border-radius: 999px;
  background: #ffd1e6;
  font-family: var(--px);
  font-size: clamp(8px, calc(18 * var(--u)), 10px);
}
.fanart-invite-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  border: calc(4.5 * var(--u)) solid var(--ink);
  border-radius: 999px;
  background: #ffafd1;
  box-shadow: 0 calc(5 * var(--u)) 0 #e68bb3;
  padding: calc(18 * var(--u)) calc(28 * var(--u));
  font-size: clamp(11px, calc(33 * var(--u)), 16px);
  font-weight: 950;
  transition: background .16s ease, transform .16s ease;
  position: relative;
}
.fanart-invite-link:hover {
  background: #ff8ec0;
  transform: translateY(-2px);
}

/* Upcoming Art Slot Card (Tidy Column 3) */
.fanart-next-body {
  flex: 1 1 auto;
  margin: calc(24 * var(--u));
  padding: calc(32 * var(--u));
  border: calc(4.5 * var(--u)) dashed #cf82a6;
  border-radius: calc(26 * var(--u));
  background:
    radial-gradient(circle at 50% 38%, #fff6fa 0%, #ffe8f2 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: calc(22 * var(--u));
}
.fanart-next-heart {
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  animation: fanartFloat 3.8s ease-in-out infinite;
}
.fanart-next-heart .pixel-heart-icon {
  width: calc(96 * var(--u));
  height: calc(87 * var(--u));
  min-width: 36px;
  min-height: 32px;
  filter: drop-shadow(0 calc(6 * var(--u)) 0 rgba(62, 29, 46, .16));
}
.fanart-next strong {
  display: block;
  font-size: clamp(16px, calc(46 * var(--u)), 24px);
  font-weight: 1000;
}

/* Tidy Bottom Status Row */
.fanart-page-bottom {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding-top: calc(4 * var(--u));
  font-size: clamp(11px, calc(29 * var(--u)), 15px);
  color: #633349;
}

/* ---- Full-Screen Lightbox Viewer ---- */
@keyframes lightboxPop {
  0% { opacity: 0; transform: scale(.94) translateY(10px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}
dialog.fanart-lightbox {
  position: fixed;
  width: min(920px, 92vw);
  max-width: min(920px, 92vw);
  max-height: 92vh;
  overflow: auto;
  padding: 20px 22px 18px;
  text-align: center;
  border: 3px solid var(--ink);
  border-radius: 24px;
  background: #fff5f9;
  box-shadow: 0 14px 0 #e9a2c1;
}
dialog.fanart-lightbox[open] {
  animation: lightboxPop .24s cubic-bezier(.22, 1, .36, 1) both;
}
.fanart-lightbox img {
  display: block;
  max-width: 100%;
  max-height: 72vh;
  width: auto;
  height: auto;
  margin: 0 auto;
  object-fit: contain;
  border-radius: 14px;
  border: 2px solid rgba(62, 29, 46, .15);
  background: #ebe0ed;
}
.fanart-lightbox-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.fanart-lightbox p {
  font-size: 14px;
  margin: 0;
}
.fanart-lightbox-nav {
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: #ffd3e6;
  padding: 5px 14px;
  font-size: 13px;
  font-weight: 900;
}
.fanart-lightbox-nav:hover { background: #ff9ec7; }
.fanart-lightbox-nav[hidden] { display: none !important; }
.fanart-lightbox .fanart-lightbox-close {
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: #ffb3d1;
  font-size: 24px;
  line-height: 1;
  transition: transform .15s ease, background .15s ease;
}
.fanart-lightbox .fanart-lightbox-close:hover {
  background: #ff8ebe;
  transform: scale(1.08);
}

/* ---- Responsive Mobile Layout (<= 860px) ---- */
@media (max-width: 860px) {
  .stage {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .e, .card {
    left: auto;
    top: auto;
    min-width: 0;
  }
  .like, .like.pill-heart, .like.pill-heart.sm, .like.chip {
    left: auto;
  }

  .fanart-browser-tabs {
    position: relative;
    inset: auto;
    display: flex;
    align-items: flex-end;
    gap: 8px;
    grid-column: 1 / -1;
    order: 1;
    width: 100%;
    height: 46px;
    min-width: 0;
    pointer-events: auto;
    margin-bottom: 2px;
  }

  .pixel-heart-icon {
    width: 18px;
    height: 16px;
    filter: none;
  }

  .fanart-home-tab {
    position: static;
    width: auto;
    min-width: 0;
    height: 42px;
    flex: 1 1 0;
    justify-content: space-between;
    padding: 0 12px;
    border: 2.5px solid var(--ink);
    border-bottom-width: 0;
    border-radius: 14px 14px 0 0;
    background: #ffb7d6;
    font-family: var(--px);
    font-size: 11px;
    letter-spacing: 1px;
    transition: height .18s ease, background .18s ease;
  }
  .stage.fanart-active .fanart-home-tab {
    height: 36px;
    background: #ffd8e8;
    border-bottom: 2.5px solid var(--ink);
    opacity: .88;
  }
  .fanart-home-close {
    display: grid;
    width: 22px;
    height: 22px;
  }
  .pixel-heart-icon {
    width: 18px;
    height: 16px;
    filter: drop-shadow(0 1.5px 0 rgba(62, 29, 46, .16));
  }

  .fanart-page {
    position: relative;
    left: auto;
    top: auto;
    grid-column: 1 / -1;
    order: 4;
    width: 100%;
    min-width: 0;
    height: auto;
    padding: 16px 13px;
    gap: 15px;
    overflow: visible;
    border: 2.5px solid var(--ink);
    border-radius: 20px;
    box-shadow: 0 5px 0 #f4aecf;
  }
  .fanart-page-heading {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom-width: 2px;
  }
  .fanart-eyebrow { font-size: 9px; }
  .fanart-count-pill { font-size: 8px; padding: 3px 9px; border-width: 1.5px; }
  .fanart-page h2 { font-size: clamp(22px, 6vw, 28px); }
  .fanart-page-heading p { font-size: 12px; }
  .fanart-header-actions { width: 100%; justify-content: flex-start; }
  .fanart-heading-stamp { display: none; }
  .fanart-top-back { padding: 6px 12px; border-width: 2px; font-size: 12px; box-shadow: none; }

  .fanart-gallery-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .fanart-card {
    border-width: 2.5px;
    border-radius: 18px;
    box-shadow: 0 4px 0 #f4aecf;
  }
  .fanart-card:hover { transform: none; box-shadow: 0 4px 0 #f4aecf; }
  .fanart-card-bar { padding: 9px 12px; border-bottom-width: 2px; }
  .fanart-card-slot { font-size: 9px; gap: 6px; }
  .fanart-card-dot { width: 8px; height: 8px; border-width: 1.5px; }
  .fanart-feature-label { font-size: 9px; padding: 3px 8px; border-width: 1.5px; }

  .fanart-art-button { flex: none; min-height: 0; aspect-ratio: 4 / 3; }
  .fanart-zoom-hint { bottom: 10px; right: 10px; padding: 5px 10px; border-width: 2px; font-size: 11px; }
  .fanart-feature-caption { padding: 11px 13px; border-top-width: 2px; }
  .fanart-feature-caption strong { font-size: 14px; }
  .fanart-feature-caption div span { font-size: 11px; }

  .fanart-invite-body { padding: 16px 14px; gap: 10px; }
  .fanart-side-symbol { right: 14px; top: 8px; font-size: 72px; }
  .fanart-mini-tag { font-size: 9px; padding: 4px 10px; }
  .fanart-invite h3 { font-size: 20px; }
  .fanart-invite p { font-size: 13px; }
  .fanart-step-list { gap: 7px; margin: 4px 0; }
  .fanart-step-pill { padding: 7px 11px; border-width: 2px; font-size: 12px; gap: 8px; }
  .fanart-step-pill b { font-size: 8px; padding: 2px 7px; }
  .fanart-invite-link { padding: 10px 15px; border-width: 2px; font-size: 13px; box-shadow: none; }

  .fanart-next-body { margin: 12px; padding: 24px 14px; border-width: 2px; border-radius: 14px; gap: 12px; }
  .fanart-next-heart .pixel-heart-icon { width: 34px; height: 31px; filter: drop-shadow(0 2px 0 rgba(62, 29, 46, .16)); }
  .fanart-next strong { font-size: 16px; }

  .fanart-page-bottom {
    flex-direction: column;
    align-items: flex-start;
    font-size: 12px;
    gap: 10px;
  }
}

@media (max-width: 360px) {
  .fanart-home-tab { font-size: 9px; padding: 0 8px; letter-spacing: .3px; }
  .fanart-page { padding: 14px 11px; }
  .fanart-feature-label { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .fanart-page.is-entering,
  .fanart-page.is-leaving,
  .fanart-page.is-entering .fanart-card,
  .stage.home-returning > *,
  .fanart-side-symbol,
  .fanart-next-heart,
  dialog.fanart-lightbox[open] {
    animation: none !important;
  }
  .fanart-art-button img,
  .fanart-art-button::before,
  .fanart-invite-link,
  .fanart-card,
  .fanart-home-tab,
  .pixel-heart-icon {
    transition: none !important;
  }
}

/* Cover the homepage's baked card rims beneath the gallery, including the
   white artwork-frame edge at the bottom. Stay inside the outer window. */
@media (min-width:861px){
  .stage.fanart-active::after{
    content:"";position:absolute;z-index:6;pointer-events:none;
    left:calc(89 * var(--u));right:calc(89 * var(--u));
    top:calc(389 * var(--u));bottom:calc(97 * var(--u));
    border-radius:0 0 calc(53 * var(--u)) calc(53 * var(--u));
    background:#ffc7de;
  }
}

/* Desktop: mask the complete original window, including the single raised tab.
   No separate SVG fill or stroke sits above the translucent raster. */
@media (min-width:861px){
  .shell{
    -webkit-mask:url('./assets/tpl/window-mask.svg') center / 100% 100% no-repeat;
    mask:url('./assets/tpl/window-mask.svg') center / 100% 100% no-repeat;
  }
}
