:root {
  color-scheme: dark;
  --page-bg: #0f0f0f;
  --frame: #222222;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.03), transparent 35%),
    linear-gradient(180deg, #191919 0%, #0e0e0e 100%);
  font-family: "Trebuchet MS", "Gill Sans", sans-serif;
}

body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  color: #f3f1eb;
}

.app-shell {
  width: min(calc(100vw - 24px), calc((100vh - 24px) * 1724 / 1284));
  height: min(calc(100vh - 24px), calc((100vw - 24px) * 1284 / 1724));
  position: relative;
  display: grid;
  place-items: center;
  padding: 0;
  overflow: hidden;
  border-radius: 22px;
}

canvas {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.02) inset;
  background: #171717;
}

#water-fill-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 24px;
  background: #ffffff;
  border-radius: 0;
  z-index: 9999;
  pointer-events: none;
  overflow: hidden;
}

#water-fill-overlay.is-active {
  display: flex;
}

#water-fill-overlay img {
  display: block;
  width: min(54vw, 760px);
  max-width: calc(100vw - 96px);
  max-height: calc(100vh - 96px);
  height: auto;
  object-fit: contain;
  margin: 0 auto;
  flex: 0 0 auto;
}

#water-fill-fallback {
  display: none;
  color: #181818;
  font: 700 36px/1.1 Inter, "Segoe UI", sans-serif;
  text-align: center;
  max-width: calc(100vw - 120px);
  padding: 0 24px;
}

#water-fill-overlay.is-fallback img {
  display: none;
}

#water-fill-overlay.is-fallback #water-fill-fallback {
  display: block;
}
