:root {
  --match-bg: #f6f3ee;
  --match-card: #ffffff;
  --match-text: #151515;
  --match-muted: #6f6a63;
  --match-border: rgba(21, 21, 21, .1);
  --match-shadow: 0 24px 80px rgba(0, 0, 0, .16);
  --match-radius: 32px;
  --match-orange: #ff7847;
  --match-green: #1f8f62;
  --match-dark: #111111;
}

* { box-sizing: border-box; }

body.match-page {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--match-text);
  background:
    radial-gradient(circle at top left, rgba(255, 120, 71, .22), transparent 34rem),
    radial-gradient(circle at bottom right, rgba(31, 143, 98, .18), transparent 30rem),
    var(--match-bg);
}

.match-shell,
.match-settings-shell {
  width: min(1120px, calc(100% - 28px));
  margin: 0 auto;
  padding: 18px 0 34px;
}

.match-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0 22px;
}

.match-logo {
  color: var(--match-text);
  text-decoration: none;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -.04em;
}

.match-logo span { color: var(--match-orange); }

.match-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.match-nav a,
.match-embed-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--match-border);
  border-radius: 999px;
  color: var(--match-text);
  background: rgba(255, 255, 255, .82);
  text-decoration: none;
  font-weight: 800;
}

.match-hero {
  width: min(780px, 100%);
  margin: 0 auto 24px;
  text-align: center;
}

.match-kicker {
  margin: 0 0 8px;
  color: var(--match-orange);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .13em;
  font-size: 12px;
}

.match-hero h1,
.match-settings-card h1 {
  margin: 0;
  font-size: clamp(34px, 7vw, 68px);
  line-height: .95;
  letter-spacing: -.07em;
}

.match-hero p,
.match-muted {
  color: var(--match-muted);
  font-size: 17px;
  line-height: 1.55;
}

.match-stage {
  position: relative;
  display: grid;
  justify-items: center;
  width: min(430px, calc(100vw - 28px));
  margin-left: auto;
  margin-right: auto;
  z-index: 4;
}

.match-card-stack {
  position: relative;
  width: 100%;
  height: min(670px, calc(100vh - 260px));
  min-height: 540px;
  touch-action: none;
  perspective: 1000px;
}

.match-loading,
.match-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 26px;
  border: 1px dashed var(--match-border);
  border-radius: var(--match-radius);
  color: var(--match-muted);
  background: rgba(255, 255, 255, .65);
  text-align: center;
  font-weight: 750;
}

.match-card {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: var(--match-radius);
  background: var(--match-card);
  box-shadow: var(--match-shadow);
  user-select: none;
  cursor: grab;
  will-change: transform;
  transition: transform .25s ease, opacity .25s ease;
}

.match-card:active { cursor: grabbing; }

.match-card-photo {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #ddd center / cover no-repeat;
}

.match-card-photo-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  image-rendering: auto;
  transform: translateZ(0);
}

.match-card-photo-placeholder {
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, .45), transparent 18rem),
    linear-gradient(135deg, #f97316, #111827 62%, #1f8f62);
}

.match-card-photo-placeholder span {
  width: 148px;
  height: 148px;
  display: grid;
  place-items: center;
  border-radius: 44px;
  background: rgba(255, 255, 255, .18);
  color: #fff;
  font-size: 56px;
  font-weight: 950;
  letter-spacing: -.08em;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35), 0 24px 60px rgba(0, 0, 0, .25);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.match-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(
      to top,
      rgba(0, 0, 0, .92) 0%,
      rgba(0, 0, 0, .74) 24%,
      rgba(0, 0, 0, .28) 54%,
      rgba(0, 0, 0, .10) 100%
    );
}

.match-card-content {
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 26px 26px 124px;
  color: #fff;
}

.match-card-name {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  margin: 0 0 6px;
  font-size: 36px;
  line-height: 1;
  letter-spacing: -.05em;
  font-weight: 950;
}

.match-age {
  font-size: 22px;
  opacity: .9;
  font-weight: 780;
}

.match-headline {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 800;
}

.match-bio-preview,
.match-zone {
  margin: 0 0 10px;
  color: rgba(255, 255, 255, .86);
  line-height: 1.45;
}

.match-zone {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 13px;
  font-weight: 800;
}

