/* MAP_SCREEN MCP VISUAL */
.map-bg {
  position: absolute;
  top: 0;
  left: -7.04%;
  width: 114.08%;
  height: 101.15%;
  object-fit: fill;
  z-index: 1;
  pointer-events: none;
  user-select: none;
}

.real-map {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: #F9F3EC;
  overflow: hidden;
}

.real-map.is-adding-sticker {
  cursor: crosshair;
}

.map-pin {
  position: absolute;
  user-select: none;
  -webkit-user-drag: none;
}

.map-pin {
  transform: translate(-50%, -50%);
  z-index: 2;
}

.geoapify-map-pin {
  position: static;
  display: block;
  transform: none;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: auto;
}

.real-map .maplibregl-marker {
  will-change: transform;
  z-index: 4;
}

.real-map.maplibregl-map {
  font-family: 'IBM Plex Mono', monospace;
  background: #F9F3EC;
}

.real-map .maplibregl-ctrl-attrib {
  font-size: 0.58rem;
  color: #54142c;
  background: rgba(249, 243, 236, 0.72);
  backdrop-filter: blur(6px);
}

.real-map .maplibregl-ctrl-attrib a {
  color: #54142c;
}

.real-map .maplibregl-ctrl-zoom-in,
.real-map .maplibregl-ctrl-zoom-out,
.real-map .maplibregl-ctrl-compass {
  display: none !important;
}

.sticker-map-popup .maplibregl-popup-content {
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 30px rgba(0,0,0,0.22);
  padding: 10px;
}

.sticker-map-popup .maplibregl-popup-tip {
  border-top-color: rgba(255, 255, 255, 0.96);
  border-bottom-color: rgba(255, 255, 255, 0.96);
}

.user-location-marker {
  width: 34px;
  height: 33px;
  filter: none;
  pointer-events: none;
}

.sticker-location-marker {
  width: 34px;
  height: 33px;
  filter: drop-shadow(0 5px 10px rgba(0,0,0,0.24));
  cursor: pointer;
}

.search-result-marker {
  width: 34px;
  height: 33px;
  filter: drop-shadow(0 5px 10px rgba(0,0,0,0.24));
  cursor: pointer;
}

.partner-location-marker {
  width: 38px;
  height: 38px;
  object-fit: contain;
  filter: drop-shadow(0 5px 10px rgba(0,0,0,0.22));
  cursor: pointer;
}

.event-location-marker {
  width: 36px;
  height: 36px;
  object-fit: contain;
  filter: drop-shadow(0 5px 10px rgba(245,92,176,0.26));
  cursor: pointer;
}

.map-popup {
  position: absolute;
  z-index: 3;
  transform: translate(-50%, calc(-100% - 22px));
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 30px rgba(0,0,0,0.22);
  padding: 10px;
  pointer-events: auto;
}

.sticker-popup {
  min-width: 150px;
  color: #142117;
}

.sticker-popup strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.sticker-popup img {
  display: block;
  width: 150px;
  height: 110px;
  object-fit: cover;
  border-radius: 8px;
}

.partner-popup em {
  display: block;
  margin-top: 8px;
  color: #ff83bd;
  font-style: normal;
  font-size: 0.86rem;
}

.map-add-hint {
  position: absolute;
  left: 50%;
  bottom: calc(2.45dvh + 86px);
  transform: translateX(-50%) translateY(10px);
  z-index: 9;
  width: min(86%, 360px);
  padding: 12px 16px;
  border: 1px solid rgba(255,255,255,0.46);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.42);
  color: #F2F8E3;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.95rem;
  font-weight: 400;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.map-add-hint.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.location-permission-btn {
  position: absolute;
  left: 50%;
  bottom: calc(2.45dvh + 140px);
  transform: translateX(-50%) translateY(8px);
  z-index: 12;
  width: min(72%, 280px);
  min-height: 42px;
  border: 1px solid rgba(255,140,197, 0.9);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(245, 92, 176, 0.78), rgba(242, 248, 227, 0.68), rgba(139, 218, 250, 0.78));
  color: #d33d3d;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.92rem;
  font-weight: 700;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 8px 22px rgba(245, 92, 176, 0.2);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.location-permission-btn.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

/* ====================================================
   APP OPENING ANIMATION
   ==================================================== */
.app-opening-overlay {
  position: fixed;
  top: var(--app-top);
  left: var(--app-left);
  width: var(--app-width);
  height: var(--app-height);
  z-index: 100;
  overflow: hidden;
  pointer-events: auto;
  background: linear-gradient(180deg, #F9F3EC 0%, #DFF4ED 52%, #8BDAFA 100%);
  animation: openingOverlayExit .22s ease 1.18s forwards;
}

.opening-sticker-field {
  position: absolute;
  inset: 0;
  overflow: hidden;
  transform: translateZ(0);
}

.opening-sticker {
  position: absolute;
  left: var(--sticker-left);
  top: var(--sticker-top);
  width: var(--sticker-size);
  transform: translate3d(-50%, -170vh, 0) rotate(var(--sticker-rotate-start)) scale(0.86);
  opacity: 0;
  will-change: transform, opacity;
  filter: drop-shadow(0 12px 18px rgba(84,20,44, 0.16));
  user-select: none;
  pointer-events: none;
  animation: openingStickerFall .68s cubic-bezier(.2,.8,.2,1) var(--sticker-delay) forwards;
}

.opening-logo {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  width: 76%;
  max-width: 352px;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.72);
  filter: drop-shadow(0 18px 34px rgba(84,20,44, 0.24));
  user-select: none;
  pointer-events: none;
  will-change: transform, opacity, top, width;
  animation: openingLogoTravel 1.7s cubic-bezier(.2,.92,.25,1) 4.5s forwards;
}

@keyframes openingStickerFall {
  0% {
    opacity: 0;
    transform: translate3d(-50%, -170vh, 0) rotate(var(--sticker-rotate-start)) scale(0.86);
  }
  78% {
    opacity: 1;
    transform: translate3d(-50%, 2.2vh, 0) rotate(var(--sticker-rotate-end)) scale(1.035);
  }
  100% {
    opacity: 1;
    transform: translate3d(-50%, 0, 0) rotate(var(--sticker-rotate-end)) scale(1);
  }
}

@keyframes openingLogoTravel {
  0% {
    opacity: 0;
    top: 50%;
    left: 50%;
    width: 76%;
    transform: translate(-50%, -50%) scale(0.72);
  }
  28% {
    opacity: 1;
    top: 50%;
    left: 50%;
    width: 76%;
    transform: translate(-50%, -50%) scale(1.08);
  }
  48% {
    opacity: 1;
    top: 50%;
    left: 50%;
    width: 76%;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 1;
    top: 8.23%;
    left: 50%;
    width: 72.5%;
    transform: translateX(-50%) scale(1);
  }
}

@keyframes openingOverlayExit {
  to {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-opening-overlay {
    animation-duration: 0.18s;
    animation-delay: 0.8s;
  }

  .opening-sticker,
  .opening-logo {
    animation-duration: 0.01ms;
    animation-delay: 0s;
  }
}

.map-logo {
  position: absolute;
  top: 40px;
  left: 50%;
  transform: translateX(-50%);
  width: 180px;
  z-index: 2;
  filter: drop-shadow(0 4px 16px #0004);
}
.map-glow-green {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 47.45%;
  z-index: 2;
  background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(229,248,255,0.2) 50%, rgba(247,255,237,1) 100%);
  pointer-events: none;
}

.map-glow-top {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 34%;
  z-index: 2;
  background: linear-gradient(0deg, rgba(255,255,255,0) 0%, rgba(229,248,255,0.2) 48%, rgba(247,255,237,1) 100%);
  pointer-events: none;
}

.ocp-top-badge {
  position: absolute;
  top: 8.23%;
  left: 50%;
  transform: translateX(-50%);
  width: 72.5%;
  max-width: 337px;
  z-index: 5;
  filter: none;
  pointer-events: none;
  user-select: none;
  transition: opacity 0.18s ease;
}

#screen-map.search-active .ocp-top-badge {
  opacity: 0;
}

#screen-map.search-active .map-search-toggle {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.map-search-toggle {
  position: absolute;
  top: calc(8.23% + min(72.5vw, 337px) * 0.162);
  left: calc(50% - min(72.5vw, 337px) * 0.327);
  width: min(6.8vw, 31px);
  height: auto;
  aspect-ratio: 1 / 1;
  transform: translate(-50%, -50%);
  z-index: 12;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  display: block;
  opacity: 1;
  transition: opacity 0.16s ease, visibility 0.16s ease;
}

.map-search-toggle img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.map-search-form {
  position: absolute;
  top: 8.4%;
  left: 50%;
  z-index: 8;
  width: min(78%, 360px);
  transform: translateX(-50%) translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.map-search-form.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.map-search-form input {
  width: 100%;
  height: 44px;
  border: 1px solid rgba(255,140,197, 0.86);
  border-radius: 999px;
  padding: 0 18px;
  background: rgba(255, 254, 246, 0.78);
  color: #54142c;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.98rem;
  outline: none;
  box-shadow: 0 8px 22px rgba(84,20,44, 0.18), inset 0 1px 0 rgba(255,255,255,0.5);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.map-search-suggestions {
  display: grid;
  gap: 7px;
  margin-top: 9px;
}

.search-suggestion {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "type title"
    "type detail";
  column-gap: 10px;
  width: 100%;
  border: 1px solid rgba(255,140,197, 0.58);
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(255, 254, 246, 0.82);
  color: #54142c;
  text-align: left;
  font-family: 'IBM Plex Mono', monospace;
  cursor: pointer;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.search-suggestion.is-empty {
  display: block;
  color: rgba(84,20,44, 0.72);
  cursor: default;
}

.search-suggestion.is-contact-finder {
  border-style: solid;
  border-color: rgba(245, 92, 176, 0.72);
  background: rgba(255, 254, 246, 0.88);
}

.search-suggestion.is-contact-finder .suggestion-type {
  color: #ff83bd;
}

.suggestion-type {
  grid-area: type;
  align-self: center;
  min-width: 50px;
  color: #ff83bd;
  font-size: 0.72rem;
}

.search-suggestion strong {
  grid-area: title;
  font-size: 0.94rem;
  font-weight: 400;
}

.search-suggestion small {
  grid-area: detail;
  color: rgba(84,20,44, 0.72);
  font-size: 0.78rem;
}

.map-event-popup {
  position: absolute;
  left: 50%;
  bottom: calc(112px + env(safe-area-inset-bottom));
  width: min(90vw, 520px);
  max-width: min(90vw, 520px);
  height: clamp(40px, 10.4vw, 58px);
  z-index: 9;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transform: translateX(-50%);
  color: #54142c;
  overflow-x: auto;
  overflow-y: hidden;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  pointer-events: auto;
  transition: height 0.24s ease, bottom 0.24s ease;
  box-sizing: border-box;
}

.scan-event-popup {
  z-index: 70;
}

#screen-scan .map-event-popup {
  z-index: 70;
}

.map-event-popup.has-expanded-event {
  bottom: calc(142px + env(safe-area-inset-bottom));
  width: min(90vw, 520px);
  max-width: min(90vw, 520px);
  height: min(56vh, 390px);
  overflow-y: visible;
}

.map-event-popup.has-invite-tray:not(.has-expanded-event) {
  height: clamp(106px, 27vw, 132px);
  overflow: visible;
}

.map-event-popup.has-invite-tray:not(.has-expanded-event) .event-popup-main {
  height: clamp(40px, 10.4vw, 58px);
  overflow: visible;
}

.map-event-popup::-webkit-scrollbar {
  display: none;
}

.map-event-popup[hidden] {
  display: none;
}

.event-popup-main {
  position: relative;
  width: min(43vw, 280px);
  min-width: min(43vw, 280px);
  height: 100%;
  display: grid;
  grid-template-columns: 1fr clamp(24px, 5.3vw, 30px);
  align-items: center;
  gap: clamp(5px, 1.1vw, 9px);
  padding: 0 clamp(20px, 3.6vw, 21px) 0 clamp(59px, 10.4vw, 63px);
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.65);
  box-shadow:
    0 8px 16px rgba(84,20,44,0.1),
    inset 0 1px 0 rgba(255,255,255,0.66);
  scroll-snap-align: start;
  cursor: pointer;
  transition: width 0.24s ease, min-width 0.24s ease, height 0.24s ease, border-radius 0.24s ease, padding 0.24s ease;
  box-sizing: border-box;
}

.event-popup-main::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1.4px solid rgba(84,20,44, 0.58);
  border-radius: inherit;
  pointer-events: none;
}

.event-popup-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-family: 'IBM Plex Mono', monospace;
}

.event-popup-kicker {
  display: block;
  color: rgba(84,20,44, 0.62);
  font-size: clamp(0.38rem, 0.95vw, 0.48rem);
  line-height: 1.05;
  text-transform: uppercase;
  letter-spacing: 0;
}

.event-popup-copy strong {
  display: block;
  margin-top: 1px;
  color: #54142c;
  font-size: clamp(0.78rem, 2.45vw, 1.08rem);
  font-weight: 400;
  line-height: 0.9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: none;
}

