/* Illustrated title art paints before the game bundle. The island stays held until Play. */
@font-face { font-family: 'Isla Title'; src: url('./assets/juice/LilitaOne-Regular.ttf') format('truetype'); font-display: swap; }
html, body { margin: 0; background: #315e49; }
[hidden] { display: none !important; }
#launch-screen {
  position: fixed; inset: 0; margin: 0; width: 100%; height: 100%; height: 100dvh;
  max-width: none; max-height: none; padding: 0; border: 0; box-sizing: border-box;
  overflow: auto; overscroll-behavior: contain; color: #fff6dc;
  background-color: #315e49;
  background-image: linear-gradient(0deg, #173e3270, transparent 28%), url('./assets/brand/isla-title-landscape.webp');
  background-size: cover; background-position: center; background-repeat: no-repeat;
  font-family: system-ui, sans-serif; z-index: 100;
}
#launch-screen:not([open]) { display: none; }
/* While the island loads, Play keeps its place unseen and the loading bar stands in that same place (below). */
body[data-launch-state="loading"] #launch-enter { visibility: hidden; }
#launch-screen::backdrop { background: transparent; }
#launch-title { margin: 0; }
.launch-sr-only, #launch-title > span { position: absolute; width: 1px; height: 1px; margin: -1px; clip-path: inset(50%); overflow: hidden; }
#launch-title img { position: absolute; top: max(7%, calc(env(safe-area-inset-top) + 16px)); left: 30%; transform: translateX(-50%); width: min(80%, 450px); max-height: 27%; object-fit: contain; filter: drop-shadow(0 4px 4px #193d3650); }
#launch-screen.launch-art-failed #launch-title > span { clip-path: none; width: auto; height: auto; inset: 10% 5% auto; text-align: center; font: 36px/1.2 'Isla Title', system-ui, sans-serif; text-shadow: 0 2px 5px #143c2e; }
#launch-screen.launch-art-failed #launch-title img { display: none; }
.launch-menu { position: absolute; left: 30%; transform: translateX(-50%); bottom: max(6%, calc(env(safe-area-inset-bottom) + 20px)); width: min(76%, 300px); text-align: center; display: grid; }
/* The loading bar and Play share one place: the bar fills there, then Play appears there. Nothing moves. */
#launch-loading, #launch-enter { grid-area: 1 / 1; }
#launch-screen button { box-sizing: border-box; font: inherit; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
#launch-screen button:focus-visible { outline: 3px solid #fff7dc; outline-offset: 5px; }
#launch-screen #launch-enter {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  width: 100%; min-height: 62px; padding: 12px 18px; border: 3px solid #173a1a; border-radius: 20px;
  background: #2f6b2a; color: #fffaf0; font: 27px/1.15 'Isla Title', system-ui, sans-serif;
  box-shadow: inset 0 2px 0 #5d9a4f, 0 4px 0 #173a1a;
}
#launch-enter > svg { width: 22px; height: 22px; }
#launch-screen #launch-enter:hover:enabled { background: #387a31; }
#launch-screen #launch-enter:active:enabled { transform: translateY(2px); box-shadow: inset 0 2px 0 #5d9a4f, 0 2px 0 #173a1a; }
#launch-screen #launch-enter:disabled { cursor: wait; font-size: 19px; border-color: #6b5238; background: #c8b592; color: #3a2a1d; box-shadow: 0 4px 0 #6b5238; }
#launch-tools { display: flex; justify-content: center; gap: 20px; margin-top: 22px; transition: opacity .2s ease-out; }
/* The row keeps its place while the island loads, so Play never moves when loading ends (it used to jump up 72 px
   as the row arrived under it). It fades in; the loading line above Play fades out. */
#launch-tools[hidden] { display: flex !important; visibility: hidden; opacity: 0; }
#launch-tools button { display: grid; place-items: center; width: 50px; height: 50px; min-height: 50px; padding: 10px; border-radius: 50%; border: 2px solid #7a4f24; box-shadow: 0 3px 0 #533b24, inset 0 0 0 2px #edc587; background: #e4b469; color: #3a2a1d; }
#launch-tools button:hover { background: #ecc07a; }
/* Another device's island waits in a cloud (src/presentation/cloud-saves.ts): a small cloud on the Saves disk. */
#launch-saves { position: relative; }
#launch-saves[data-cloud='waiting']::after { content: ''; position: absolute; top: -8px; right: -10px; width: 28px; height: 22px; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='4 12 40 28'%3E%3Cpath d='M14 36h21a8 8 0 0 0 1-15.9A11 11 0 0 0 15.3 17 9.5 9.5 0 0 0 14 36Z' fill='%23fff4d8' stroke='%231d4a24' stroke-width='2.8' stroke-linejoin='round'/%3E%3Cpath d='M24 22v9m-4-4 4 4 4-4' fill='none' stroke='%231d4a24' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  animation: launch-cloud-in .3s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes launch-cloud-in { from { transform: translateY(4px) scale(.7); opacity: 0; } }
#launch-tools svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
#launch-retry { min-height: 44px; padding: 8px 16px; border-radius: 12px; border: 1px solid #fff0c85c; background: #164e3e; color: #fff4d6; font-size: 15px; }
/*
 * The loading bar (the owner, 2026-11-17, of the small spinner and grey line that stood here: "the loading indicator
 * ... is also lack luster"): a trough of dark wood that fills with coconut gold as the island loads, a coconut rolling
 * at the head of the fill, and what is being done in the title's own letters under it. `--progress` (0 to 1) is set
 * as each part of the loading finishes (launch-screen.ts); before the game's code arrives the fill breathes at its start.
 * Motion is transform only.
 */
