/* Pawder – brand UI */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

:root {
  --primary: #A96FF5;
  --primary-deep: #8B4FE0;
  --primary-soft: #C49AFA;
  --brand-gradient: linear-gradient(135deg, #C49AFA 0%, #A96FF5 48%, #8B4FE0 100%);
  --like: #21d07c;
  --nope: #ff4458;
  --super: #3b9eff;
  --gold: #e6a817;
  --boost: #A96FF5;
  --text: #0E0F19;
  --muted: #6B7280;
  --border: #E8E9ED;
  --card-radius: 10px;
  --device-w: 390px;
  --device-h: 844px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --font: "Nimbus Sans", "Nimbus Sans L", Helvetica, Arial, sans-serif;
}

html,
body {
  height: 100%;
  overflow: hidden;
  font-family: var(--font);
  background: #0E0F19;
  color: var(--text);
  user-select: none;
  touch-action: manipulation;
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea {
  font-family: inherit;
}

.device-frame {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0E0F19;
}

.app {
  position: relative;
  width: 100%;
  max-width: var(--device-w);
  height: 100%;
  max-height: var(--device-h);
  background: #fff;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 24px 80px rgba(0, 0, 0, 0.5);
}

@media (min-width: 420px) {
  .app {
    height: var(--device-h);
    border-radius: 32px;
    margin: 16px 0;
  }
}

.screen {
  position: absolute;
  inset: 0 0 49px;
  display: none;
  flex-direction: column;
  background: #fff;
}

.screen--active {
  display: flex;
}

.screen--scroll {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.discovery-hint {
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  padding: 0 12px 2px;
  line-height: 1.3;
}

/* Header – discovery */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px 2px;
  min-height: 50px;
  z-index: 20;
}

.header__btn {
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #b3b3b3;
}

.header__avatar-wrap {
  padding: 2px;
  background: var(--brand-gradient);
  border-radius: 50%;
}

.header__avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fff;
  display: block;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.header__logo {
  display: flex;
  align-items: center;
  justify-content: center;
}

.header__logo-img {
  display: block;
  height: 28px;
  width: auto;
  max-width: 150px;
  object-fit: contain;
}

.icon-paw {
  display: block;
}

.icon-paw use {
  fill: inherit;
}

.icon-paw--brand {
  fill: var(--primary);
}

.tab .icon-paw {
  fill: #c7c7cc;
}

.tab--active .icon-paw {
  fill: var(--primary);
}

/* Cards */
.card-area {
  flex: 1;
  position: relative;
  padding: 6px 12px 4px;
  min-height: 0;
}

.card-stack {
  position: relative;
  width: 100%;
  height: 100%;
}

.card {
  position: absolute;
  inset: 0;
  border-radius: var(--card-radius);
  overflow: hidden;
  background: #ddd;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.15);
  will-change: transform;
  cursor: grab;
  touch-action: none;
}

.card:active {
  cursor: grabbing;
}

.card--animating {
  pointer-events: none;
  transition: transform 0.42s cubic-bezier(0.175, 0.885, 0.32, 1.1), opacity 0.3s ease;
}

.card--behind {
  transform: scale(0.96) translateY(6px) !important;
  filter: brightness(0.92);
  pointer-events: none;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.card__gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 42%, rgba(0, 0, 0, 0.72) 100%);
  pointer-events: none;
}

.card__info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0 16px 18px;
  color: #fff;
  pointer-events: none;
  z-index: 4;
}

.card__info-btn {
  position: absolute;
  right: 14px;
  bottom: 148px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.92);
  color: #333;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  cursor: pointer;
  z-index: 5;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.card__info-btn svg {
  width: 18px;
  height: 18px;
}

