:root{
  --bg1:#f5f5f7;
  --bg2:#ffffff;
  --card: rgba(255,255,255,.68);
  --card-strong: rgba(255,255,255,.82);
  --text:#1d1d1f;
  --muted:#6e6e73;
  --border: rgba(0,0,0,.10);
  --border-soft: rgba(0,0,0,.08);
  --shadow: 0 24px 70px rgba(0,0,0,.10);
  --shadow-soft: 0 12px 30px rgba(0,0,0,.08);
  --radius: 26px;
  --radius-sm: 20px;
  --radius-xs: 14px;
  --tint: #0a84ff;
  --tint-soft: rgba(10,132,255,.18);
  --hairline: rgba(255,255,255,.70);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  color:var(--text);
  font: 16px/1.55 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", Segoe UI, Roboto, Arial, "Apple Color Emoji","Segoe UI Emoji";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background:
    radial-gradient(900px 600px at 18% 12%, rgba(10,132,255,.10), transparent 55%),
    radial-gradient(800px 520px at 82% 18%, rgba(52,199,89,.10), transparent 55%),
    radial-gradient(900px 700px at 50% 92%, rgba(255,149,0,.10), transparent 60%),
    linear-gradient(180deg, var(--bg1), var(--bg2));
}

.app{
  min-height:100%;
  display:flex;
  flex-direction:column;
  padding: clamp(16px, 3vw, 28px);
  max-width: 920px;
  margin: 0 auto;
  gap: 16px;
}

.top{
  display:flex;
  flex-direction: column;
  align-items:center;
  gap: 4px;
  padding: 2px 0;
  text-align: center;
}

.top__title{
  font-weight: 800;
  letter-spacing: -0.5px;
  font-size: 26px;
  line-height: 1.06;
  margin: 0;
}

.top__subtitle{
  color: var(--muted);
  font-weight: 600;
  letter-spacing: .2px;
  font-size: 13px;
  margin: 0;
}

.brand{
  display:flex;
  gap:10px;
  align-items:center;
  padding:10px 12px;
  border:1px solid var(--border);
  background: var(--card);
  backdrop-filter: blur(10px);
  border-radius: 999px;
  box-shadow: 0 10px 28px rgba(21,32,43,.08);
}

.brand__dot{
  width:10px;height:10px;border-radius:999px;
  background: linear-gradient(135deg, var(--accent1), var(--accent3));
  box-shadow: 0 0 0 6px rgba(51,214,166,.12);
}

.brand__text{color:var(--muted); font-weight:600; letter-spacing:.2px}

.hero{
  flex: 1 1 auto;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap: 16px;
  padding: clamp(18px, 4.8vw, 36px);
  border: 1px solid var(--border-soft);
  background: var(--card);
  backdrop-filter: blur(18px) saturate(1.2);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  transition: padding .45s ease, justify-content .45s ease, flex .45s ease, transform .45s ease;
}

.hero::before{
  content:"";
  position:absolute;
  inset: 0;
  background:
    radial-gradient(520px 320px at 22% 18%, rgba(10,132,255,.10), transparent 60%),
    radial-gradient(520px 320px at 78% 18%, rgba(255,149,0,.10), transparent 60%);
  pointer-events:none;
}

.hero__hint{
  margin: 0;
  max-width: 34ch;
  text-align: center;
  color: var(--muted);
  font-weight: 520;
  letter-spacing: .15px;
  position: relative;
  transition: opacity .25s ease, transform .25s ease, max-height .25s ease, margin .25s ease;
  max-height: 80px;
}

.app--revealed .hero__hint{
  opacity: 0;
  transform: translateY(-4px);
  max-height: 0;
  margin: 0;
  pointer-events: none;
}

.app--revealed .hero{
  flex: 0 0 auto;
  justify-content:flex-start;
  padding-top: 16px;
  padding-bottom: 18px;
  transform: translateY(-2px);
}

.place{
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .5s ease, transform .5s ease;
}

.place.place--in{
  opacity: 1;
  transform: translateY(0);
}

