@font-face {
  font-family: Anton;
  src: url("assets/fonts/anton.ttf") format("truetype");
  font-display: swap;
}
@font-face {
  font-family: "Young Serif";
  src: url("assets/fonts/young-serif.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
* { box-sizing: border-box; }
html {
  height: 100%;
  background: #2b2b2b url("assets/wallpaper.webp") center / cover fixed no-repeat;
}
@media (max-aspect-ratio: 1/1) {
  html {
    background-size: auto 107.2vh;
    background-position: 13.6% center;
  }
}
body {
  margin: 0 auto;
  height: 100%;
  height: min(100%, 100dvh);
  display: grid;
  grid-template-rows: 2.13% minmax(0, 1fr) max(6px, .93%) clamp(33px, 3.7%, 44px) .74%;
  container-type: size;
  color: white;
  font: 400 24px/1.2 "Young Serif", Georgia, serif;
}
a { color: inherit; text-decoration: none; }
a:focus-visible, .web:focus-visible { outline: 2px solid white; outline-offset: 2px; }
main {
  grid-row: 2;
  margin-inline: 1.25%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .833cqw;
  font-size: clamp(16px, 2.23cqh, 24px);
}
.window {
  position: relative;
  border: 1px solid #ff9395;
  border-radius: 35px;
  background: #2b2b2b;
  text-align: center;
}
.brand, nav, .action, .versions, h2 {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
.brand {
  top: 3.2%;
  margin: 0;
  color: #f3fbef;
  font: 400 min(9.2cqh, 10cqw, 108px)/.86 Impact, Anton, sans-serif;
  letter-spacing: -.025em;
  -webkit-text-stroke: 2px #172517;
  paint-order: stroke fill;
}
.brand span, .brand small { display: block; }
.brand span:first-child { font-size: 1.16em; }
.brand small {
  margin-top: .35em;
  color: white;
  font-size: .32em;
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
  -webkit-text-stroke-color: #111;
}
.frame {
  position: absolute;
  inset: 31% 1.4% 2.3% 3.2%;
  border: 4px solid #696969;
  border-radius: 30px;
}
nav {
  top: 29%;
  width: max(23.6%, 64px);
  height: 5%;
  display: flex;
  padding: .6cqh .36cqw;
  background: #363636;
  border-radius: 20px;
}
nav a {
  flex: 1;
  display: grid;
  place-items: center;
  background: #424242;
  border-radius: 20px;
}
nav, .versions { font-size: clamp(14px, 1.67cqh, 18px); }
.action {
  top: 41.15%;
  width: 39.8%;
  min-width: max-content;
  height: 6.35%;
  padding: 0 .4em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .16em;
  border-radius: 15px;
  background: #434343;
}
#download {
  width: max-content;
  min-width: 39.8%;
  max-width: 90%;
}
#release-version {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.versions { top: 48.2%; }
h2 { top: 54.55%; margin: 0; font: inherit; }
.screenshots {
  position: absolute;
  inset: max(58.6%, calc(54.55% + 1.2em + 4px)) 9.2% 5% 11.1%;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  overflow: hidden;
  border-radius: 20px;
  background: #202020;
}
footer {
  grid-row: 4;
  margin-inline: 10.68% 11.25%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 8px;
  border-radius: 30px;
  background: #2b2b2b;
  font: 14px system-ui, sans-serif;
}
footer > * {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 70%;
  padding: 2px 12px;
  border-radius: 20px;
  background: #373737;
}
time { justify-self: start; white-space: pre; }
#active-window { min-width: 10em; }
.social { justify-self: end; gap: 4px; padding: 2px 6px; }
.social a, .social img { display: block; width: 20px; height: 20px; }
@media (max-width: 600px), (max-width: 760px) and (pointer: coarse) {
  main { margin-inline: 2.8%; grid-template-columns: 1fr; }
  .web { display: none; }
  .brand { top: 5.8%; left: 52.7%; font-size: min(7.5cqh, 16cqw, 76px); }
  .frame { inset-inline: 3.2%; }
  nav { left: 52.8%; padding-inline: 4px; }
  .action { top: 42%; width: 75%; height: 5.55%; }
  #download { min-width: 75%; }
  .versions { top: 47.8%; left: 52%; }
  h2 { top: 54.85%; }
  .screenshots { inset: max(59.65%, calc(54.85% + 1.2em + 4px)) 6.9% 5.3% 7.1%; }
  footer { margin-inline: 2.8% 4.2%; }
  footer > * { padding-inline: 7px; }
  #active-window { min-width: 0; }
  .social { flex-direction: row-reverse; gap: 2px; padding-inline: 4px; }
}
@container (max-width: 360px) {
  footer { font-size: 12px; padding-inline: 4px; }
}

.screenshot-preview {
  display: block;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}
.screenshot-preview img, .screenshot-dialog img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.screenshot-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 3px 8px;
  background: #373737;
  font: 14px system-ui, sans-serif;
}
.screenshot-controls button, .screenshot-dialog form button {
  min-width: 40px;
  min-height: 36px;
  border: 0;
  border-radius: 12px;
  background: #484848;
  color: white;
  font: 24px/1 system-ui, sans-serif;
  cursor: pointer;
}
.screenshot-controls button:focus-visible, .screenshot-dialog button:focus-visible {
  outline: 2px solid white;
  outline-offset: -2px;
}
.screenshot-dialog {
  width: min(94vw, 1280px);
  max-height: 92dvh;
  padding: 0;
  overflow: hidden;
  border: 1px solid #ff9395;
  border-radius: 20px;
  background: #202020;
  color: white;
}
.screenshot-dialog::backdrop { background: rgb(0 0 0 / 80%); }
.screenshot-dialog form { position: absolute; top: 8px; right: 8px; }
.screenshot-dialog img { height: min(76dvh, 760px); }

@container (max-height: 490px) {
  .screenshots .screenshot-controls button { min-height: 30px; }
}