.match-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.match-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .16);
  color: #fff;
  font-size: 13px;
  font-weight: 850;
}

.match-swipe-label {
  position: absolute;
  z-index: 5;
  top: 28px;
  padding: 10px 14px;
  border: 3px solid currentColor;
  border-radius: 14px;
  color: #fff;
  font-weight: 950;
  font-size: 20px;
  text-transform: uppercase;
  letter-spacing: .06em;
  opacity: 0;
  transform: rotate(-10deg);
  transition: opacity .12s ease;
}

.match-swipe-label.right { right: 22px; color: #7dffb3; }
.match-swipe-label.left { left: 22px; color: #ff9a9a; transform: rotate(10deg); }
.match-swipe-label.down { left: 50%; transform: translateX(-50%); color: #fff4a3; }
.match-card.is-right .match-swipe-label.right,
.match-card.is-left .match-swipe-label.left,
.match-card.is-down .match-swipe-label.down { opacity: 1; }

.match-actions {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 16px;
  z-index: 30;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  padding: 8px;
  border-radius: 24px;
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 18px 48px rgba(0, 0, 0, .22);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.match-action {
  appearance: none;
  width: 100%;
  min-width: 0;
  min-height: 52px;
  border: 1px solid rgba(0, 0, 0, .06);
  border-radius: 18px;
  padding: 8px 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  font-size: 13px;
  font-weight: 950;
  line-height: 1.05;
  text-align: center;
  white-space: normal;
  cursor: pointer;
  box-shadow: none;
  text-decoration: none;
  touch-action: manipulation;
}

.match-action-left { background: #fff0f0; color: #a12121; }
.match-action-profile { background: #fff7cf; color: #6e5100; }
.match-action-right { background: #dfffee; color: #0e673d; }
.match-action span { display: block; }
.match-action:disabled { opacity: .55; cursor: not-allowed; }
.match-action:not(:disabled):hover { transform: translateY(-1px); }

.match-profile-sheet {
  position: fixed;
  inset: 0;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}

.match-profile-sheet.is-open {
  opacity: 1;
  pointer-events: auto;
}

.match-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.match-sheet-panel {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: min(720px, 100%);
  max-height: min(90vh, 900px);
  overflow: auto;
  transform: translateX(-50%) translateY(16px);
  border-radius: 30px 30px 0 0;
  background: #fff;
  box-shadow: 0 -24px 80px rgba(0, 0, 0, .22);
  transition: transform .2s ease;
}

.match-profile-sheet.is-open .match-sheet-panel { transform: translateX(-50%) translateY(0); }

.match-sheet-close {
  position: sticky;
  top: 14px;
  float: right;
  z-index: 2;
  width: 42px;
  height: 42px;
  margin: 14px 14px 0 0;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, .08);
  color: #111;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

.match-sheet-content { padding: 18px 22px 30px; }

.match-profile-head {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 18px;
  align-items: center;
  padding: 22px 28px 18px;
}

.match-profile-avatar {
  width: 120px;
  aspect-ratio: 1;
  border-radius: 28px;
  object-fit: cover;
  box-shadow: 0 18px 34px rgba(0, 0, 0, .16);
}

.match-profile-title h2 {
  margin: 0 0 6px;
  font-size: 34px;
  line-height: 1;
  letter-spacing: -.05em;
}

.match-profile-title p { margin: 0; color: var(--match-muted); line-height: 1.45; }

.match-section {
  padding: 18px 28px;
  border-top: 1px solid var(--match-border);
}

.match-section h3 {
  margin: 0 0 12px;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: .1em;
}

.match-place-list {
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.match-place-list li,
.match-review-box {
  padding: 13px 14px;
  border-radius: 18px;
  background: #f7f4ee;
}

.match-place-list strong { display: block; }
.match-place-list small { color: var(--match-muted); }

.match-photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.match-photo-item {
  width: 100%;
  aspect-ratio: 1;
  margin: 0;
  overflow: hidden;
  border-radius: 16px;
  background: #eee;
}

.match-photo-grid img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  background: #eee;
}

.match-photo-grid img.is-broken {
  display: none;
}

.match-profile-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 18px 28px 26px;
}

.match-profile-actions button,
.match-save-btn {
  min-height: 52px;
  border: 0;
  border-radius: 16px;
  font-weight: 950;
  cursor: pointer;
}

.match-profile-actions .coffee,
.match-save-btn { background: var(--match-dark); color: #fff; }
.match-profile-actions .skip { background: #f0ece5; color: #2b2b2b; }

.match-toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 10000;
  transform: translateX(-50%);
  max-width: min(520px, calc(100vw - 28px));
  padding: 13px 16px;
  border-radius: 999px;
  background: #111;
  color: #fff;
  box-shadow: 0 14px 40px rgba(0, 0, 0, .22);
  font-weight: 850;
  text-align: center;
}

.match-settings-shell { width: min(880px, calc(100% - 28px)); }

.match-settings-card {
  padding: clamp(20px, 4vw, 42px);
  border: 1px solid var(--match-border);
  border-radius: 32px;
  background: rgba(255, 255, 255, .78);
  box-shadow: var(--match-shadow);
}

.match-form { display: grid; gap: 16px; margin-top: 24px; }
.match-form label { display: grid; gap: 7px; font-weight: 850; }

.match-form input[type="text"],
.match-form input[type="url"],
.match-form input[type="date"],
.match-form textarea {
  width: 100%;
  border: 1px solid var(--match-border);
  border-radius: 16px;
  padding: 13px 14px;
  background: #fff;
  color: var(--match-text);
  font: inherit;
  outline: none;
}

.match-form input:focus,
.match-form textarea:focus {
  border-color: rgba(255, 120, 71, .6);
  box-shadow: 0 0 0 4px rgba(255, 120, 71, .12);
}

.match-toggle-row {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px;
  border: 1px solid var(--match-border);
  border-radius: 18px;
  background: #fff;
}

.match-toggle-row small { display: block; margin-top: 4px; color: var(--match-muted); font-weight: 600; }
.match-toggle-row input[type="checkbox"] { width: 48px; height: 28px; flex: 0 0 auto; accent-color: var(--match-orange); }

.match-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.match-privacy-box {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 22px;
  background: #f7f4ee;
}

.match-privacy-box h2 { margin: 0 0 4px; font-size: 20px; letter-spacing: -.03em; }
.match-save-btn { width: 100%; }

.match-tabs {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 6px;
  margin: 18px 0;
  border-radius: 18px;
  background: #f0ece5;
}

.match-tabs button {
  border: 0;
  border-radius: 13px;
  min-height: 42px;
  padding: 0 16px;
  background: transparent;
  color: var(--match-muted);
  font-weight: 950;
  cursor: pointer;
}

.match-tabs button.is-active {
  background: #fff;
  color: var(--match-text);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .08);
}

.match-invite-list { display: grid; gap: 12px; }

.match-invite-card {
  display: grid;
  grid-template-columns: 70px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--match-border);
  border-radius: 22px;
  background: #fff;
}

.match-invite-card img {
  width: 70px;
  aspect-ratio: 1;
  border-radius: 18px;
  object-fit: cover;
  background: #eee;
}

.match-invite-card h3 { margin: 0 0 4px; font-size: 18px; }
.match-invite-card p { margin: 0; color: var(--match-muted); line-height: 1.35; }

.match-invite-status {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  background: #f0ece5;
  color: var(--match-muted);
  font-weight: 900;
  font-size: 12px;
  text-transform: uppercase;
}

.match-invite-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.match-invite-actions button { min-height: 38px; border: 0; border-radius: 999px; padding: 0 12px; font-weight: 950; cursor: pointer; }
.match-invite-actions .accept { background: #ddffe9; color: #14653f; }
.match-invite-actions .reject,
.match-invite-actions .cancel { background: #ffe6e6; color: #9d2626; }

.match-embed {
  width: min(900px, calc(100% - 24px));
  margin: 32px auto;
  padding: 24px;
  border: 1px solid rgba(21, 21, 21, .08);
  border-radius: 34px;
  background:
    radial-gradient(circle at top left, rgba(255, 120, 71, .16), transparent 28rem),
    radial-gradient(circle at bottom right, rgba(31, 143, 98, .14), transparent 24rem),
    #f8f4ec;
  box-shadow: 0 22px 70px rgba(0, 0, 0, .10);
  position: relative;
  z-index: 3;
  overflow: visible;
}

.match-embed-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
  margin-bottom: 18px;
}

.match-embed-head h2 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(30px, 5vw, 58px);
  line-height: .95;
  letter-spacing: -.07em;
}

.match-embed-head p:not(.match-kicker) {
  max-width: 720px;
  margin: 12px 0 0;
  color: var(--match-muted);
  font-size: 16px;
  line-height: 1.5;
}

.match-embed-links { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.match-embed .match-card-stack { height: min(620px, calc(100vh - 260px)); min-height: 500px; }

@media (max-width: 760px) {
  .match-shell,
  .match-settings-shell { width: min(100% - 18px, 1120px); padding-top: 8px; }
  .match-topbar { align-items: flex-start; }
  .match-nav { flex-wrap: wrap; justify-content: flex-end; }
  .match-hero { margin-bottom: 14px; }
  .match-hero p { font-size: 14px; }
  .match-stage { width: min(100%, calc(100vw - 18px)); }
  .match-card-stack { min-height: 500px; height: min(560px, calc(100vh - 230px)); }
  .match-card-content { padding: 22px 18px 128px; }
  .match-card-name { font-size: 32px; }
  .match-age { font-size: 19px; }
  .match-headline { font-size: 16px; }
  .match-actions { left: 10px; right: 10px; bottom: 12px; grid-template-columns: 1fr 1fr 1fr; gap: 6px; padding: 7px; border-radius: 22px; }
  .match-action { min-height: 50px; padding: 8px 5px; font-size: 12px; border-radius: 16px; }
  .match-card-photo-placeholder span { width: 122px; height: 122px; border-radius: 34px; font-size: 46px; }
  .match-profile-head { grid-template-columns: 86px 1fr; padding: 20px 18px 14px; }
  .match-profile-avatar { width: 86px; border-radius: 22px; }
  .match-profile-title h2 { font-size: 28px; }
  .match-section { padding: 16px 18px; }
  .match-profile-actions { padding: 16px 18px 24px; grid-template-columns: 1fr; }
  .match-photo-grid { grid-template-columns: repeat(2, 1fr); }
  .match-grid-2 { grid-template-columns: 1fr; }
  .match-toggle-row { align-items: flex-start; }
  .match-invite-card { grid-template-columns: 54px 1fr; }
  .match-invite-card img { width: 54px; border-radius: 15px; }
  .match-invite-actions { grid-column: 1 / -1; justify-content: stretch; }
  .match-invite-actions button { flex: 1; }
  .match-embed { width: calc(100% - 18px); padding: 16px; border-radius: 26px; margin: 20px auto 120px; }
  .match-embed-head { grid-template-columns: 1fr; }
  .match-embed-links { justify-content: flex-start; }
  .match-embed .match-card-stack { min-height: 500px; height: min(560px, calc(100vh - 240px)); }
}

@media (max-width: 430px) {
  .match-embed { width: 100%; padding: 14px; border-left: 0; border-right: 0; border-radius: 0; }
  .match-embed-head h2 { font-size: 36px; }
  .match-embed-head p:not(.match-kicker) { font-size: 15px; }
  .match-card-stack { min-height: 500px; height: 540px; }
  .match-card-content { padding: 20px 16px 124px; }
  .match-card-name { font-size: 30px; }
  .match-actions { left: 8px; right: 8px; bottom: 10px; gap: 5px; padding: 6px; border-radius: 20px; }
  .match-action { min-height: 48px; padding: 7px 4px; font-size: 11px; border-radius: 15px; letter-spacing: -.02em; }
}

@media (max-width: 360px) {
  .match-action { font-size: 10.5px; min-height: 46px; }
  .match-card-name { font-size: 28px; }
}

/* v1.0.6 — Perfil centrado, por encima del menú inferior y sin taparse */
html.match-profile-open,
body.match-profile-open {
  overflow: hidden !important;
  overscroll-behavior: contain;
}

.match-profile-sheet {
  position: fixed !important;
  inset: 0 !important;
  z-index: 2147483000 !important;
  display: grid !important;
  place-items: center !important;
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom)) !important;
}

.match-profile-sheet.is-open {
  opacity: 1 !important;
  pointer-events: auto !important;
}

.match-sheet-backdrop {
  position: fixed !important;
  inset: 0 !important;
  z-index: 0 !important;
  background: rgba(0, 0, 0, .56) !important;
  backdrop-filter: blur(7px) !important;
  -webkit-backdrop-filter: blur(7px) !important;
}

.match-sheet-panel {
  position: relative !important;
  left: auto !important;
  right: auto !important;
  top: auto !important;
  bottom: auto !important;
  z-index: 2 !important;
  width: min(640px, calc(100vw - 32px)) !important;
  max-height: min(760px, calc(100dvh - 42px)) !important;
  overflow: auto !important;
  -webkit-overflow-scrolling: touch !important;
  overscroll-behavior: contain !important;
  transform: translateY(14px) scale(.985) !important;
  border-radius: 30px !important;
  background: #fff !important;
  box-shadow: 0 34px 120px rgba(0, 0, 0, .36) !important;
}

.match-profile-sheet.is-open .match-sheet-panel {
  transform: translateY(0) scale(1) !important;
}

.match-sheet-close {
  position: sticky !important;
  top: 12px !important;
  float: right !important;
  z-index: 5 !important;
  width: 42px !important;
  height: 42px !important;
  margin: 12px 12px 0 0 !important;
  background: rgba(255, 255, 255, .92) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .12) !important;
}

.match-sheet-content {
  padding: 18px 22px 34px !important;
}

.match-profile-head {
  padding-top: 20px !important;
}

.match-profile-actions {
  position: sticky;
  bottom: 0;
  z-index: 3;
  padding: 14px 28px 18px !important;
  background: linear-gradient(to top, #fff 72%, rgba(255,255,255,0));
}

.match-profile-actions button {
  min-height: 54px !important;
}

@media (max-width: 760px) {
  .match-profile-sheet {
    align-items: start !important;
    padding: max(14px, env(safe-area-inset-top)) 10px max(96px, calc(env(safe-area-inset-bottom) + 92px)) !important;
  }

  .match-sheet-panel {
    width: calc(100vw - 20px) !important;
    max-height: calc(100dvh - 118px) !important;
    border-radius: 26px !important;
    margin-top: 6px !important;
  }

  .match-sheet-content {
    padding: 14px 14px 26px !important;
  }

  .match-profile-head {
    grid-template-columns: 74px 1fr !important;
    gap: 13px !important;
    padding: 18px 18px 14px !important;
  }

  .match-profile-avatar {
    width: 74px !important;
    border-radius: 20px !important;
  }

  .match-profile-title h2 {
    font-size: 24px !important;
    line-height: 1.05 !important;
  }

  .match-section {
    padding: 14px 18px !important;
  }

  .match-profile-actions {
    grid-template-columns: 1fr 1fr !important;
    padding: 12px 18px 16px !important;
    gap: 8px !important;
  }

  .match-profile-actions button {
    min-height: 48px !important;
    font-size: 13px !important;
    border-radius: 15px !important;
  }
}

@media (max-width: 390px) {
  .match-profile-sheet {
    padding-left: 8px !important;
    padding-right: 8px !important;
  }

  .match-sheet-panel {
    width: calc(100vw - 16px) !important;
  }

  .match-profile-actions button {
    font-size: 12px !important;
  }
}

/* v1.0.8 — invitaciones: botón para ver perfil desde la lista/mail */
.match-invite-actions a.profile {
  min-height: 38px;
  border: 0;
  border-radius: 999px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff7cf;
  color: #6e5100;
  font-weight: 950;
  text-decoration: none;
}

@media (max-width: 720px) {
  .match-invite-actions a.profile {
    flex: 1;
  }
}

/* v1.1.0 — Badge rojo de notificaciones Match */
.match-link-with-badge,
.match-invite-with-badge {
  position: relative;
  overflow: visible !important;
}

.match-notification-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #ef1d2f;
  color: #fff;
  border: 2px solid #fff;
  box-shadow: 0 8px 22px rgba(239, 29, 47, .35);
  font-size: 11px;
  line-height: 1;
  font-weight: 950;
  letter-spacing: -.02em;
  z-index: 30;
}

.match-notification-badge[hidden] {
  display: none !important;
}

@media (max-width: 760px) {
  .match-notification-badge {
    top: -7px;
    right: -7px;
    min-width: 21px;
    height: 21px;
    font-size: 10.5px;
  }
}

/* v1.1.1 — páginas standalone usando header/footer de la app */
.match-standalone-page .match-standalone-content {
  padding-top: 28px;
  padding-bottom: 120px;
}

.match-card-topline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
}

.match-local-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.match-local-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid rgba(21, 21, 21, .11);
  border-radius: 999px;
  background: rgba(255,255,255,.88);
  color: var(--match-text);
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(0,0,0,.05);
}

.match-invite-actions .profile,
.match-invite-actions a.profile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 0;
  border-radius: 999px;
  padding: 0 12px;
  background: #f0ece5;
  color: #2b2b2b;
  font-weight: 950;
  text-decoration: none;
  cursor: pointer;
}