.event-popup-copy small {
  display: block;
  margin-top: 2px;
  color: rgba(84,20,44, 0.7);
  font-size: clamp(0.38rem, 1vw, 0.48rem);
  line-height: 1.05;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.event-popup-main.is-expanded {
  width: 100%;
  min-width: 100%;
  max-width: 100%;
  height: auto;
  min-height: min(48vh, 330px);
  grid-template-columns: 1fr clamp(30px, 7.2vw, 38px) clamp(28px, 6.8vw, 34px);
  align-content: start;
  align-items: start;
  gap: 10px 12px;
  padding: clamp(18px, 4.2vw, 24px) clamp(16px, 4.4vw, 24px) clamp(18px, 4.8vw, 26px) clamp(16px, 4.4vw, 24px);
  border-radius: clamp(20px, 5.4vw, 30px);
  background: rgba(255, 254, 246, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.event-popup-main.is-expanded .event-popup-copy {
  padding-left: clamp(48px, 10.6vw, 58px);
}

.event-popup-main.is-expanded .event-popup-kicker {
  font-size: clamp(0.48rem, 1.6vw, 0.68rem);
}

.event-popup-main.is-expanded .event-popup-copy strong {
  font-size: clamp(1.18rem, 4.4vw, 1.86rem);
  line-height: 0.98;
  white-space: normal;
  overflow: visible;
}

.event-popup-main.is-expanded .event-popup-copy small {
  font-size: clamp(0.62rem, 2.1vw, 0.84rem);
  white-space: normal;
  overflow: visible;
}

.event-description {
  grid-column: 1 / -1;
  max-height: min(31vh, 206px);
  padding: 0 clamp(2px, 1vw, 6px);
  overflow-y: auto;
  color: #54142c;
  font-family: 'IBM Plex Mono', monospace;
  font-size: clamp(0.72rem, 2.25vw, 0.92rem);
  line-height: 1.22;
  scrollbar-width: thin;
  overflow-wrap: anywhere;
  word-break: normal;
}

.event-description p {
  margin: 0 0 0.68em;
}

.event-description p:last-child {
  margin-bottom: 0;
}

.event-description-link {
  color: #F80000;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.event-popup-main:not(.is-expanded) .event-description {
  display: none;
}

.event-attend-btn {
  position: relative;
  width: clamp(24px, 5.3vw, 30px);
  height: clamp(24px, 5.3vw, 30px);
  display: grid;
  place-items: center;
  border: 1.3px solid rgba(84,20,44, 0.72);
  border-radius: 50%;
  background: rgba(248, 0, 0, 0.75);
  color: transparent;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  box-shadow: none;
  text-shadow: none;
}

.event-popup-main.is-expanded .event-attend-btn {
  width: clamp(30px, 7.2vw, 38px);
  height: clamp(30px, 7.2vw, 38px);
}

.event-close-btn {
  position: relative;
  width: clamp(28px, 6.8vw, 34px);
  height: clamp(28px, 6.8vw, 34px);
  display: grid;
  place-items: center;
  border: 1.2px solid rgba(84,20,44, 0.35);
  border-radius: 50%;
  background: rgba(255, 254, 246, 0.36);
  color: #54142c;
  font-family: 'IBM Plex Mono', monospace;
  font-size: clamp(1rem, 3.6vw, 1.36rem);
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.55);
}

.event-attend-btn.is-going {
  background: rgba(248, 0, 0, 0.75);
  color: transparent;
}

.event-attend-btn::before {
  content: "+";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-family: 'IBM Plex Mono', monospace;
  font-size: clamp(1.15rem, 3.75vw, 1.7rem);
  font-weight: 400;
  line-height: 1;
  transform: none;
  pointer-events: none;
}

.event-friend-row {
  position: absolute;
  top: 50%;
  left: clamp(14px, 3.65vw, 21px);
  width: clamp(24px, 5.8vw, 33px);
  height: clamp(24px, 5.8vw, 33px);
  display: block;
  margin: 0;
  padding: 0;
  transform: translateY(-50%);
  z-index: 1;
}

.event-popup-main.is-expanded .event-friend-row {
  top: clamp(21px, 5.4vw, 31px);
  left: clamp(16px, 4.4vw, 24px);
  transform: none;
}

.event-friend-strip {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  overflow: hidden;
  box-shadow: none;
  cursor: default;
}

.event-avatar {
  width: 100%;
  height: 100%;
  min-width: 100%;
  display: grid;
  place-items: center;
  border: 1.2px solid rgba(84,20,44, 0.58);
  border-radius: 50%;
  background-color: rgba(102, 223, 0, 0.74);
  background-size: cover;
  background-position: center;
  color: #FFFEF6;
  font-family: 'IBM Plex Mono', monospace;
  font-size: clamp(0.68rem, 2.15vw, 0.82rem);
  line-height: 1;
}

.event-empty-friends {
  display: none;
}

.event-invite-btn {
  display: none;
}

.event-invite-tray {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + 10px);
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px;
  border: 1.2px solid rgba(84,20,44, 0.58);
  border-radius: 999px;
  background: rgba(255, 254, 246, 0.78);
  box-shadow: 0 10px 18px rgba(84,20,44,0.14), inset 0 1px 0 rgba(255,255,255,0.66);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  z-index: 4;
  box-sizing: border-box;
}

.event-invite-tray::-webkit-scrollbar {
  display: none;
}

.event-invite-friend {
  min-width: max-content;
  height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(255,140,197, 0.28);
  color: #54142c;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  padding: 3px 10px 3px 3px;
  cursor: pointer;
}

.event-invite-friend .event-avatar {
  width: 28px;
  height: 28px;
  min-width: 28px;
  font-size: 0.68rem;
}

.event-invite-friend span {
  max-width: 112px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-invite-empty {
  color: #54142c;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  padding: 0 8px;
  white-space: nowrap;
}

.event-chat-btn {
  position: absolute;
  right: clamp(12px, 3.2vw, 18px);
  bottom: clamp(10px, 2.8vw, 16px);
  z-index: 3;
  border: 1.2px solid #ff8cc5;
  border-radius: 999px;
  background: rgba(255,254,246,0.74);
  color: #54142c;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.78rem;
  padding: 7px 12px;
  cursor: pointer;
}

.event-popup-main:not(.is-expanded) .event-chat-btn {
  display: none;
}

.map-marker-pin {
  position: absolute;
  top: 71.15%;
  left: 56.9%;
  transform: translate(-50%, -50%);
  width: 6.3%;
  max-width: 30px;
  min-width: 24px;
  z-index: 3;
  filter: none;
  pointer-events: none;
  user-select: none;
}

.map-profile-dot,
.map-profile-hotspot {
  position: absolute;
  top: calc(8.23% + min(72.5vw, 337px) * 0.142);
  left: calc(50% + min(72.5vw, 337px) * 0.327);
  width: min(7.6vw, 35px);
  aspect-ratio: 82 / 84;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.map-profile-dot {
  z-index: 6;
  background: linear-gradient(180deg, #b3f100 0%, #7cdf00 100%);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  border: 2px solid rgba(242, 248, 227, 0.9);
  box-shadow: 0 3px 10px rgba(0,0,0,0.18);
  pointer-events: none;
}

.map-profile-dot.has-profile-notification::after {
  content: "";
  position: absolute;
  right: -2px;
  top: -3px;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(242,248,227,0.96);
  border-radius: 50%;
  background: #F80000;
  box-shadow: 0 2px 8px rgba(248,0,0,0.36);
}

.map-profile-dot.has-message-notification::after {
  background: #eef1f2;
  box-shadow: 0 2px 8px rgba(255,140,197,0.42);
}

.map-profile-hotspot {
  z-index: 7;
  border: 0;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
}

@keyframes shinePulse {
  0% { opacity: 0.7; filter: drop-shadow(0 0 24px #2D9CDBcc); }
  50% { opacity: 1; filter: drop-shadow(0 0 48px #2D9CDBff); }
  100% { opacity: 0.7; filter: drop-shadow(0 0 24px #2D9CDBcc); }
}

.shine-line.pulse {
  animation: shinePulse 1.4s infinite ease-in-out;
}

body.scanner-active .shine-line.pulse {
  animation: shinePulse 1.4s infinite ease-in-out;
  opacity: 0.42;
}

.glass-box {
  background: rgba(177, 177, 177, 0.25);
  border-radius: 22px;
  box-shadow: none;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid #979797;
  padding: 0 18px;
  width: 100%;
  height: 100%;
  min-height: 0;
  box-sizing: border-box;
  margin: 0 auto;
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
}

.glass-box .box-info-text {
  position: static;
  top: auto;
  left: auto;
  width: 100%;
  height: 100%;
  transform: none;
  color: #F2F8E3;
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 400;
  font-size: clamp(0.95rem, 4.15vw, 1.12rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.3;
  letter-spacing: 0;
  pointer-events: none;
  text-shadow: none;
}

.glass-box .box-info-text span {
  display: block;
  white-space: nowrap;
}
/* Login input label sobre a imagem */
.login-label-box {
  position: relative;
  width: 370px;
  max-width: 96vw;
  min-width: 260px;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 24px;
}

.login-label-box .input-bg {
  width: 100%;
  max-width: 440px;
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 2px 16px #0005);
}

.input-label {
  position: absolute;
  top: 28px;
  left: 0;
  width: 100%;
  text-align: center;
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 400;
  font-size: 1.18rem;
  color: #222;
  letter-spacing: 0.01em;
  pointer-events: none;
  z-index: 2;
  text-shadow: 0 2px 8px #fff8, 0 1px 2px #0002;
}

.login-label-box .styled-input {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 90px;
  width: 84%;
  height: 44px;
  z-index: 3;
  background: transparent;
  border: none;
  outline: none;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1.18rem;
  color: #222;
  text-align: center;
  padding: 0 8px;
  font-weight: 400;
  letter-spacing: 0.01em;
  box-shadow: none;
}
:root {
  --neon-border: linear-gradient(to right, #ff0080, #ff8c00, #40ff00, #00f2ff);
  --footer-gradient: linear-gradient(to right, #ff6b00, #a3ff00);
  --app-width: 100vw;
  --app-height: 100vh;
  --app-left: 0px;
  --app-top: 0px;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  min-height: var(--app-height);
  overflow: hidden;
  font-family: Arial, sans-serif;
  background:
    linear-gradient(180deg, rgba(255, 254, 246, 0.92) 0%, #FFFEF6 62%, #FFFEF6 100%);
  touch-action: none;
}

/* Hide overlapping A-frame elements */
.mindar-ui-overlay {
  display: none !important;
}

a-scene {
  position: fixed !important;
  top: var(--app-top) !important;
  left: var(--app-left) !important;
  width: var(--app-width) !important;
  height: var(--app-height) !important;
  z-index: 0;
  background: transparent;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

body.scanner-active a-scene {
  opacity: 1;
  visibility: visible;
  background: transparent;
}

body.scanner-active,
body.scanner-active .ui-layer,
body.scanner-active #screen-scan,
body.scanner-active .app-screen.active-screen {
  background: transparent !important;
}

body.scanner-active #screen-scan::before,
body.scanner-active #screen-scan::after,
body.scanner-active .mindar-ui-overlay,
body.scanner-active .mindar-ui-loading,
body.scanner-active .mindar-ui-scanning,
body.scanner-active .mindar-ui-error {
  background: transparent !important;
  opacity: 0.05 !important;
}

a-scene canvas,
a-scene video {
  width: var(--app-width) !important;
  height: var(--app-height) !important;
  object-fit: cover;
  background: transparent !important;
}

/* Main UI Layer Overlay */
.ui-layer {
  position: fixed;
  top: var(--app-top);
  left: var(--app-left);
  width: var(--app-width);
  height: var(--app-height);
  z-index: 10;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

@media (min-width: 700px) {
  body {
    background: #F9F3EC;
  }

  .ui-layer {
    box-shadow: none;
  }
}

/* Screen Management */
#screens-container {
  flex: 1;
  width: 100%;
  height: 100%;
  position: relative;
}

.app-screen {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.active-screen {
  opacity: 1;
  pointer-events: auto;
}

.hidden-screen {
  opacity: 0;
  pointer-events: none;
  z-index: -1;
}

/* ====================================================
   AUTH SCREENS
   ==================================================== */
.auth-screen {
  --auth-h: var(--app-height);
  background: #ff2028;
  overflow: hidden;
}

.login-bg {
  position: absolute;
  top: 0;
  left: 50%;
  width: auto;
  height: 100%;
  aspect-ratio: 1080 / 1920;
  transform: translateX(-50%);
  object-fit: fill;
  z-index: 1;
  pointer-events: none;
  user-select: none;
}

.auth-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.invisible-input {
  position: absolute;
  left: calc(50% - 444 / 1920 * var(--auth-h));
  width: calc(888 / 1920 * var(--auth-h));
  height: calc(84 / 1920 * var(--auth-h));
  box-sizing: border-box;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #54142c;
  font-family: 'IBM Plex Mono', monospace;
  font-size: clamp(1rem, 3.6vw, 1.25rem);
  font-weight: 400;
  line-height: 1;
  outline: none;
  padding: 0 calc(56 / 1920 * var(--auth-h));
  text-align: left;
  pointer-events: auto;
}

.invisible-input:focus {
  background: transparent;
  box-shadow: none;
}

.invisible-btn {
  position: absolute;
  left: calc(50% - 486 / 1920 * var(--auth-h));
  width: calc(972 / 1920 * var(--auth-h));
  height: calc(165 / 1920 * var(--auth-h));
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
}

.invisible-btn:focus-visible,
.auth-switch-link:focus-visible {
  outline: 3px solid #B9E3F7;
  outline-offset: 3px;
}

.login-fields .field-email {
  top: calc(510 / 1920 * var(--auth-h));
}

.register-fields .field-name {
  top: calc(510 / 1920 * var(--auth-h));
}

.login-fields .field-password {
  top: calc(786 / 1920 * var(--auth-h));
}

.register-fields .field-email {
  top: calc(786 / 1920 * var(--auth-h));
}

.register-fields .field-phone {
  top: calc(1046 / 1920 * var(--auth-h));
}

.register-fields .field-password {
  top: calc(1308 / 1920 * var(--auth-h));
}

.btn-login,
.btn-register {
  top: calc(1706 / 1920 * var(--auth-h));
}

.auth-switch-link {
  position: absolute;
  right: 8%;
  z-index: 3;
  border: 1px solid rgba(255, 247, 223, 0.48);
  background:
    linear-gradient(135deg, rgba(255,255,255,0.42) 0%, rgba(255,254,246,0.2) 35%, rgba(230,0,18,0.08) 64%, rgba(255,254,246,0.28) 100%),
    rgba(255, 254, 246, 0.75);
  color: #54142c;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1;
  border-radius: 999px;
  padding: 11px 16px;
  text-shadow: 0 1px 8px rgba(255,247,223,0.58);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.62),
    inset 0 -10px 18px rgba(84,20,44,0.08),
    0 8px 24px rgba(90,0,10,0.18);
  backdrop-filter: blur(13px) saturate(1.16);
  -webkit-backdrop-filter: blur(13px) saturate(1.16);
  cursor: pointer;
  pointer-events: auto;
}

.forgot-password-link {
  position: absolute;
  left: 50%;
  top: calc(892 / 1920 * var(--auth-h) + 7px);
  transform: translateX(-50%);
  z-index: 3;
  border: 0;
  background: transparent;
  color: #FFFEF6;
  font-family: 'IBM Plex Mono', monospace;
  font-size: clamp(0.92rem, 3.2vw, 1.05rem);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-shadow: 0 2px 10px rgba(90,0,10,0.28);
  cursor: pointer;
  pointer-events: auto;
}

.client-area-link {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  border: 1.2px solid rgba(255,140,197,0.9);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(255,254,246,0.88), rgba(249,243,236,0.74) 48%, rgba(139,218,250,0.36)),
    rgba(255,254,246,0.72);
  color: #54142c;
  font-family: 'IBM Plex Mono', monospace;
  width: min(calc(760 / 1920 * var(--auth-h)), 78vw);
  font-size: clamp(0.78rem, 2.8vw, 0.96rem);
  line-height: 1.12;
  padding: 8px 14px;
  text-align: center;
  text-decoration: none;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.76),
    0 8px 22px rgba(90,0,10,0.18);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
  pointer-events: auto;
}

.login-client-link {
  top: calc(960 / 1920 * var(--auth-h) + 7px);
}

.auth-switch-link::before {
  content: "";
  position: absolute;
  inset: 2px 8px auto;
  height: 38%;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,0.56), rgba(255,247,223,0));
  pointer-events: none;
}

.login-switch {
  top: calc(var(--app-height) * 0.845 - 40.25px);
}

.register-switch {
  top: calc(var(--app-height) * 0.845 - 40.25px);
}

.password-reset-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(20, 18, 18, 0.28);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.password-reset-modal.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.password-reset-card {
  position: relative;
  width: min(86vw, 360px);
  display: grid;
  gap: 12px;
  padding: 24px 20px 20px;
  border: 1.5px solid #ff8cc5;
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.46), rgba(255,254,246,0.16) 46%, rgba(245,92,176,0.16)),
    rgba(255,254,246,0.78);
  color: #54142c;
  font-family: 'IBM Plex Mono', monospace;
  box-shadow: 0 24px 70px rgba(90,0,10,0.24), inset 0 1px 0 rgba(255,255,255,0.62);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
}

.password-reset-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.26);
  color: #54142c;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.password-reset-kicker {
  color: #54142c;
  font-size: 0.82rem;
}

.password-reset-card h2,
.password-reset-card p {
  margin: 0;
}

.password-reset-card h2 {
  font-size: 1.45rem;
  font-weight: 400;
}

.password-reset-card p {
  color: #54142c;
  font-size: 0.95rem;
  line-height: 1.28;
}

.password-reset-card .password-reset-rules {
  color: #ff83bd;
  font-size: 0.82rem;
  line-height: 1.24;
}

.password-reset-input {
  width: 100%;
  height: 44px;
  box-sizing: border-box;
  border: 1.2px solid rgba(255,140,197,0.82);
  border-radius: 999px;
  background: rgba(255,255,255,0.54);
  color: #54142c;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1rem;
  outline: none;
  padding: 0 18px;
}

.password-reset-dev-link {
  color: #54142c;
  font-size: 0.88rem;
  overflow-wrap: anywhere;
}

.password-reset-submit {
  height: 46px;
  border: 1.4px solid #ff8cc5;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(139,218,250,0.95), rgba(255,107,0,0.9) 28%, rgba(255,168,25,0.92) 68%, rgba(157,255,0,0.88));
  color: #FFFEF6;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1rem;
  cursor: pointer;
}

.client-area-modal {
  position: fixed;
  inset: 0;
  z-index: 82;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(20,18,18,0.32);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.client-area-modal.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.client-area-card {
  position: relative;
  width: min(92vw, 420px);
  max-height: min(86vh, 720px);
  overflow-y: auto;
  display: grid;
  gap: 12px;
  padding: 24px 18px 18px;
  border: 1.5px solid #ff8cc5;
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.52), rgba(255,254,246,0.22) 48%, rgba(245,92,176,0.14)),
    rgba(255,254,246,0.78);
  color: #54142c;
  font-family: 'IBM Plex Mono', monospace;
  box-shadow: 0 24px 70px rgba(90,0,10,0.24);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
}

.client-area-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.28);
  color: #54142c;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.client-area-kicker {
  color: #ff83bd;
  font-size: 0.82rem;
}

.client-area-card h2 {
  margin: 0;
  color: #54142c;
  font-size: 1.42rem;
  font-weight: 400;
}

.client-area-intro {
  margin: 0;
  color: #54142c;
  font-size: 0.92rem;
  line-height: 1.32;
}

.client-area-grid {
  display: grid;
  gap: 10px;
}

.client-area-grid label {
  display: grid;
  gap: 5px;
  font-size: 0.78rem;
  color: #54142c;
}

.client-area-grid input,
.client-area-grid select,
.client-area-grid textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1.2px solid rgba(255,140,197,0.82);
  border-radius: 16px;
  background: rgba(255,255,255,0.58);
  color: #54142c;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.96rem;
  outline: none;
  padding: 11px 13px;
}

.client-area-grid textarea {
  resize: vertical;
  min-height: 88px;
}

.client-area-submit {
  height: 46px;
  border: 1.4px solid #ff8cc5;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(139,218,250,0.95), rgba(245,92,176,0.88) 48%, rgba(157,255,0,0.88));
  color: #FFFEF6;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1rem;
  cursor: pointer;
}

.chat-modal {
  position: fixed;
  top: var(--app-top);
  left: var(--app-left);
  width: var(--app-width);
  height: var(--app-height);
  z-index: 84;
  display: grid;
  place-items: center;
  align-items: center;
  justify-items: center;
  padding: 18px;
  box-sizing: border-box;
  background: rgba(20,18,18,0.32);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.chat-modal.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.chat-card {
  position: relative;
  width: min(calc(var(--app-width) - 36px), 520px);
  max-width: min(calc(var(--app-width) - 36px), 520px);
  max-height: min(calc(var(--app-height) - 36px), 640px);
  margin: auto;
  justify-self: center;
  align-self: center;
  display: grid;
  grid-template-rows: auto auto minmax(220px, 1fr) auto;
  gap: 10px;
  padding: 24px 16px 16px;
  border: 1.5px solid #ff8cc5;
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.5), rgba(255,254,246,0.18) 48%, rgba(245,92,176,0.16)),
    rgba(255,254,246,0.82);
  color: #54142c;
  font-family: 'IBM Plex Mono', monospace;
  box-shadow: 0 24px 70px rgba(90,0,10,0.24);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  box-sizing: border-box;
}

.chat-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.28);
  color: #54142c;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.chat-kicker {
  color: #ff83bd;
  font-size: 0.82rem;
}