.cta-wrap{
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(132px, 36vw, 168px);
  height: clamp(132px, 36vw, 168px);
  filter: drop-shadow(0 18px 34px rgba(0,0,0,.10));
}

.cta-loader{
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 3px solid rgba(0,0,0,.10);
  border-top-color: var(--tint);
  border-right-color: rgba(52,199,89,.60);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}
.cta-wrap--loading .cta-loader{
  opacity: 1;
  animation: ctaSpin .8s linear infinite;
}

@keyframes ctaSpin{
  to{ transform: rotate(360deg); }
}

.cta{
  position:relative;
  border:0;
  border-radius: 50%;
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  padding: 0;
  min-width: 0;
  cursor:pointer;
  color: #fff;
  background: linear-gradient(135deg, rgba(10,132,255,.95), rgba(94,92,230,.88));
  box-shadow:
    0 18px 34px rgba(0,0,0,.18),
    inset 0 0 0 1px rgba(255,255,255,.20);
  transition: transform .14s ease, filter .2s ease, box-shadow .25s ease;
  outline: none;
  overflow: hidden;
}
.cta:hover{
  box-shadow:
    0 22px 42px rgba(0,0,0,.20),
    inset 0 0 0 1px rgba(255,255,255,.28);
}
.cta:active{transform: translateY(1px) scale(.99)}
.cta:disabled{cursor:default; filter:saturate(.7) brightness(.97)}

.cta--has-photo{
  background: #0b1220;
}

.cta__text{
  position: relative;
  z-index: 2;
  font-weight: 700;
  letter-spacing:.15px;
  font-size: clamp(14px, 3.9vw, 17px);
  line-height: 1.15;
  padding: 10px 12px;
  text-align: center;
  max-width: 92%;
  text-shadow: 0 1px 10px rgba(0,0,0,.24);
}

.cta__photo{
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cta__shine{
  position:absolute; inset:-1px;
  border-radius:50%;
  background: radial-gradient(140px 60px at 20% 20%, rgba(255,255,255,.55), transparent 60%);
  pointer-events:none;
  mix-blend-mode: overlay;
  z-index: 2;
}

.cta--spinning .cta__text,
.cta--has-photo .cta__text{
  display: none;
}

.cta--has-photo .cta__shine{
  display: none;
}

.result{
  text-align:center;
  animation: fadeUp .42s ease both;
}
.result__lead{
  color:var(--muted);
  font-weight:520;
  letter-spacing:.2px;
}
.result__phrase{
  margin-top: 4px;
  font-size: clamp(24px, 4.6vw, 44px);
  line-height:1.06;
  font-weight: 900;
  letter-spacing: -0.5px;
}

.reco{
  margin-top: 14px;
  width: 100%;
  color: var(--text);
  animation: fadeUp .42s ease both;
  display: flex;
  justify-content: flex-start;
}

.reco__who{
  color: var(--muted);
  font-weight: 900;
  letter-spacing: .15px;
}

.reco__nick{
  color: var(--text);
}

.reco__text{
  position: relative;
  margin-top: 8px;
  max-width: min(62ch, 100%);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-soft);
  background: var(--card-strong);
  backdrop-filter: blur(18px) saturate(1.2);
  box-shadow: var(--shadow-soft);
  font-weight: 400;
  color: #1a2a22;
  text-align: left;
  white-space: pre-wrap;
}

.reco__text::before{
  content:"";
  position:absolute;
  left: 14px;
  bottom: -6px;
  width: 14px;
  height: 14px;
  background: var(--card-strong);
  border-left: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  transform: rotate(45deg);
  border-bottom-left-radius: 4px;
}

.place__card{
  border: 1px solid var(--border-soft);
  background: var(--card);
  backdrop-filter: blur(18px) saturate(1.2);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow:hidden;
}

.place__head{
  padding: 18px 18px 8px 18px;
}

.place__title{
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -.2px;
}

.place__address{
  margin-top: 6px;
  color: var(--muted);
  font-weight: 600;
}

.place__meta{
  margin-top: 10px;
  display:flex;
  flex-wrap:wrap;
  gap: 8px;
}