#launch-loading { --progress: .06; display: grid; align-content: center; justify-items: center; gap: 7px; min-height: 62px; margin: 0;
  font: 19px/1.1 'Isla Title', system-ui, sans-serif; letter-spacing: .01em; color: #fff6dc; text-shadow: 0 2px 0 #173a1a, 0 0 10px #0d2a20, 0 0 3px #0d2a20;
  transition: opacity .2s ease-out, visibility .2s; }
/* It keeps its place when it goes: Play appears where it stood. */
#launch-loading[hidden] { display: grid !important; opacity: 0; visibility: hidden; }
.launch-bar { position: relative; container-type: inline-size; box-sizing: border-box; width: 100%; height: 26px; border: 3px solid #173a1a; border-radius: 9px;
  background: linear-gradient(180deg, #2a1c11, #4a3220); box-shadow: inset 0 3px 5px #000a, 0 4px 0 #173a1a, 0 8px 12px #0d2a2066; }
.launch-bar > i { position: absolute; inset: 0; overflow: hidden; border-radius: 6px; }
.launch-bar > i::before { content: ''; position: absolute; inset: 0; border-radius: 6px; transform: translateX(calc((var(--progress) - 1) * 100%)); transition: transform .6s cubic-bezier(.2, .8, .2, 1);
  background: linear-gradient(180deg, #fff0b0 0%, #ffd45e 30%, #f4b23a 62%, #d98a1e 100%); box-shadow: inset 0 -3px 0 #b9701366; }
.launch-bar > i::after { content: ''; position: absolute; top: 0; bottom: 0; left: 0; width: 40%; background: linear-gradient(100deg, transparent, #fff8dc8c 50%, transparent); transform: translateX(-120%); animation: launch-bar-shine 1.6s ease-in-out infinite; }
/* (The picture has clear space round the nut: at 50 px the nut itself is about 30, a ball a little taller than the trough.) */
.launch-bar > img { position: absolute; left: -25px; top: -15px; width: 50px; height: 50px; transform: translateX(calc(var(--progress) * 100cqw)) rotate(calc(var(--progress) * 540deg));
  transition: transform .6s cubic-bezier(.2, .8, .2, 1); filter: drop-shadow(0 3px 2px #0d2a2099); }
@keyframes launch-bar-shine { 0% { transform: translateX(-120%); } 60%, 100% { transform: translateX(320%); } }
#launch-loading progress { position: absolute; width: 1px; height: 1px; margin: -1px; clip-path: inset(50%); overflow: hidden; opacity: 0; }
/* A note (saving unavailable, a save recovered) stands where the loading line stood, above Play, and grows upwards:
   arriving, it moves nothing. Under the tools row it pushed Play up 37 px (register J11). */
#launch-note { position: absolute; left: 0; right: 0; bottom: calc(100% + 8px); margin: 0; padding: 5px 10px; border-radius: 10px; background: #173c30d9; font-size: 13px; line-height: 1.5; color: #fff8e8; text-wrap: balance; }
body:not([data-launch-state="playing"]) #hud-review { visibility: hidden; }
body[data-launch-state="error"] .launch-menu { visibility: hidden; }
@keyframes isla-loading { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .launch-bar > i::after { animation: none; } .launch-bar > i::before, .launch-bar > img, #launch-tools, #launch-loading { transition: none; } #launch-saves::after { animation: none; } }
body.settings-reduced-motion .launch-bar > i::after { animation: none; }
body.settings-reduced-motion :is(.launch-bar > i::before, .launch-bar > img) { transition: none; }
@media (max-aspect-ratio: 1/1) {
  #launch-screen { background-image: linear-gradient(0deg, #173e3270, transparent 24%), url('./assets/brand/isla-title-portrait.webp'); }
  #launch-title img { top: max(10%, calc(env(safe-area-inset-top) + 16px)); left: 50%; }
  .launch-menu { left: 50%; }
}
@media (max-height: 500px) and (min-aspect-ratio: 4/3) {
  #launch-title img { left: 25%; width: min(40%, 340px); top: max(6%, env(safe-area-inset-top)); max-height: 44%; }
  .launch-menu { left: 25%; width: min(36%, 270px); bottom: max(24px, calc(env(safe-area-inset-bottom) + 12px)); }
  #launch-screen #launch-enter { min-height: 48px; font-size: 23px; border-radius: 15px; }
  #launch-tools { margin-top: 14px; gap: 18px; }
  #launch-tools button { width: 44px; height: 44px; min-height: 44px; padding: 7px; }
  #launch-loading { min-height: 48px; gap: 4px; font-size: 15px; }
  .launch-bar { height: 20px; } .launch-bar > img { width: 40px; height: 40px; left: -20px; top: -13px; }
  #launch-note { bottom: calc(100% + 6px); font-size: 11px; }
}