.chat-card h2 {
  margin: 0;
  color: #54142c;
  font-size: 1.38rem;
  font-weight: 400;
}

.chat-messages {
  min-height: 220px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border: 1.2px solid rgba(255,140,197,0.54);
  border-radius: 16px;
  background: rgba(255,255,255,0.38);
}

.chat-empty {
  margin: auto;
  color: #54142c;
  font-size: 0.9rem;
  text-align: center;
}

.chat-message {
  max-width: 82%;
  align-self: flex-start;
  display: flex;
  align-items: flex-end;
  gap: 7px;
  font-size: 0.9rem;
  line-height: 1.25;
}

.chat-message.is-mine {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.chat-message-avatar {
  width: 28px;
  height: 28px;
  min-width: 28px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1.4px solid #ff8cc5;
  border-radius: 50%;
  background:
    linear-gradient(135deg, rgba(245, 92, 176, 0.42), rgba(157, 255, 0, 0.28)),
    rgba(255,255,255,0.38);
  background-size: cover;
  background-position: center;
  color: #fff;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  line-height: 1;
  box-shadow: 0 4px 10px rgba(84,20,44,0.16);
  cursor: pointer;
}

.chat-message-bubble {
  display: block;
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(255,254,246,0.86);
  color: #54142c;
}

.chat-invite-card small {
  display: block;
  margin-top: 3px;
  color: rgba(84,20,44,0.74);
  font-size: 0.72rem;
}

.chat-invite-actions {
  display: flex;
  gap: 7px;
  margin-top: 8px;
}

.chat-invite-actions button {
  border: 1px solid rgba(84,20,44,0.45);
  border-radius: 999px;
  background: rgba(255,254,246,0.76);
  color: #54142c;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  padding: 5px 9px;
  cursor: pointer;
}

.chat-message.is-mine .chat-message-bubble {
  background: linear-gradient(160deg, rgba(139,218,250,0.9), rgba(245,92,176,0.28));
  color: #54142c;
}

.chat-message strong {
  display: block;
  margin-bottom: 3px;
  color: #54142c;
  font-size: 0.75rem;
  font-weight: 400;
}

.chat-form {
  display: flex;
  gap: 8px;
}

.chat-form input {
  min-width: 0;
  flex: 1;
  border: 1.2px solid rgba(255,140,197,0.82);
  border-radius: 999px;
  background: rgba(255,255,255,0.58);
  color: #54142c;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.96rem;
  outline: none;
  padding: 0 14px;
}

.chat-form button {
  height: 42px;
  border: 1.3px solid #ff8cc5;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(139,218,250,0.95), rgba(245,92,176,0.88) 54%, rgba(157,255,0,0.88));
  color: #FFFEF6;
  font-family: 'IBM Plex Mono', monospace;
  padding: 0 15px;
  cursor: pointer;
}

.friend-request-modal {
  position: fixed;
  inset: 0;
  z-index: 86;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(20,18,18,0.3);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.friend-request-modal.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.friend-request-card {
  position: relative;
  width: min(86vw, 340px);
  display: grid;
  gap: 12px;
  padding: 24px 18px 18px;
  border: 1.5px solid #ff8cc5;
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.5), rgba(255,254,246,0.2) 48%, rgba(245,92,176,0.16)),
    rgba(255,254,246,0.82);
  color: #54142c;
  font-family: 'IBM Plex Mono', monospace;
  box-shadow: 0 24px 70px rgba(90,0,10,0.24);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
}

.friend-request-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.28);
  color: #54142c;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.friend-request-kicker {
  color: #ff83bd;
  font-size: 0.82rem;
}

.friend-request-card h2,
.friend-request-card p {
  margin: 0;
}

.friend-request-card h2 {
  color: #54142c;
  font-size: 1.38rem;
  font-weight: 400;
}

.friend-request-card p {
  color: #54142c;
  font-size: 0.94rem;
  line-height: 1.32;
}

.friend-request-actions {
  display: flex;
  gap: 9px;
}

.friend-request-actions button {
  flex: 1;
  height: 42px;
  border: 1.3px solid #ff8cc5;
  border-radius: 999px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.95rem;
  cursor: pointer;
}

.friend-request-accept {
  background: linear-gradient(180deg, rgba(139,218,250,0.95), rgba(245,92,176,0.88) 54%, rgba(157,255,0,0.88));
  color: #FFFEF6;
}

.friend-request-decline {
  border-style: solid;
  background: rgba(255,254,246,0.42);
  color: #54142c;
}

/* ====================================================
   SCAN SCREEN (Original styles reinstated)
   ==================================================== */