.card__name {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.card__meta {
  font-size: 15px;
  font-weight: 500;
  margin-top: 4px;
  opacity: 0.92;
}

.card__anthem {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 6px 10px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  max-width: 100%;
}

.card__anthem-icon {
  color: var(--primary-soft);
  font-size: 14px;
}

.card__headline {
  margin-top: 8px;
  font-size: 14px;
  font-weight: 500;
  opacity: 0.9;
  line-height: 1.3;
}

.card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.card__badge {
  padding: 5px 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.card__tags {
  display: none;
}

.card__stamp {
  position: absolute;
  top: 56px;
  padding: 2px 8px;
  border: 4px solid;
  border-radius: 4px;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: 0.02em;
  opacity: 0;
  z-index: 10;
  pointer-events: none;
}

.card__stamp--like {
  left: 20px;
  color: var(--like);
  border-color: var(--like);
  transform: rotate(-15deg);
}

.card__stamp--nope {
  right: 20px;
  color: var(--nope);
  border-color: var(--nope);
  transform: rotate(15deg);
}

.card__stamp--super {
  left: 50%;
  top: 40%;
  transform: translateX(-50%) rotate(-8deg);
  color: var(--super);
  border-color: var(--super);
  font-size: 26px;
}

/* Action bar – Tinder layout */
.action-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 10px 16px 14px;
  padding-bottom: calc(14px + var(--safe-bottom));
}

.action {
  border: none;
  background: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.12s ease;
}

.action:active {
  transform: scale(0.9);
}

.action:disabled {
  opacity: 0.4;
  transform: none;
}

.action--sm {
  width: 48px;
  height: 48px;
}

.action--md {
  width: 52px;
  height: 52px;
}

.action--lg {
  width: 64px;
  height: 64px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

.action--like {
  box-shadow: 0 4px 14px rgba(33, 208, 124, 0.35);
}

.action--nope {
  box-shadow: 0 4px 14px rgba(255, 68, 88, 0.35);
}

.action--super {
  box-shadow: 0 4px 12px rgba(59, 158, 255, 0.3);
}

.action__svg {
  display: block;
  pointer-events: none;
}

.tab__paw {
  display: block;
  width: 28px;
  height: 28px;
  object-fit: contain;
  opacity: 0.35;
}

.tab--active .tab__paw {
  opacity: 1;
}

.action--pulse {
  animation: action-pulse 0.3s ease;
}

@keyframes action-pulse {
  50% { transform: scale(1.12); }
}

.empty-state {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px;
  gap: 8px;
}

.empty-state[hidden] {
  display: none;
}

.empty-state__emoji {
  font-size: 52px;
  line-height: 1;
}

.empty-state h2 {
  font-size: 20px;
  font-weight: 700;
  margin-top: 16px;
}

.empty-state p {
  color: var(--muted);
  font-size: 15px;
}

.btn-primary {
  margin-top: 16px;
  padding: 14px 32px;
  border: none;
  border-radius: 28px;
  background: var(--brand-gradient);
  color: #fff;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

/* Tab bar */
.tab-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 49px;
  padding-bottom: var(--safe-bottom);
  display: flex;
  justify-content: space-around;
  align-items: center;
  background: #fff;
  border-top: 1px solid var(--border);
  z-index: 30;
}

.tab {
  flex: 1;
  height: 100%;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #b3b3b3;
  cursor: pointer;
  position: relative;
}

.tab--active {
  color: var(--primary);
}

.tab__badge {
  position: absolute;
  top: 6px;
  left: 54%;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
}

/* Inbox */
.inbox-header {
  padding: 12px 16px 8px;
}

.inbox-header h1 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.inbox-search {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 16px 12px;
  padding: 10px 14px;
  background: #f0f2f4;
  border-radius: 10px;
  color: var(--muted);
  font-size: 15px;
}

.matches-new {
  padding: 0 16px 8px;
}

.matches-new h2 {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.matches-new--hidden {
  display: none;
}

.matches-list {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.matches-list::-webkit-scrollbar {
  display: none;
}

.match-item {
  flex-shrink: 0;
  width: 76px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  text-align: center;
}

.match-item__ring {
  width: 76px;
  height: 76px;
  padding: 3px;
  border-radius: 50%;
  background: var(--brand-gradient);
}

.match-item__ring img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #fff;
  display: block;
}

.match-item span {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-top: 6px;
  color: var(--text);
}

.matches-empty {
  font-size: 14px;
  color: var(--muted);
}

.inbox-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 12px 16px 4px;
}

.chat-list {
  list-style: none;
  padding-bottom: 16px;
}

.chat-list > li {
  border-bottom: 1px solid var(--border);
}

.chat-item {
  display: flex;
  gap: 12px;
  width: 100%;
  padding: 12px 16px;
  border: none;
  background: #fff;
  text-align: left;
  cursor: pointer;
  align-items: center;
}

.chat-item:active {
  background: #f7f7f7;
}

.chat-item__avatar {
  position: relative;
  flex-shrink: 0;
}

.chat-item__avatar img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.chat-item--unread .chat-item__avatar::after {
  content: "";
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 14px;
  height: 14px;
  background: var(--like);
  border: 2px solid #fff;
  border-radius: 50%;
}

.chat-item__body {
  flex: 1;
  min-width: 0;
}

.chat-item__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.chat-item__top strong {
  font-size: 17px;
  font-weight: 600;
}

.chat-item__top time {
  font-size: 13px;
  color: var(--muted);
}

.chat-item--unread .chat-item__top time {
  color: var(--primary);
  font-weight: 600;
}

.chat-item__preview {
  font-size: 15px;
  color: var(--muted);
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-item--unread .chat-item__preview {
  color: var(--text);
  font-weight: 600;
}

.chat-item__badge {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 8px;
  background: #e9ebee;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
}

.chat-item--unread .chat-item__badge {
  background: rgba(253, 38, 122, 0.12);
  color: var(--primary);
}

/* Profile */
.profile-top {
  position: relative;
}

.profile-settings {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 5;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.profile-edit-fab {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.profile-hero {
  height: 420px;
  background: #ddd;
}

.profile-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-card {
  margin: -24px 12px 0;
  padding: 16px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
  position: relative;
  z-index: 2;
}

.profile-card__head {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.profile-card__head h1 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.profile-age {
  font-size: 28px;
  font-weight: 300;
  color: var(--primary);
}

.profile-meta {
  margin-top: 4px;
  font-size: 15px;
  color: var(--muted);
}

.profile-premium {
  padding: 16px;
}

.premium-pill {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, #fff9e6 0%, #fff3cc 100%);
  border: 1px solid #f0e0a8;
}

.profile-gold-label {
  font-weight: 700;
  background: linear-gradient(90deg, #c9a227, #e8c547);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.feature-value--gold {
  font-size: 14px;
  font-weight: 600;
  color: #9a7b0a;
}

.profile-info-cards {
  margin: 0 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.profile-info-card {
  padding: 14px 16px;
  background: #f7f8fa;
  border-radius: 12px;
}

.profile-info-card__label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.profile-info-card p {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
}

.profile-details {
  padding-bottom: 24px;
}

.profile-section {
  padding: 16px 16px 0;
  border-top: 1px solid var(--border);
}

.profile-section:first-child {
  border-top: none;
  padding-top: 8px;
}

.profile-section h3 {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 12px;
}

.profile-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid #f0f2f4;
}

.profile-row:last-of-type {
  border-bottom: none;
}

.profile-row__icon {
  font-size: 20px;
  line-height: 1.3;
  flex-shrink: 0;
  width: 28px;
  text-align: center;
}

.profile-row__text {
  font-size: 16px;
  line-height: 1.4;
  color: var(--text);
  padding-top: 1px;
}

.profile-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 8px;
}

.profile-chip {
  display: inline-block;
  padding: 8px 14px;
  border: 1.5px solid var(--border);
  border-radius: 24px;
  font-size: 15px;
  font-weight: 500;
  background: #fff;
}

/* Chat thread */
.screen--chat {
  position: absolute;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  background: #fff;
}

.screen--chat[hidden] {
  display: none !important;
}

.chat-thread-header {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 8px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.chat-thread-back,
.chat-thread-more {
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--primary);
}

.chat-thread-more {
  color: var(--muted);
}

.chat-thread-user {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  min-width: 0;
}

.chat-avatar-ring {
  display: block;
  padding: 2px;
  background: var(--brand-gradient);
  border-radius: 50%;
  flex-shrink: 0;
}

.chat-avatar-ring img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fff;
  display: block;
}

.chat-thread-names {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.chat-thread-names > span:first-child {
  font-size: 17px;
  font-weight: 600;
}

.chat-thread-status {
  font-size: 13px;
  color: var(--muted);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: #f7f7f7;
  -webkit-overflow-scrolling: touch;
}

.msg--system {
  text-align: center;
  margin: 10px 0;
}

.msg--system span {
  font-size: 12px;
  color: var(--muted);
  background: #e9ebee;
  padding: 6px 14px;
  border-radius: 14px;
  display: inline-block;
  max-width: 88%;
  line-height: 1.35;
}

.msg--bobby {
  align-self: flex-end;
  max-width: 78%;
}

.msg__bubble {
  padding: 10px 14px;
  border-radius: 20px;
  font-size: 16px;
  line-height: 1.35;
}

.msg--bobby .msg__bubble {
  background: var(--brand-gradient);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.msg__time {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
  text-align: right;
}

.chat-compose {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  padding-bottom: calc(8px + var(--safe-bottom));
  border-top: 1px solid var(--border);
  background: #fff;
  flex-shrink: 0;
}

.chat-compose-extra {
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  color: #b3b3b3;
  padding: 8px;
}

.chat-compose input {
  flex: 1;
  border: none;
  background: #f0f2f4;
  border-radius: 20px;
  padding: 10px 16px;
  font-size: 16px;
  color: var(--text);
}

.chat-compose-send {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: var(--brand-gradient);
  opacity: 0.45;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Match screen */
.match-screen {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--brand-gradient);
  text-align: center;
  color: #fff;
}

.match-screen[hidden] {
  display: none;
}

.match-screen__hearts {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.match-screen__title {
  font-size: 36px;
  font-weight: 800;
  font-style: italic;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
  animation: match-title 0.5s cubic-bezier(0.34, 1.4, 0.64, 1);
  z-index: 1;
}

.match-screen__sub {
  font-size: 16px;
  margin-top: 8px;
  opacity: 0.95;
  z-index: 1;
}

.match-screen__photos {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 36px 0 40px;
  z-index: 1;
}

.match-photo {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.match-photo--you {
  transform: rotate(-8deg) translateX(12px);
  z-index: 2;
}

.match-photo--them {
  transform: rotate(8deg) translateX(-12px);
}

.match-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.match-screen__actions {
  width: 100%;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 1;
}

.match-btn {
  width: 100%;
  padding: 16px;
  border-radius: 28px;
  font-family: var(--font);
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  border: none;
}

.match-btn--primary {
  background: #fff;
  color: var(--primary);
}

.match-btn--secondary {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.8);
}

@keyframes match-title {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.match-heart {
  position: absolute;
  font-size: 22px;
  animation: float-heart 2s ease-in forwards;
  opacity: 0.7;
}

@keyframes float-heart {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.5);
  }
  20% {
    opacity: 0.8;
  }
  100% {
    opacity: 0;
    transform: translateY(-120vh) scale(1.2) rotate(45deg);
  }
}

/* Detail */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  background: rgba(0, 0, 0, 0.5);
}

.overlay[hidden] {
  display: none;
}

.overlay--detail {
  align-items: flex-end;
}

.detail-panel {
  width: 100%;
  max-width: var(--device-w);
  max-height: 94%;
  background: #fff;
  border-radius: 14px 14px 0 0;
  overflow-y: auto;
  animation: slide-up 0.32s ease;
}

@keyframes slide-up {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.detail-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.detail-content {
  position: relative;
}

.detail-content img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
}

.detail-content__body {
  padding: 20px 16px 40px;
}

.detail-content__body h2 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.detail-content__species {
  margin-top: 2px;
  font-size: 16px;
  font-weight: 600;
  color: var(--primary);
}

.detail-content__distance {
  color: var(--muted);
  font-size: 15px;
  margin-top: 4px;
}

.detail-anthem {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, #f6effe 0%, #ebe0fc 100%);
  border: 1px solid #d9c4f7;
}

.detail-anthem__label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary-deep);
  margin-bottom: 4px;
}

.detail-anthem__track {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.detail-anthem__track span {
  color: var(--primary);
  margin-right: 4px;
}

.detail-looking {
  margin-top: 14px;
  padding: 12px 14px;
  background: #f7f8fa;
  border-radius: 12px;
}

.detail-looking__label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 4px;
}

.detail-looking p {
  font-size: 16px;
  font-weight: 600;
}

.detail-content__bio {
  margin-top: 16px;
  font-size: 16px;
  line-height: 1.45;
  white-space: pre-line;
}

.detail-facts {
  margin-top: 16px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.detail-tags span {
  padding: 8px 14px;
  border: 1.5px solid var(--border);
  border-radius: 24px;
  font-size: 14px;
  font-weight: 500;
}

/* Deleted chats */
.chat-item--deleted {
  opacity: 0.55;
}

.chat-item--deleted .chat-item__preview {
  font-style: italic;
}

.msg-deleted {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 24px;
  color: var(--muted);
  gap: 8px;
}

.msg-deleted p {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.msg-deleted__sub {
  font-size: 14px !important;
  font-weight: 400 !important;
  color: var(--muted) !important;
}

/* HN article */
.msg-article {
  padding: 20px 16px 32px;
}

.msg-article__source {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 10px;
}

.msg-article__title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-bottom: 16px;
  color: var(--text);
}

.msg-article__p {
  font-size: 15px;
  line-height: 1.55;
  color: #222;
  margin-bottom: 14px;
}

/* Crew overlay */
.crew-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(14, 15, 25, 0.55);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
}

.crew-overlay[hidden] {
  display: none;
}

.crew-panel {
  width: 100%;
  max-width: var(--device-w);
  background: #fff;
  border-radius: 20px 20px 16px 16px;
  padding: 20px 20px 28px;
  position: relative;
  max-height: 85vh;
  overflow-y: auto;
}

.crew-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text);
}

.crew-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  padding-right: 40px;
}

.crew-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.crew-list li {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.crew-list strong {
  font-size: 16px;
  font-weight: 700;
}

.crew-list span {
  font-size: 14px;
  color: var(--muted);
}

.crew-meta {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  text-align: center;
}
