:root{
  --bg1:#faf6f1;
  --bg2:#f2ece4;
  --card: rgba(255,251,247,.70);
  --card-strong: rgba(255,252,248,.88);
  --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: #c0704a;
  --tint-soft: rgba(192,112,74,.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 'Nunito', ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background:
    radial-gradient(900px 600px at 18% 12%, rgba(192,112,74,.10), transparent 55%),
    radial-gradient(800px 520px at 82% 18%, rgba(255,180,120,.07), transparent 55%),
    radial-gradient(900px 700px at 50% 92%, rgba(255,149,0,.09), transparent 60%),
    linear-gradient(180deg, var(--bg1), var(--bg2));
}

body::before{
  content:"";
  position:fixed;
  inset:0;
  z-index:0;
  pointer-events:none;
  opacity:.04;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size:300px 300px;
}

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

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

.top__title{
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.3px;
  font-size: 30px;
  line-height: 1.06;
  margin: 0;
}

.top__subtitle{
  color: var(--muted);
  font-weight: 400;
  letter-spacing: .3px;
  font-size: 13px;
  text-transform: uppercase;
  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(192,112,74,.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: 400;
  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(255,190,150,.45);
  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(210,100,70,.97), rgba(175,60,42,.92));
  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:400;
  letter-spacing:.2px;
}
.result__phrase{
  margin-top: 4px;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(30px, 5.5vw, 56px);
  line-height:1.04;
  font-weight: 600;
  font-style: italic;
  letter-spacing: -0.3px;
}

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

.reco__bubble{
  position: relative;
  max-width: min(62ch, 100%);
  width: 100%;
}

.reco__avatar{
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 72px;
  height: auto;
  display: block;
  filter: drop-shadow(0 3px 8px rgba(0,0,0,.18));
  pointer-events: none;
}

.reco__name{
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.15px;
  text-align: right;
  max-width: min(62ch, 100%);
  width: 100%;
  margin: 6px 0 0;
  padding-right: 10px;
}

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

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

.reco__text{
  position: relative;
  padding: 14px 14px 82px 14px;
  border-radius: var(--radius-sm);
  border: none;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  font-weight: 400;
  color: var(--text);
  text-align: left;
  white-space: pre-wrap;
}


.reco__text::after{
  content:"▌";
  display:inline;
  color: var(--tint);
  opacity:1;
  font-size:.75em;
  animation: blink .7s step-end infinite;
  vertical-align: baseline;
  margin-left: 1px;
}

.reco__text--done::after{
  display:none;
}

.reco__text--done{
  white-space: normal;
}

.reco__text ul,
.reco__text ol{
  margin: 6px 0;
  padding-left: 18px;
}

.reco__text li{
  margin: 3px 0;
}

.reco__text strong{
  font-weight: 700;
}

.reco__text em{
  font-style: italic;
}

.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: 700;
  letter-spacing: -.2px;
}

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

.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(192,112,74,.12);
  border: 1px solid rgba(192,112,74,.22);
  color: #7a3510;
}

.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:700}
.map__coords{color:var(--muted); font-weight:400; 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: 600;
  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: 600;
  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)}
}

.btn-again{
  border:0;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: .2px;
  cursor:pointer;
  padding: 10px 20px;
  border-radius: 999px;
  transition: background .15s, color .15s;
  margin-top: 2px;
}
.btn-again:hover{ background: rgba(0,0,0,.06); color: var(--text); }

@keyframes blink{
  50%{ opacity:0; }
}

@media (prefers-color-scheme: dark){
  :root{
    --bg1:#1c1714;
    --bg2:#13100d;
    --card: rgba(42,34,26,.75);
    --card-strong: rgba(52,42,32,.92);
    --text:#f0ebe4;
    --muted:#9a8f85;
    --border: rgba(255,255,255,.10);
    --border-soft: rgba(255,255,255,.07);
    --shadow: 0 24px 70px rgba(0,0,0,.52);
    --shadow-soft: 0 12px 30px rgba(0,0,0,.36);
    --hairline: rgba(255,255,255,.10);
  }
  body{
    background:
      radial-gradient(900px 600px at 18% 12%, rgba(192,112,74,.08), transparent 55%),
      radial-gradient(800px 520px at 82% 18%, rgba(255,180,120,.05), transparent 55%),
      radial-gradient(900px 700px at 50% 92%, rgba(255,149,0,.07), transparent 60%),
      linear-gradient(180deg, var(--bg1), var(--bg2));
  }
}

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