.preview-view-switch {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: 306px;
}

.preview-view-switch button {
  padding-left: 7px;
  padding-right: 7px;
}

.guess-mode-active #locateButton,
.guess-mode-active #peopleToggle {
  display: none;
}

.guess-fullscreen {
  position: absolute;
  z-index: 650;
  inset: 0 0 calc(62px + env(safe-area-inset-bottom));
  overflow: hidden;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  background: #eaf0ed;
  transition: opacity 0.18s ease, visibility 0.18s;
}

.guess-fullscreen.is-active {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.guess-topline {
  position: absolute;
  z-index: 12;
  top: calc(max(10px, env(safe-area-inset-top)) + 118px);
  left: 18px;
  right: 18px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  color: #fff;
  text-shadow: 0 2px 10px rgba(13, 30, 23, 0.28);
}

.guess-kicker {
  font-size: 12px;
  font-weight: 800;
}

.guess-topline p {
  margin: 2px 0 0;
  font-size: 10px;
  text-align: right;
}

.guess-card-stage {
  width: 100%;
  height: 100%;
}

.guess-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background:
    linear-gradient(160deg, rgba(255,255,255,0.1), transparent 42%),
    linear-gradient(145deg, var(--guess-a), var(--guess-b));
  touch-action: pan-y;
  user-select: none;
  will-change: transform;
  cursor: grab;
}

.guess-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(30deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 46px),
    repeating-linear-gradient(120deg, rgba(255,255,255,0.035) 0 1px, transparent 1px 58px);
  pointer-events: none;
}

.guess-card.is-dragging {
  cursor: grabbing;
  transition: none;
}

.guess-card.drag-left {
  box-shadow: inset 8px 0 0 rgba(232, 93, 63, 0.7);
}

.guess-card.drag-right {
  box-shadow: inset -8px 0 0 rgba(31, 138, 112, 0.72);
}

.guess-counter {
  position: absolute;
  z-index: 8;
  top: 120px;
  right: 18px;
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 0 10px;
  border-radius: 14px;
  background: rgba(15, 31, 24, 0.36);
  color: #fff;
  font-size: 10px;
  font-weight: 750;
  backdrop-filter: blur(10px);
}

.guess-portrait-space {
  display: grid;
  flex: 1 1 auto;
  place-items: center;
  min-height: 0;
  padding: 160px 24px 260px;
}

.guess-portrait {
  position: relative;
  display: grid;
  place-items: center;
  width: min(62vw, 278px);
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 8px solid rgba(255, 255, 255, 0.76);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: clamp(70px, 24vw, 108px);
  font-weight: 850;
  text-shadow: 0 8px 28px rgba(20, 36, 29, 0.22);
  box-shadow: 0 24px 60px rgba(22, 38, 31, 0.25);
}

.guess-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.guess-portrait::after {
  content: "";
  position: absolute;
  inset: 13px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  pointer-events: none;
}

.guess-profile {
  position: relative;
  z-index: 3;
  padding: 48px 22px 16px;
  background: linear-gradient(180deg, rgba(248,250,248,0), rgba(248,250,248,0.95) 18%, #f8faf8 56%);
}

.guess-name-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
}

.guess-name-row h1 {
  margin: 0;
  color: #15221e;
  font-size: 30px;
  line-height: 1.1;
  font-weight: 850;
  letter-spacing: 0;
}

.guess-area {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 8px 0 0;
  color: #1d7864;
  font-size: 13px;
  font-weight: 700;
}

.guess-area svg {
  width: 14px;
  height: 14px;
}

.guess-distance {
  color: #65736d;
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}

.guess-bio {
  display: -webkit-box;
  overflow: hidden;
  margin: 13px 0 0;
  color: #4f5e58;
  font-size: 13px;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.guess-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 11px;
}

.guess-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 0 9px;
  border: 1px solid #cbded6;
  border-radius: 13px;
  background: #eef6f2;
  color: #286c5b;
  font-size: 11px;
  font-weight: 650;
}

.guess-open {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  min-height: 46px;
  margin-top: 14px;
  border: 0;
  border-radius: 8px;
  background: #172b24;
  color: #fff;
  font-size: 13px;
  font-weight: 750;
  box-shadow: 0 8px 20px rgba(23, 43, 36, 0.18);
  cursor: pointer;
}

.guess-open svg {
  width: 17px;
  height: 17px;
}

.guess-hint {
  margin: 9px 0 0;
  color: #88948f;
  font-size: 10px;
  text-align: center;
}

.guess-empty {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  width: 100%;
  height: 100%;
  color: rgba(255,255,255,0.88);
  text-align: center;
}

.guess-empty strong {
  font-size: 18px;
}

.guess-empty span {
  font-size: 12px;
}

@media (min-width: 760px) {
  .guess-topline {
    top: 84px;
    left: 350px;
    right: 26px;
  }

  .guess-counter {
    top: 88px;
    right: 26px;
  }

  .guess-portrait-space {
    padding-top: 125px;
    padding-bottom: 235px;
  }

  .guess-portrait {
    width: min(34vw, 330px);
  }

  .guess-profile {
    width: min(100%, 720px);
    margin: 0 auto;
    padding-left: 32px;
    padding-right: 32px;
  }
}

