/* lools.ru */

/* ---------- Шрифты (лежат на своём хостинге) ---------- */
@font-face {
  font-family: "Dela Gothic One"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("/assets/fonts/dela-gothic-one-cyrillic-400-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Dela Gothic One"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("/assets/fonts/dela-gothic-one-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0020-007E, U+00A0-00FF, U+2013-2014, U+2018-201E, U+2026, U+20AC, U+2122;
}
@font-face {
  font-family: "Golos Text"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("/assets/fonts/golos-text-cyrillic-400-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Golos Text"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("/assets/fonts/golos-text-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0020-007E, U+00A0-00FF, U+2013-2014, U+2018-201E, U+2026, U+20AC, U+2122;
}
@font-face {
  font-family: "Golos Text"; font-weight: 600; font-style: normal; font-display: swap;
  src: url("/assets/fonts/golos-text-cyrillic-600-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Golos Text"; font-weight: 600; font-style: normal; font-display: swap;
  src: url("/assets/fonts/golos-text-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0020-007E, U+00A0-00FF, U+2013-2014, U+2018-201E, U+2026, U+20AC, U+2122;
}

/* ---------- Основа ---------- */
:root {
  --lemon: #FFEFA3;
  --lemon-deep: #FFE066;
  --ink: #1F1147;
  --ink-soft: #5B4F80;
  --white: #FFFFFF;
  --punch: #FF4F79;
  --punch-deep: #E9305E;

  --display: "Dela Gothic One", "Arial Black", sans-serif;
  --text: "Golos Text", system-ui, -apple-system, "Segoe UI", sans-serif;

  --line: 3px;
  --radius: 16px;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--lemon);
  color: var(--ink);
  font: 400 1.0625rem/1.5 var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

.page {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 20px 72px;
  flex: 1;
}
.page--tool { max-width: 860px; }

/* ---------- Логотип с глазами ---------- */
.logo {
  margin: 0;
  font: 400 clamp(5rem, 21vw, 12.5rem)/0.9 var(--display);
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  color: var(--ink);
  text-decoration: none;
  user-select: none;
}
.logo--small { font-size: 2.75rem; }

.eye {
  --px: 0px;
  --py: 0.06em;
  position: relative;
  flex: none;
  width: 0.56em;
  height: 0.56em;
  margin: 0 0.015em 0.115em;
  align-self: flex-end;
  background: var(--white);
  border: 0.062em solid var(--ink);
  border-radius: 50%;
  overflow: hidden;
  transition: transform 90ms ease-in;
}
.eye.is-blink { transform: scaleY(0.08); }

.pupil {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 46%;
  height: 46%;
  margin: -23% 0 0 -23%;
  background: var(--ink);
  border-radius: 50%;
  transform: translate(var(--px), var(--py));
  transition: transform 80ms linear;
}
.pupil::after {
  content: "";
  position: absolute;
  left: 18%;
  top: 16%;
  width: 28%;
  height: 28%;
  background: var(--white);
  border-radius: 50%;
}

/* Пока нейросеть думает, зрачки ходят по кругу */
.logo.is-thinking .pupil {
  transition: none;
  animation: think 0.9s linear infinite;
}
@keyframes think {
  0%   { transform: translate(0, -0.085em); }
  25%  { transform: translate(0.085em, 0); }
  50%  { transform: translate(0, 0.085em); }
  75%  { transform: translate(-0.085em, 0); }
  100% { transform: translate(0, -0.085em); }
}

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 22px;
  border: var(--line) solid var(--ink);
  border-radius: 12px;
  background: var(--white);
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { background: var(--lemon-deep); }
.btn--punch { background: var(--punch); }
.btn--punch:hover { background: var(--punch-deep); }
.btn.is-done { background: var(--lemon-deep); }
.btn[disabled] { cursor: progress; opacity: 0.7; }

/* ---------- Главная: вопрос ---------- */
.hero {
  padding-top: clamp(28px, 7vh, 72px);
  text-align: center;
}

.ask {
  max-width: 760px;
  margin: clamp(20px, 4vh, 36px) auto 0;
  text-align: left;
}

.ask__label {
  display: block;
  margin-bottom: 14px;
  font: 400 clamp(1.6rem, 4.6vw, 2.5rem)/1.1 var(--display);
  text-align: center;
}

.ask__row {
  display: flex;
  background: var(--white);
  border: var(--line) solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 6px 6px 0 var(--ink);
  overflow: hidden;
}
.ask__row:focus-within { box-shadow: 9px 9px 0 var(--ink); }

.ask__input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 18px 20px;
  font-size: 1.1875rem;
}
.ask__input::placeholder { color: var(--ink-soft); opacity: 0.8; }
.ask__input:focus { outline: none; }

/* Кнопка внутри строки: без своей рамки, только разделитель слева */
.ask__row .ask__go {
  border-radius: 0;
  border-width: 0 0 0 var(--line);
  padding-inline: 26px;
}

.ask__hint {
  margin: 16px 4px 0;
  font-size: 0.9375rem;
  text-align: center;
}

.tries {
  max-width: 760px;
  margin: 26px auto 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  font-size: 0.9375rem;
}
.tries__label { flex-basis: 100%; margin-bottom: 2px; }

.chip, .pick {
  padding: 7px 14px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
}
.chip:hover, .pick:hover { background: var(--lemon-deep); }
.pick[aria-pressed="true"] { background: var(--ink); color: var(--white); }

.status {
  max-width: 760px;
  margin: 40px auto 0;
  padding: 14px 18px;
  background: var(--white);
  border: var(--line) solid var(--ink);
  border-radius: var(--radius);
  font-weight: 600;
  text-align: center;
}
.status[hidden] { display: none; }

/* ---------- Главная: шутки ---------- */
.out {
  max-width: 860px;
  margin: 44px auto 0;
}
.out[hidden] { display: none; }

.styles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 0.9375rem;
}

.out__more { margin-top: 18px; }
.out__more[hidden] { display: none; }

/* ---------- Лист со строками результата (общий для всех страниц) ---------- */
.sheet {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--white);
  border: var(--line) solid var(--ink);
  border-radius: var(--radius);
  overflow: hidden;
}

.row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px 14px 20px;
}
.row + .row { border-top: 2px dashed var(--ink); }

.row__body { flex: 1; min-width: 0; }
.row > .row__text { flex: 1; min-width: 0; }

.row__name {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.row__text {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.row__body .row__text { font-size: 1.375rem; }

.row__copy {
  flex: none;
  min-width: 9.2em;
  padding: 10px 14px;
  font-size: 0.9375rem;
}

/* ---------- Ссылки на инструменты внизу главной ---------- */
.shelf {
  margin-top: 80px;
  padding-top: 36px;
  border-top: var(--line) solid var(--ink);
}
.shelf__title {
  margin: 0 0 20px;
  font: 400 clamp(1.4rem, 3.4vw, 1.9rem)/1.15 var(--display);
}
.shelf__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 40px;
}
.shelf__link { font-size: 1.1875rem; font-weight: 600; text-underline-offset: 4px; }
.shelf__link:hover { text-decoration-thickness: 3px; }
.shelf__note { display: block; margin-top: 2px; font-size: 0.9375rem; }

/* ---------- Шапка на страницах инструментов ---------- */
.top {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 18px 20px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
}
.top__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  font-weight: 600;
}
.top__nav a { text-decoration: none; padding: 4px 0; }
.top__nav a:hover { text-decoration: underline; text-underline-offset: 6px; }
.top__nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-color: var(--punch);
  text-decoration-thickness: 4px;
  text-underline-offset: 6px;
}

/* ---------- Страница инструмента ---------- */
.title {
  margin: 36px 0 12px;
  font: 400 clamp(1.8rem, 5.4vw, 3rem)/1.1 var(--display);
}
.lead { margin: 0 0 28px; max-width: 62ch; }

.tool__label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}
.tool__input {
  display: block;
  width: 100%;
  padding: 16px 18px;
  background: var(--white);
  border: var(--line) solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 6px 6px 0 var(--ink);
  font-size: 1.25rem;
  resize: vertical;
}
.tool__input:focus { outline: none; box-shadow: 9px 9px 0 var(--ink); }

