:root { color-scheme: light; --ink: #20232d; --orange: #ff7900; --sky: #a6e5f6; }
@font-face { font-family: 'Logly Rounded'; src: url('./assets/nunito-900.ttf') format('truetype'); font-weight: 900; font-display: swap; }
* { box-sizing: border-box; }
html, body { margin: 0; min-width: 280px; min-height: 100%; }
body { font-family: ui-rounded, system-ui, sans-serif; background: linear-gradient(#a7e6f7 0%,#a7e6f7 45%,#a9d945 72%,#71ab35 100%); }
main { --hint-space: 136px; min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding-block: 12px; overflow: hidden; }
.scene { position: relative; flex: none; width: min(100vw,calc((100svh - var(--hint-space))*1.776833)); aspect-ratio: 1672 / 941; isolation: isolate; }
picture, picture img, canvas, #crew { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
picture img { object-fit: contain; }
canvas { opacity: 0; }
.ready canvas { opacity: 1; }
.ready picture { visibility: hidden; }
#crew { pointer-events: none; }
.character { position: absolute; padding: 0; border: 0; background: transparent; cursor: pointer; pointer-events: auto; touch-action: manipulation; -webkit-tap-highlight-color: transparent; border-radius: 38%; }
.character:focus-visible { outline: 3px dashed #20232d; outline-offset: 5px; background: #fff3; }
.character:hover { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cpath d='M8 4v23l6-7 6 10 5-3-6-10 9-1z' fill='%23ff7900' stroke='%2320232d' stroke-width='2' stroke-linejoin='round'/%3E%3C/svg%3E") 8 4, pointer; }
#tooltip { position: absolute; pointer-events: none; z-index: 2; transform: translate(-50%,-100%); padding: 11px 17px; border: 2px solid var(--ink); border-radius: 16px; background: #fffaf0; color: var(--ink); text-align: center; box-shadow: 0 4px 0 #20232d26; width: max-content; max-width: calc(100% - 24px); font-size: 18px; line-height: 1.35; }
#tooltip strong { display: block; font-size: 24px; font-weight: 850; }
#tooltip span { font-size: 1em; }
.crew-hint { flex: none; width: min(760px,calc(100% - 8px)); margin: 0; padding: 11px 12px; background: #fff9e7; border: 3px solid var(--ink); border-radius: 22px; color: var(--ink); box-shadow: 0 3px 0 #20232d55; text-align: center; font-family: 'Logly Rounded',ui-rounded,system-ui,sans-serif; font-size: clamp(22px,2vw,30px); font-weight: 900; line-height: 1.1; letter-spacing: -.45px; -webkit-text-stroke: .45px currentColor; paint-order: stroke fill; }
.crew-hint strong { color: var(--orange); font-weight: 900; }
#crew-reset { width: min(470px,calc(100vw - 36px)); margin: auto; padding: 30px 24px 25px; border: 3px solid var(--ink); border-radius: 30px; background: #fffaf0; color: var(--ink); box-shadow: 0 7px 0 #20232d55; text-align: center; font-family: inherit; }
#crew-reset::backdrop { background: #0c1b29a3; }
#crew-reset h2 { margin: 0 0 8px; color: var(--orange); font-size: clamp(52px,8vw,78px); font-weight: 900; line-height: 1.05; letter-spacing: -2px; }
#crew-reset p { margin: 10px 0 25px; font-size: clamp(26px,4vw,36px); line-height: 1.18; font-weight: 850; }
#sorry { width: 100%; padding: 12px 20px; border: 3px solid var(--ink); border-radius: 20px; background: var(--orange); color: var(--ink); font: 850 30px/1.2 ui-rounded,system-ui,sans-serif; box-shadow: 0 4px 0 #20232d26; cursor: pointer; }
#sorry:hover { background: #ff922b; }
#sorry:focus-visible { outline: 3px solid var(--ink); outline-offset: 5px; }
.motion-toggle { position: absolute; bottom: 14px; left: 14px; width: 38px; height: 38px; border: 2px solid var(--ink); border-radius: 50%; background: #fff9e9; color: var(--ink); cursor: pointer; font-weight: 900; font-size: 18px; opacity: .55; transition: opacity 150ms; }
.scene:focus-within .motion-toggle, .motion-toggle:hover { opacity: 1; }
.motion-toggle:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
#error { position: fixed; bottom: 15px; background: white; padding: 12px 20px; border: 2px solid var(--ink); border-radius: 12px; color: var(--ink); }
[hidden] { display: none !important; }
@media (max-aspect-ratio: 1/1) { .scene { width: min(100vw,calc((100svh - var(--hint-space))*.562799)); aspect-ratio: 941 / 1672; } .crew-hint { font-size: clamp(13px,4.95vw,30px); } }
@media (max-width: 330px) { main { --hint-space: 154px; } .crew-hint { padding: 10px 8px; } #tooltip { font-size: 16px; } #tooltip strong { font-size: 21px; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