.pill{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 13px;
  background: rgba(10,132,255,.12);
  border: 1px solid rgba(10,132,255,.18);
  color: #0a3e7a;
}

.pill--soft{
  background: rgba(255,149,0,.14);
  border: 1px solid rgba(255,149,0,.20);
  color: #6a3a00;
}

.place__media{
  padding: 0 18px 16px 18px;
}

.place__photo{
  width:100%;
  height: 220px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(122,167,255,.15), rgba(51,214,166,.12));
}

.map{
  padding: 0 18px 18px 18px;
  display:flex;
  flex-direction:column;
  gap: 10px;
}

.map__head{
  display:flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.map__title{font-weight:900}
.map__coords{color:var(--muted); font-weight:700; font-size: 13px}

.map__link{
  display:block;
  border-radius: var(--radius-sm);
  overflow:hidden;
  border: 1px solid var(--border);
  background: #fff;
}

.map__img{
  display:block;
  width:100%;
  height: 220px;
  object-fit: cover;
}

.place__actions{
  padding: 0 18px 18px 18px;
}

.actions{
  display:flex;
  gap: 10px;
  align-items: center;
}

.actions .btn{
  width: auto;
}

.actions .btn--yandex{
  flex: 1 1 auto;
  width: 100%;
}

.btn--yandex{
  height: 44px;
}

.icon{
  width: 18px;
  height: 18px;
  display: block;
}

.btn{
  display:inline-flex;
  width:100%;
  justify-content:center;
  align-items:center;
  gap:10px;
  text-decoration:none;
  padding: 12px 14px;
  border-radius: var(--radius-xs);
  font-weight: 650;
  color: #0b1a14;
  background: linear-gradient(135deg, rgba(10,132,255,.92), rgba(94,92,230,.84));
  border: 1px solid rgba(0,0,0,.10);
  box-shadow: 0 18px 34px rgba(0,0,0,.14), inset 0 0 0 1px rgba(255,255,255,.28);
  transition: transform .14s ease, filter .2s ease, box-shadow .25s ease;
}
.btn:hover{
  box-shadow: 0 22px 40px rgba(0,0,0,.16), inset 0 0 0 1px rgba(255,255,255,.38);
}
.btn:active{transform: translateY(1px)}

.btn--yandex{
  background: linear-gradient(180deg, #ff3b30, #d70015);
  border-color: rgba(0,0,0,.14);
  color: #fff;
  box-shadow: 0 18px 34px rgba(215,0,21,.20), 0 14px 30px rgba(0,0,0,.10), inset 0 0 0 1px rgba(255,255,255,.16);
}
.btn--yandex:hover{
  box-shadow: 0 22px 40px rgba(215,0,21,.22), 0 16px 34px rgba(0,0,0,.12), inset 0 0 0 1px rgba(255,255,255,.22);
}

.btn--share{
  flex: 0 0 auto;
  padding: 0;
  height: 44px;
  width: 44px;
  min-width: 44px;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  color: var(--text);
  background: rgba(255,255,255,.72);
  border: 1px solid var(--border-soft);
  box-shadow: 0 10px 22px rgba(0,0,0,.08), inset 0 0 0 1px rgba(255,255,255,.40);
  white-space: nowrap;
}
.btn--share:hover{
  box-shadow: 0 12px 26px rgba(0,0,0,.10), inset 0 0 0 1px rgba(255,255,255,.50);
}

.bottom{
  margin-top:auto;
  display:flex;
  justify-content:center;
  padding: 6px 0 2px;
}

.linklike{
  border:0;
  background: transparent;
  cursor:pointer;
  color: var(--muted);
  font-weight: 800;
  padding: 10px 12px;
  border-radius: 12px;
}
.linklike:hover{background: rgba(255,255,255,.55)}

@keyframes fadeUp{
  from{opacity:0; transform: translateY(10px)}
  to{opacity:1; transform: translateY(0)}
}

@media (prefers-reduced-motion: reduce){
  .result, .place{animation:none}
  .cta{transition:none}
  .cta-wrap--loading .cta-loader{animation:none}
}