.shine-line {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: var(--app-height);
  z-index: 2;
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(0 0 24px #2D9CDBcc);
  opacity: 0.34;
  mix-blend-mode: screen;
  animation: shinePulse 1.6s infinite ease-in-out;
}

.box-info-wrapper {
  position: absolute;
  top: 4.2dvh;
  left: 50%;
  transform: translateX(-50%);
  width: 46.4%;
  min-width: 190px;
  max-width: 260px;
  aspect-ratio: 501 / 165;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.box-info-bg {
  width: 100%;
  height: auto;
  display: block;
  pointer-events: none;
  user-select: none;
  filter: blur(0.5px) brightness(1.08);
  opacity: 0.93;
}

.box-info-text {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 80%;
  transform: translate(-50%, -50%);
  color: #0a1a2a;
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 600;
  font-size: 1.5rem;
  text-align: center;
  line-height: 1.3;
  letter-spacing: 0.01em;
  pointer-events: none;
}


/* ====================================================
   MAP SCREEN
   ==================================================== */
#screen-map { background-color: #f1f2ec; }

.map-container {
  width: 100%;
  height: 100%;
  position: relative;
}

#real-map {
  width: 100%;
  height: 100%;
  z-index: 1;
}

@keyframes bluePulse {
  0% {
    box-shadow: 0 0 4px #B9E3F7, inset 0 0 4px #B9E3F7;
    border-color: #B9E3F7;
  }
  50% {
    box-shadow: 0 0 16px #B9E3F7, 0 0 24px #4fb8ea, inset 0 0 12px #B9E3F7;
    border-color: #ffffff;
  }
  100% {
    box-shadow: 0 0 4px #B9E3F7, inset 0 0 4px #B9E3F7;
    border-color: #B9E3F7;
  }
}

.map-top-bar {
  position: absolute;
  top: 6dvh;
  left: 0;
  width: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  z-index: 1000;
  pointer-events: none;
}

.map-logo {
  height: 54px;
  width: auto;
  pointer-events: auto;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.15));
}

.profile-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.95);
  border: 3px solid #B9E3F7;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: auto;
  color: #E6007E;
  transition: transform 0.2s;
  padding: 0;
  outline: none;
  animation: bluePulse 2s infinite ease-in-out;
}

.profile-btn:active {
  transform: scale(0.95);
}


/* ====================================================
   PROFILE SCREEN
   ==================================================== */
#screen-profile {
  background: #bbbb77; /* Soft yellow-green fallback matching portrait background */
  overflow: hidden;
  pointer-events: auto;
}

.profile-background {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  /* Optional: Set background-image if provided */
  background: radial-gradient(circle at center, #d8d898 0%, #aeb46e 100%);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  z-index: 0;
  pointer-events: none;
}

.profile-background::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.08) 0%, rgba(0,0,0,0.12) 42%, rgba(0,0,0,0.08) 100%);
  pointer-events: none;
}

.profile-content {
  position: relative;
  z-index: 1;
  height: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-y: auto;
  padding: calc(var(--app-height) * 0.15) clamp(24px, 7vw, 56px) calc(100px + 40px) clamp(24px, 7vw, 56px);
  overscroll-behavior: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

.profile-content > *:not(.profile-photo-actions) {
  width: 100%;
  max-width: 430px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

.profile-content::-webkit-scrollbar {
  display: none;
}

.profile-photo-actions {
  position: fixed;
  top: 24px;
  right: 20px;
  z-index: 5;
  width: auto;
  max-width: calc(100% - 40px);
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.profile-bg-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.profile-bg-btn,
.profile-name-edit-btn,
.profile-qr-btn {
  min-width: 64px;
  height: 38px;
  border: 1px solid rgba(255,255,255,0.48);
  border-radius: 999px;
  background: rgba(255,255,255,0.16);
  color: #fff;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,0.16);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.profile-qr-btn {
  min-width: 38px;
  width: 38px;
  padding: 0;
  display: grid;
  place-items: center;
}

.profile-qr-btn span {
  width: 17px;
  height: 17px;
  display: block;
  background:
    linear-gradient(#fff 0 0) 0 0 / 7px 7px no-repeat,
    linear-gradient(#fff 0 0) 100% 0 / 7px 7px no-repeat,
    linear-gradient(#fff 0 0) 0 100% / 7px 7px no-repeat,
    linear-gradient(#fff 0 0) 100% 100% / 4px 4px no-repeat,
    linear-gradient(#fff 0 0) 62% 62% / 3px 3px no-repeat;
  box-shadow:
    inset 0 0 0 2px rgba(255,255,255,0.95),
    0 0 0 1px rgba(255,255,255,0.24);
}

.profile-bg-btn:active,
.profile-name-edit-btn:active,
.profile-qr-btn:active {
  transform: scale(0.97);
}

.profile-bg-btn:focus-visible,
.profile-name-edit-btn:focus-visible,
.profile-qr-btn:focus-visible {
  outline: 3px solid #B9E3F7;
  outline-offset: 3px;
}

.profile-header {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  position: relative;
  text-align: center;
  margin-bottom: 1.05rem;
}

.profile-title .user-name {
  font-size: clamp(2rem, 9vw, 2.5rem);
  font-weight: 400; /* Mudado para Causten Regular */
  color: #fff;
  text-shadow: 0 4px 10px rgba(0,0,0,0.5);
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.profile-name-edit-btn[hidden],
.profile-qr-btn[hidden] {
  display: none;
}

.profile-title .user-role {
  font-size: 1.25rem;
  font-weight: 400;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.level-badge {
  position: relative;
  right: auto;
  top: auto;
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-social-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.profile-follow-btn,
.profile-decline-btn,
.profile-message-btn {
  margin-top: 12px;
  min-width: 136px;
  height: 38px;
  border: 1.4px solid #ff8cc5;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.62) 0%, rgba(255,254,246,0.34) 42%, rgba(255,255,255,0.12) 100%),
    linear-gradient(122deg, rgba(230,0,18,0.34) 0%, rgba(255,254,246,0.68) 48%, rgba(245,92,176,0.28) 100%);
  color: #54142c;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  box-shadow:
    0 8px 22px rgba(0,0,0,0.16),
    inset 0 1px 0 rgba(255,255,255,0.72),
    inset 0 -10px 18px rgba(255,254,246,0.22);
  backdrop-filter: blur(14px) saturate(130%);
  -webkit-backdrop-filter: blur(14px) saturate(130%);
}

.profile-social-actions .profile-follow-btn,
.profile-social-actions .profile-decline-btn,
.profile-social-actions .profile-message-btn {
  margin-top: 0;
}

.profile-decline-btn {
  min-width: 104px;
  border-style: solid;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.48) 0%, rgba(255,254,246,0.26) 100%),
    rgba(255,254,246,0.22);
  color: #F9F3EC;
}

.profile-follow-btn:active,
.profile-decline-btn:active {
  transform: scale(0.97);
}

.profile-follow-btn:disabled {
  color: #54142c;
  opacity: 0.9;
  cursor: default;
}

.level-bg {
  width: 65px;
  height: auto;
  pointer-events: none;
}

.level-text {
  position: absolute;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1.8rem;
  font-weight: 400; /* Mudado para Causten Regular */
  color: #ff83bd;
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
  margin-top: 2px;
}

.glass-panel {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 8px 32px 0 rgba(0,0,0,0.1);
  color: #fff;
}

.profile-ocp {
  margin-top: 1.15rem;
  margin-bottom: 1.4rem;
}

.ocp-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-weight: 400; /* Mudado para Causten Regular */
}

.ocp-score {
  color: #ff83bd;
}

.ocp-progress-track {
  width: 100%;
  height: 8px;
  background: rgba(255,255,255,0.3);
  border-radius: 4px;
  overflow: hidden;
}

.ocp-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #F55CB0 0%, #8BDAFA 54%, #9dff00 100%);
  border-radius: 4px;
  transition: width 0.32s ease;
}

.glass-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 1.2rem;
}

.glass-card {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 20px;
  padding: 20px;
  text-align: center;
  color: #fff;
}

.full-width-card {
  grid-column: span 2;
}

.glass-card .card-num {
  font-size: 2rem;
  font-weight: 400; /* Mudado para Causten Regular */
}

.glass-card .card-label {
  font-size: 0.95rem;
  font-weight: 400; /* Mudado para Causten Regular */
  letter-spacing: 0.02em;
}

.profile-activity {
  width: 100%;
  min-width: 0;
  display: grid;
  gap: 12px;
  padding: 16px;
  margin-bottom: 1.2rem;
  overflow-x: hidden;
  overflow-y: visible;
}

.activity-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  color: #FFFEF6;
}

.activity-header div,
.activity-goal-card {
  display: grid;
  gap: 3px;
}

.activity-header span:first-child {
  font-size: 1.08rem;
}

.activity-header small,
.activity-stats small,
.activity-goal-card span {
  color: rgba(255,255,255,0.76);
  font-size: 0.78rem;
  line-height: 1.18;
}

#activity-total-distance {
  color: #ff83bd;
  font-size: 1.08rem;
  white-space: nowrap;
}

.activity-actions {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.activity-mode-btn,
.activity-submit {
  min-height: 42px;
  border: 1.4px solid #ff8cc5;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(139,218,250,0.82) 0%, rgba(245,92,176,0.78) 52%, rgba(157,255,0,0.76) 100%);
  color: #FFFEF6;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.95rem;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.58), 0 10px 22px rgba(84,20,44,0.2);
  cursor: pointer;
}

.activity-stats {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.activity-stats div {
  min-width: 0;
  display: grid;
  gap: 3px;
  padding: 10px 8px;
  border: 1px solid rgba(255,140,197,0.45);
  border-radius: 13px;
  background: rgba(255,255,255,0.1);
  color: #FFFEF6;
}

.activity-stats span {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 0.9rem;
  line-height: 1.1;
}

.activity-goal-card {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 12px;
  border: 1.2px solid rgba(255,140,197,0.74);
  border-radius: 14px;
  background: rgba(255,254,246,0.12);
  color: #FFFEF6;
}

.activity-goal-track {
  width: 100%;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,0.22);
}

.activity-goal-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #F55CB0 0%, #8BDAFA 55%, #9DFF00 100%);
  transition: width 0.28s ease;
}

.activity-goal-track-segmented {
  display: flex;
}

.activity-goal-segment {
  height: 100%;
  min-width: 0;
}

.activity-goal-segment:first-child {
  border-radius: 999px 0 0 999px;
}

.activity-goal-segment:last-child {
  border-radius: 0 999px 999px 0;
}

.activity-goal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 8px;
  color: rgba(255,255,255,0.78);
  font-size: 0.68rem;
  line-height: 1.1;
}

.activity-goal-person {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.activity-goal-person i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.activity-history {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(255,140,197,0.38);
  border-radius: 14px;
  background: rgba(255,254,246,0.1);
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-y: visible;
}

.activity-history-header {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  overflow: hidden;
}

.activity-history-header span {
  color: #FFFEF6;
  font-size: 0.96rem;
}

.activity-history-header small,
.activity-history-empty,
.activity-history-item small {
  color: rgba(255,255,255,0.72);
  font-size: 0.72rem;
}

.activity-history-list {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  display: grid;
  gap: 9px;
  max-height: none;
  overflow-y: visible;
  overflow-x: hidden;
  overscroll-behavior: contain;
  padding: 0;
  box-sizing: border-box;
}

.activity-history-item {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  justify-content: stretch;
  gap: 7px;
  padding: 11px;
  border: 1px solid rgba(255,140,197,0.46);
  border-radius: 12px;
  background: rgba(255,255,255,0.09);
  color: #FFFEF6;
  font-family: 'IBM Plex Mono', monospace;
  text-align: left;
  cursor: pointer;
  box-sizing: border-box;
  overflow: visible;
}

.activity-history-item div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.activity-history-item div:last-child {
  text-align: left;
}

.activity-history-item strong,
.activity-history-item span {
  min-width: 0;
  font-weight: 400;
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.activity-history-item span {
  color: #ff83bd;
}

.activity-history-actions {
  width: 100%;
  display: flex !important;
  grid-template-columns: none !important;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-start;
  min-width: 0;
}

.activity-history-actions button {
  flex: 0 1 auto;
  max-width: 100%;
  min-height: 28px;
  border: 1px solid rgba(255,140,197,0.54);
  border-radius: 999px;
  background: rgba(255,254,246,0.14);
  color: #FFFEF6;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.68rem;
  padding: 4px 8px;
  cursor: pointer;
}

.profile-events,
.profile-coupons,
.profile-partners {
  padding: 16px;
}

.profile-events,
.profile-coupons {
  margin-bottom: 1.2rem;
}

.coupon-progress {
  margin: -2px 0 12px;
  color: #54142c;
  font-size: 0.78rem;
  line-height: 1.2;
}

.events-header,
.coupons-header,
.partners-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 0.98rem;
}

.profile-events-list {
  display: grid;
  gap: 8px;
  max-height: 210px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.profile-event-item {
  min-height: 74px;
  display: grid;
  gap: 3px;
  padding: 12px 14px;
  border: 1px solid rgba(255,140,197, 0.58);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(139, 218, 250, 0.18), rgba(245, 92, 176, 0.13) 52%, rgba(157,255,0,0.13)),
    rgba(255,255,255,0.1);
  color: #FFFEF6;
  text-align: left;
  cursor: pointer;
}

.profile-event-item span,
.profile-events-empty {
  color: rgba(255,255,255,0.72);
  font-size: 0.72rem;
}

.profile-event-item strong {
  color: #ff83bd;
  font-weight: 400;
  line-height: 1.05;
}

.profile-event-item small {
  color: rgba(255,255,255,0.78);
  line-height: 1.18;
}

.partner-directory-controls {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.partner-directory-controls input,
.partner-directory-controls select {
  width: 100%;
  min-height: 38px;
  border: 1px solid rgba(255,140,197, 0.72);
  border-radius: 12px;
  background: rgba(255, 254, 246, 0.78);
  color: #54142c;
  font: inherit;
  padding: 0 12px;
  outline: none;
  box-shadow: inset 0 1px 12px rgba(255, 255, 255, 0.22);
}

.partner-directory-controls input::placeholder {
  color: rgba(84,20,44, 0.62);
}

.partner-directory-list {
  display: grid;
  gap: 8px;
  max-height: 250px;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
}

.partner-directory-item {
  min-height: 78px;
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid rgba(255,140,197, 0.62);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(249, 243, 236, 0.18), rgba(139, 218, 250, 0.18) 52%, rgba(245, 92, 176, 0.14)),
    rgba(255,255,255,0.1);
  color: #FFFEF6;
  text-align: left;
  cursor: pointer;
}

.partner-directory-item:disabled {
  cursor: default;
  opacity: 0.92;
}

.partner-directory-type,
.partner-directory-empty {
  color: rgba(255,255,255,0.72);
  font-size: 0.72rem;
}

.partner-directory-item strong {
  color: #ff8cc5;
  font-weight: 400;
  line-height: 1.05;
}

.partner-directory-item small {
  color: rgba(255,255,255,0.78);
  line-height: 1.18;
}

.coupon-card {
  display: grid;
  gap: 6px;
  min-height: 84px;
  padding: 15px;
  border: 1px solid rgba(255,140,197, 0.72);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(245, 92, 176, 0.16), rgba(249, 243, 236, 0.86) 52%, rgba(139, 218, 250, 0.2)),
    rgba(255, 254, 246, 0.82);
  color: #54142c;
}

.coupon-card.is-empty {
  opacity: 0.84;
}

.coupon-wallet-entry + .coupon-wallet-entry {
  border-top: 1px solid rgba(255,140,197, 0.7);
  padding-top: 10px;
  margin-top: 5px;
}

.coupon-wallet-entry { display: grid; gap: 4px; }

.coupon-partner {
  color: #C52F78;
  font-size: 0.82rem;
}

.coupon-title {
  color: #54142c;
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.15;
}

.coupon-detail {
  color: rgba(25, 74, 98, 0.86);
  font-size: 0.86rem;
}

.friend-requests-panel {
  width: 100%;
  min-height: 92px;
  margin: 0 0 0.4rem;
  padding: 14px 16px 13px;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.2), rgba(255,254,246,0.1) 50%, rgba(139, 218, 250, 0.14)),
    rgba(255,255,255,0.15);
}

.friend-requests-panel[hidden] {
  display: none;
}

.friend-requests-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 9px;
  font-size: 0.98rem;
}

