:root {
  color-scheme: light;
  --ink: #31415f;
  --muted: #71809f;
  --faint: #aab4cb;
  --blue: #7f9fe9;
  --blue-dark: #688bdc;
  --gold: #e9b963;
  --paper: rgba(255, 255, 255, .86);
  --shadow: 0 14px 36px rgba(67, 86, 126, .12);
  --soft-shadow: 0 8px 24px rgba(67, 86, 126, .09);
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  background: #edf1f9;
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea {
  color: inherit;
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid rgba(104, 139, 220, .72);
  outline-offset: 2px;
}

.app-shell {
  position: relative;
  width: min(100%, 430px);
  min-height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  background:
    radial-gradient(circle at 82% 9%, rgba(214, 226, 254, .72), transparent 27%),
    radial-gradient(circle at 4% 70%, rgba(230, 235, 250, .72), transparent 30%),
    linear-gradient(180deg, #fbfcff 0%, #f5f8ff 54%, #fbfcff 100%);
  box-shadow: 0 0 60px rgba(46, 60, 96, .18);
}

.ambient {
  position: absolute;
  z-index: 0;
  border-radius: 50%;
  filter: blur(45px);
  opacity: .55;
  pointer-events: none;
}

.ambient-one {
  top: 7%;
  right: -90px;
  width: 210px;
  height: 210px;
  background: #dbe6ff;
}

.ambient-two {
  bottom: 4%;
  left: -95px;
  width: 220px;
  height: 220px;
  background: #e8ecf8;
}

.stars {
  position: absolute;
  z-index: 2;
  inset: 0;
  pointer-events: none;
}

.stars i {
  position: absolute;
  left: var(--x);
  top: var(--y);
  color: var(--gold);
  font-size: var(--s);
  font-style: normal;
  animation: twinkle 3.4s var(--d) ease-in-out infinite;
}

@keyframes twinkle {
  0%, 100% { opacity: .25; transform: scale(.82) rotate(0deg); }
  50% { opacity: .95; transform: scale(1.15) rotate(12deg); }
}

.screen {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: none;
  min-height: 100dvh;
  opacity: 0;
  transform: translateY(8px);
}

.screen.is-active {
  display: flex;
  animation: screen-in .38s cubic-bezier(.2, .72, .25, 1) forwards;
}

@keyframes screen-in {
  to { opacity: 1; transform: translateY(0); }
}

.eyebrow {
  margin: 0 0 8px;
  color: #91a2c1;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .13em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -.035em;
}

.primary-button {
  min-height: 56px;
  border: 0;
  border-radius: 20px;
  background: linear-gradient(135deg, #87a7ed 0%, #7697e4 100%);
  box-shadow: 0 12px 26px rgba(104, 139, 220, .28);
  color: white;
  font-size: 16px;
  font-weight: 560;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.primary-button:active {
  transform: scale(.985);
  box-shadow: 0 7px 17px rgba(104, 139, 220, .24);
}

.primary-button:disabled {
  cursor: progress;
  filter: grayscale(.25);
  opacity: .7;
}

.welcome-screen {
  flex-direction: column;
  padding: max(74px, env(safe-area-inset-top) + 44px) 34px max(28px, env(safe-area-inset-bottom) + 18px);
}

.welcome-copy {
  position: relative;
  z-index: 2;
}

.welcome-copy h1 {
  color: #33415e;
  font-size: clamp(48px, 14vw, 61px);
  line-height: .93;
}

.welcome-copy .lead {
  margin: 14px 0 0;
  color: #596784;
  font-size: 17px;
  line-height: 1.48;
}

.hero-pet {
  position: relative;
  flex: 1;
  min-height: 285px;
  margin: -8px -20px -2px;
  display: grid;
  place-items: center;
}

.hero-pet::after {
  position: absolute;
  bottom: 9%;
  width: 76%;
  height: 12%;
  border-radius: 50%;
  background: rgba(80, 96, 126, .13);
  filter: blur(16px);
  content: "";
}

.hero-pet img {
  position: relative;
  z-index: 1;
  width: 118%;
  max-height: 420px;
  object-fit: contain;
  filter: saturate(.94) contrast(1.02);
}

.welcome-actions {
  position: relative;
  z-index: 3;
  display: grid;
  gap: 14px;
}

.welcome-actions .primary-button {
  width: 100%;
}

.text-button {
  justify-self: center;
  padding: 8px 18px;
  border: 0;
  background: transparent;
  color: #a0a9bf;
  cursor: pointer;
}

.form-screen,
.result-screen {
  flex-direction: column;
  padding-top: env(safe-area-inset-top);
}

.auth-screen {
  flex-direction: column;
  padding-top: env(safe-area-inset-top);
}

.auth-topbar {
  grid-template-columns: 48px 1fr 48px;
}

.auth-content {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 34px max(56px, env(safe-area-inset-bottom) + 38px);
  text-align: center;
}

.auth-star {
  position: relative;
  display: grid;
  width: min(58vw, 238px);
  min-height: 230px;
  margin: -4px auto -1px;
  place-items: center;
  isolation: isolate;
}

.auth-star::before {
  position: absolute;
  z-index: -1;
  width: 72%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 209, 101, .48) 0%, rgba(255, 220, 139, .18) 45%, transparent 72%);
  content: "";
  filter: blur(15px);
  animation: auth-star-aura 3.2s ease-in-out infinite;
}

.auth-star::after {
  position: absolute;
  z-index: 2;
  top: 24%;
  right: 13%;
  color: #fff8cf;
  content: "✦";
  font-size: 22px;
  line-height: 1;
  opacity: 0;
  text-shadow: 0 0 6px #fff, 0 0 16px #ffc95f;
  transform: scale(.35) rotate(-12deg);
  animation: auth-star-spark 2.9s ease-in-out infinite 1.1s;
}

.auth-star img {
  position: relative;
  z-index: 1;
  width: 100%;
  filter: brightness(1) drop-shadow(0 12px 18px rgba(196, 133, 24, .18));
  transform-origin: 50% 52%;
  animation:
    auth-star-float 4.8s ease-in-out infinite,
    auth-star-shimmer 3.2s ease-in-out infinite;
}

@keyframes auth-star-float {
  0%,
  100% {
    transform: translateY(3px) rotate(-.8deg);
  }

  50% {
    transform: translateY(-7px) rotate(.8deg);
  }
}

@keyframes auth-star-shimmer {
  0%,
  100% {
    filter: brightness(.98) drop-shadow(0 12px 18px rgba(196, 133, 24, .18));
  }

  48% {
    filter: brightness(1.1) drop-shadow(0 0 16px rgba(255, 211, 103, .54)) drop-shadow(0 14px 22px rgba(196, 133, 24, .25));
  }
}

@keyframes auth-star-aura {
  0%,
  100% {
    opacity: .48;
    transform: scale(.9);
  }

  50% {
    opacity: .92;
    transform: scale(1.08);
  }
}

@keyframes auth-star-spark {
  0%,
  32%,
  100% {
    opacity: 0;
    transform: scale(.35) rotate(-12deg);
  }

  43% {
    opacity: 1;
    transform: scale(1.18) rotate(4deg);
  }

  54% {
    opacity: .15;
    transform: scale(.7) rotate(14deg);
  }
}

.auth-content h2 {
  color: #3b4b68;
  font-size: 42px;
  line-height: .98;
}

.auth-copy {
  margin: 16px 0 25px;
  color: #6e7c97;
  font-size: 14px;
  line-height: 1.55;
}

.telegram-button {
  display: flex;
  width: 100%;
  min-height: 58px;
  align-items: center;
  justify-content: center;
  gap: 11px;
  border: 0;
  border-radius: 20px;
  background: linear-gradient(135deg, #42b7eb, #279ed8);
  box-shadow: 0 12px 26px rgba(42, 165, 220, .25);
  color: white;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

.telegram-button:disabled {
  cursor: progress;
  opacity: .7;
}

.telegram-mark {
  display: grid;
  width: 28px;
  height: 28px;
  padding: 0 2px 1px 0;
  place-items: center;
  border-radius: 50%;
  background: white;
  color: #2aa8df;
  font-size: 15px;
  transform: rotate(-22deg);
}

.auth-note,
.auth-error {
  margin: 13px 5px 0;
  color: #a0aabd;
  font-size: 10px;
  line-height: 1.45;
}

.auth-error {
  color: #b8636a;
  font-size: 12px;
}

.topbar {
  position: relative;
  z-index: 5;
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  align-items: center;
  gap: 14px;
  min-height: 82px;
  padding: 18px 22px 8px;
}

.icon-button {
  display: grid;
  width: 44px;
  height: 44px;
  padding: 0 0 5px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 16px;
  background: rgba(255, 255, 255, .8);
  box-shadow: var(--soft-shadow);
  color: #344767;
  font-family: var(--serif);
  font-size: 35px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(18px);
}

.profile-button {
  padding: 0;
}

.profile-glyph {
  position: relative;
  display: block;
  width: 21px;
  height: 23px;
}

.profile-glyph::before {
  position: absolute;
  top: 1px;
  left: 6px;
  width: 9px;
  height: 9px;
  border: 1.8px solid #526485;
  border-radius: 50%;
  content: "";
}

.profile-glyph::after {
  position: absolute;
  right: 1px;
  bottom: 0;
  left: 1px;
  height: 9px;
  border: 1.8px solid #526485;
  border-radius: 11px 11px 7px 7px;
  content: "";
}

.progress {
  display: flex;
  align-items: center;
  justify-content: center;
}

.progress i {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #e4e8f1;
}

.progress i + i {
  margin-left: 44px;
}

.progress i + i::before {
  position: absolute;
  top: 3px;
  right: 100%;
  width: 44px;
  height: 1px;
  background: #e3e7f0;
  content: "";
}

.progress i.done {
  background: #a8bbe7;
}

.progress i.done::before,
.progress i.active::before {
  background: linear-gradient(90deg, #a8bbe7, var(--blue));
}

.progress i.active {
  width: 9px;
  height: 9px;
  background: var(--blue);
  box-shadow: 0 0 0 5px rgba(127, 159, 233, .1);
}

.progress i.active::before {
  top: 4px;
}

.scroll-area,
.result-scroll {
  position: relative;
  z-index: 2;
  flex: 1;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 16px 24px 126px;
  scrollbar-width: none;
  overscroll-behavior: contain;
}

.scroll-area::-webkit-scrollbar,
.result-scroll::-webkit-scrollbar {
  display: none;
}

.screen-heading {
  margin: 1px 8px 24px;
}

.screen-heading h2 {
  color: #3d4d6a;
  font-size: 38px;
  line-height: 1.04;
}

.screen-heading > p:last-child {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
}

#question-form {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.input-card,
.choice-card {
  position: relative;
  display: block;
  margin: 0;
  padding: 22px 20px;
  border: 1px solid rgba(235, 239, 248, .9);
  border-radius: 22px;
  background: var(--paper);
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(18px);
  width: 100%;
  max-width: 100%;
}

.field-title {
  display: block;
  color: #3b4b69;
  font-size: 15px;
  font-weight: 560;
  line-height: 20px;
}

.field-title small {
  color: #8a97b1;
  font-size: 13px;
  font-weight: 450;
}

.input-card textarea {
  display: block;
  width: 100%;
  min-height: 74px;
  margin-top: 14px;
  padding: 0 0 20px;
  resize: none;
  border: 0;
  outline: 0;
  background: transparent;
  color: #3c4b68;
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.45;
}

.input-card textarea::placeholder {
  color: #b6bfd1;
}

.counter {
  position: absolute;
  right: 20px;
  bottom: 17px;
  color: #a9b3c7;
  font-size: 11px;
}

.counter b {
  font-weight: 400;
}

.choice-card {
  min-width: 0;
}

.segmented {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 5px;
  margin-top: 14px;
  padding: 4px;
  border-radius: 15px;
  background: #f0f3fa;
}

.segmented button {
  min-width: 0;
  min-height: 42px;
  padding: 7px 10px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #8591a9;
  font-size: 13px;
  cursor: pointer;
}

.segmented button.is-selected {
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 4px 14px rgba(76, 94, 133, .1);
  color: #4d6594;
  font-weight: 600;
}

.time-current,
.selected-place {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 17px;
}

.field-icon {
  display: grid;
  flex: 0 0 39px;
  width: 39px;
  height: 39px;
  place-items: center;
  border-radius: 13px;
  background: #eef3ff;
  color: #7293df;
  font-size: 20px;
}

.time-current strong,
.selected-place strong {
  display: block;
  color: #445572;
  font-size: 14px;
  font-weight: 600;
}

.time-current small,
.selected-place small {
  display: block;
  margin-top: 3px;
  color: #9aa5ba;
  font-size: 11px;
  line-height: 1.3;
}

.manual-time {
  grid-template-columns: 1fr .75fr;
  gap: 10px;
  margin-top: 16px;
}

.manual-time:not([hidden]) {
  display: grid;
}

.manual-time label span {
  display: block;
  margin: 0 0 6px 4px;
  color: #8d99af;
  font-size: 11px;
}

.manual-time input {
  width: 100%;
  min-height: 45px;
  padding: 0 10px;
  border: 1px solid #e5e9f2;
  border-radius: 13px;
  outline: 0;
  background: white;
  color: #4d5d78;
  font-size: 13px;
}

.search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 49px;
  margin-top: 16px;
  padding: 0 14px;
  border: 1px solid #e4e8f1;
  border-radius: 15px;
  background: rgba(255, 255, 255, .78);
  color: #86a0d4;
}

.search-field input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 14px;
}

.search-field input::placeholder {
  color: #aab4c7;
}

.suggestions,
.map-suggestions {
  overflow: hidden;
  margin-top: 8px;
  border: 1px solid #e8ebf3;
  border-radius: 15px;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 12px 22px rgba(64, 80, 116, .12);
}

.suggestions button,
.map-suggestions button {
  display: block;
  width: 100%;
  padding: 12px 14px;
  border: 0;
  border-bottom: 1px solid #eef0f5;
  background: transparent;
  color: #52617b;
  text-align: left;
  cursor: pointer;
}

.suggestions button:last-child,
.map-suggestions button:last-child {
  border-bottom: 0;
}

.map-preview {
  position: relative;
  width: 100%;
  min-height: 118px;
  margin-top: 16px;
  overflow: hidden;
  border: 1px solid #e3e8f2;
  border-radius: 17px;
  background: #edf3f6;
  color: #485a78;
  cursor: pointer;
}

.map-preview strong,
.map-preview small {
  position: relative;
  z-index: 2;
  display: block;
}

.map-preview strong {
  margin-top: 48px;
  font-size: 14px;
}

.map-preview small {
  margin-top: 4px;
  color: #8592a8;
  font-size: 11px;
}

.map-grid {
  position: absolute;
  inset: 0;
  opacity: .5;
  background:
    linear-gradient(25deg, transparent 46%, #d4dfde 47%, #d4dfde 50%, transparent 51%),
    linear-gradient(-35deg, transparent 47%, #d3dfe7 48%, #d3dfe7 52%, transparent 53%),
    linear-gradient(90deg, transparent 47%, #d8e2ea 48%, #d8e2ea 51%, transparent 52%);
  background-size: 62px 48px, 72px 62px, 86px 58px;
}

.map-pin {
  position: absolute;
  z-index: 2;
  top: 22px;
  left: calc(50% - 7px);
  width: 14px;
  height: 14px;
  border: 4px solid white;
  border-radius: 50% 50% 50% 0;
  background: var(--blue);
  box-shadow: 0 5px 12px rgba(63, 91, 151, .25);
  transform: rotate(-45deg);
}

.selected-place {
  padding-top: 2px;
}

.selected-place > span:nth-child(2) {
  min-width: 0;
  flex: 1;
}

.selected-place strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selected-place button {
  padding: 8px 0 8px 8px;
  border: 0;
  background: transparent;
  color: #7895d4;
  font-size: 11px;
  cursor: pointer;
}

.form-error {
  margin: 0 8px;
  color: #b8636a;
  font-size: 13px;
  line-height: 1.4;
}

.sticky-action {
  position: absolute;
  z-index: 8;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 18px 24px max(24px, env(safe-area-inset-bottom) + 14px);
  background: linear-gradient(180deg, rgba(248, 250, 255, 0), rgba(248, 250, 255, .94) 27%, #f8faff 64%);
  pointer-events: none;
}

.sticky-action .primary-button {
  width: 100%;
  pointer-events: auto;
}

.map-screen {
  flex-direction: column;
  background: #e8edf0;
}

.map-topbar {
  position: absolute;
  z-index: 500;
  top: max(14px, env(safe-area-inset-top) + 8px);
  right: 18px;
  left: 18px;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
}

.map-topbar h2 {
  justify-self: center;
  padding: 10px 16px;
  border-radius: 15px;
  background: rgba(255, 255, 255, .9);
  box-shadow: var(--soft-shadow);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 650;
  letter-spacing: 0;
  backdrop-filter: blur(15px);
}

#map {
  position: absolute;
  inset: 0;
  background: #e6ecef;
}

.leaflet-control-attribution {
  margin-bottom: 210px !important;
  font-size: 8px !important;
  opacity: .65;
}

.leaflet-control-zoom {
  display: none;
}

.map-search {
  position: absolute;
  z-index: 510;
  top: max(76px, env(safe-area-inset-top) + 70px);
  right: 20px;
  left: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 15px;
  border: 1px solid rgba(255, 255, 255, .92);
  border-radius: 17px;
  background: rgba(255, 255, 255, .93);
  box-shadow: var(--shadow);
  color: #7f9ad2;
  backdrop-filter: blur(16px);
}

.map-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 14px;
}

.map-suggestions {
  position: absolute;
  z-index: 520;
  top: max(132px, env(safe-area-inset-top) + 126px);
  right: 20px;
  left: 20px;
  margin: 0;
}

.center-marker {
  position: absolute;
  z-index: 480;
  top: calc(50% - 54px);
  left: 50%;
  width: 38px;
  height: 48px;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.center-marker::before {
  position: absolute;
  top: 0;
  left: 3px;
  width: 31px;
  height: 31px;
  border: 4px solid white;
  border-radius: 50% 50% 50% 0;
  background: var(--blue);
  box-shadow: 0 9px 18px rgba(54, 78, 128, .27);
  content: "";
  transform: rotate(-45deg);
}

.center-marker::after {
  position: absolute;
  top: 10px;
  left: 14px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: white;
  content: "";
}

.locate-button {
  position: absolute;
  z-index: 490;
  right: 20px;
  bottom: 226px;
  width: 48px;
  height: 48px;
  border: 1px solid white;
  border-radius: 16px;
  background: rgba(255, 255, 255, .94);
  box-shadow: var(--shadow);
  color: #6f8ed2;
  font-size: 23px;
  cursor: pointer;
}

.map-sheet {
  position: absolute;
  z-index: 500;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 10px 24px max(24px, env(safe-area-inset-bottom) + 16px);
  border-radius: 28px 28px 0 0;
  background: rgba(251, 252, 255, .96);
  box-shadow: 0 -12px 35px rgba(58, 72, 108, .14);
  backdrop-filter: blur(20px);
}

.sheet-handle {
  display: block;
  width: 38px;
  height: 4px;
  margin: 0 auto 17px;
  border-radius: 9px;
  background: #d9deea;
}

.map-sheet p {
  margin: 0 0 5px;
  color: #94a0b6;
  font-size: 11px;
}

.map-sheet strong {
  display: block;
  overflow: hidden;
  color: #3e4f6d;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-sheet small {
  display: block;
  margin: 5px 0 16px;
  color: #97a3b7;
  font-size: 11px;
}

.map-sheet .primary-button {
  width: 100%;
  min-height: 52px;
}

.loading-screen {
  flex-direction: column;
  text-align: center;
}

.stage-topbar {
  padding-right: 22px;
  padding-left: 22px;
}

.loading-content {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 30px 82px;
}

.loading-pet {
  width: min(84vw, 350px);
  margin-bottom: -8px;
}

.loading-pet img {
  width: 100%;
}

.loading-content h2 {
  color: #3b4c69;
  font-size: 34px;
}

.loading-content > p:last-child {
  color: #94a0b7;
  font-size: 13px;
}

.loading-dots {
  display: flex;
  gap: 8px;
  margin: 24px 0 13px;
}

.loading-dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blue);
  animation: loading-dot 1.2s infinite ease-in-out;
}

.loading-dots i:nth-child(2) { animation-delay: .16s; }
.loading-dots i:nth-child(3) { animation-delay: .32s; }

@keyframes loading-dot {
  0%, 60%, 100% { opacity: .3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-6px); }
}

.result-topbar {
  grid-template-columns: 48px 1fr 48px;
}

.result-heading {
  margin-bottom: 25px;
}

.result-heading h2 {
  font-size: 41px;
}

.answer-card {
  position: relative;
  min-height: 420px;
  padding: 32px 27px 22px;
  border: 1px solid rgba(235, 238, 246, .94);
  border-radius: 23px;
  background: rgba(255, 255, 255, .88);
  box-shadow: var(--shadow);
}

#answer-text {
  padding-bottom: 80px;
  color: #40506c;
  font-size: 16px;
  line-height: 1.65;
}

#answer-text p {
  margin: 0 0 18px;
}

#answer-text .answer-lead {
  color: #334464;
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.5;
}