.check {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  cursor: pointer;
}
.check input { width: 20px; height: 20px; accent-color: var(--ink); }

.note {
  margin: 14px 0 0;
  padding-left: 14px;
  border-left: 4px solid var(--punch);
  max-width: 62ch;
}
.note[hidden] { display: none; }

.result { margin-top: 36px; }
.result[hidden] { display: none; }
.result__title {
  margin: 0 0 14px;
  font: 400 1.4rem/1.2 var(--display);
}

/* Каомодзи */
.kao-group { margin-top: 36px; }
.kao-group__title {
  margin: 0 0 14px;
  font: 400 1.4rem/1.2 var(--display);
}
.kao-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.kao {
  max-width: 100%;
  padding: 10px 14px;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 12px;
  font-size: 1.125rem;
  white-space: nowrap;
  overflow-x: auto;
  cursor: pointer;
}
.kao:hover { background: var(--lemon-deep); }

/* Пояснения под инструментом */
.prose { margin-top: 64px; max-width: 66ch; }
.prose h2 { margin: 28px 0 8px; font-size: 1.25rem; font-weight: 600; line-height: 1.3; }
.prose p { margin: 0 0 12px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  max-width: calc(100vw - 32px);
  padding: 10px 18px;
  background: var(--ink);
  color: var(--white);
  border-radius: 999px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transform: translateX(-50%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 150ms linear;
}
.toast.is-on { opacity: 1; }

/* ---------- Подвал ---------- */
.foot {
  padding: 20px;
  border-top: var(--line) solid var(--ink);
  font-size: 0.875rem;
  text-align: center;
}
.foot p { margin: 0 auto; max-width: 70ch; }

/* ---------- Телефон ---------- */
@media (max-width: 720px) {
  .ask__row { flex-direction: column; }
  .ask__row .ask__go { border-width: var(--line) 0 0 0; padding-block: 16px; }
  .row { flex-direction: column; align-items: stretch; gap: 10px; padding: 14px 16px; }
  .row__text { font-size: 1.125rem; }
  /* На страницах инструментов строки короткие: кнопка остаётся справа */
  .row--tight { flex-direction: row; align-items: center; }
  .row--tight .row__copy { min-width: 0; padding: 9px 12px; font-size: 0.875rem; }
  .row__body .row__text { font-size: 1.25rem; }
  .shelf__list { grid-template-columns: minmax(0, 1fr); }
  .logo--small { font-size: 2.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  .eye, .pupil, .toast { transition: none; }
  .logo.is-thinking .pupil { animation: none; }
}