.friend-requests-header span:last-child {
  color: #ff83bd;
  font-size: 0.98rem;
  line-height: 1;
}

.friend-requests-list {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 48px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.friend-requests-list::-webkit-scrollbar {
  display: none;
}

.empty-requests {
  color: rgba(255,255,255,0.78);
  font-size: 0.88rem;
  align-self: center;
}

.friend-circle {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  width: 52px;
  min-width: 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: #fff;
  font-family: 'IBM Plex Mono', monospace;
  cursor: default;
}

.friend-circle-request {
  cursor: pointer;
}

.friend-circle[data-open-direct-chat] {
  cursor: pointer;
}

.friend-circle-avatar {
  position: relative;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 2px solid #ff8cc5;
  border-radius: 50%;
  background:
    linear-gradient(135deg, rgba(245, 92, 176, 0.42), rgba(157, 255, 0, 0.28)),
    rgba(255,255,255,0.22);
  background-size: cover;
  background-position: center;
  color: #fff;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1rem;
  line-height: 1;
  box-shadow:
    0 6px 16px rgba(0,0,0,0.18),
    inset 0 1px 0 rgba(255,255,255,0.45);
}

.friend-circle-avatar.has-request::after {
  content: "";
  position: absolute;
  right: -1px;
  top: -2px;
  width: 13px;
  height: 13px;
  border: 2px solid rgba(255,255,255,0.88);
  border-radius: 50%;
  background: #F80000;
  box-shadow: 0 2px 8px rgba(248,0,0,0.36);
}

.friend-circle-avatar.has-message::after {
  content: "";
  position: absolute;
  right: -1px;
  top: -2px;
  width: 13px;
  height: 13px;
  border: 2px solid rgba(255,255,255,0.88);
  border-radius: 50%;
  background: #eef1f2;
  box-shadow: 0 2px 8px rgba(255,140,197,0.42);
}

.friend-circle-name {
  max-width: 52px;
  color: rgba(255,255,255,0.88);
  font-size: 0.62rem;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


/* ====================================================
   SHARED FOOTER NAVIGATION (Restored using original visual)
   ==================================================== */
.scan-bottom-wrapper {
  position: absolute;
  left: 50%;
  bottom: 2.45dvh;
  transform: translateX(-50%);
  width: 90%;
  max-width: 520px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
  overflow: hidden;
  border-radius: 999px;
}

.scan-bottom-bg {
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  display: block;
  pointer-events: none;
  user-select: none;
  filter: none;
  opacity: 1;
}

.scan-bottom-wrapper::before,
.scan-bottom-wrapper::after {
  content: "";
  position: absolute;
  inset: 13% 3.5%;
  border-radius: 999px;
  pointer-events: none;
  display: none;
}

.scan-bottom-wrapper::before {
  z-index: 2;
  background:
    radial-gradient(circle at 20% 60%, rgba(255, 0, 128, 0.55) 0 10%, rgba(255, 139, 0, 0.36) 28%, rgba(159, 255, 0, 0) 48%),
    radial-gradient(circle at 78% 46%, rgba(185, 227, 247, 0.5) 0 11%, rgba(159, 255, 0, 0.42) 28%, rgba(255, 139, 0, 0) 52%),
    linear-gradient(90deg, rgba(255, 0, 128, 0.18), rgba(255, 139, 0, 0.3), rgba(159, 255, 0, 0.26), rgba(185, 227, 247, 0.18));
  background-size: 145% 150%, 160% 155%, 180% 100%;
  opacity: 0.58;
  mix-blend-mode: screen;
  transform: translate3d(-3%, 3%, 0) scale(0.98);
  animation: scanGradientFloat 4.8s ease-in-out infinite alternate;
}

.scan-bottom-wrapper::after {
  z-index: 2;
  inset: 18% 10%;
  background: linear-gradient(100deg, rgba(255,255,255,0) 0%, rgba(242,248,227,0.5) 34%, rgba(255,255,255,0) 68%);
  filter: blur(5px);
  opacity: 0.52;
  transform: translate3d(-58%, 0, 0) skewX(-12deg);
  animation: scanLightFloat 3.6s ease-in-out infinite;
}

.scan-bottom-wrapper.scan-exploding::before {
  animation: scanGradientBlast 0.82s cubic-bezier(0.17, 0.84, 0.26, 1) both, scanGradientFloat 4.8s ease-in-out 0.82s infinite alternate;
}

.scan-bottom-wrapper.scan-exploding::after {
  animation: scanGlowBlast 0.82s cubic-bezier(0.17, 0.84, 0.26, 1) both, scanLightFloat 3.6s ease-in-out 0.82s infinite;
}

@keyframes scanGradientFloat {
  0% {
    background-position: 0% 56%, 100% 45%, 0% 50%;
    transform: translate3d(-3%, 4%, 0) scale(0.98);
  }
  50% {
    background-position: 48% 42%, 52% 58%, 72% 50%;
    transform: translate3d(2%, -2%, 0) scale(1.02);
  }
  100% {
    background-position: 100% 55%, 0% 44%, 100% 50%;
    transform: translate3d(4%, 3%, 0) scale(0.98);
  }
}

@keyframes scanGradientBlast {
  0% {
    opacity: 0;
    transform: translateY(72%) scaleY(0.42);
  }
  28% {
    opacity: 0.96;
  }
  68% {
    opacity: 0.9;
    transform: translateY(-8%) scaleY(1.32);
  }
  100% {
    opacity: 0;
    transform: translateY(-78%) scaleY(1.65);
  }
}

@keyframes scanGlowBlast {
  0% {
    opacity: 0;
    transform: translate3d(-12%, 64%, 0) scaleX(0.72) scaleY(0.55);
  }
  35% {
    opacity: 0.78;
  }
  100% {
    opacity: 0;
    transform: translate3d(8%, -70%, 0) scaleX(1.12) scaleY(1.55);
  }
}

@keyframes scanLightFloat {
  0%, 18% {
    transform: translate3d(-62%, 0, 0) skewX(-12deg);
    opacity: 0.12;
  }
  52% {
    opacity: 0.58;
  }
  100% {
    transform: translate3d(62%, 0, 0) skewX(-12deg);
    opacity: 0.16;
  }
}

.scan-bottom-content {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px 0 24px;
  pointer-events: auto;
  z-index: 3;
}

.scan-label {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 400;
  font-size: 1.35rem;
  color: #fff;
  letter-spacing: 0.01em;
  text-shadow: 0 2px 8px #0004;
  cursor: pointer;
}

.scan-buttons {
  position: relative;
  display: flex;
  gap: 16px;
  height: 70%; /* Área de toque dos ícones sem interferir na arte da barra */
  align-items: center;
}

.circle-btn {
  position: relative;
  z-index: 1;
  height: 100%;
  aspect-ratio: 1 / 1; /* Mantém redondo perfeito independente da escala */
  border-radius: 50%;
  appearance: none;
  -webkit-appearance: none;
  background: transparent !important;
  border: 0 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: none !important;
  cursor: pointer;
  pointer-events: auto;
  transition: transform 0.18s;
  font-size: 2rem;
  outline: 0 !important;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}
.circle-btn:active {
  transform: scale(0.95);
}

@media (prefers-reduced-motion: reduce) {
  .scan-bottom-wrapper::before,
  .scan-bottom-wrapper::after {
    animation: none;
  }

  .scan-bottom-wrapper.scan-exploding::before,
  .scan-bottom-wrapper.scan-exploding::after {
    animation: none;
  }
}

.plus {
  font-size: 2.2rem;
  font-weight: 700;
  color: #FFD600;
  line-height: 1;
}

/* Success Modal */
.success-modal {
  position: absolute;
  bottom: 0; left: 0;
  width: 100%;
  height: var(--app-height);
  background: transparent;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  opacity: 0;
  visibility: hidden;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  overflow: hidden;
}

.sticker-burst {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(circle at 50% 50%, rgba(242,248,227,0.95) 0 8%, rgba(139,218,250,0.82) 18%, rgba(245,92,176,0.78) 32%, rgba(255,107,0,0.78) 48%, rgba(163,255,0,0.62) 64%, rgba(255,255,255,0) 76%),
    conic-gradient(from 20deg, rgba(245,92,176,0.9), rgba(255,107,0,0.86), rgba(163,255,0,0.78), rgba(139,218,250,0.86), rgba(245,92,176,0.9));
  opacity: 0;
  transform: scale(0.05) rotate(-18deg);
  mix-blend-mode: screen;
  pointer-events: none;
}

.sticker-burst.is-active {
  animation: stickerBurstExplosion 1.05s cubic-bezier(0.12, 0.82, 0.2, 1) both;
}

@keyframes stickerBurstExplosion {
  0% {
    opacity: 0;
    transform: scale(0.04) rotate(-22deg);
    filter: blur(0);
  }
  28% {
    opacity: 1;
    transform: scale(0.85) rotate(8deg);
  }
  62% {
    opacity: 0.92;
    transform: scale(1.45) rotate(24deg);
    filter: blur(1px);
  }
  100% {
    opacity: 0;
    transform: scale(2.35) rotate(42deg);
    filter: blur(10px);
  }
}

.modal-content {
  position: relative;
  z-index: 1;
  background: #1a1a2a;
  padding: 32px;
  border-radius: 24px;
  text-align: center;
  width: 80%;
  max-width: 350px;
  transform: translateY(100px);
  box-shadow: 0 10px 40px rgba(0,242,255,0.2);
}

.modal-content h2 { margin: 0 0 10px 0; font-weight: 900; color: #fff; }
.modal-content p { color: #ccc; margin-bottom: 24px; }

.close-modal-btn {
  background: var(--footer-gradient);
  border: none;
  color: #1a1a2a;
  font-size: 1rem;
  font-weight: 900;
  padding: 12px 24px;
  border-radius: 9999px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,0.2);
}

.scan-sticker-explosion {
  position: fixed;
  top: 50%;
  left: 50%;
  width: var(--app-width);
  height: var(--app-height);
  z-index: 85;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 50%, rgba(249,243,236,0.42), rgba(139,218,250,0.14) 42%, rgba(249,243,236,0) 70%);
  transform: translate(-50%, -50%);
}

.scan-sticker-explosion.is-active {
  visibility: visible;
  animation: scanExplosionLayer 1.42s ease both;
}

.scan-sticker-explosion img {
  width: min(66vw, 310px);
  max-width: none;
  user-select: none;
  pointer-events: none;
  filter: drop-shadow(0 22px 38px rgba(84,20,44, 0.22));
  transform: scale(0.16) rotate(-10deg);
}

.scan-sticker-explosion.is-active img {
  animation: scanStickerExplode 1.42s cubic-bezier(.12,.84,.18,1) both;
}

.scan-sticker-3d {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.scan-sticker-3d canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.scan-sticker-explosion.has-3d img { visibility: hidden; }
.scan-sticker-explosion.has-3d.is-active {
  animation-duration: 2.5s;
}

@keyframes scanExplosionLayer {
  0% { opacity: 0; }
  14% { opacity: 1; }
  70% { opacity: 1; }
  100% { opacity: 0; visibility: hidden; }
}

@keyframes scanStickerExplode {
  0% {
    opacity: 0;
    transform: scale(0.16) rotate(-12deg);
  }
  22% {
    opacity: 1;
    transform: scale(0.78) rotate(4deg);
  }
  58% {
    opacity: 1;
    transform: scale(1.55) rotate(18deg);
  }
  100% {
    opacity: 0;
    transform: scale(4.4) rotate(34deg);
  }
}

.sticker-modal {
  position: absolute;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0,0,0,0.62);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.sticker-modal.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.sticker-modal-content {
  width: min(100%, 350px);
  border: 1px solid rgba(255,255,255,0.54);
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.48), rgba(255,254,246,0.1) 42%, rgba(230,0,18,0.08) 100%),
    rgba(255, 254, 246, 0.75);
  color: #54142c;
  padding: 22px;
  box-shadow: 0 20px 70px rgba(0,0,0,0.24), inset 0 1px 0 rgba(255,255,255,0.56);
  font-family: 'IBM Plex Mono', monospace;
  backdrop-filter: blur(18px) saturate(1.15);
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
}

.sticker-modal-content h2 {
  margin: 0 0 8px;
  font-size: 1.35rem;
  font-weight: 400;
}

.sticker-modal-content p {
  margin: 0 0 18px;
  color: rgba(117, 26, 25, 0.72);
  font-size: 0.95rem;
}

.sticker-name-input {
  width: 100%;
  height: 48px;
  margin-bottom: 14px;
  border: 1px solid rgba(84,20,44,0.24);
  border-radius: 999px;
  background: rgba(255,255,255,0.38);
  color: #54142c;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1rem;
  font-weight: 400;
  outline: none;
  padding: 0 16px;
  box-sizing: border-box;
}

.sticker-name-input::placeholder {
  color: rgba(117,26,25,0.48);
}

.sticker-name-input:focus {
  border-color: rgba(84,20,44,0.52);
  box-shadow: 0 0 0 3px rgba(84,20,44,0.12);
}

.sticker-photo-picker {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 140px;
  border: 1px solid rgba(84,20,44,0.34);
  border-radius: 14px;
  background: rgba(255,255,255,0.32);
  color: #54142c;
  overflow: hidden;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.36);
}