@media (max-height: 720px) and (max-width: 759px) {
  .guess-topline {
    top: calc(max(10px, env(safe-area-inset-top)) + 108px);
  }

  .guess-counter {
    top: 110px;
  }

  .guess-portrait-space {
    padding-top: 142px;
    padding-bottom: 218px;
  }

  .guess-portrait {
    width: min(48vw, 190px);
  }

  .guess-profile {
    padding-top: 38px;
  }

  .guess-name-row h1 {
    font-size: 25px;
  }

  .guess-bio {
    -webkit-line-clamp: 2;
  }
}

/* Full-photo card and first-use guide */
.guess-mode-active .topbar {
  display: none;
}

.guess-mode-active .preview-view-switch {
  top: max(10px, env(safe-area-inset-top));
}

.guess-topline {
  top: calc(max(10px, env(safe-area-inset-top)) + 53px);
}

.guess-counter {
  top: calc(max(10px, env(safe-area-inset-top)) + 52px);
}

.guess-topline p {
  display: none;
}

.guess-photo {
  position: absolute;
  z-index: 0;
  inset: 0;
  display: grid;
  place-items: center;
  background-color: var(--guess-a);
  background-image: linear-gradient(145deg, var(--guess-a), var(--guess-b));
  background-position: center;
  background-size: cover;
  color: rgba(255,255,255,0.88);
  font-size: clamp(96px, 38vw, 190px);
  font-weight: 850;
}

.guess-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(7,15,12,0.36) 0, rgba(7,15,12,0.04) 30%, transparent 48%),
    linear-gradient(0deg, rgba(5,13,10,0.9) 0, rgba(5,13,10,0.55) 28%, transparent 64%);
}

.guess-profile {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  margin: 0;
  padding: 118px 22px 16px;
  background: linear-gradient(180deg, transparent 0, rgba(7,16,12,0.64) 28%, rgba(6,14,11,0.94) 58%, #07100c 100%);
  color: #fff;
}

.guess-name-row h1 {
  color: #fff;
  text-shadow: 0 3px 14px rgba(0,0,0,0.28);
}

.guess-area {
  color: #b8f4df;
}

.guess-distance,
.guess-bio {
  color: rgba(255,255,255,0.78);
}

.guess-tags span {
  border-color: rgba(255,255,255,0.28);
  background: rgba(255,255,255,0.14);
  color: #fff;
  backdrop-filter: blur(8px);
}

.guess-open {
  background: #fff;
  color: #14251f;
  box-shadow: 0 8px 22px rgba(0,0,0,0.2);
}

.guess-hint {
  color: rgba(255,255,255,0.54);
}

.guess-guide {
  position: absolute;
  z-index: 1700;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(8, 17, 13, 0.62);
  backdrop-filter: blur(5px);
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, visibility 0.18s;
}

.guess-guide.is-open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.guess-guide-card {
  position: relative;
  width: min(100%, 350px);
  padding: 22px 20px 18px;
  border: 1px solid rgba(255,255,255,0.9);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 26px 70px rgba(0,0,0,0.3);
  transform: translateY(8px) scale(0.98);
  transition: transform 0.18s ease;
}

.guess-guide.is-open .guess-guide-card {
  transform: translateY(0) scale(1);
}

.guess-guide-step {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 12px;
  background: #edf5f1;
  color: #26735e;
  font-size: 10px;
  font-weight: 750;
}

.guess-guide-art {
  display: grid;
  place-items: center;
  height: 116px;
  margin: 14px 0 16px;
  overflow: hidden;
  border: 1px solid #dbe7e1;
  border-radius: 8px;
  background: #f1f7f4;
  color: #1d7864;
}

.guide-swipe-art,
.guide-tap-art,
.guide-nav-art {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  width: 100%;
}

.guide-swipe-art span {
  font-size: 34px;
  font-weight: 800;
}

.guide-swipe-art b,
.guide-tap-art b {
  font-size: 13px;
}

.guide-tap-art {
  flex-direction: column;
}

.guide-person {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #dca07b;
  color: #fff;
  font-size: 24px;
  font-weight: 800;
}

.guide-nav-art span {
  display: grid;
  place-items: center;
  width: 84px;
  height: 39px;
  border: 1px solid #cadbd4;
  border-radius: 8px;
  background: #fff;
  font-size: 12px;
  font-weight: 750;
}

.guide-nav-art span:first-child {
  background: #1f826b;
  color: #fff;
}

.guess-guide-card h2 {
  margin: 0;
  color: #17211f;
  font-size: 21px;
  line-height: 1.25;
  font-weight: 820;
}

.guess-guide-card > p {
  min-height: 44px;
  margin: 8px 0 0;
  color: #61706a;
  font-size: 13px;
  line-height: 1.6;
}

.guess-guide-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 13px 0 16px;
}

.guess-guide-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #d2ddd8;
}

.guess-guide-dots span.is-active {
  width: 18px;
  border-radius: 3px;
  background: #1f826b;
}

.guess-guide-actions {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 9px;
}

.guess-guide-actions button {
  min-height: 43px;
  border: 1px solid #d3dfd9;
  border-radius: 8px;
  background: #fff;
  color: #63716b;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.guess-guide-actions .guess-guide-next {
  border-color: #1f826b;
  background: #1f826b;
  color: #fff;
}

@media (min-width: 760px) {
  .guess-mode-active .preview-view-switch {
    top: 18px;
  }

  .guess-topline {
    top: 72px;
    left: 18px;
  }

  .guess-counter {
    top: 70px;
    right: 24px;
  }

  .guess-profile {
    width: min(100%, 760px);
    left: 50%;
    right: auto;
    padding-left: 34px;
    padding-right: 34px;
    transform: translateX(-50%);
  }
}
