.tt-flame {
  --tt-flame-edge: 22px;
  --tt-flame-size: 80px;
  --tt-flame-heat: 1;
  --tt-flame-right: max(var(--tt-flame-edge), env(safe-area-inset-right));
  --tt-flame-bottom: max(var(--tt-flame-edge), env(safe-area-inset-bottom));
  position: fixed;
  z-index: 20;
  right: var(--tt-flame-right);
  bottom: var(--tt-flame-bottom);
  color: #1c1a17;
  line-height: 1.35;
}

.tt-flame__trigger {
  position: relative;
  display: block;
  margin-left: auto;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: transparent;
}

.tt-flame__trigger:focus-visible {
  outline: 2px solid #fff8ed;
  outline-offset: 1px;
  box-shadow: 0 0 0 5px #352121;
}

.tt-flame__label {
  position: absolute;
  right: calc(100% + 4px);
  bottom: 16px;
  visibility: hidden;
  pointer-events: none;
  padding: 8px 12px;
  border: 1px solid #c7c0b3;
  border-radius: 8px;
  background: #f7f4ed;
  box-shadow: 0 2px 8px #1c1a1717;
  font-size: 1rem;
  font-weight: 650;
}

.tt-flame__stage {
  display: grid;
  place-items: center;
  width: var(--tt-flame-size);
  height: var(--tt-flame-size);
}

.tt-flame__art {
  display: block;
  width: var(--tt-flame-size);
  height: var(--tt-flame-size);
  image-rendering: pixelated;
  transform: scale(var(--tt-flame-heat));
  transform-origin: 50% 85%;
}

.tt-flame__trigger[aria-expanded="false"]:focus-visible .tt-flame__label { visibility: visible; }

@media (any-hover: hover) {
  .tt-flame__trigger[aria-expanded="false"]:hover .tt-flame__label { visibility: visible; }
}

.tt-flame__contact {
  position: absolute;
  bottom: calc(100% + 10px);
  right: 0;
  width: min(304px, calc(100vw - var(--tt-flame-right) - max(var(--tt-flame-edge), env(safe-area-inset-left))));
  max-height: calc(100dvh - var(--tt-flame-bottom) - env(safe-area-inset-top) - var(--tt-flame-size) - 24px);
  overflow: auto;
  padding: 18px;
  border: 1px solid #c7c0b3;
  border-radius: 14px;
  background: #f7f4ed;
  box-shadow: 0 6px 24px #1c1a172e;
}

.tt-flame__title {
  margin: 1px 42px 13px 0;
  font: 750 1.125rem/1.3 Golos, Arial, sans-serif;
  letter-spacing: normal;
}

.tt-flame__close {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
}

.tt-flame__close:hover { background: #ebe4d9; }

.tt-flame__call {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 13px;
  min-height: 52px;
  border-radius: 8px;
  background: #28211c;
  color: #fff8ed;
  font-size: 1rem;
  font-weight: 500;
}

.tt-flame__call:hover { background: #483027; }
.tt-flame__call svg { width: 22px; height: 22px; flex: none; fill: none; stroke: #ffaa74; stroke-width: 1.7; stroke-linejoin: round; }
.tt-flame__number { display: block; margin-top: 1px; font-size: 1.125rem; font-weight: 750; font-variant-numeric: tabular-nums; }

/* Leave room to scroll the last links clear of the floating control. */
body:has(.tt-flame:not([hidden])) .contact { padding-bottom: 98px; }

@media (max-width: 620px) {
  .tt-flame { --tt-flame-edge: 12px; }
  .tt-flame__label { padding-inline: 10px; }
}