#answer-text h3 {
  margin: 30px 0 13px;
  color: #314463;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 500;
  line-height: 1.2;
}

#answer-text h3:first-child {
  margin-top: 0;
}

#answer-text ul {
  display: grid;
  gap: 8px;
  margin: 0 0 21px;
  padding-left: 21px;
}

#answer-text li {
  padding-left: 3px;
}

#answer-text li::marker {
  color: #7c9fea;
}

.answer-actions {
  position: absolute;
  right: 27px;
  bottom: 20px;
  left: 27px;
  display: flex;
  gap: 25px;
  padding-top: 15px;
  border-top: 1px solid #dde2ed;
}

.answer-actions button {
  display: grid;
  gap: 4px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #99a5bc;
  font-size: 10px;
  cursor: pointer;
}

.answer-actions button span {
  color: #7d8fb2;
  font-size: 20px;
}

.result-pet {
  position: relative;
  z-index: 3;
  display: block;
  width: 145px;
  margin: -96px -16px 10px auto;
  mix-blend-mode: multiply;
}

.feedback-card {
  margin: 4px 0 28px;
  padding: 22px;
  border: 1px solid rgba(226, 232, 246, .95);
  border-radius: 22px;
  background: rgba(255, 255, 255, .88);
  box-shadow: var(--shadow);
}

