@import url("https://fonts.googleapis.com/css2?family=Fredoka:wght@500;600;700&family=Nunito:wght@500;700;800&display=swap");

:root {
  --text: #1a1020; --muted: #6b4a5a; --accent: #ff2d6a; --line: rgba(255, 60, 120, 0.18);
  --ok: #12b981; --danger: #e11d48;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
body {
  min-height: 100%;
  color: var(--text);
  font: 500 16px/1.45 Nunito, sans-serif;
  background:
    radial-gradient(ellipse 80% 50% at 8% 0%, #ff8ab8 0%, transparent 55%),
    radial-gradient(ellipse 70% 45% at 100% 8%, #7aecff 0%, transparent 50%),
    linear-gradient(165deg, #fff5f8, #fff9e8 50%, #e8fbff);
}
button, input, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
.wrap { max-width: 980px; margin: 0 auto; padding: 16px 16px 48px; }
.top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.brand {
  font-family: Fredoka, Nunito, sans-serif; font-weight: 700; font-size: 26px;
  text-decoration: none; color: var(--accent);
}
.free { color: var(--muted); font-size: 14px; }
.nav { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; max-width: 100%; }
@media (max-width: 640px) {
  .nav { width: 100%; margin-left: 0; }
}
.nav a, .nav button, .btn, .chip {
  border: 2px solid var(--line); background: #fff; border-radius: 999px;
  padding: 6px 12px; text-decoration: none; color: var(--text); cursor: pointer; font-weight: 800;
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.danger { color: var(--danger); border-color: rgba(225, 29, 72, 0.4); background: #fff; }
.btn.wide { width: 100%; border-radius: 14px; padding: 12px; }
.quota { margin: 12px 0; color: var(--muted); font-size: 14px; }
.filters, .row, .actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filters { margin-bottom: 14px; }
.place-filters select { max-width: min(48%, 220px); }
.country-note { margin: 0 0 14px; font-size: 14px; }
.country-note a { font-weight: 800; }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.deck { position: relative; max-width: 420px; height: min(68vh, 620px); margin: 0 auto; touch-action: none; }
.deck .person { position: absolute; inset: 0; }
.deck .under { transform: scale(0.96) translateY(14px); }
.deck .top {
  z-index: 2; touch-action: none; cursor: grab; transition: transform .2s ease;
  user-select: none; -webkit-user-select: none;
}
.deck .top.dragging { transition: none; cursor: grabbing; }
.person {
  background: #fff; border-radius: 24px; overflow: hidden; border: 1px solid var(--line);
}
.deck .person img {
  width: 100%; height: 100%; object-fit: cover; display: block; background: #ffe4ee;
  pointer-events: none; -webkit-user-drag: none; user-select: none;
}
.person-bar { pointer-events: none; }
.person-bar {
  position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-wrap: wrap; gap: 6px 10px;
  align-items: center; padding: 48px 16px 16px;
  background: linear-gradient(transparent, rgba(20, 8, 16, 0.72)); color: #fff;
}
.person-bar b { font-size: 26px; }
.person-bar span { color: #fff; }
.stamp {
  position: absolute; top: 24px; z-index: 3; padding: 4px 10px; border: 3px solid; border-radius: 10px;
  font-weight: 800; letter-spacing: 0.04em; opacity: 0; pointer-events: none;
}
.like-stamp { left: 16px; color: #12b981; border-color: #12b981; transform: rotate(-12deg); }
.nope-stamp { right: 16px; color: #fff; border-color: #fff; transform: rotate(12deg); }
.swipe-actions { display: flex; justify-content: center; align-items: center; gap: 12px; margin: 14px 0 6px; }
.deck-count { text-align: center; }
.online { color: #b8ffd9; font-weight: 800; font-size: 14px; }
.online::before {
  content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%;
  background: #3dff9a; margin-right: 6px;
}
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.card {
  background: #fff; border-radius: 16px; overflow: hidden; border: 1px solid var(--line);
  text-align: left; padding: 0; cursor: pointer; color: inherit;
}
.card img { width: 100%; aspect-ratio: 3/4; object-fit: cover; display: block; background: #ffe4ee; }
.card div { padding: 8px 10px 12px; }
.card b { display: block; }
.card span, .muted { color: var(--muted); font-size: 13px; font-weight: 600; }
.banner, .box {
  background: rgba(255, 255, 255, 0.86); border: 1px solid var(--line); border-radius: 16px; padding: 14px; margin-bottom: 14px;
}
form.box { display: grid; gap: 10px; }
label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); font-weight: 800; }
input, textarea, select {
  width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: #fff;
}
select { max-width: 240px; }
.id { font-family: ui-monospace, monospace; font-size: 22px; letter-spacing: 0.04em; }
.err { color: var(--danger); font-weight: 800; }
.msgs { display: grid; gap: 8px; margin: 12px 0; }
.msg { max-width: 80%; background: #fff; border-radius: 14px; padding: 8px 12px; }
.msg.mine { justify-self: end; background: #ffe0ea; }
.msg.typing { color: var(--muted); font-style: italic; }
.gallery { display: flex; gap: 8px; flex-wrap: wrap; }
.gallery figure { width: 92px; }
.gallery img { width: 92px; height: 122px; object-fit: cover; border-radius: 10px; }
.gallery figure.swap-shot { width: 120px; display: grid; gap: 4px; justify-items: start; }
.gallery figure.swap-shot img { width: 120px; height: 160px; }
.gallery figure.swap-shot .btn { padding: 4px 8px; font-size: 12px; }
.gallery figure.pick { cursor: pointer; border-radius: 10px; }
.gallery figure.pick.on { outline: 3px solid var(--accent); outline-offset: 2px; }
.gallery-msg { display: flex; gap: 6px; flex-wrap: wrap; background: transparent; padding: 0; }
.gallery-msg img { width: 92px; height: 122px; object-fit: cover; border-radius: 10px; }
img[data-zoom] { cursor: zoom-in; }
.send { display: flex; gap: 8px; }
.send input { flex: 1; }
.back { margin-bottom: 10px; }
.zoom-layer {
  position: fixed; inset: 0; z-index: 80; background: rgba(8, 4, 10, 0.92);
  display: grid; grid-template-rows: auto 1fr auto; touch-action: none;
}
.zoom-layer[hidden] { display: none !important; }
.zoom-top, .zoom-hint {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 12px 14px; color: #fff;
}
.zoom-hint { justify-content: center; font-size: 13px; opacity: 0.75; }
.zoom-stage {
  position: relative; overflow: hidden; display: grid; place-items: center;
  touch-action: none; cursor: grab;
}
.zoom-stage.dragging { cursor: grabbing; }
.zoom-stage img {
  max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain;
  transform-origin: center center; user-select: none; -webkit-user-drag: none;
  will-change: transform;
}
.zoom-top .btn { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.35); color: #fff; }