.sticker-pick-map-btn {
  width: 100%;
  margin-top: 12px;
  border: 1px solid #ff8cc5;
  border-radius: 999px;
  background: rgba(255,255,255,0.32);
  color: #54142c;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.95rem;
  font-weight: 400;
  padding: 11px 14px;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.34);
}

.sticker-popup span {
  display: block;
  margin: -4px 0 8px;
  font-size: 0.78rem;
  color: rgba(20,33,23,0.7);
}

.sticker-photo-picker img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

#sticker-photo-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.sticker-modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 18px;
}

.sticker-modal-actions button {
  flex: 1;
  height: 44px;
  border: 1px solid #ff8cc5;
  border-radius: 999px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.95rem;
  cursor: pointer;
}

#sticker-cancel-btn {
  background: rgba(255,255,255,0.32);
  color: #54142c;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.36);
}

.sticker-modal-actions button[type="submit"] {
  background:
    linear-gradient(140deg, rgba(255,255,255,0.5) 0%, rgba(255,255,255,0.08) 38%, rgba(255,255,255,0.3) 100%),
    radial-gradient(circle at 22% 28%, rgba(255,0,128,0.42) 0 14%, rgba(255,0,128,0) 36%),
    linear-gradient(100deg, #ff6b00 0%, #ff8c00 34%, #a3ff00 100%);
  color: #FFFEF6;
  border: 1px solid #ff8cc5;
  box-shadow: 0 10px 24px rgba(255,107,0,0.24), inset 0 1px 0 rgba(255,255,255,0.48);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  text-shadow: 0 1px 8px rgba(117,26,25,0.26);
}

.onboarding-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background:
    radial-gradient(circle at 50% 72%, rgba(255, 254, 246, 0.28) 0 22%, transparent 48%),
    linear-gradient(180deg, rgba(36, 109, 145, 0.12), rgba(12, 20, 24, 0.36));
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.onboarding-modal.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.onboarding-card {
  position: relative;
  width: min(88vw, 388px);
  max-height: min(84vh, 640px);
  overflow-y: auto;
  border-radius: 22px;
  border: 1.4px solid rgba(255,140,197, 0.96);
  padding: 25px 20px 20px;
  background:
    linear-gradient(145deg, rgba(255, 254, 246, 0.84), rgba(255, 254, 246, 0.62)),
    radial-gradient(circle at 12% 2%, rgba(245, 92, 176, 0.22), transparent 34%),
    radial-gradient(circle at 95% 14%, rgba(139, 218, 250, 0.38), transparent 34%);
  backdrop-filter: blur(20px) saturate(1.18);
  -webkit-backdrop-filter: blur(20px) saturate(1.18);
  box-shadow:
    0 22px 54px rgba(84,20,44, 0.28),
    inset 0 1px 0 rgba(255,255,255,0.66);
  color: #54142c;
  font-family: 'IBM Plex Mono', monospace;
  overscroll-behavior: contain;
}

.onboarding-card::before {
  content: "";
  position: absolute;
  left: 20px;
  right: 20px;
  top: 12px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.82), transparent);
  pointer-events: none;
}

.onboarding-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.2px solid rgba(255,140,197, 0.92);
  background: rgba(248, 0, 0, 0.74);
  color: #FFFEF6;
  font-size: 1.28rem;
  line-height: 32px;
  padding: 2px 0 0;
  text-align: center;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.38);
}

.onboarding-kicker {
  display: inline-flex;
  margin-bottom: 9px;
  padding: 5px 10px 4px;
  border: 1px solid rgba(255,140,197, 0.5);
  border-radius: 999px;
  background: rgba(255,255,255,0.26);
  color: #ff83bd;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.onboarding-card h2 {
  margin: 0 42px 8px 0;
  color: #F80000;
  font-size: clamp(1.55rem, 7vw, 2rem);
  line-height: 0.98;
}

.onboarding-intro {
  margin: 0 0 14px;
  color: #54142c;
  font-size: 0.96rem;
  line-height: 1.28;
}

.onboarding-steps {
  display: grid;
  gap: 8px;
  margin: 0 0 16px;
}

.onboarding-step {
  position: relative;
  display: grid;
  grid-template-columns: 42px 1fr;
  column-gap: 10px;
  row-gap: 2px;
  align-items: start;
  min-height: 66px;
  padding: 10px 11px;
  border: 1px solid rgba(255,140,197, 0.48);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.34), rgba(255,255,255,0.12)),
    rgba(255, 254, 246, 0.22);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.42);
}

.onboarding-step span {
  grid-row: 1 / span 2;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255,140,197, 0.92);
  background: rgba(248, 0, 0, 0.76);
  color: #FFFEF6;
  font-size: 0.76rem;
  font-weight: 900;
  box-shadow: 0 7px 16px rgba(248,0,0,0.14), inset 0 1px 0 rgba(255,255,255,0.38);
}

.onboarding-step strong {
  color: #F80000;
  font-size: 0.98rem;
  line-height: 1.05;
}

.onboarding-step p {
  margin: 0;
  color: #54142c;
  font-size: 0.84rem;
  line-height: 1.22;
}

.onboarding-start {
  position: relative;
  width: 100%;
  min-height: 50px;
  overflow: hidden;
  border-radius: 999px;
  border: 1.4px solid #ff8cc5;
  background:
    linear-gradient(140deg, rgba(255,255,255,0.52) 0%, rgba(255,255,255,0.08) 38%, rgba(255,255,255,0.34) 100%),
    radial-gradient(circle at 21% 26%, rgba(245,92,176,0.52) 0 14%, rgba(245,92,176,0) 38%),
    linear-gradient(100deg, #F80000 0%, #FF6B00 42%, #9DFF00 100%);
  color: #FFFEF6;
  font-weight: 900;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1rem;
  cursor: pointer;
  box-shadow:
    0 12px 26px rgba(248, 0, 0, 0.2),
    0 0 18px rgba(255,140,197, 0.18),
    inset 0 1px 0 rgba(255,255,255,0.52);
  text-shadow: 0 1px 8px rgba(117,26,25,0.28);
}

.onboarding-start::after {
  content: "";
  position: absolute;
  inset: -45% -20%;
  background: linear-gradient(120deg, transparent 25%, rgba(255,255,255,0.34) 44%, transparent 62%);
  transform: translateX(-58%);
  animation: onboardingButtonShine 4.8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes onboardingButtonShine {
  0%, 42% { transform: translateX(-58%); }
  68%, 100% { transform: translateX(58%); }
}

@media (max-height: 700px) {
  .onboarding-card {
    padding: 22px 18px 18px;
  }

  .onboarding-step {
    min-height: 58px;
    padding: 8px 10px;
  }

  .onboarding-step p {
    font-size: 0.8rem;
  }
}

.profile-qr-modal {
  position: absolute;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.22);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.profile-qr-modal.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.profile-qr-card {
  position: relative;
  width: min(78vw, 310px);
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 26px 22px 22px;
  border: 1.4px solid rgba(255,140,197, 0.82);
  border-radius: 26px;
  background: rgba(255, 254, 246, 0.76);
  color: #54142c;
  font-family: 'IBM Plex Mono', monospace;
  text-align: center;
  box-shadow: 0 20px 44px rgba(84,20,44, 0.24), inset 0 1px 0 rgba(255,255,255,0.58);
}

.profile-qr-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(84,20,44, 0.32);
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  color: #54142c;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.profile-qr-kicker {
  color: #ff83bd;
  font-size: 0.76rem;
  text-transform: uppercase;
}

.profile-qr-card strong {
  color: #54142c;
  font-size: 1.38rem;
  font-weight: 400;
}

.profile-qr-card img {
  width: min(58vw, 210px);
  aspect-ratio: 1 / 1;
  padding: 10px;
  border-radius: 18px;
  background: #FFFEF6;
  box-shadow: inset 0 0 0 1px rgba(84,20,44, 0.12);
}

.profile-qr-card small {
  color: rgba(84,20,44, 0.75);
  font-size: 0.82rem;
  line-height: 1.2;
}

.activity-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 82;
  width: var(--app-width);
  height: var(--app-height);
  display: grid;
  place-items: center;
  align-items: center;
  justify-items: center;
  padding: 22px;
  background: rgba(0, 0, 0, 0.22);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transform: translate(-50%, -50%);
  transition: opacity 0.22s ease, visibility 0.22s ease;
  box-sizing: border-box;
}

.activity-live-banner {
  position: absolute;
  left: 50%;
  bottom: calc(96px + env(safe-area-inset-bottom));
  z-index: 81;
  width: min(86vw, 350px);
  display: grid;
  gap: 2px;
  padding: 10px 16px;
  border: 1.3px solid rgba(255,140,197,0.86);
  border-radius: 999px;
  background: rgba(255,254,246,0.78);
  color: #54142c;
  font-family: 'IBM Plex Mono', monospace;
  text-align: left;
  transform: translateX(-50%);
  box-shadow: 0 14px 26px rgba(84,20,44,0.18), inset 0 1px 0 rgba(255,255,255,0.62);
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.activity-live-banner[hidden] {
  display: none;
}

.activity-live-banner span {
  color: #54142c;
  font-size: 0.92rem;
  line-height: 1.08;
}

.activity-live-banner small {
  color: #54142c;
  font-size: 0.72rem;
  line-height: 1.12;
}

.activity-modal.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.activity-card {
  position: relative;
  width: min(86vw, 350px);
  max-height: min(86vh, 620px);
  margin: auto;
  justify-self: center;
  align-self: center;
  display: grid;
  gap: 14px;
  padding: 26px 20px 20px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1.4px solid rgba(255,140,197,0.86);
  border-radius: 26px;
  background: rgba(255,254,246,0.76);
  color: #54142c;
  font-family: 'IBM Plex Mono', monospace;
  box-shadow: 0 20px 44px rgba(84,20,44,0.24), inset 0 1px 0 rgba(255,255,255,0.58);
  box-sizing: border-box;
}

.activity-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(84,20,44,0.32);
  border-radius: 50%;
  background: rgba(255,255,255,0.22);
  color: #54142c;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.activity-kicker {
  color: #ff83bd;
  font-size: 0.76rem;
  text-transform: uppercase;
}

.activity-card h2 {
  margin: 0;
  color: #54142c;
  font-size: 1.6rem;
  font-weight: 400;
  line-height: 1.05;
}

.activity-form-grid {
  display: grid;
  gap: 10px;
}

.activity-form-grid label {
  display: grid;
  gap: 5px;
  color: #54142c;
  font-size: 0.78rem;
}

