.profile-modal {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  pointer-events: none;
  visibility: hidden;
}
.profile-modal.is-open {
  pointer-events: auto;
  visibility: visible;
}

.profile-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 8, 12, 0.62);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.profile-modal.is-open .profile-modal__backdrop { opacity: 1; }

.profile-modal__sheet {
  position: relative;
  z-index: 1;
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: scale(0.94) translateY(10px);
  transition: opacity 0.28s ease,
              transform 0.34s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.22),
              0 4px 16px rgba(0, 0, 0, 0.08);

  width: min(300px, calc(100vw - 40px));
  max-height: calc(100dvh - 40px);
}
.profile-modal.is-open .profile-modal__sheet {
  opacity: 1;
  transform: scale(1) translateY(0);
}

@media (min-width: 640px) {
  .profile-modal__sheet {
    flex-direction: row;
    align-items: stretch;
    width: auto;
    height: min(400px, calc(100dvh - 80px));
    max-height: min(400px, calc(100dvh - 80px));
  }
}

.profile-modal__close {
  position: absolute;
  top: 11px;
  right: 11px;
  z-index: 20;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #111;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.14);
  transition: background 0.18s, transform 0.18s;
}
.profile-modal__close:hover  { background: #fff; transform: scale(1.08); }
.profile-modal__close:active { transform: scale(0.93); }

.profile-modal__gallery {
  position: relative;
  background: #f0f0f2;
  overflow: hidden;
  touch-action: pan-y;
  flex-shrink: 0;

  width: 100%;
  aspect-ratio: 4 / 5;
}

@media (min-width: 640px) {
  .profile-modal__gallery {
    width: auto;
    height: 100%;
    aspect-ratio: 4 / 5;
    border-radius: 20px 0 0 20px;
  }
}

.profile-modal__slides {
  display: flex;
  height: 100%;
  width: 100%;
  will-change: transform;
}
.profile-modal__slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

.profile-modal__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #111;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
  transition: background 0.18s, transform 0.18s;
  z-index: 5;
}
.profile-modal__arrow--prev { left: 10px; }
.profile-modal__arrow--next { right: 10px; }
.profile-modal__arrow:hover  { background: #fff; transform: translateY(-50%) scale(1.06); }
.profile-modal__arrow:active { transform: translateY(-50%) scale(0.93); }
.profile-modal__arrow:disabled { opacity: 0.25; pointer-events: none; }

.profile-modal__dots {
  position: absolute;
  bottom: 10px;
  left: 0; right: 0;
  display: flex;
  justify-content: center;
  gap: 5px;
  z-index: 5;
}
.profile-modal__dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  padding: 0;
  transition: background 0.2s, width 0.2s;
}
.profile-modal__dot.is-active {
  background: #fff;
  width: 18px;
  border-radius: 3px;
}
.profile-modal__dot:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.profile-modal__body {
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  padding: 16px;
  gap: 12px;
}

@media (min-width: 640px) {
  .profile-modal__body {
    width: 280px;
    flex-shrink: 0;
    flex-grow: 0;
    padding: 22px 24px;
    gap: 0; 
    justify-content: flex-start;
    overflow-y: auto;
  }
}

.profile-modal__top-label {
  display: none;
}
@media (min-width: 640px) {
  .profile-modal__top-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--brand, #b10c41);
    margin-bottom: 12px;
  }
  .profile-modal__top-label::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 2px;
    background: var(--brand, #b10c41);
    border-radius: 1px;
  }
}

.profile-modal__header-row {
  display: block;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

@media (min-width: 640px) {
  .profile-modal__header-row {
    margin-bottom: 6px;
  }
}

.profile-modal__name {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0a0a0f;
  letter-spacing: -0.025em;
  margin: 0 0 4px;
  line-height: 1.15;
}
@media (min-width: 640px) {
  .profile-modal__name {
    font-size: 1.25rem;
  }
}

.profile-modal__location {
  font-size: 0.74rem;
  color: #9ca3af;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 5px;
}
.profile-modal__location::before {
  content: '';
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
}

.profile-modal__badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
  margin-top: 2px;
   margin-bottom: 8px;
}
.profile-modal__badge--p {
  background: rgba(177, 12, 65, 0.08);
  color: var(--brand, #b10c41);
  border: 1px solid rgba(177, 12, 65, 0.18);
}
.profile-modal__badge--l {
  background: rgba(37, 99, 235, 0.08);
  color: #2563eb;
  border: 1px solid rgba(37, 99, 235, 0.18);
}
.profile-modal__rule {
  display: none;
}
@media (min-width: 640px) {
  .profile-modal__rule {
    display: block;
    height: 1px;
    background: #f0f0f4;
    margin: 14px 0;
    flex-shrink: 0;
  }
}

.profile-modal__stats {
  display: flex;
  align-items: stretch;
  background: #f7f7f9;
  border-radius: 12px;
  overflow: hidden;
}

@media (min-width: 640px) {
  .profile-modal__stats {
    margin-bottom: 14px;
    border-radius: 10px;
  }
}

.profile-modal__stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 11px 6px;
}

