/* matches-v2.css - lighter /matches page (desktop and phone): photo cards with the name and details
   underneath on the card surface instead of a heavy dark bar over the photo.
   Loads after profile-v2.css. Rollback: remove its <link> from index.html. */

#view:has(.mgrid) > h2 { margin: 0; font: 700 26px/1.2 var(--font-d); text-transform: none; letter-spacing: 0; }
#view:has(.mgrid) > h2 + p.muted { margin: 4px 0 16px; font-size: 13px; color: var(--t3); }

.mgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px !important; margin: 0 !important; }
.mgrid .mc2, .mgrid .mc2:last-child:nth-child(odd) {
  grid-column: auto !important; aspect-ratio: auto !important;
  display: flex; flex-direction: column; position: relative; overflow: hidden; cursor: pointer;
  background: var(--s1); border-radius: 18px; clip-path: none !important;
  transition: transform .25s cubic-bezier(.2, .8, .2, 1), box-shadow .25s;
}
.mgrid .mc2:hover { transform: translateY(-4px); box-shadow: 0 10px 24px rgba(27, 26, 46, .08); }
.mgrid .mc2:focus-visible { outline: 3px solid var(--acc-t); outline-offset: 2px; }

/* photo (or the first letter when there is no photo) */
.mgrid .mc2 img {
  position: static !important; display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover;
  object-position: 50% 30%; transition: transform .4s cubic-bezier(.2, .8, .2, 1);
}
.mgrid .mc2:hover img { transform: scale(1.03); }
.mgrid .mc2 .l0 {
  position: static !important; transform: none !important; display: flex; align-items: center; justify-content: center;
  width: 100%; aspect-ratio: 4 / 5; background: var(--tint, var(--s2)); color: transparent;
  -webkit-text-stroke: 2px var(--acc); font: 700 72px/1 var(--font-d) !important;
}

/* name and details under the photo */
.mgrid .mc2 .i2 { position: static !important; padding: 10px 12px 12px; background: none !important; color: var(--t1); }
.mgrid .mc2 .i2 b {
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap; color: var(--t1) !important;
  font: 700 15px/1.3 var(--font-d) !important; text-transform: none !important; letter-spacing: 0 !important;
}
.mgrid .mc2 .i2 div {
  margin-top: 2px; color: var(--t3) !important; font-size: 12px; line-height: 1.4;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* "New" tag for matches you have not talked to yet */
.mgrid .mc2 .tagn {
  top: 10px; left: 10px; padding: 3px 10px; border-radius: 10px; clip-path: none;
  background: var(--acc); color: var(--on-acc); font: 700 11px/1.4 var(--font-b) !important; letter-spacing: 0; text-transform: none;
}

@media (min-width: 640px) {
  .mgrid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 14px !important; }
}
@media (min-width: 900px) {
  .wrap:has(#nav) #view:has(.mgrid) { max-width: 1120px !important; padding: 28px 40px 48px !important; }
  #view:has(.mgrid) > h2 { font-size: 34px; }
  #view:has(.mgrid) > h2 + p.muted { margin: 6px 0 22px; }
  .mgrid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)) !important; gap: 18px !important; }
  .mgrid .mc2 .i2 { padding: 12px 14px 14px; }
  .mgrid .mc2 .i2 b { font-size: 16px !important; }
  .mgrid .mc2 .i2 div { font-size: 13px; }
}
/* end of matches-v2.css */
