:root {
  color-scheme: dark;
  --bg: #050505;
  --panel: #111111;
  --panel-strong: #181818;
  --text: #ffffff;
  --muted: #9a9a9a;
  --soft: #d8d8d8;
  --border: rgba(255, 255, 255, 0.12);
  --shadow: rgba(0, 0, 0, 0.52);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  min-height: 100dvh;
  margin: 0;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.06), transparent 34rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button {
  font: inherit;
}

.page-shell {
  width: min(100%, 560px);
  min-height: 100dvh;
  margin: 0 auto;
  background: #050505;
  box-shadow: 0 0 80px var(--shadow);
}

.open-hint {
  position: sticky;
  top: 0;
  z-index: 20;
  display: none;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  min-height: 62px;
  padding: calc(9px + env(safe-area-inset-top)) 16px 9px;
  background: rgba(17, 17, 17, 0.96);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(18px);
}

.in-app-browser .open-hint {
  display: grid;
}

.hint-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  font-size: 23px;
}

.hint-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.hint-copy strong {
  overflow: hidden;
  color: var(--text);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hint-copy span {
  overflow: hidden;
  color: var(--soft);
  font-size: 13px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hint-copy b {
  display: inline-grid;
  min-width: 28px;
  height: 24px;
  margin: 0 2px;
  place-items: center;
  border-radius: 8px;
  background: #2d2d2d;
  color: var(--text);
  font-weight: 800;
  letter-spacing: 0;
}

.hint-side {
  display: grid;
  justify-items: center;
  gap: 2px;
  color: var(--muted);
}

.hint-side span {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 8px;
  background: #dae9ff;
  color: #2475c7;
  font-size: 16px;
  font-weight: 900;
}

.hint-side small {
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
}

main {
  padding-bottom: 34px;
}

.hero {
  position: relative;
  height: 58dvh;
  min-height: 390px;
  max-height: 660px;
  overflow: hidden;
  background: #111111;
}

.hero::after {
  position: absolute;
  inset: auto 0 0;
  height: 48%;
  content: "";
  background: linear-gradient(to bottom, transparent, rgba(5, 5, 5, 0.84) 58%, #050505);
  pointer-events: none;
}

.hero img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center 36%;
}

.profile {
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: center;
  gap: 10px;
  margin-top: -68px;
  padding: 0 24px 28px;
  text-align: center;
}

.avatar {
  width: 132px;
  height: 132px;
  display: block;
  border: 5px solid #080808;
  border-radius: 50%;
  outline: 2px solid rgba(255, 255, 255, 0.18);
  background: #181818;
  box-shadow: 0 16px 36px var(--shadow);
  object-fit: cover;
  object-position: center;
}

.profile h1 {
  margin: 12px 0 0;
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 44px;
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: 0;
}

.profile p {
  margin: 0;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.2;
}

.actions {
  padding: 0 20px 18px;
}

.active-hint {
  margin: 0 0 10px;
  color: var(--soft);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}

.active-hint span {
  display: inline-block;
  margin-left: 4px;
  color: #f5a9c8;
  font-size: 17px;
  transform: translateY(2px);
}

.message-card {
  position: relative;
  width: 100%;
  height: 268px;
  display: block;
  overflow: hidden;
  padding: 0;
  cursor: pointer;
  border: 0;
  border-radius: 22px;
  background: var(--panel);
  color: var(--text);
  text-align: left;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.38);
}

.message-card::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(to bottom, transparent 25%, rgba(0, 0, 0, 0.16) 52%, rgba(0, 0, 0, 0.78));
  pointer-events: none;
}

.message-card:hover img,
.message-card:focus-visible img {
  transform: scale(1.035);
}

.message-card:focus-visible,
.photo-tile:focus-visible,
.confirm-button:focus-visible,
.ghost-button:focus-visible,
.close-button:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.82);
  outline-offset: 3px;
}

.message-card img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  transition: transform 220ms ease;
}

.message-card span {
  position: absolute;
  right: 22px;
  bottom: 24px;
  left: 22px;
  z-index: 1;
  color: var(--text);
  font-size: 30px;
  font-weight: 800;
  line-height: 1.15;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.8);
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 0 20px 28px;
}

.photo-tile {
  aspect-ratio: 1 / 1;
  width: 100%;
  overflow: hidden;
  padding: 0;
  cursor: pointer;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--panel);
}

.photo-tile img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  transition: transform 220ms ease, filter 220ms ease;
}

.photo-tile:hover img,
.photo-tile:focus-visible img {
  filter: brightness(1.08);
  transform: scale(1.04);
}

.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(18px);
}

.modal-panel {
  width: min(100%, 390px);
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(18, 18, 18, 0.98);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
}

.age-panel {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 30px 24px 24px;
  text-align: center;
}

.age-badge {
  display: grid;
  width: 78px;
  height: 78px;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.42);
  border-radius: 50%;
  color: var(--text);
}

.lock-icon {
  width: 36px;
  height: 36px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.age-panel h2 {
  margin: 6px 0 0;
  font-size: 28px;
  line-height: 1.1;
}

.age-panel p {
  max-width: 270px;
  margin: 0;
  color: var(--soft);
  font-size: 16px;
  line-height: 1.45;
}

.modal-actions {
  display: grid;
  width: 100%;
  gap: 10px;
  margin-top: 10px;
}

.confirm-button,
.ghost-button {
  min-height: 52px;
  cursor: pointer;
  border-radius: 999px;
  font-weight: 800;
}

.confirm-button {
  border: 0;
  background: #f5a9c8;
  color: #ffffff;
}

.ghost-button {
  border: 1px solid var(--border);
  background: transparent;
  color: #9d9d9d;
}

.lightbox-panel {
  position: relative;
  display: grid;
  width: min(100%, 450px);
  place-items: center;
}

.lightbox-frame {
  aspect-ratio: 4 / 5;
  width: min(100%, 430px);
  max-height: 82dvh;
  overflow: hidden;
  border-radius: 24px;
  background: var(--panel-strong);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.64);
}

.lightbox-frame img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

.close-button {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1;
  display: inline-flex;
  width: 46px;
  height: 46px;
  align-items: center;
  justify-content: center;
  flex: 0 0 46px;
  padding: 0;
  cursor: pointer;
  border: 0;
  border-radius: 999px;
  background: #f5a9c8;
  color: var(--text);
  font-size: 0;
  line-height: 1;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.42);
}

.close-button::before {
  content: "×";
  display: block;
  color: #ffffff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 34px;
  font-weight: 400;
  line-height: 1;
}

@media (max-width: 420px) {
  .open-hint {
    gap: 10px;
    min-height: 58px;
    padding-right: 12px;
    padding-left: 12px;
  }

  .hint-icon {
    width: 32px;
    height: 32px;
    font-size: 23px;
  }

  .hint-copy strong {
    font-size: 17px;
  }

  .hint-copy span {
    font-size: 14px;
  }

  .hint-side small {
    font-size: 12px;
  }

  .hero {
    min-height: 360px;
  }

  .profile h1 {
    font-size: 40px;
  }

  .profile p {
    font-size: 18px;
  }

  .actions,
  .photo-grid {
    padding-right: 14px;
    padding-left: 14px;
  }

  .message-card {
    height: 240px;
    border-radius: 20px;
  }

  .message-card span {
    font-size: 25px;
  }

  .photo-grid {
    gap: 8px;
  }
}