.activity-goal-fields {
  display: grid;
  gap: 10px;
}

.activity-goal-fields[hidden] {
  display: none;
}

.activity-form-grid input,
.activity-form-grid select,
.activity-invite-toggle {
  width: 100%;
  min-height: 40px;
  border: 1px solid rgba(255,140,197,0.78);
  border-radius: 14px;
  background: rgba(255,255,255,0.5);
  color: #54142c;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.95rem;
  padding: 8px 11px;
  outline: none;
}

.activity-invite-toggle {
  text-align: left;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.58);
}

.activity-invite-toggle.is-open {
  border-color: rgba(245,92,176,0.78);
  background: rgba(255,255,255,0.62);
  color: #54142c;
}

.activity-form-grid select[multiple] {
  min-height: 94px;
}

.activity-field-hint {
  color: rgba(84,20,44,0.68);
  font-size: 0.68rem;
  line-height: 1.18;
}

.activity-live {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.activity-live[hidden] {
  display: none;
}

.activity-live div {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 12px 8px;
  border: 1px solid rgba(255,140,197,0.72);
  border-radius: 16px;
  background: rgba(255,255,255,0.42);
  text-align: center;
}

.activity-live-map {
  grid-column: 1 / -1;
  position: relative;
  width: 100%;
  aspect-ratio: 14 / 9;
  min-height: 180px;
  border: 1.2px solid rgba(255,140,197,0.76);
  border-radius: 18px;
  background: rgba(249,243,236,0.68);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.55);
  overflow: hidden;
}

.activity-live-map.is-loading::before {
  content: "Carregando mapa";
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  color: #54142c;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.82rem;
  background: rgba(249,243,236,0.72);
}

.activity-live-map.maplibregl-map {
  font-family: 'IBM Plex Mono', monospace;
}

.activity-live-map .maplibregl-ctrl-attrib,
.activity-live-map .maplibregl-ctrl-logo {
  display: none !important;
}

.activity-live-user-pin {
  width: 18px;
  height: 18px;
  display: block;
  border: 2px solid #FFFEF6;
  border-radius: 50%;
  background: #ff83bd;
  box-shadow: 0 0 0 5px rgba(255,140,197,0.38), 0 6px 14px rgba(84,20,44,0.28);
  pointer-events: none;
}

.activity-live span {
  color: #ff83bd;
  font-size: 0.95rem;
  overflow-wrap: anywhere;
}

.activity-live small {
  color: #54142c;
  font-size: 0.7rem;
}

.activity-check {
  grid-template-columns: 18px 1fr;
  align-items: center;
}

.activity-check input {
  min-height: auto;
  height: 18px;
  padding: 0;
}

.activity-submit {
  color: #FFFEF6;
}

.activity-share-modal {
  position: absolute;
  inset: 0;
  z-index: 84;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0,0,0,0.32);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.activity-share-modal.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.activity-share-wrap {
  position: relative;
  width: min(76vw, 330px);
  display: grid;
  gap: 12px;
  justify-items: center;
}

.activity-share-options {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 4px;
  border: 1px solid rgba(255,140,197,0.5);
  border-radius: 999px;
  background: rgba(255,254,246,0.3);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.activity-share-options button {
  min-height: 34px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #FFFEF6;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.78rem;
  cursor: pointer;
}

.activity-share-options button.is-active {
  background: linear-gradient(180deg, rgba(139,218,250,0.88) 0%, rgba(245,92,176,0.82) 55%, rgba(157,255,0,0.72) 100%);
  color: #FFFEF6;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.5), 0 8px 18px rgba(84,20,44,0.2);
}

.activity-share-wrap canvas {
  width: 100%;
  aspect-ratio: 9 / 16;
  border-radius: 24px;
  box-shadow: 0 20px 52px rgba(0,0,0,0.34);
  background:
    linear-gradient(45deg, rgba(255,255,255,0.14) 25%, transparent 25% 75%, rgba(255,255,255,0.14) 75%),
    linear-gradient(45deg, rgba(255,255,255,0.14) 25%, transparent 25% 75%, rgba(255,255,255,0.14) 75%);
  background-color: rgba(84,20,44,0.26);
  background-position: 0 0, 12px 12px;
  background-size: 24px 24px;
}

.activity-share-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(84,20,44,0.32);
  border-radius: 50%;
  background: rgba(255,254,246,0.74);
  color: #54142c;
  font-size: 1.25rem;
  cursor: pointer;
}

.password-reset-close,
.client-area-close,
.chat-close,
.friend-request-close,
.event-close-btn,
.profile-qr-close,
.activity-close,
.activity-share-close,
.activity-detail-close {
  display: grid;
  place-items: center;
  padding: 0;
  text-align: center;
  line-height: 1;
  font-size: 0;
}

.password-reset-close::before,
.client-area-close::before,
.chat-close::before,
.friend-request-close::before,
.event-close-btn::before,
.profile-qr-close::before,
.activity-close::before,
.activity-share-close::before,
.activity-detail-close::before {
  content: "×";
  display: block;
  color: var(--close-icon-color, #54142c);
  font-family: 'IBM Plex Mono', monospace;
  font-size: var(--close-icon-size, 1.28rem);
  font-weight: 400;
  line-height: 1;
  transform: translateY(2px);
}

.event-close-btn,
.profile-qr-close,
.activity-close,
.activity-share-close,
.activity-detail-close {
  --close-icon-color: #54142c;
}

.event-close-btn {
  --close-icon-size: clamp(1rem, 3.6vw, 1.36rem);
}

.activity-share-btn {
  min-height: 42px;
  width: 100%;
  border: 1.4px solid #ff8cc5;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(139,218,250,0.88) 0%, rgba(245,92,176,0.82) 52%, rgba(157,255,0,0.78) 100%);
  color: #FFFEF6;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.95rem;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.58), 0 10px 22px rgba(84,20,44,0.2);
  cursor: pointer;
}

@media (max-width: 400px) {
  .box-info-wrapper { width: 46.4%; }
  .scan-bottom-wrapper { width: 99%; }
  .glass-box .box-info-text { font-size: clamp(0.95rem, 4.15vw, 1.12rem); }
  .scan-label { font-size: 1.08rem; }
  .circle-btn { width: 42px; height: 42px; font-size: 1.4rem; }
}

/* ====================================================
   AUTH SCREENS (Modular com Imagens Exportadas)
   ==================================================== */
.auth-fluid-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--app-height);
  object-fit: cover;
  z-index: 0;
}

.auth-content {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 0 24px;
}

.auth-hero-logo {
  height: 80px;
  margin-bottom: 40px;
  filter: drop-shadow(0 4px 12px rgba(255,255,255,0.1));
}

.input-container {
  position: relative;
  width: 100%;
  max-width: 360px;
  height: 60px; /* Baseado nas imagens gráficas do Sketch */
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.input-bg {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain; /* Para não distorcer as caixas de arte */
  z-index: 0;
}


.styled-input {
  position: relative;
  z-index: 1;
  width: 85%; /* Deixa de área útil dentro do box */
  height: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: #C20000; /* Vermelho mais escuro para melhor contraste */
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1.05rem;
  font-weight: 600;
  padding-left: 8px; /* Pequeno espaçamento dentro da caixa */
  text-shadow: 0 1px 2px #fff, 0 0 2px #fff;
}

.styled-input::placeholder {
  color: #C20000;
  opacity: 0.7;
  text-shadow: 0 1px 2px #fff, 0 0 2px #fff;
}

.styled-input:focus {
  outline: 2px solid #FFD600;
  background: rgba(255,255,255,0.08);
}

.auth-btn {
  width: 100%;
  max-width: 360px;
  margin-top: 10px;
}

.activity-detail-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 84;
  width: var(--app-width);
  height: var(--app-height);
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0,0,0,0.32);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transform: translate(-50%, -50%);
  transition: opacity 0.22s ease, visibility 0.22s ease;
  box-sizing: border-box;
}

.activity-detail-modal.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.activity-detail-card {
  position: relative;
  width: min(88vw, 390px);
  max-height: min(86vh, 680px);
  margin: auto;
  justify-self: center;
  align-self: center;
  display: grid;
  gap: 12px;
  padding: 26px 18px 18px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1.4px solid rgba(255,140,197,0.86);
  border-radius: 26px;
  background: rgba(255,254,246,0.78);
  color: #54142c;
  font-family: 'IBM Plex Mono', monospace;
  box-shadow: 0 20px 44px rgba(84,20,44,0.24), inset 0 1px 0 rgba(255,255,255,0.58);
  box-sizing: border-box;
}

.activity-detail-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(84,20,44,0.32);
  border-radius: 50%;
  background: rgba(255,255,255,0.22);
  color: #54142c;
  cursor: pointer;
}

.activity-detail-card h2 {
  margin: 0;
  color: #54142c;
  font-size: 1.55rem;
  font-weight: 400;
  line-height: 1.05;
}

.activity-detail-map {
  position: relative;
  width: 100%;
  aspect-ratio: 14 / 10;
  min-height: 220px;
  border: 1.2px solid rgba(255,140,197,0.76);
  border-radius: 18px;
  background: rgba(249,243,236,0.68);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.55);
  overflow: hidden;
}

.activity-detail-map.is-loading::before {
  content: "Carregando percurso";
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  color: #54142c;
  font-size: 0.82rem;
  background: rgba(249,243,236,0.72);
}

.activity-detail-map .maplibregl-ctrl-attrib,
.activity-detail-map .maplibregl-ctrl-logo {
  display: none !important;
}

.activity-detail-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.activity-detail-stats div {
  display: grid;
  gap: 3px;
  padding: 11px 8px;
  border: 1px solid rgba(255,140,197,0.72);
  border-radius: 16px;
  background: rgba(255,255,255,0.42);
  text-align: center;
}

.activity-detail-stats span {
  color: #ff83bd;
  font-size: 0.92rem;
}

.activity-detail-stats small {
  color: #54142c;
  font-size: 0.68rem;
}

.activity-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.activity-detail-actions button {
  flex: 1;
  min-width: max-content;
  min-height: 38px;
  border: 1.3px solid #ff8cc5;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(139,218,250,0.88) 0%, rgba(245,92,176,0.82) 52%, rgba(157,255,0,0.78) 100%);
  color: #FFFEF6;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.8rem;
  cursor: pointer;
}

@font-face {
  font-family: 'IBM Plex Mono';
  src: url('assets/identity/ibm-plex-mono-regular.ttf') format('truetype');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'IBM Plex Mono';
  src: url('assets/identity/ibm-plex-mono-medium.ttf') format('truetype');
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: 'IBM Plex Mono';
  src: url('assets/identity/ibm-plex-mono-bold.ttf') format('truetype');
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

body, body button, body input, body select, body textarea, body * {
  font-family: 'IBM Plex Mono', monospace !important;
  letter-spacing: 0 !important;
}

#screen-profile {
  background: #fff;
}

#screen-profile .profile-background {
  background: #fff url('assets/identity/profile-gradient.webp') center top / 100% min(74vh, 650px) no-repeat !important;
}

#screen-profile .profile-background::after {
  display: none;
}

#screen-profile .profile-content {
  padding: 72px clamp(18px, 5vw, 40px) 128px;
}

#screen-profile .profile-content > *:not(.profile-photo-actions) {
  max-width: 560px;
}

#screen-profile .profile-photo-actions {
  position: absolute;
  top: 24px;
  right: max(18px, calc((100% - 560px) / 2));
}

#screen-profile .profile-bg-btn,
#screen-profile .profile-name-edit-btn,
#screen-profile .profile-qr-btn {
  min-width: 38px;
  width: 38px;
  height: 38px;
  font-size: 0;
  background: rgba(255,255,255,.88);
  border: 1px solid rgba(245,92,176,.5);
  box-shadow: 0 3px 12px rgba(245,92,176,.16);
  color: #54142c;
}

#screen-profile .profile-bg-btn::after { content: '+'; font-size: 24px; line-height: 1; }
#screen-profile .profile-name-edit-btn { background: #fff url('assets/identity/edit-icon.webp') center / cover no-repeat; }
#screen-profile .profile-name-edit-btn::after { display: none; }
#screen-profile .profile-qr-btn span { filter: invert(24%) sepia(87%) saturate(4629%) hue-rotate(339deg); }

#screen-profile .profile-header { margin-bottom: 22px; }

.profile-avatar {
  position: relative;
  width: clamp(128px, 39vw, 190px);
  aspect-ratio: 1;
  border-radius: 30%;
  background: rgba(255,255,255,.9) url('assets/identity/profile-icon.png') center / 75% no-repeat;
  background-position: center;
  box-shadow: 0 0 0 8px rgba(255,242,91,.3), 0 10px 30px rgba(159,220,0,.3);
  margin: 0 auto 18px;
}

.profile-avatar::after {
  content: '';
  position: absolute;
  inset: -9px;
  background: url('assets/identity/photo-frame.png') center / 100% 100% no-repeat;
  pointer-events: none;
}

#screen-profile .profile-title .user-name {
  display: inline-block;
  font-size: 1.1rem;
  background: rgba(255,255,255,.36);
  border: 1px solid rgba(255,242,91,.95);
  border-radius: 7px;
  padding: 5px 22px;
  color: #fff;
  text-shadow: 0 1px 4px rgba(54,112,0,.45);
}