.match-invite-actions .profile:hover,
.match-local-nav a:hover {
  transform: translateY(-1px);
}

.match-invite-avatar-fallback {
  width: 70px;
  aspect-ratio: 1;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #d01864, #ff7847);
  color: #fff;
  font-size: 28px;
  font-weight: 950;
  letter-spacing: -.06em;
}

.match-profile-avatar-fallback {
  width: 120px;
  aspect-ratio: 1;
  border-radius: 28px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #d01864, #ff7847);
  color: #fff;
  font-size: 42px;
  font-weight: 950;
  letter-spacing: -.06em;
  box-shadow: 0 18px 34px rgba(0, 0, 0, .16);
}

.match-profile-actions-single {
  grid-template-columns: 1fr;
}

.match-profile-actions-single .skip {
  background: var(--match-dark);
  color: #fff;
}

@media (max-width: 760px) {
  .match-standalone-page .match-standalone-content {
    padding-top: 16px;
    padding-bottom: 130px;
  }

  .match-card-topline {
    grid-template-columns: 1fr;
  }

  .match-local-nav {
    justify-content: flex-start;
  }

  .match-invite-card {
    grid-template-columns: 54px 1fr;
  }

  .match-invite-avatar-fallback {
    width: 54px;
    border-radius: 15px;
    font-size: 22px;
  }

  .match-invite-actions {
    grid-column: 1 / -1;
    justify-content: stretch;
  }

  .match-invite-actions .profile,
  .match-invite-actions button,
  .match-invite-actions a.profile {
    flex: 1 1 0;
  }

  .match-profile-avatar-fallback {
    width: 86px;
    border-radius: 22px;
    font-size: 32px;
  }
}