.feedback-card h3,
.feedback-sheet h2 {
  margin: 5px 0 14px;
  color: #344766;
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 500;
}

.feedback-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin: 14px 0 12px;
}

.feedback-options button {
  min-height: 42px;
  padding: 8px 6px;
  border: 1px solid #e1e7f4;
  border-radius: 13px;
  background: #f7f9fe;
  color: #607399;
  font-size: 12px;
}

.feedback-options button:disabled {
  opacity: .58;
}

.feedback-card textarea,
.feedback-sheet textarea {
  width: 100%;
  min-height: 74px;
  resize: vertical;
  padding: 12px 13px;
  border: 1px solid #e1e7f4;
  border-radius: 14px;
  background: rgba(250, 251, 255, .9);
  color: #40506c;
  font: inherit;
  font-size: 13px;
}

.feedback-status {
  min-height: 18px;
  margin-top: 8px;
  color: #7185aa;
  font-size: 12px;
}

.feedback-sheet .secondary-button {
  width: 100%;
  margin-top: 10px;
  padding: 12px;
  border: 0;
  background: transparent;
  color: #8392ad;
}

.info-sheet {
  position: absolute;
  z-index: 900;
  inset: 0;
}

.sheet-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  border: 0;
  background: rgba(38, 48, 70, .22);
  backdrop-filter: blur(4px);
  animation: sheet-backdrop-in .25s ease-out;
}