#screen-profile .profile-title .user-role { display: none; }
#screen-profile .level-badge { position: absolute; right: 0; top: 0; transform: scale(.62); transform-origin: top right; }

#screen-profile .friend-requests-panel {
  margin: 12px auto 12px;
  background: rgba(255,255,255,.94);
  color: #291d26;
  border: 1px solid #f5e995;
  border-radius: 20px;
  box-shadow: 0 8px 22px rgba(248,198,27,.16);
}

#screen-profile .friend-circle,
#screen-profile .empty-requests { color: #54142c; }

.profile-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-bottom: 3px solid transparent;
  border-image: linear-gradient(90deg,#ffe849,#f55cb0) 1;
  margin-top: 4px;
}

.profile-tab {
  min-height: 44px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #54142c;
  cursor: pointer;
  font-size: .9rem;
}

.profile-tab.is-active { border-bottom-color: #351724; font-weight: 700; }
.profile-tab-panel[hidden] { display: none !important; }
.profile-tab-panel { padding-top: 24px; min-width: 0; }

.profile-new-post {
  display: block;
  margin: 4px 0 22px auto;
  border: 1px solid #ff4c88;
  border-radius: 999px;
  background: #fff;
  color: #54142c;
  padding: 9px 16px;
  cursor: pointer;
  font-size: .78rem;
}

.profile-new-post[hidden] { display: none; }
.profile-posts-grid { columns: 3; column-gap: 7px; }
.profile-posts-grid .profile-post { display: block; width: 100%; margin: 0 0 7px; break-inside: avoid; border: 0; padding: 0; background: #f5f5f5; cursor: pointer; overflow: hidden; }
.profile-posts-grid .profile-post img { display: block; width: 100%; height: auto; max-height: 1920px; object-fit: contain; }
.profile-post-repost-credit { display:block; padding:6px 7px; background:#20bfe8; color:#fff; text-align:left; font-size:clamp(.5rem,2.4vw,.62rem); line-height:1.3; overflow-wrap:anywhere; }
.profile-post:nth-child(4n + 2) .profile-post-repost-credit { background:#e9eef0; color:#54142c; }
.profile-post:nth-child(4n + 3) .profile-post-repost-credit { background:#ff83bd; color:#fff; }
.profile-post:nth-child(4n + 4) .profile-post-repost-credit { background:#ceff00; color:#183600; }
.profile-post-repost-credit button { padding: 0; border: 0; background: transparent; color: inherit; font: inherit; cursor: pointer; }
.profile-posts-empty { column-span: all; width: min(100%, 350px); margin: 16px auto; color: #6d8562; text-align: center; font-size: .8rem; line-height: 1.5; }

#profile-coupons-panel { display: flex; flex-direction: column; }
#profile-coupons-panel .glass-cards-grid { order: 1; }
#profile-coupons-panel .profile-partners { order: 2; }
#profile-coupons-panel .profile-coupons { order: 3; }
#profile-coupons-panel .profile-ocp { order: 4; }
#profile-coupons-panel .profile-more { order: 5; }
#profile-coupons-panel .glass-cards-grid .full-width-card { display: none; }
#profile-coupons-panel .glass-card { min-width: 0; text-align: left; }
#profile-coupons-panel .card-label { display: block; font-size: .72rem; line-height: 1.2; }

#profile-coupons-panel .glass-panel,
#profile-coupons-panel .glass-card {
  border-radius: 10px;
  background: #f5f5f7;
  box-shadow: none;
  color: #30202a;
  border: 0;
}

#profile-coupons-panel .profile-ocp,
#profile-coupons-panel .profile-coupons,
#profile-coupons-panel .glass-cards-grid,
#profile-coupons-panel .profile-partners { margin-bottom: 16px; }
#profile-coupons-panel .card-num { color: #ff83bd; }
#profile-coupons-panel .profile-coupons { background: #f5f5f7; }
#profile-coupons-panel .profile-partners { background: transparent; padding: 0; }
#profile-coupons-panel .partner-directory-controls { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
#profile-coupons-panel .partner-directory-controls input { grid-column: 1 / -1; }
#profile-coupons-panel .partner-directory-controls select { min-width: 0; font-size: .7rem; }
#profile-coupons-panel .partner-directory-controls input { border-radius: 999px; background: white; }

.profile-more { margin-bottom: 16px; color: #513640; }
.profile-more > summary { cursor: pointer; padding: 12px 0; font-size: .8rem; }
.profile-more > .glass-panel { margin-bottom: 12px; }

.profile-post-modal[hidden] { display: none; }
.profile-post-modal {
  position: fixed;
  inset: 0;
  z-index: 1500;
  display: grid;
  place-items: center;
  padding: 16px;
  box-sizing: border-box;
  background: rgba(37,29,33,.5);
}

.profile-post-form {
  position: relative;
  width: min(100%, 430px);
  max-height: min(92dvh, 700px);
  overflow-y: auto;
  display: grid;
  gap: 12px;
  padding: 22px;
  box-sizing: border-box;
  border: 1px solid #ff83bd;
  border-radius: 8px;
  background: #fffef6;
  color: #54142c;
  touch-action: pan-y;
}

.profile-post-form h2 { margin: 0 38px 12px 0; font-size: 1.15rem; }
.profile-post-form label { font-size: .8rem; }
.profile-post-form input, .profile-post-form textarea { width: 100%; box-sizing: border-box; border: 1px solid #a5db71; border-radius: 6px; padding: 10px; background: #fff; color: #30202a; }
.profile-post-form input[type='file']::file-selector-button { border: 1px solid #ff8cc5; border-radius: 4px; background: #fffef6; color: #54142c; padding: 7px 10px; cursor: pointer; }
.profile-post-form img { width: 100%; max-height: 50vh; object-fit: contain; }
.profile-post-detail img { max-height: min(70dvh, 1920px); }
.profile-post-detail p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .85rem; }
.profile-post-form button[type='submit'] { border: 1px solid #ff8cc5; border-radius: 999px; padding: 12px; background: linear-gradient(100deg,#ff3e7a,#ff7057,#ffe343,#91d900); color: #fff; cursor: pointer; }
.profile-post-close { position: absolute; top: 14px; right: 14px; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 1px solid #ff83bd; border-radius: 50%; background: #fff; color: #54142c; font-size: 22px; cursor: pointer; }

.event-popup-main,
.event-popup-main.is-expanded {
  background: color-mix(in srgb, var(--event-accent, #ceff00) 72%, white);
}

.event-popup-main::before { border-color: color-mix(in srgb, var(--event-accent, #ceff00) 75%, #54142c); }
.event-popup-kicker { display: table; width: max-content; max-width: 100%; padding: 2px 4px; background: #ceff00; color: #26362a; }

/* New bottom navigation: the scanner is the central color target. */
.scan-bottom-wrapper { width: min(94%, 520px); overflow: visible; border-radius: 0; }
.scan-bottom-content { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); padding: 0 3%; gap: 0; }
.bottom-nav-action,
.map-search-toggle.bottom-nav-action {
  position: relative;
  top: auto;
  left: auto;
  transform: none;
  width: clamp(34px, 9.5vw, 56px);
  height: clamp(34px, 9.5vw, 56px);
  aspect-ratio: 1;
  justify-self: center;
  align-self: center;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
  opacity: 1;
  transition: opacity .22s ease, transform .22s ease;
}
.bottom-nav-action img,
.map-search-toggle.bottom-nav-action img { display: block; width: 100%; height: 100%; object-fit: contain; }
.bottom-nav-action:hover { transform: scale(1.06); }
.bottom-nav-action:focus-visible { outline: 2px solid #54142c; outline-offset: 3px; }
.bottom-nav-scan { width: clamp(43px, 12vw, 68px); height: clamp(43px, 12vw, 68px); }
.scan-bottom-wrapper.search-active .map-search-toggle { opacity: 0; pointer-events: none; }
#screen-map.search-active .map-search-toggle { visibility: visible; }

/* The white search circle travels and unfolds into the top search field. */
.map-search-form {
  transform: translate(calc(-50% + var(--search-dx, 0px)), var(--search-dy, 0px)) scaleX(var(--search-scale, .13));
  transform-origin: center 22px;
  opacity: .98;
  visibility: hidden;
  transition: transform .42s cubic-bezier(.2,.8,.2,1), visibility 0s linear .42s;
}
.map-search-form.is-open {
  transform: translate(-50%, 0) scaleX(1);
  visibility: visible;
  transition: transform .42s cubic-bezier(.2,.8,.2,1), visibility 0s;
}
.map-search-form input {
  background: rgba(255,254,246,.94);
  font-family: 'IBM Plex Mono', monospace;
  color: #54142c;
}
.map-search-form:not(.is-open) input,
.map-search-form:not(.is-open) .map-search-suggestions { opacity: 0; }
.map-search-form.is-open input { animation: searchInputReveal .22s .22s both; }
@keyframes searchInputReveal { from { color: transparent; } to { color: #54142c; } }

.profile-reaction-notifications {
  margin: 0 0 16px;
  border: 1px solid #ff83bd;
  border-radius: 8px;
  background: rgba(255,254,246,.94);
  overflow: hidden;
}
.profile-reaction-notifications[hidden],
.profile-reaction-notifications [hidden] { display: none !important; }
.profile-reaction-notifications > button {
  width: 100%; min-height: 42px; display: flex; align-items: center; justify-content: space-between;
  border: 0; padding: 9px 12px; background: transparent; color: #392b31;
  text-align: left; cursor: pointer; font-size: .8rem;
}
#profile-reaction-unread { min-width: 19px; height: 19px; padding: 0 4px; border-radius: 50%; background: #ff83bd; color: white; text-align: center; line-height: 19px; }
#profile-reaction-notifications-list { max-height: 230px; overflow-y: auto; border-top: 1px solid #f1d4e4; }
.profile-reaction-item { display: grid; grid-template-columns: 32px 1fr; align-items: center; gap: 9px; width: 100%; padding: 8px 12px; border: 0; border-bottom: 1px solid #f4e8ed; background: transparent; color: #392b31; text-align: left; font-size: .72rem; cursor: pointer; }
.profile-reaction-item img { width: 32px; height: 32px; object-fit: cover; border-radius: 3px; }
.profile-post-actions { display: flex; align-items: center; gap: 10px; }
.profile-post-action { position: relative; flex: 0 0 46px; width: 46px; min-width: 46px; max-width: 46px; height: 46px; min-height: 46px; max-height: 46px; box-sizing: border-box; padding: 0; border: 0; border-radius: 50%; background: transparent; contain: layout; cursor: pointer; }
.profile-post-action img { display: block; width: 100%; height: 100%; object-fit: contain; transform-origin: 50% 50%; }
.profile-post-action:focus-visible { outline: 2px solid #54142c; outline-offset: 2px; }
.profile-post-action:disabled { opacity: 1; cursor: default; }
.profile-post-like[aria-pressed='true']::after {
  content: ''; position: absolute; inset: 12px 12px 11px; pointer-events: none;
  background: linear-gradient(135deg,#35bcea,#f55cb0 40%,#ff3643 66%,#a2dc00);
  clip-path: polygon(50% 90%, 6% 46%, 4% 25%, 18% 9%, 35% 10%, 50% 27%, 65% 10%, 82% 9%, 96% 25%, 94% 46%);
  filter: drop-shadow(0 1px 3px rgba(245,92,176,.42));
  animation: likeFill .36s cubic-bezier(.2,.9,.25,1.25) both;
}
@keyframes likeFill { from { transform: scale(.25); opacity: 0; } 70% { transform: scale(1.16); opacity: 1; } to { transform: scale(1); opacity: 1; } }
.profile-post-repost.is-spinning img { animation: repostSpin .62s cubic-bezier(.2,.8,.2,1); }
@keyframes repostSpin { 55% { transform: rotate(230deg); } to { transform: rotate(360deg); } }
.profile-post-repost[aria-pressed='true'] { box-shadow: 0 0 0 2px #a2dc00 inset; }
.profile-post-private-counts { margin-left: auto; color: #6c4d5b; font-size: .68rem; text-align: right; }
#profile-post-action-error { color: #b00020; font-size: .75rem; }
@media (prefers-reduced-motion: reduce) {
  .map-search-form, .bottom-nav-action { transition-duration: .01ms; }
  .profile-post-repost.is-spinning img, .profile-post-like[aria-pressed='true']::after { animation-duration: .01ms; }
}
.event-popup-main .event-popup-copy strong,
.event-popup-main .event-popup-copy small,
.event-popup-main .event-description { color: #243225; }

.chat-modal.is-event-chat .chat-card {
  background: var(--event-accent, #ceff00);
  border-color: color-mix(in srgb, var(--event-accent, #ceff00) 65%, #54142c);
  color: #26362a;
}

.chat-modal.is-event-chat .chat-messages {
  background: rgba(255,254,246,.92);
}

.chat-modal.is-event-chat #chat-send {
  width: 42px;
  min-width: 42px;
  padding: 0;
  border: 1px solid var(--event-accent, #ceff00);
  border-radius: 50%;
  background: #fff url('assets/identity/send-icon.webp') center / 100% 100% no-repeat;
  font-size: 0;
}

@media (min-width: 700px) {
  #screen-profile .profile-content { padding-top: 44px; }
  #screen-profile .profile-avatar { width: 154px; }
  #screen-profile .profile-header { margin-bottom: 12px; }
}