/* v1.1.5 — Panel de gestión de notificaciones Match */
.match-admin-shell {
  width: min(1180px, calc(100% - 28px));
}

.match-admin-card {
  overflow: visible;
}

.match-card-topline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 18px;
}

.match-local-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.match-local-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(21,21,21,.11);
  background: rgba(255,255,255,.88);
  color: var(--match-text);
  font-weight: 850;
  text-decoration: none;
}

.match-admin-token-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  padding: 14px;
  margin: 22px 0;
  border-radius: 22px;
  background: #f7f4ee;
  border: 1px solid var(--match-border);
}

.match-admin-token-box label {
  display: grid;
  gap: 7px;
  font-weight: 850;
}

.match-admin-token-box input,
.match-form select,
.match-form input[type="search"],
.match-form input[type="email"],
.match-form input[type="number"] {
  width: 100%;
  border: 1px solid var(--match-border);
  border-radius: 16px;
  padding: 13px 14px;
  background: #fff;
  color: var(--match-text);
  font: inherit;
  outline: none;
}

.match-admin-token-box small {
  grid-column: 1 / -1;
  color: var(--match-muted);
}

.match-admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr);
  gap: 16px;
  align-items: start;
}

.match-admin-panel {
  padding: 18px;
  border: 1px solid var(--match-border);
  border-radius: 24px;
  background: rgba(255,255,255,.78);
}