.info-sheet article {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 12px 27px max(28px, env(safe-area-inset-bottom) + 18px);
  border-radius: 28px 28px 0 0;
  background: #fbfcff;
  box-shadow: 0 -16px 36px rgba(47, 59, 88, .18);
  animation: sheet-up .3s ease-out;
}

@keyframes sheet-up {
  from { transform: translateY(100%); }
}

.info-sheet.is-closing {
  pointer-events: none;
}

.info-sheet.is-closing article {
  animation: sheet-down .3s ease-in forwards;
}

.info-sheet.is-closing .sheet-backdrop {
  animation: sheet-backdrop-out .3s ease-in forwards;
}

@keyframes sheet-down {
  to { transform: translateY(100%); }
}

@keyframes sheet-backdrop-in {
  from { opacity: 0; }
}

@keyframes sheet-backdrop-out {
  to { opacity: 0; }
}

.info-sheet h2 {
  font-size: 34px;
}

.info-sheet p {
  margin: 15px 0 24px;
  color: #6d7b96;
  font-size: 15px;
  line-height: 1.55;
}

.info-sheet .primary-button {
  width: 100%;
}

.profile-sheet article {
  max-height: min(88%, 760px);
  padding-bottom: max(28px, env(safe-area-inset-bottom) + 18px);
  overflow-y: auto;
}