.profile-modal__stat svg { color: #c4c4cc; margin-bottom: 1px; }

.profile-modal__stat-val {
  font-size: 0.9rem;
  font-weight: 800;
  color: #0a0a0f;
  line-height: 1;
}
@media (min-width: 640px) {
  .profile-modal__stat-val { font-size: 1rem; }
}

.profile-modal__stat-lbl {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #b8b8c4;
}

.profile-modal__stat-divider {
  width: 1px;
  background: #e8e8ee;
  flex-shrink: 0;
  margin: 8px 0;
}

.profile-modal__info-rows {
  display: none;
}
@media (min-width: 640px) {
  .profile-modal__info-rows {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
  }
}

.profile-modal__info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
}

.profile-modal__info-key {
  color: #9ca3af;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}
.profile-modal__info-key svg { color: #d1d5db; flex-shrink: 0; }

.profile-modal__info-val {
  font-weight: 700;
  color: #1f2937;
}

.profile-modal__avail {
  display: none;
}
@media (min-width: 640px) {
  .profile-modal__avail {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(34, 197, 94, 0.07);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 14px;
  }
  .profile-modal__avail-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #22c55e;
    flex-shrink: 0;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
  }
  .profile-modal__avail-text {
    font-size: 0.72rem;
    font-weight: 700;
    color: #15803d;
    letter-spacing: 0.01em;
  }
}

.profile-modal__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 42px;
  border-radius: 12px;
  border: none;
  background: var(--brand, #b10c41);
  color: #fff;
  font-family: var(--font, sans-serif);
  font-size: 0.83rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, transform 0.18s, box-shadow 0.2s;
  box-shadow: 0 4px 18px rgba(177, 12, 65, 0.28);
  flex-shrink: 0;
  margin-top: auto;
}
@media (min-width: 640px) {
  .profile-modal__cta {
    height: 44px;
    border-radius: 10px;
    margin-top: 0;
  }
}
.profile-modal__cta:hover {
  background: #96093a;
  box-shadow: 0 6px 26px rgba(177, 12, 65, 0.38);
  transform: translateY(-1px);
}
.profile-modal__cta:active { transform: translateY(0); }

@supports (padding-bottom: env(safe-area-inset-bottom)) {
  @media (max-width: 639px) {
    .profile-modal__body {
      padding-bottom: max(16px, calc(env(safe-area-inset-bottom) + 12px));
    }
  }
}

.profile-modal__voice {
  flex-shrink: 0;
}

.voice-player {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0;
}

.voice-play-btn {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  border: none;
  outline: none;
  -webkit-tap-highlight-color: transparent; 
  background: transparent;
  color: var(--brand, #b10c41);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: opacity 0.15s, transform 0.15s;
}
.voice-play-btn:focus         { outline: none; }
.voice-play-btn:focus-visible { outline: none; }

.voice-bar {
  flex: 1;
  height: 3px;
  background: #e4e4ec;
  border-radius: 2px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.voice-bar:hover .voice-progress {
  background: #96093a;
}
.voice-progress {
  height: 100%;
  width: 0%;
  background: var(--brand, #b10c41);
  border-radius: 2px;
  transition: width 0.1s linear;
}

.voice-time {
  flex-shrink: 0;
  font-size: 0.65rem;
  font-weight: 600;
  color: #c4c4cc;
  min-width: 24px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.profile-modal__avail {
  display: none !important;
}

@media (min-width: 640px) {
  .profile-modal__voice {
    margin-top: auto;
    margin-bottom: 14px;
  }
}