.match-admin-panel.full {
  margin-top: 16px;
}

.match-admin-panel h2 {
  margin: 0 0 8px;
  font-size: 22px;
  letter-spacing: -.04em;
}

.match-form.compact {
  gap: 12px;
  margin-top: 14px;
}

.match-admin-search-row,
.match-admin-actions-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.match-admin-search-row button,
.match-admin-actions-row button,
.match-admin-user-option,
.match-invite-actions .profile {
  min-height: 44px;
  border: 0;
  border-radius: 15px;
  padding: 0 14px;
  background: var(--match-dark);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}

.match-admin-actions-row .danger {
  background: var(--match-orange);
}

.match-admin-user-results {
  display: grid;
  gap: 8px;
  max-height: 310px;
  overflow: auto;
  padding-right: 4px;
}

.match-admin-user-option {
  width: 100%;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 10px;
  align-items: center;
  min-height: 58px;
  padding: 8px;
  background: #fff;
  color: var(--match-text);
  text-align: left;
  border: 1px solid var(--match-border);
}

.match-admin-user-option img,
.match-admin-user-option span {
  grid-row: 1 / span 2;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  object-fit: cover;
  background: #f0ece5;
  display: grid;
  place-items: center;
  font-weight: 950;
  color: var(--match-orange);
}