.profile-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
}

.profile-avatar {
  display: grid;
  flex: 0 0 58px;
  width: 58px;
  height: 58px;
  place-items: center;
  overflow: hidden;
  border-radius: 19px;
  background: linear-gradient(145deg, #dbe6ff, #edf2ff);
  box-shadow: inset 0 0 0 1px rgba(126, 155, 218, .16);
  color: #6382c6;
  font-family: var(--serif);
  font-size: 28px;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.profile-heading small {
  color: #9aa5b9;
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.profile-heading h2 {
  margin-top: 2px;
  font-family: var(--serif);
  font-size: 28px;
}

.profile-heading p {
  min-height: 15px;
  margin: 2px 0 0;
  color: #8c98ad;
  font-size: 12px;
}

.balance-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 22px 0 14px;
  padding: 18px;
  border: 1px solid #e7ebf3;
  border-radius: 18px;
  background: #f5f7fc;
}

.balance-card small,
.balance-card strong {
  display: block;
}

.balance-card small {
  margin-bottom: 4px;
  color: #99a4b8;
  font-size: 10px;
}

.balance-card strong {
  color: #4b5c78;
  font-size: 14px;
}

.balance-card b {
  color: #6889d2;
  font-family: var(--serif);
  font-size: 36px;
  font-weight: 400;
}

.profile-hint {
  margin: 0 2px 20px;
  color: #8e9ab0;
  font-size: 12px;
  line-height: 1.5;
  text-align: left;
}

.balance-section {
  margin: 15px 0;
  text-align: left;
}

.balance-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 2px 9px;
}

.balance-section-heading h3 {
  color: #4b5c78;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 650;
}

.balance-section-heading span {
  color: #d2a853;
  font-size: 10px;
}

.question-packages {
  display: grid;
  gap: 8px;
}

.question-package {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 13px;
  border: 1px solid #e3e8f2;
  border-radius: 15px;
  background: white;
  color: #4c5d79;
  cursor: pointer;
}

.question-package.is-popular {
  border-color: rgba(116, 151, 225, .42);
  background: linear-gradient(135deg, #f3f6ff, #fffaf1);
}

.question-package:disabled {
  cursor: default;
  opacity: .58;
}

.question-package span,
.question-package small {
  display: block;
}

.question-package span {
  font-size: 13px;
  font-weight: 650;
}

.question-package small {
  margin-top: 2px;
  color: #98a3b7;
  font-size: 9px;
}

.question-package b {
  color: #d09e36;
  font-size: 14px;
}

.promo-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.promo-form input {
  min-width: 0;
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid #e1e6f0;
  border-radius: 14px;
  outline: 0;
  background: white;
  color: #445572;
  font-size: 13px;
  text-transform: uppercase;
}

.promo-form input:focus {
  border-color: #92ace3;
  box-shadow: 0 0 0 3px rgba(122, 155, 224, .12);
}

.promo-form button {
  min-height: 46px;
  padding: 0 14px;
  border: 0;
  border-radius: 14px;
  background: #e9effc;
  color: #5d7cbe;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}

.promo-form button:disabled {
  cursor: default;
  opacity: .6;
}

.balance-status {
  margin: 8px 2px 0 !important;
  color: #71809a !important;
  font-size: 11px !important;
}

.balance-status.is-error {
  color: #b8636a !important;
}

.purchase-note {
  margin-bottom: 16px;
}

.toast {
  position: absolute;
  z-index: 1000;
  right: 22px;
  bottom: max(28px, env(safe-area-inset-bottom) + 18px);
  left: 22px;
  padding: 13px 16px;
  border-radius: 15px;
  background: rgba(50, 63, 88, .94);
  box-shadow: var(--shadow);
  color: white;
  font-size: 13px;
  text-align: center;
  backdrop-filter: blur(12px);
}

[hidden] {
  display: none !important;
}

@media (min-width: 700px) {
  body {
    padding: 24px 0;
  }

  .app-shell,
  .screen {
    min-height: calc(100dvh - 48px);
    border-radius: 34px;
  }
}

@media (max-height: 720px) {
  .welcome-screen {
    padding-top: 44px;
  }

  .welcome-copy h1 {
    font-size: 44px;
  }

  .welcome-copy .lead {
    margin-top: 10px;
  }

  .hero-pet {
    min-height: 230px;
  }

  .hero-pet img {
    max-height: 300px;
  }

  .auth-content {
    padding-bottom: max(24px, env(safe-area-inset-bottom) + 14px);
  }

  .auth-star {
    width: min(50vw, 205px);
    min-height: 188px;
  }

  .auth-content h2 {
    font-size: 37px;
  }

  .auth-copy {
    margin: 12px 0 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
