@font-face {
  font-family: "titles";
  src: url("fonts/joan.woff2") format("woff2");
  font-display: swap;
}
:root {
  --tlo: #e89878;
  --linia: #1c2350;
  --tekst: #1c2350;
  --akcent: #ffb999;
  --skala: 1;
}
:root.ciemny {
  --tlo: #1c2350;
  --linia: #e89878;
  --tekst: #ffb999;
  --akcent: #1c2350;
}
html {
  scroll-behavior: smooth;
}
::selection {
  background: var(--linia);
  color: var(--akcent);
}
html.zamek,
html.zamek body {
  overflow: hidden;
}
body {
  margin: 0;
  background: #1c2350;
  overflow-x: clip;
}
body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  transition: opacity 1.4s, background .3s;
}
body::before {
  background: radial-gradient(ellipse 120% 85% at 50% 0%, #ffb44b 0%, #ffb999 26%, #e89878 42%, #4b5888 70%, #1c2350 100%);
}
body::after {
  background: var(--tlo);
  opacity: 0;
}
body.wszedl::after {
  opacity: 1;
}
.strona {
  max-width: 488px;
  margin: 0 auto;
}
.hero {
  position: relative;
  box-sizing: border-box;
  height: 100svh;
  padding-top: 76px;
}
model-viewer {
  display: block;
  height: 100%;
  width: 100vw;
  margin-left: calc(50% - 50vw);
}
.hero.gotowe model-viewer {
  height: calc(100% - 6vh - 120px - env(safe-area-inset-bottom));
  transition: height 1.2s ease;
}
model-viewer::part(default-progress-bar) {
  display: none;
}
.wchodze,
.menu button,
.belka button,
.toggle summary,
.panel h2,
.foto::after {
  font-family: "titles", Arial, sans-serif;
  font-weight: normal;
}
.powitanie {
  position: absolute;
  top: 28px;
  left: 6%;
  right: 6%;
  z-index: 1;
  margin: 0;
  font: 18px/1.35 Arial, sans-serif;
  color: #1c2350;
  text-align: center;
  transition: opacity .8s;
}
.powitanie span {
  display: block;
}
.powitanie.znika,
.powitanie i {
  opacity: 0;
}
.powitanie i {
  font-style: normal;
}
.powitanie i.widac {
  opacity: 1;
}
.powitanie b {
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 1px;
  vertical-align: -.12em;
  background: currentColor;
  animation: kursor .8s steps(1) infinite;
}
@keyframes kursor {
  50% { opacity: 0; }
}
.zaklecia {
  position: absolute;
  left: 6%;
  right: 6%;
  bottom: calc(6vh + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 10px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(60px);
}
.hero.gotowe .zaklecia {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 1.2s, transform 1.2s ease, visibility 1.2s;
}
.wchodze {
  display: block;
  box-sizing: border-box;
  width: 100%;
  height: 44px;
  padding: 0;
  border: 1px solid #ffb999;
  border-radius: 33px;
  background: transparent;
  line-height: 42px;
  text-align: center;
  font-size: 18px;
  color: #ffb999;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 3px 8px rgba(28, 35, 80, .3);
  transition: background .2s, color .2s;
}
.wchodze:hover {
  background: #ffb999;
  color: #1c2350;
}
.tresc {
  min-height: 100svh;
  font-family: Arial, sans-serif;
  text-align: center;
  color: var(--tekst);
}
.menu,
.belka {
  display: grid;
  border-left: 1px solid var(--linia);
}
.menu {
  position: sticky;
  top: 0;
  z-index: 1;
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: 52px;
  background: var(--tlo);
}
.belka {
  grid-template-columns: 1fr 1fr 2fr;
  grid-auto-rows: 44px;
  margin-bottom: calc(64px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--linia);
}
.menu button,
.belka button {
  margin: 0;
  padding: 0;
  border: 0;
  border-right: 1px solid var(--linia);
  border-bottom: 1px solid var(--linia);
  border-radius: 0;
  -webkit-appearance: none;
  appearance: none;
  background: var(--tlo);
  color: var(--tekst);
  cursor: pointer;
  transition: background .2s, color .2s;
}
.menu button {
  font-size: 18px;
}
.belka button {
  font-size: 15px;
}
.menu button:hover,
.menu button.aktywny,
.belka button:hover,
.toggle summary:hover,
.toggle[open] summary {
  background: var(--linia);
  color: var(--akcent);
}
.panel {
  padding: 24px 24px 0;
  border-inline: 1px solid var(--linia);
  font-size: calc(17px * var(--skala));
  line-height: 1.6;
}
.panel h2 {
  margin: 8px 0 20px;
  font-size: calc(33px * var(--skala));
  font-variant-caps: all-small-caps;
  letter-spacing: .12em;
  line-height: 1.2;
}
.mail {
  color: inherit;
  font-weight: bold;
}
.toggle {
  margin: 0 -24px;
  border-top: 1px solid var(--linia);
}
.toggle:last-of-type {
  border-bottom: 1px solid var(--linia);
}
.toggle summary {
  position: relative;
  padding: 14px 48px;
  font-size: calc(18px * var(--skala));
  list-style: none;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.toggle summary::-webkit-details-marker {
  display: none;
}
.toggle summary::after {
  content: "†";
  position: absolute;
  right: 20px;
  top: 50%;
  margin-top: -.6em;
  line-height: 1.2;
  font-size: 22px;
  transition: transform .3s;
}
.toggle[open] summary::after {
  transform: rotate(180deg);
}
.toggle p {
  margin: 0;
  padding: 16px 24px;
  font-size: calc(15px * var(--skala));
  text-align: left;
}
.toggle p + p {
  padding-top: 0;
}
.foto {
  position: relative;
  margin: 24px -24px 0;
  overflow: hidden;
  border-top: 1px solid var(--linia);
}
.toggle + .foto {
  margin-top: 0;
  border-top: 0;
}
.foto img {
  display: block;
  width: 100%;
  max-height: 3000px;
  object-fit: cover;
  transition: max-height 1s ease, filter .8s;
}
.foto.zakryte {
  cursor: pointer;
}
.foto.zakryte img {
  max-height: 140px;
  filter: blur(14px);
  transform: scale(1.1);
}
.foto.zakryte::after,
.pigulka,
.chat__bubble,
.chat__chip,
.chat__typing,
.chat__send {
  box-sizing: border-box;
  border: 1px solid #1c2350;
  border-radius: 33px;
  background: #e89878;
  color: #1c2350;
  font-family: "titles", Arial, sans-serif;
  font-size: calc(15px * var(--skala));
  line-height: 1.4;
}
.foto.zakryte::after {
  content: "Ucieleśnij piksele";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 15px;
  white-space: nowrap;
}
.foto.zakryte::after,
.pigulka,
.chat__chip,
.chat__send {
  cursor: pointer;
  box-shadow: 0 3px 8px rgba(28, 35, 80, .3);
  transition: background .2s, color .2s, border-color .2s, box-shadow .2s, transform .2s;
}
.foto.zakryte::after,
.pigulka {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 222px;
  height: 44px;
  padding: 0;
}
.pigulka:active,
.chat__chip:active,
.chat__send:active {
  transform: translateY(1px);
  box-shadow: 0 1px 3px rgba(28, 35, 80, .3);
}
.chat__chip,
.chat__send,
.foto.zakryte:hover::after,
.pigulka:hover {
  background: #1c2350;
  color: #ffb999;
}
.chat__chip:hover,
.chat__send:hover,
.ciemny .chat__bubble--system,
.ciemny .chat__typing {
  border-color: #e89878;
  background: transparent;
  color: #ffb999;
}
.ciemny .chat__typing span {
  background: #ffb999;
}
.ciemny .chat__chip,
.ciemny .chat__send {
  background: #e89878;
  color: #1c2350;
}
.ciemny .pigulka:hover,
.ciemny .chat__chip:hover,
.ciemny .chat__send:hover,
.ciemny .foto.zakryte:hover::after {
  border-color: #e89878;
  background: #1c2350;
  color: #ffb999;
}
.pigulka {
  margin: 8px auto 24px;
}
.pigulka[hidden] {
  display: none;
}
.chat {
  margin: 8px -12px 24px;
  text-align: left;
}
.chat__thread {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.chat__bubble {
  max-width: 100%;
  font-family: Arial, sans-serif;
  font-size: calc(14px * var(--skala));
  align-self: flex-start;
  padding: 9px 12px;
  animation: dymek .3s ease-out;
}
.chat__bubble--user {
  align-self: flex-end;
  border-color: #e89878;
  background: #1c2350;
  color: #ffb999;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
@keyframes dymek {
  from { opacity: 0; transform: translateY(6px); }
}
.chat__chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 14px 8px;
  margin: 14px 0;
}
.chat__chip {
  padding: 9px 20px;
}
.chat__typing {
  align-self: flex-start;
  display: flex;
  gap: 5px;
  padding: 14px 18px;
}
.chat__typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #1c2350;
  animation: kropka 1s infinite;
}
.chat__typing span:nth-child(2) { animation-delay: .15s; }
.chat__typing span:nth-child(3) { animation-delay: .3s; }
@keyframes kropka {
  50% { opacity: .25; }
}
.chat__composer {
  position: relative;
  display: flex;
  gap: 8px;
  margin-top: 14px;
}
.chat__composer--message {
  flex-direction: column;
}
.chat__composer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.chat__field {
  flex: 1;
  min-width: 0;
  padding: 10px 18px;
  border: 1px solid var(--linia);
  border-radius: 33px;
  background: transparent;
  color: var(--tekst);
  font: 16px Arial, sans-serif;
}
textarea.chat__field {
  min-height: 120px;
  border-radius: 18px;
  resize: vertical;
  scrollbar-width: thin;
  scrollbar-color: var(--linia) transparent;
}
textarea.chat__field::-webkit-scrollbar {
  width: 6px;
}
textarea.chat__field::-webkit-scrollbar-thumb {
  border-radius: 3px;
  background: var(--linia);
}
textarea.chat__field::-webkit-scrollbar-track {
  margin: 14px 0;
  background: transparent;
}
.chat__field::placeholder {
  color: var(--tekst);
  opacity: .5;
}
.chat__field:focus {
  outline: none;
  box-shadow: 0 0 0 1px var(--linia);
}
.chat__send {
  flex: none;
  width: 44px;
  height: 44px;
  padding: 0;
  font-size: 20px;
}
.chat__counter {
  font-size: 13px;
  opacity: .7;
}
.chat__hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.chat__error {
  min-height: 1.2em;
  margin: 8px 0 0;
  font-size: 14px;
  text-align: center;
}