.match-admin-user-option strong,
.match-admin-user-option small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.match-admin-user-option small {
  color: var(--match-muted);
}

.match-admin-status {
  margin-top: 14px;
  padding: 13px 14px;
  border-radius: 18px;
  background: #f7f4ee;
  color: var(--match-muted);
  line-height: 1.5;
}

.match-admin-table-wrap {
  width: 100%;
  overflow: auto;
}

.match-admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.match-admin-table th,
.match-admin-table td {
  padding: 10px 9px;
  border-bottom: 1px solid var(--match-border);
  text-align: left;
  vertical-align: top;
}

.match-admin-table th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--match-muted);
}

.match-admin-pill {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  background: #f0ece5;
  color: var(--match-muted);
  font-size: 12px;
  font-weight: 900;
}

.match-admin-pill.enviado {
  background: #ddffe9;
  color: #14653f;
}

.match-admin-pill.pendiente,
.match-admin-pill.error {
  background: #fff3d0;
  color: #805c00;
}

.match-admin-output {
  max-height: 420px;
  overflow: auto;
  padding: 14px;
  border-radius: 18px;
  background: #111;
  color: #f6f3ee;
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.match-admin-empty {
  padding: 12px;
  border-radius: 16px;
  background: #f7f4ee;
  color: var(--match-muted);
}

@media (max-width: 860px) {
  .match-card-topline,
  .match-admin-grid,
  .match-admin-token-box,
  .match-admin-search-row,
  .match-admin-actions-row {
    grid-template-columns: 1fr;
  }

  .match-local-nav {
    justify-content: flex-start;
  }

  .match-admin-shell {
    width: min(100% - 18px, 1180px);
  }
}


/* v1.1.6 — Botón de mensajería real dentro de invitaciones Match */
.match-invite-actions .message,
.match-profile-message-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 0;
  border-radius: 999px;
  padding: 0 12px;
  background: #111111;
  color: #ffffff !important;
  font-weight: 950;
  text-decoration: none;
  cursor: pointer;
}

