/* noto-sans-cyrillic-ext-400-normal */
@font-face {
  font-family: 'Noto Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(/fonts/noto-sans-cyrillic-ext-400-normal.woff2) format('woff2');
  unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F;
}

/* noto-sans-cyrillic-400-normal */
@font-face {
  font-family: 'Noto Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(/fonts/noto-sans-cyrillic-400-normal.woff2) format('woff2');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}

:root {
  font-family: "Noto Sans", system-ui, sans-serif;
  color: #19342c;
  background: #f6f5ef;
  font-size: 17px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
header,
main {
  max-width: 54rem;
  margin: auto;
  padding: 1rem;
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #bdc8ba;
}
header strong {
  letter-spacing: 0.03em;
}
main {
  display: grid;
  gap: 0.85rem;
}
h1,
h2,
p {
  margin: 0.2rem 0;
}
h1 {
  font-family: Georgia, serif;
  font-size: clamp(1.7rem, 5vw, 3rem);
}
h2 {
  font-size: 1.15rem;
}
section,
details {
  background: white;
  border: 1px solid #cdd6c8;
  padding: 1rem;
  border-radius: 0.7rem;
}
label {
  display: grid;
  gap: 0.35rem;
  margin: 0.6rem 0;
}
button,
select,
input,
textarea {
  font: inherit;
  padding: 0.65rem;
  border: 1px solid #9daea5;
  border-radius: 0.4rem;
  max-width: 100%;
  min-width: 0;
}
button {
  cursor: pointer;
  color: #18392f;
  background: #fff;
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
button.primary {
  background: #195345;
  color: white;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #c89240;
}
nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.5rem 0;
}
textarea {
  min-height: 7rem;
}
summary {
  cursor: pointer;
  font-weight: bold;
}
.preview {
  white-space: pre-line;
  background: #173c33;
  color: #fff;
  margin: 0.65rem 0;
  padding: 1rem;
  border-radius: 0.5rem;
}
.preview small {
  display: block;
  color: #c8d8cd;
}
.screen {
  color: #fff;
  background: #101412;
  display: flex;
  min-height: 100dvh;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.screen header {
  display: none;
}
.screen main {
  padding: 3vh 4vw;
  width: 100%;
  max-width: none;
}
.words {
  white-space: pre-line;
  overflow-wrap: anywhere;
  line-height: 1.32;
}
.words small {
  display: block;
  font-size: 0.4em;
  color: #dfcc9c;
  margin-bottom: 0.7em;
}
.screen img {
  max-width: 90vw;
  max-height: 84vh;
  object-fit: contain;
}
.screen footer {
  font-size: 0.85rem;
}
.follow nav {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
}
.screen.follow {
  padding-bottom: 4rem;
}
.screen.follow main {
  max-width: 50rem;
}
.screen.follow button {
  color: white;
  background: #202e27;
}
.preview img {
  max-height: 8rem;
  max-width: 100%;
}
output:not(:empty) {
  position: fixed;
  bottom: 0.75rem;
  left: 1rem;
  right: 1rem;
  max-width: 45rem;
  margin: auto;
  background: #703b24;
  color: white;
  padding: 0.75rem;
  border-radius: 0.5rem;
}
.screen output:empty {
  display: none;
}
a {
  color: #195345;
}
.display .take-control {
  position: fixed;
  bottom: 0.5rem;
  right: 0.5rem;
  z-index: 1;
  opacity: 0;
}
.display:hover .take-control, .display .take-control:focus-visible {
  opacity: 1;
}
