@font-face {
  font-family: "Krungthep";
  src: url("fonts/ChicagoFLF.ttf");
}

@font-face {
  font-family: "basiic";
  src: url("cinni.net/fonts/basiic.ttf");
}

:root {
  --bg-green: #7ba66f;
  --bg-green-dark: #5d8555;
  --bg-green-light: #92b784;
  --dialog: #cfcfcf;
  --dialog-light: #f6f6f6;
  --dialog-dark: #9c9c9c;
  --title-blue: #0f39b8;
  --title-blue-dark: #0a2798;
  --ink: #111111;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body.landing-screen {
  min-height: 100vh;
  overflow: hidden;
  font-family: "basiic", "Lucida Grande", Geneva, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.16), transparent 24%),
    linear-gradient(135deg, var(--bg-green-light) 0%, var(--bg-green) 45%, var(--bg-green-dark) 100%);
}

body.landing-screen::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.06)),
    url("images/8.png");
  mix-blend-mode: soft-light;
  opacity: 0.28;
  pointer-events: none;
}

.splash-shell {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem;
}

.portrait-noise {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.portrait-noise::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 51%;
  width: min(58vw, 560px);
  height: min(78vh, 760px);
  transform: translate(-50%, -50%);
  background:
    radial-gradient(circle at 50% 18%, rgba(12, 23, 15, 0.75) 0 19%, transparent 20%),
    radial-gradient(circle at 50% 31%, rgba(244, 211, 176, 0.62) 0 18%, transparent 19%),
    radial-gradient(circle at 50% 67%, rgba(172, 95, 47, 0.62) 0 26%, transparent 27%),
    radial-gradient(circle at 50% 86%, rgba(245, 217, 190, 0.48) 0 12%, transparent 13%);
  filter: blur(5px) saturate(0.8);
  opacity: 0.82;
}

.portrait-noise::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 54%;
  width: min(44vw, 400px);
  height: min(58vh, 520px);
  transform: translate(-50%, -50%);
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 246, 232, 0.62) 0 6%, transparent 7%),
    radial-gradient(circle at 50% 54%, rgba(198, 60, 32, 0.6) 0 8%, transparent 9%);
  filter: blur(1px);
  opacity: 0.78;
}

.warning-window {
  position: relative;
  z-index: 1;
  width: min(620px, calc(100vw - 2rem));
  background: var(--dialog);
  border: 2px solid #ffffff;
  border-right-color: #4c4c4c;
  border-bottom-color: #4c4c4c;
  box-shadow:
    0 0 0 1px #bdbdbd,
    0 14px 40px rgba(0, 0, 0, 0.22);
}

.warning-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0.55rem 0.55rem 0.9rem;
  background: linear-gradient(90deg, var(--title-blue-dark), var(--title-blue));
  color: #ffffff;
}

.warning-titlebar h1 {
  margin: 0;
  font-family: "Krungthep", monospace;
  font-size: clamp(1rem, 2vw, 1.4rem);
  font-weight: normal;
}

.window-controls {
  display: flex;
  gap: 0.35rem;
}

.control {
  width: 38px;
  height: 34px;
  background: var(--dialog);
  border: 2px solid #ffffff;
  border-right-color: #4c4c4c;
  border-bottom-color: #4c4c4c;
  position: relative;
}

.control::before,
.control::after {
  content: "";
  position: absolute;
  background: var(--ink);
}

.control.minimize::before {
  left: 8px;
  right: 8px;
  bottom: 8px;
  height: 3px;
}

.control.maximize::before {
  inset: 7px;
  border: 3px solid var(--ink);
  background: transparent;
}

.control.close::before,
.control.close::after {
  left: 7px;
  right: 7px;
  top: 50%;
  height: 3px;
}

.control.close::before {
  transform: rotate(45deg);
}

.control.close::after {
  transform: rotate(-45deg);
}

.warning-body {
  padding: 2.25rem 2rem 1.4rem;
}

.warning-body p {
  margin: 0;
  font-size: clamp(1.6rem, 3.4vw, 2.35rem);
  line-height: 1.18;
}

.warning-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.4rem;
  margin-top: 2.3rem;
}

.dialog-button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 68px;
  padding: 0.8rem 1rem;
  background: var(--dialog);
  border: 2px solid #ffffff;
  border-right-color: #4c4c4c;
  border-bottom-color: #4c4c4c;
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.55);
  color: var(--ink);
  cursor: pointer;
  font-family: "basiic", "Lucida Grande", Geneva, sans-serif;
  font-size: clamp(1.2rem, 2.2vw, 1.8rem);
  text-decoration: none;
}

.dialog-button:active,
.dialog-button-primary:focus-visible {
  border-color: #4c4c4c #ffffff #ffffff #4c4c4c;
  box-shadow: inset -1px -1px 0 rgba(255, 255, 255, 0.45);
}

.status-line {
  min-height: 1.2rem;
  margin-top: 0.9rem !important;
  font-size: 0.95rem !important;
  text-align: center;
  letter-spacing: 0.02em;
}

.warning-window.is-shaking {
  animation: shake 180ms linear 2;
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-6px);
  }

  75% {
    transform: translateX(6px);
  }
}

@media (max-width: 640px) {
  .splash-shell {
    padding: 1rem;
  }

  .warning-body {
    padding: 1.5rem 1.2rem 1rem;
  }

  .warning-actions {
    grid-template-columns: 1fr;
    gap: 0.9rem;
  }

  .control {
    width: 32px;
    height: 30px;
  }
}
