/* Muppet Madness Lightweight 2.9.9: homepage art only.
   No changes to header, boxed shell, community, plugins or article layouts. */
.mm-home-theatre .mm-max-hero,
.mm-main-visual-home .mm-max-hero,
.mm-max-hero {
  position:relative; display:flex; align-items:center; isolation:isolate;
  min-height:390px; margin:0 0 27px;
  overflow:hidden; border-radius:20px;
  border:1px solid rgba(224,161,102,.43);
  background:#09110f; color:#fff8ec;
  box-shadow:0 12px 35px rgba(0,0,0,.23);
}
.mm-max-hero-media,.mm-max-hero-media picture,.mm-max-hero-media img{
  position:absolute;inset:0;display:block;width:100%;height:100%;
}
.mm-max-hero-media{z-index:-2}
.mm-max-hero-media img{object-fit:cover;object-position:center center}
.mm-max-hero:before{content:"";position:absolute;z-index:-1;inset:0;pointer-events:none;
  background:linear-gradient(90deg,rgba(5,13,12,.98) 0%,rgba(5,12,12,.93) 28%,rgba(7,14,14,.72) 49%,rgba(7,13,15,.1) 79%);
}
.mm-max-hero-content{position:relative;z-index:1;max-width:690px;padding:42px clamp(25px,4.5vw,54px) 47px}
.mm-max-hero-kicker{display:block;color:#f7d59d;font-size:10px;letter-spacing:.16em;font-weight:900;text-transform:uppercase}
.mm-max-hero-kicker span{color:#f8a454;font-size:18px;vertical-align:middle;margin-right:5px}
.mm-max-hero h1{color:#fff7eb!important;margin:14px 0 14px!important;
  font:850 clamp(41px,5vw,67px)/1.04 var(--mm-display)!important;letter-spacing:-.055em!important;
  text-wrap:balance;text-shadow:0 2px 22px rgba(0,0,0,.28);
}
.mm-max-hero h1 em{font-style:normal;color:#ffa966}
.mm-max-hero-content > p{max-width:425px;margin:0!important;color:#e6e6dd!important;font-size:14px;line-height:1.68}
.mm-max-hero-links{display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin-top:24px}
.mm-max-hero-links a{display:inline-flex;align-items:center;justify-content:center;gap:14px;min-height:45px;
  padding:11px 17px;text-decoration:none!important;border-radius:11px;font-size:12px;font-weight:850;transition:background .18s,transform .18s}
.mm-max-hero-links a:hover{transform:translateY(-2px)}
.mm-max-hero-primary{background:#ffa45c;color:#1d130b!important;border:1px solid #ffc48d}
.mm-max-hero-primary:hover{background:#ffc18d}
.mm-max-hero-secondary{background:#071511b0;color:#f7eee1!important;border:1px solid #a4b09a}
.mm-max-hero-secondary:hover{background:#192b24}
.mm-max-hero a:focus-visible{outline:2px solid #fff3c9;outline-offset:3px}

/* Keep all the existing Meme Craft card text/links/hook; add one lightweight photograph. */
.mm-meme-feature-grid > .mm-craft-home-card{position:relative;isolation:isolate;
  display:flex; flex-direction:column; align-items:stretch;justify-content:flex-end;
  min-height:270px; padding:23px; overflow:hidden;background:#10201e;
  border-color:rgba(255,188,115,.43);
}
.mm-craft-home-card .mm-craft-art,.mm-craft-home-card .mm-craft-art img{position:absolute;inset:0;display:block;width:100%;height:100%}
.mm-craft-home-card .mm-craft-art{z-index:-2}
.mm-craft-home-card .mm-craft-art img{object-fit:cover;object-position:57% 42%;transition:transform .3s}
.mm-craft-home-card:after{content:"";position:absolute;z-index:-1;inset:0;pointer-events:none;
  background:linear-gradient(90deg,rgba(7,18,17,.96) 0%,rgba(8,19,17,.89) 38%,rgba(7,19,17,.49) 67%,rgba(7,15,14,.05) 100%),linear-gradient(0deg,rgba(6,14,14,.6),transparent 70%)}
.mm-meme-feature-grid > .mm-craft-home-card .mm-tool-badge{position:absolute;top:19px;left:21px;z-index:2;
  background:#10231ed9;color:#ffdda8!important;border:1px solid #ffe0ac5c}
.mm-meme-feature-grid > .mm-craft-home-card .mm-meme-feature-mark{display:none!important}
.mm-meme-feature-grid > .mm-craft-home-card > div:last-child{position:relative;z-index:2;max-width:65%;min-width:0}
.mm-meme-feature-grid > .mm-craft-home-card h3{color:#fff7e6!important;text-shadow:0 2px 10px #0009}
.mm-meme-feature-grid > .mm-craft-home-card p{color:#e1e9df!important;text-shadow:0 1px 5px #0009}
.mm-meme-feature-grid > .mm-craft-home-card .mm-kicker{color:#ffddad!important}
.mm-meme-feature-grid > .mm-craft-home-card .mm-link-button{position:relative;z-index:2;white-space:normal}
.mm-meme-feature-grid > .mm-craft-home-card:hover .mm-craft-art img{transform:scale(1.035)}

/* Preserve featured-story type scale whether the hero is enabled (h2) or disabled (h1). */
.mm-home-theatre .mm-feature-copy h2.mm-feature-title{max-width:650px;margin:13px 0 15px!important;
  color:var(--mm-stage-cream)!important;font:700 clamp(29px,3.7vw,49px)/1.07 var(--mm-stage-serif)!important;
  letter-spacing:-.042em!important;text-wrap:balance}
.mm-main:not(.mm-home-theatre) .mm-feature-copy h2.mm-feature-title{margin:8px 0 14px!important;
  color:var(--mm-text)!important;font:800 clamp(36px,5vw,61px)/.96 var(--mm-display)!important;letter-spacing:-.06em!important}
@media(max-width:850px){
  .mm-max-hero{min-height:370px}
  .mm-max-hero-content{max-width:67%;padding:36px 26px}
  .mm-max-hero h1{font-size:clamp(39px,6vw,54px)!important}
  .mm-meme-feature-grid > .mm-craft-home-card > div:last-child{max-width:76%}
}
@media(max-width:640px){
  .mm-max-hero{min-height:550px;align-items:flex-end;margin-bottom:22px;border-radius:16px}
  .mm-max-hero-media img{object-position:center top}
  .mm-max-hero:before{background:linear-gradient(0deg,#071410 0%,#07140ff5 23%,#081612c9 43%,#07151130 79%)}
  .mm-max-hero-content{max-width:100%;padding:250px 20px 26px}
  .mm-max-hero-kicker{font-size:9px;letter-spacing:.12em}
  .mm-max-hero h1{font-size:clamp(37px,9.5vw,52px)!important;margin:12px 0!important;line-height:1.02!important}
  .mm-max-hero-content>p{font-size:12.5px;line-height:1.6}
  .mm-max-hero-links{gap:7px;margin-top:16px}
  .mm-max-hero-links a{padding:10px 11px;gap:8px;min-height:42px;font-size:11px}
  .mm-meme-feature-grid > .mm-craft-home-card{min-height:330px;padding:19px}
  .mm-craft-home-card .mm-craft-art img{object-position:55% 33%}
  .mm-craft-home-card:after{background:linear-gradient(0deg,rgba(6,15,14,.97) 0%,rgba(6,15,14,.88) 35%,rgba(6,15,14,.18) 90%)}
  .mm-meme-feature-grid > .mm-craft-home-card > div:last-child{max-width:100%}
  .mm-meme-feature-grid > .mm-craft-home-card .mm-tool-badge{top:13px;left:16px}
  .mm-home-theatre .mm-feature-copy h2.mm-feature-title{font-size:clamp(29px,7.8vw,37px)!important}
}
@media(prefers-reduced-motion:reduce){.mm-max-hero-links a,.mm-craft-home-card .mm-craft-art img{transition:none!important;transform:none!important}}


/* v2.9.10: Stop the CREATE chip stretching across the card (theme + editor layout). */
.mm-meme-feature-grid > a.mm-craft-home-card > .mm-tool-badge,
.mm-meme-feature-grid > .mm-craft-home-card .mm-tool-badge {
  display: inline-flex !important;
  position: absolute !important;
  inset: auto !important;
  top: 17px !important;
  left: 19px !important;
  right: auto !important;
  bottom: auto !important;
  width: max-content !important;
  max-width: calc(100% - 38px) !important;
  min-width: 0 !important;
  height: auto !important;
  margin: 0 !important;
  padding: 6px 11px !important;
  border-radius: 999px !important;
  flex: 0 0 auto !important;
  align-self: flex-start !important;
  justify-self: start !important;
  white-space: nowrap !important;
  line-height: 1.2 !important;
  z-index: 3 !important;
}

/* Companion Meme Battles card is rendered by its plugin into the existing hook.
   This styles its standard card without changing any plugin files, hooks or voting. */
.mm-meme-feature-grid > .mm-meme-feature-card:not(.mm-craft-home-card) {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: stretch;
  min-height: 270px;
  padding: 23px;
  background-color: #0f1921;
  background-image:
    linear-gradient(90deg,rgba(6,15,22,.98) 0%,rgba(7,15,21,.88) 34%,rgba(8,14,23,.29) 74%,rgba(9,14,23,.10) 100%),
    url('../images/max-meme-battles.webp');
  background-size: cover, cover;
  background-position: center, center;
  border-color: rgba(255,188,115,.43);
}
.mm-meme-feature-grid > .mm-meme-feature-card:not(.mm-craft-home-card) .mm-meme-feature-mark {
  display: none !important;
}
.mm-meme-feature-grid > .mm-meme-feature-card:not(.mm-craft-home-card) > div:last-child {
  position: relative;
  z-index: 2;
  width: 65%;
  max-width: 65%;
  min-width: 0;
}
.mm-meme-feature-grid > .mm-meme-feature-card:not(.mm-craft-home-card) h3 {
  color: #fff7e6 !important;
  text-shadow: 0 2px 10px rgba(0,0,0,.9);
}
.mm-meme-feature-grid > .mm-meme-feature-card:not(.mm-craft-home-card) p {
  color: #e6ecf0 !important;
  text-shadow: 0 1px 5px rgba(0,0,0,.85);
}
.mm-meme-feature-grid > .mm-meme-feature-card:not(.mm-craft-home-card) .mm-kicker {color: #ffdc9e !important}
.mm-meme-feature-grid > .mm-meme-feature-card:not(.mm-craft-home-card) > .mm-tool-badge {
  display:inline-flex !important;
  position:absolute !important;
  top:16px !important; right:16px !important;
  bottom:auto !important; left:auto !important;
  width:auto !important; max-width:calc(100% - 32px) !important;
  min-width:0 !important; flex:0 0 auto !important;
  white-space:nowrap !important; z-index:3;
}
@media (max-width: 850px) {
  .mm-meme-feature-grid > .mm-meme-feature-card:not(.mm-craft-home-card) > div:last-child {
    width: 77%;max-width:77%;
  }
}
@media (max-width: 640px) {
  .mm-meme-feature-grid > .mm-meme-feature-card:not(.mm-craft-home-card) {
    min-height: 330px;
    padding: 19px;
    background-image:
      linear-gradient(0deg,rgba(6,13,19,.97) 0%,rgba(6,13,19,.89) 36%,rgba(6,13,19,.19) 84%),
      url('../images/max-meme-battles.webp');
    background-position: center, center 35%;
  }
  .mm-meme-feature-grid > .mm-meme-feature-card:not(.mm-craft-home-card) > div:last-child {
    width: 100%;max-width:100%;
  }
}
