* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; background: #083f52; }
body { font-family: ui-rounded, "Avenir Next", system-ui, sans-serif; color: #fff9ec; }
[hidden] { display: none !important; }
#player { position: fixed; inset: 0; height: 100%; height: 100dvh; overflow: hidden; background: #083f52; }
#player:fullscreen { width: 100%; height: 100%; }
#game { display: block; width: 100%; height: 100%; border: 0; outline: 0; touch-action: none; }
#launch {
  position: absolute; inset: 0; display: flex; align-items: flex-end; isolation: isolate;
  background: #126578 url("island.webp") 62% center / cover no-repeat;
}
#launch::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(0deg, rgb(6 34 45 / 83%), transparent 62%),
              linear-gradient(90deg, rgb(10 51 64 / 23%), transparent 62%);
}
.launch-content {
  width: min(85%, 30rem);
  margin: 0 0 max(clamp(2rem, 9vh, 6rem), env(safe-area-inset-bottom))
    max(clamp(1.5rem, 7vw, 7rem), env(safe-area-inset-left));
}
#wordmark {
  margin: 0 0 .22em -.055em; font-size: clamp(4.4rem, 9vw, 9rem); line-height: 1;
  font-weight: 900; font-style: italic; letter-spacing: -.085em; text-shadow: 0 3px 16px #063f483d;
}
#wordmark span { color: #b4f4ce; }
#google-signin { margin-top: .8rem; min-height: 40px; }
.readout { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; font-weight: 650; }
#percent { font-variant-numeric: tabular-nums; font-size: .88em; }
#progress {
  display: block; width: 100%; height: .45rem; margin-top: .6rem; border: 0; border-radius: 1rem;
  appearance: none; overflow: hidden; background: #ffffff40; color: #a4eeca;
}
#progress::-webkit-progress-bar { background: #ffffff40; border-radius: 1rem; }
#progress::-webkit-progress-value { background: #a4eeca; border-radius: 1rem; }
#progress::-moz-progress-bar { background: #a4eeca; border-radius: 1rem; }
#progress:indeterminate {
  background: linear-gradient(90deg, transparent, #a4eeca 50%, transparent) 0 0 / 50% 100% no-repeat, #ffffff40;
  animation: tide 1.8s ease-in-out infinite alternate;
}
#progress:indeterminate::-webkit-progress-bar { background: transparent; }
@keyframes tide { to { background-position: 100% 0; } }
button {
  min-height: 42px; font: inherit; font-weight: 700; cursor: pointer; color: inherit;
  border-radius: 30px; -webkit-tap-highlight-color: transparent;
}
button:focus-visible { outline: 3px solid #f9ce75; outline-offset: 3px; }
#retry { margin-top: .85rem; padding: .5rem 1.3rem; border: 0; background: #fff9ec; color: #16445a; }
#safari-help {
  width: min(24rem, 86vw); max-height: 86dvh; padding: 1.25rem; overflow: auto;
  border: 0; border-radius: 1rem; background: #fff9ec; color: #16445a;
}
#safari-help::backdrop { background: rgb(6 34 45 / 72%); }
#safari-help h2 { margin: 0; }
#safari-help p { margin: .75rem 0; line-height: 1.45; }
#safari-help form { text-align: right; }
#safari-help button { padding: .5rem 1.25rem; border: 0; background: #16445a; color: white; }
#fullscreen {
  display: flex; align-items: center; justify-content: center; gap: .6rem; position: absolute;
  top: max(14px, env(safe-area-inset-top)); right: max(16px, env(safe-area-inset-right));
  padding: .5rem 1rem; font-size: .85rem; color: white; background: rgb(6 35 46 / 76%); border: 1px solid #ffffff66;
}
#fullscreen i {
  width: 16px; height: 16px; background:
    linear-gradient(currentColor,currentColor) left top, linear-gradient(currentColor,currentColor) right top,
    linear-gradient(currentColor,currentColor) left bottom, linear-gradient(currentColor,currentColor) right bottom,
    linear-gradient(currentColor,currentColor) left top, linear-gradient(currentColor,currentColor) right top,
    linear-gradient(currentColor,currentColor) left bottom, linear-gradient(currentColor,currentColor) right bottom;
  background-size: 6px 2px, 6px 2px, 6px 2px, 6px 2px, 2px 6px, 2px 6px, 2px 6px, 2px 6px;
  background-repeat: no-repeat;
}
.playing #fullscreen { top: max(4px, env(safe-area-inset-top)); right: 50%; transform: translateX(50%); width: 42px; padding: 0; opacity: .76; }
.playing #fullscreen:hover, .playing #fullscreen:focus-visible { opacity: 1; }
.playing #fullscreen span { display: none; }
@media (max-width: 600px) { #launch { background-position: 66% center; } }
@media (max-height: 460px) { #wordmark { font-size: 4rem; } .launch-content { width: min(75%, 21rem); } }
@media (prefers-reduced-motion: reduce) { #progress:indeterminate { animation: none; } }