.match-profile-actions a.match-profile-message-link {
  min-height: 52px;
  border-radius: 16px;
}

.match-invite-actions .message:hover,
.match-profile-message-link:hover {
  transform: translateY(-1px);
  opacity: .92;
}

@media (max-width: 720px) {
  .match-invite-actions .message,
  .match-invite-actions .profile,
  .match-invite-actions button,
  .match-invite-actions a.profile {
    flex: 1;
  }
}

/* v1.1.7 — Estado real de invitación dentro del perfil Match */
.match-relation-notice {
  margin: 0 28px 14px;
  padding: 13px 15px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 650;
}

.match-relation-notice strong {
  font-weight: 950;
}

.match-relation-notice.is-accepted {
  background: #ddffe9;
  color: #0e673d;
}

.match-relation-notice.is-pending {
  background: #fff7cf;
  color: #6e5100;
}

.match-relation-notice.is-muted {
  background: #f0ece5;
  color: #6f6a63;
}

.match-profile-actions.match-profile-actions-3 {
  grid-template-columns: 1fr 1fr 1fr;
}

.match-profile-actions a.match-profile-message-link,
.match-profile-actions .coffee,
.match-profile-actions .skip {
  text-align: center;
}

@media (max-width: 720px) {
  .match-relation-notice {
    margin: 0 18px 12px;
  }

  .match-profile-actions.match-profile-actions-3 {
    grid-template-columns: 1fr;
  }
}
