:root {
  --bg: #ffffff;
  --text: #111111;
  --muted: #6b6b6b;
  --border: #111111;
  --header-size: 20px;
  --heading-size: clamp(1.75rem, 4vw, 3rem);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  width: 100%;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
}

body {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  padding: 0 24px 28px;
}

.header,
.main {
  min-width: 0;
  max-width: 100%;
}

.header {
  padding: 26px 0 14px;
  text-align: center;
}

.site-title {
  margin: 0;
  font-size: var(--header-size);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.3;
  text-align: center;
}

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 36px;
  padding: 24px 0 40px;
}

.logo-circle {
  width: min(300px, 70vw);
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--border);
  background: #fff;
  flex-shrink: 0;
}

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

.quote {
  display: block;
  position: relative;
  margin: 0;
  width: 100%;
  max-width: min(42rem, 90vw);
  text-align: center;
  min-height: 5.5rem;
}

.quote-skeleton {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 4px 0;
}

.quote.is-loading .quote-skeleton {
  display: flex;
}

.quote.is-loading .quote-text,
.quote.is-loading .quote-author {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.quote-skeleton__line,
.quote-skeleton__author {
  display: block;
  border-radius: 4px;
  background: linear-gradient(
    90deg,
    rgba(17, 17, 17, 0.06) 0%,
    rgba(17, 17, 17, 0.12) 50%,
    rgba(17, 17, 17, 0.06) 100%
  );
  background-size: 200% 100%;
  animation: quote-shimmer 1.1s ease-in-out infinite;
}

.quote-skeleton__line {
  width: min(100%, 28rem);
  height: 1.15em;
}

.quote-skeleton__line--short {
  width: min(72%, 18rem);
  animation-delay: 0.12s;
}

.quote-skeleton__author {
  margin-top: 6px;
  width: 7rem;
  height: 0.7em;
  animation-delay: 0.24s;
}

@keyframes quote-shimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .quote-skeleton__line,
  .quote-skeleton__author {
    animation: none;
    background: rgba(17, 17, 17, 0.08);
  }
}

.quote-text {
  margin: 0 auto;
  font-family: Cardo, Georgia, "Times New Roman", serif;
  font-size: var(--heading-size);
  font-weight: 400;
  font-style: normal;
  line-height: 1.2;
  text-align: center;
  text-wrap: pretty;
  overflow-wrap: break-word;
  word-break: break-word;
  color: var(--text);
}

.quote-author {
  display: block;
  margin-top: 16px;
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.quote-author:not(:empty)::before {
  content: "\2014\00a0";
}

.telegram-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
  padding: 12px 22px;
  border: 2px solid var(--border);
  border-radius: 6px;
  background: var(--text);
  color: var(--bg);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-decoration: none;
}

.telegram-btn__icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.telegram-btn:hover,
.telegram-btn:focus-visible {
  background: var(--bg);
  color: var(--text);
}

.telegram-btn:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
}

@media (max-width: 640px) {
  .page {
    padding: 0 20px 20px;
  }

  .main {
    gap: 28px;
  }

  .quote {
    max-width: 18ch;
  }

  .quote-skeleton__line {
    width: 100%;
  }

  .quote-skeleton__line--short {
    width: 78%;
  }
}

@media (max-height: 860px) {
  .logo-circle {
    width: min(240px, 58vw);
  }

  .main {
    gap: 24px;
    padding: 12px 0 24px;
  }

  .quote-text {
    font-size: clamp(1.5rem, 3.4vw, 2.5rem);
  }
}
