.wallet-card-context-extras {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 5px 7px;
  pointer-events: auto;
}

.wallet-card-location-address {
  flex: 1 1 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(255,255,255,.76);
  font-size: 9px;
  line-height: 1.2;
  font-weight: 700;
  text-align: center;
}

.wallet-card-map-action,
.wallet-card-event-weather {
  min-height: 27px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 9px;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 999px;
  background: rgba(2,6,23,.13);
  color: #FFFFFF;
  font: 800 9.5px/1 var(--font-family);
  white-space: nowrap;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.wallet-card-map-action {
  cursor: pointer;
}

.wallet-card-map-action:active {
  transform: scale(.97);
  background: rgba(2,6,23,.20);
}

.wallet-card-map-action:focus-visible {
  outline: 2px solid rgba(255,255,255,.92);
  outline-offset: 2px;
}

.wallet-card-event-weather {
  pointer-events: none;
}

.wallet-gallery-calendar-day[role="button"] {
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: background 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.wallet-gallery-calendar-day[role="button"]:active {
  transform: scale(.94);
  background: rgba(15,118,110,.08);
}

.wallet-gallery-calendar-day[role="button"]:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px rgba(15,118,110,.48), 0 0 0 2px rgba(255,255,255,.94);
}

.wallet-gallery-calendar-day.is-calendar-selected {
  background: rgba(15,118,110,.10);
  box-shadow: inset 0 0 0 1.5px rgba(15,118,110,.38);
  color: #0F766E;
}

/* Active-card presentation tuning: keep content legible and move utility controls
   visually outside the document card without changing their archive/edit behavior. */
.wallet-gallery-main-item {
  padding-bottom: 42px;
}

.wallet-gallery-main .wallet-document-card {
  overflow: visible;
  grid-template-rows: auto auto minmax(0,1fr) auto auto;
  row-gap: 8px;
  padding: 18px 21px 16px;
}

.wallet-gallery-main .wallet-document-card::before {
  border-radius: inherit;
}

.wallet-gallery-main .wallet-document-card::after {
  top: 0;
  height: 42px;
  filter: blur(6px);
  opacity: .42;
}

.wallet-gallery-main .wallet-card-top {
  min-height: 31px;
  align-items: center;
  justify-content: flex-start;
}

.wallet-gallery-main .wallet-card-inserted {
  display: none;
}

.wallet-gallery-main .wallet-card-emoji {
  font-size: 31px;
}

.wallet-gallery-main .wallet-card-title {
  font-size: 24px;
  line-height: 1.08;
  letter-spacing: -.03em;
}

.wallet-gallery-main .wallet-card-details {
  align-content: center;
  gap: 8px;
}

.wallet-gallery-main .wallet-card-detail-row {
  grid-template-columns: 48px minmax(0,1fr);
  align-items: baseline;
  gap: 9px;
}

.wallet-gallery-main .wallet-card-detail-row > span {
  color: rgba(255,255,255,.68);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .055em;
}

.wallet-gallery-main .wallet-card-detail-row > strong {
  font-size: 13px;
  line-height: 1.22;
  font-weight: 850;
}

.wallet-gallery-main .wallet-card-detail-row-date > strong {
  font-size: 15px;
  font-weight: 900;
  letter-spacing: -.012em;
}

.wallet-gallery-main .wallet-card-detail-copy {
  margin: 0 0 0 57px;
  color: rgba(255,255,255,.88);
  font-size: 10.5px;
  line-height: 1.3;
}

.wallet-gallery-main .wallet-card-event-links {
  display: none;
}

.wallet-gallery-main .wallet-card-context-extras {
  justify-content: flex-start;
  gap: 6px;
  padding-left: 57px;
}

.wallet-gallery-main .wallet-card-location-address {
  flex-basis: 100%;
  padding: 0;
  color: rgba(255,255,255,.72);
  font-size: 9px;
  line-height: 1.25;
  text-align: left;
}

.wallet-gallery-main .wallet-card-map-action,
.wallet-gallery-main .wallet-card-event-weather {
  min-height: 28px;
  padding-inline: 10px;
  font-size: 9.5px;
  background: rgba(2,6,23,.12);
}

.wallet-gallery-main .wallet-card-open-hint {
  margin-top: 1px;
  color: rgba(255,255,255,.70);
  font-size: 9px;
  font-weight: 700;
}

.wallet-gallery-main .wallet-card-actions {
  position: absolute;
  z-index: 8;
  top: calc(100% + 9px);
  left: 0;
  right: 0;
  width: 100%;
  min-height: 34px;
  padding: 0 4px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.wallet-gallery-main .wallet-document-edit,
.wallet-gallery-main .wallet-document-archive {
  min-height: 32px;
  padding: 0 11px;
  border-radius: 11px;
  font-size: 10.5px;
  box-shadow: none;
}

.wallet-gallery-main .wallet-document-archive {
  border-color: transparent;
  background: transparent;
  color: #64748B;
}

.wallet-gallery-main .wallet-document-edit {
  border: 1px solid rgba(15,118,110,.20);
  background: rgba(255,255,255,.96);
  color: #0F766E;
  box-shadow: 0 6px 16px rgba(15,23,42,.07);
}

.wallet-gallery-main .wallet-document-edit:focus-visible,
.wallet-gallery-main .wallet-document-archive:focus-visible {
  outline: 2px solid rgba(15,118,110,.46);
  outline-offset: 2px;
}

@media (max-width: 390px), (max-height: 760px) {
  .wallet-card-context-extras {
    gap: 4px 6px;
  }

  .wallet-card-location-address {
    font-size: 8.5px;
  }

  .wallet-card-map-action,
  .wallet-card-event-weather {
    min-height: 25px;
    padding-inline: 8px;
    font-size: 9px;
  }

  .wallet-gallery-main-item {
    padding-bottom: 38px;
  }

  .wallet-gallery-main .wallet-document-card {
    row-gap: 6px;
    padding: 16px 18px 14px;
  }

  .wallet-gallery-main .wallet-card-emoji {
    font-size: 28px;
  }

  .wallet-gallery-main .wallet-card-title {
    font-size: 22px;
  }

  .wallet-gallery-main .wallet-card-detail-row {
    grid-template-columns: 44px minmax(0,1fr);
    gap: 7px;
  }

  .wallet-gallery-main .wallet-card-detail-copy {
    margin-left: 51px;
  }

  .wallet-gallery-main .wallet-card-context-extras {
    padding-left: 51px;
    gap: 5px;
  }

  .wallet-gallery-main .wallet-card-map-action,
  .wallet-gallery-main .wallet-card-event-weather {
    min-height: 25px;
    padding-inline: 8px;
    font-size: 9px;
  }

  .wallet-gallery-main .wallet-card-actions {
    top: calc(100% + 7px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .wallet-gallery-calendar-day[role="button"] {
    transition: none !important;
  }
}
