.mh-portal-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px;
  align-items: center;
  gap: 28px;
  margin-bottom: 16px;
  overflow: hidden;
  background:
    radial-gradient(circle at 90% 20%, rgba(87, 196, 229, .22), transparent 38%),
    linear-gradient(135deg, #fff 0%, #fff8f6 100%);
}

.mh-portal-intro h2,
.mh-portal-section__head h2,
.mh-pet-profile h2 {
  margin: 4px 0 8px;
  padding: 0;
  border: 0;
  color: var(--grape);
  font-size: clamp(1.45rem, 2.5vw, 2rem);
  line-height: 1.1;
}

.mh-portal-intro h2::after,
.mh-portal-section__head h2::after,
.mh-pet-profile h2::after { display: none; }

.mh-portal-intro p { max-width: 660px; margin: 0; color: var(--muted); font-weight: 700; line-height: 1.6; }
.mh-portal-intro img { width: 150px; height: 150px; object-fit: contain; justify-self: center; filter: drop-shadow(0 12px 14px rgba(33,39,56,.12)); }
.mh-portal-eyebrow,
.mh-portal-kicker { color: #cf5c56; font-size: .72rem; font-weight: 1000; letter-spacing: .13em; text-transform: uppercase; }

.mh-portal-alert {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  margin: 0 0 14px;
  padding: 14px 16px;
  border: 1px solid #b9dfea;
  border-left: 5px solid var(--sky);
  border-radius: 14px;
  background: #f3fbfd;
  color: #253349;
  box-shadow: 0 8px 18px rgba(33,39,56,.06);
}
.mh-portal-alert > i { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: #fff; color: #318bac; }
.mh-portal-alert strong,.mh-portal-alert span { display: block; }
.mh-portal-alert strong { margin-bottom: 3px; color: var(--grape); }
.mh-portal-alert span { font-size: .9rem; font-weight: 650; line-height: 1.45; }
.mh-portal-alert--wanted { border-color: #efd477; border-left-color: #d8aa17; background: #fffbee; }
.mh-portal-alert--wanted > i { color: #ae8300; }
.mh-portal-alert--unconfirmed { border-color: #d9c8eb; border-left-color: #8b63b1; background: #faf6ff; }
.mh-portal-alert--unconfirmed > i { color: #79549c; }
.mh-portal-alert--warning { border-color: #f2bab5; border-left-color: var(--coral); background: #fff6f5; }
.mh-portal-alert--warning > i { color: #cc554e; }

.mh-portal-section { margin-top: 16px; }
.mh-portal-section__head { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 16px; }
.mh-portal-count { flex: 0 0 auto; padding: 6px 10px; border: 1px solid rgba(33,39,56,.12); border-radius: 999px; background: #f5f8f8; color: var(--muted); font-size: .75rem; font-weight: 900; }

.mh-portal-recent {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.mh-portal-recent__item { min-width: 0; padding: 12px 8px; border: 1px solid transparent; border-radius: 14px; text-align: center; color: inherit; text-decoration: none; transition: border-color .15s ease, background .15s ease, transform .15s ease; }
.mh-portal-recent__item:hover { transform: translateY(-2px); border-color: #cfe5eb; background: #f8fcfd; }
.mh-portal-recent__item img { display: block; width: 150px; height: 150px; max-width: 100%; margin: 0 auto 7px; object-fit: contain; }
.mh-portal-recent__item strong { display: block; overflow: hidden; color: var(--grape); font-size: .9rem; line-height: 1.2; text-overflow: ellipsis; }
.mh-portal-recent__item span { display: block; margin-top: 5px; color: var(--muted); font-size: .72rem; font-weight: 800; }

.mh-portal-filters {
  display: grid;
  grid-template-columns: minmax(180px, 1.5fr) repeat(3, minmax(130px, 1fr));
  align-items: end;
  gap: 10px;
  margin: 0 0 18px;
  padding: 14px;
  border: 1px solid #dce8e9;
  border-radius: 14px;
  background: linear-gradient(120deg, rgba(87,196,229,.08), rgba(249,112,104,.05));
}
.mh-portal-filters label > span { display: block; margin: 0 0 6px 2px; color: #475069; font-size: .72rem; font-weight: 1000; letter-spacing: .05em; text-transform: uppercase; }
.mh-portal-filters input,.mh-portal-filters select { width: 100%; height: 43px; border: 1px solid #cddbdd; border-radius: 10px; outline: 0; background-color: #fff; color: var(--grape); font: inherit; font-size: .86rem; font-weight: 750; }
.mh-portal-filters input { padding: 0 11px 0 34px; }
.mh-portal-filters select { padding: 0 30px 0 11px; }
.mh-portal-filters input:focus,.mh-portal-filters select:focus { border-color: var(--sky); box-shadow: 0 0 0 3px rgba(87,196,229,.15); }
.mh-portal-search div { position: relative; }
.mh-portal-search i { position: absolute; z-index: 1; top: 50%; left: 12px; transform: translateY(-50%); color: #7c8990; font-size: .8rem; }
.mh-portal-filters .mh-btn { min-height: 43px; border-radius: 10px; box-shadow: none; }

.mh-portal-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.mh-portal-card { min-width: 0; overflow: hidden; border: 1px solid #dce5e6; border-radius: 16px; background: #fff; transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease; }
.mh-portal-card:hover { transform: translateY(-3px); border-color: #aed9e5; box-shadow: 0 12px 24px rgba(33,39,56,.10); }
.mh-portal-card__image { position: relative; display: grid; place-items: center; min-height: 170px; padding: 10px; background: radial-gradient(circle at 50% 50%, #fff 35%, #f2f8f8 100%); }
.mh-portal-card__image img { display: block; width: 150px; height: 150px; max-width: 100%; object-fit: contain; transition: transform .16s ease; }
.mh-portal-card:hover .mh-portal-card__image img { transform: scale(1.035); }
.mh-portal-history-pill { position: absolute; right: 8px; bottom: 8px; padding: 4px 7px; border: 1px solid rgba(33,39,56,.1); border-radius: 999px; background: rgba(255,255,255,.94); color: #657088; font-size: .67rem; font-weight: 900; }
.mh-portal-card__body { padding: 12px; border-top: 1px solid #edf1f1; }
.mh-portal-card__body h3 { display: block; margin: 7px 0 4px; font-size: 1rem; letter-spacing: 0; text-transform: none; }
.mh-portal-card__body h3::before { display: none; }
.mh-portal-card__body h3 a { display: block; overflow: hidden; color: var(--grape); text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.mh-portal-card__body time { color: var(--muted); font-size: .75rem; font-weight: 750; }
.mh-portal-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.mh-portal-tags span,.mh-portal-tags a { padding: 3px 7px; border: 1px solid #d5e7eb; border-radius: 999px; background: #f2fafb; color: #426c77; font-size: .66rem; font-weight: 900; text-decoration: none; }
.mh-portal-tags span + span,.mh-portal-tags a + a { border-color: #f0d8d5; background: #fff6f5; color: #955a55; }
.mh-portal-unconfirmed { display: block; margin-top: 7px; color: #81599e; font-size: .68rem; font-weight: 900; text-transform: uppercase; }

.mh-portal-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; min-height: 190px; padding: 24px; border: 1px dashed #cbdadc; border-radius: 14px; background: #fafcfc; color: var(--muted); text-align: center; }
.mh-portal-empty > i { margin-bottom: 4px; color: #87a9b1; font-size: 2rem; }
.mh-portal-empty strong { color: var(--grape); font-size: 1.05rem; }
.mh-portal-empty span { font-size: .86rem; font-weight: 700; }
.mh-portal-empty .mh-btn { margin-top: 10px; }
.mh-portal-pagination { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 20px; }
.mh-portal-pagination a,.mh-portal-pagination span { display: grid; place-items: center; min-width: 38px; height: 38px; padding: 0 10px; border: 1px solid #d4e0e2; border-radius: 10px; background: #fff; color: var(--grape); font-size: .84rem; font-weight: 900; text-decoration: none; }
.mh-portal-pagination a:hover { border-color: var(--sky); background: #f2fafc; }
.mh-portal-pagination span { border-color: var(--grape); background: var(--grape); color: #fff; }

.mh-pet-profile { display: grid; grid-template-columns: 220px minmax(0,1fr); gap: 28px; align-items: center; margin-bottom: 16px; }
.mh-pet-profile__art { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 220px; padding: 16px; border: 1px solid #dce9ea; border-radius: 16px; background: radial-gradient(circle, #fff 30%, #edf8fa 100%); }
.mh-pet-profile__art img { width: 150px; height: 150px; object-fit: contain; }
.mh-pet-profile__info > p { max-width: 650px; color: var(--muted); font-weight: 650; line-height: 1.55; }
.mh-pet-profile dl { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin: 16px 0; }
.mh-pet-profile dl div { padding: 10px; border: 1px solid #e1e8e9; border-radius: 10px; background: #fbfdfd; }
.mh-pet-profile dt { color: var(--muted); font-size: .65rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.mh-pet-profile dd { margin: 3px 0 0; color: var(--grape); font-weight: 900; }

.mh-pet-poses { display: grid; grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); gap: 14px; }
.mh-pet-pose { display: flex; flex-direction: column; align-items: center; min-height: 220px; padding: 14px; border: 1px solid #dce8e9; border-radius: 16px; background: radial-gradient(circle at 50% 55%, #fff 25%, #f1f8f9 100%); text-align: center; }
.mh-pet-pose img { width: 150px; height: 150px; max-width: 100%; object-fit: contain; }
.mh-pet-pose__label { display: inline-flex; align-items: center; gap: 7px; align-self: stretch; justify-content: center; margin-bottom: 8px; padding: 6px 10px; border-radius: 999px; background: rgba(87,196,229,.11); color: #3f6671; font-size: .73rem; font-weight: 1000; letter-spacing: .05em; text-transform: uppercase; }
.mh-pet-pose--sick .mh-pet-pose__label { background: rgba(209,214,70,.15); color: #687019; }
.mh-pet-pose--battle_left .mh-pet-pose__label,
.mh-pet-pose--battle_right .mh-pet-pose__label { background: rgba(249,112,104,.12); color: #99504b; }

.mh-pet-timeline { position: relative; display: flex; flex-direction: column; gap: 14px; }
.mh-pet-timeline::before { content: ""; position: absolute; top: 20px; bottom: 20px; left: 19px; width: 2px; background: linear-gradient(var(--sky), var(--coral)); }
.mh-pet-version { position: relative; display: grid; grid-template-columns: 40px 170px minmax(0,1fr); align-items: center; gap: 14px; padding: 14px; border: 1px solid #dfe8e9; border-radius: 14px; background: #fff; }
.mh-pet-version__marker { z-index: 1; display: grid; place-items: center; width: 38px; height: 38px; border: 4px solid #fff; border-radius: 50%; background: var(--grape); color: #fff; font-size: .75rem; font-weight: 1000; box-shadow: 0 0 0 1px #ccdadd; }
.mh-pet-version img { width: 150px; height: 150px; object-fit: contain; }
.mh-pet-version h3 { display: block; margin: 4px 0 7px; color: var(--grape); font-size: 1.05rem; letter-spacing: 0; text-transform: none; }
.mh-pet-version h3::before { display: none; }
.mh-pet-version p { margin: 5px 0 0; color: var(--muted); font-size: .85rem; font-weight: 650; line-height: 1.45; }
.mh-pet-version__dates { color: #69738a !important; font-weight: 850 !important; }

@media (max-width: 1050px) {
  .mh-portal-filters { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .mh-portal-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 760px) {
  .mh-portal-intro { grid-template-columns: 1fr; text-align: center; }
  .mh-portal-intro img { grid-row: 1; }
  .mh-portal-recent { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .mh-pet-profile { grid-template-columns: 1fr; }
  .mh-pet-poses { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 520px) {
  .mh-portal-section__head { align-items: start; }
  .mh-portal-filters,.mh-portal-grid { grid-template-columns: 1fr; }
  .mh-portal-recent__item img { width: 120px; height: 120px; }
  .mh-pet-profile dl { grid-template-columns: 1fr; }
  .mh-pet-poses { grid-template-columns: 1fr; }
  .mh-pet-version { grid-template-columns: 38px minmax(0,1fr); align-items: start; }
  .mh-pet-version img { grid-column: 2; }
  .mh-pet-version > div:last-child { grid-column: 2; }
}

@media (prefers-reduced-motion: reduce) {
  .mh-portal-card,.mh-portal-card__image img,.mh-portal-recent__item { transition: none; }
}
