/* Lantern Lake - title, hint, HUD and end panel over the canvas (frame.css sets the page and the back link) */
html, body { touch-action: none; }
body { background: #060b1c; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
canvas { position: fixed; inset: 0; width: 100%; height: 100%; cursor: pointer; }

.ll-layer { position: fixed; inset: 0; z-index: 10; pointer-events: none; }

/* title (attract mode) */
.ll-title { display: flex; flex-direction: column; align-items: center; padding-top: 13vh; text-align: center; opacity: 0; transition: opacity 0.9s; }
.ll-title.ll-show { opacity: 1; }
.ll-title h1 { margin: 0; font-size: clamp(44px, 9.5vw, 112px); line-height: 1.05; font-weight: 300; letter-spacing: 0.035em; color: #fff3dc; text-shadow: 0 0 34px rgb(255 170 90 / 0.55), 0 2px 18px rgb(4 8 24 / 0.8); }
.ll-title p { margin: 18px 0 0; font-size: clamp(14px, 1.7vw, 19px); line-height: 1.4; font-weight: 500; letter-spacing: 0.04em; color: #e8eeff; text-shadow: 0 1px 10px rgb(4 8 24 / 0.9); animation: ll-pulse 2.8s ease-in-out infinite; }
@keyframes ll-pulse { 0%, 100% { opacity: 0.95; } 50% { opacity: 0.55; } }

/* hint (first seconds of play) */
.ll-hint { position: fixed; left: 50%; bottom: calc(26px + env(safe-area-inset-bottom)); z-index: 11; transform: translateX(-50%); max-width: min(92vw, 720px); padding: 10px 18px; border-radius: 9999px; background: rgb(8 12 28 / 0.55); border: 1px solid rgb(255 255 255 / 0.14); color: #eef2ff; font-size: 13px; line-height: 18px; font-weight: 500; text-align: center; pointer-events: none; opacity: 0; transition: opacity 1.2s; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.ll-hint.ll-show { opacity: 1; }

/* HUD, top right */
.ll-top { position: fixed; top: calc(12px + env(safe-area-inset-top)); right: calc(12px + env(safe-area-inset-right)); z-index: 20; display: flex; align-items: center; gap: 10px; }
.ll-count { font-size: 13px; line-height: 16px; font-weight: 600; color: #ffe9c8; text-shadow: 0 1px 8px rgb(4 8 24 / 0.9); font-variant-numeric: tabular-nums; opacity: 0; transition: opacity 0.6s; pointer-events: none; }
.ll-count.ll-show { opacity: 1; }
.ll-btn { width: 34px; height: 34px; padding: 0; border-radius: 50%; border: 1px solid rgb(255 255 255 / 0.18); background: rgb(8 12 28 / 0.6); color: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.ll-btn:hover { background: rgb(8 12 28 / 0.88); }
.ll-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ll-btn .ll-off { display: none; }
.ll-btn.ll-muted .ll-off { display: inline-flex; }
.ll-btn.ll-muted .ll-on { display: none; }

/* touch only: save the view */
.ll-snap { position: fixed; right: calc(16px + env(safe-area-inset-right)); bottom: calc(22px + env(safe-area-inset-bottom)); z-index: 20; width: 52px; height: 52px; display: none; }
.ll-snap svg { width: 24px; height: 24px; }
.ll-touch.ll-playing .ll-snap { display: inline-flex; }
.ll-touch .ll-hint { bottom: calc(22px + env(safe-area-inset-bottom)); max-width: calc(100vw - 180px); border-radius: 18px; }

.ll-toast { position: fixed; left: 50%; top: calc(58px + env(safe-area-inset-top)); z-index: 21; transform: translateX(-50%); padding: 7px 14px; border-radius: 9999px; background: rgb(8 12 28 / 0.7); border: 1px solid rgb(255 255 255 / 0.14); color: #ffe9c8; font-size: 12px; line-height: 16px; font-weight: 600; pointer-events: none; opacity: 0; transition: opacity 0.5s; }
.ll-toast.ll-show { opacity: 1; }

/* end of the night */
.ll-end { position: fixed; inset: 0; z-index: 30; display: flex; align-items: center; justify-content: center; background: rgb(6 10 24 / 0.28); opacity: 0; visibility: hidden; transition: opacity 1.2s, visibility 0s 1.2s; }
.ll-end.ll-show { opacity: 1; visibility: visible; transition: opacity 1.2s; }
.ll-card { width: min(88vw, 420px); padding: 30px 28px 26px; border-radius: 22px; background: rgb(10 15 34 / 0.72); border: 1px solid rgb(255 255 255 / 0.16); text-align: center; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 20px 60px rgb(0 0 0 / 0.45); }
.ll-card h2 { margin: 0; font-size: 34px; line-height: 40px; font-weight: 300; letter-spacing: 0.03em; color: #fff3dc; text-shadow: 0 0 24px rgb(255 170 90 / 0.45); }
.ll-card .ll-sub { margin: 8px 0 18px; font-size: 14px; line-height: 20px; color: #c9d3f2; }
.ll-stats { display: flex; justify-content: center; gap: 22px; margin: 0 0 22px; }
.ll-stat b { display: block; font-size: 30px; line-height: 34px; font-weight: 600; color: #ffd9a0; font-variant-numeric: tabular-nums; }
.ll-stat span { display: block; margin-top: 2px; font-size: 11px; line-height: 14px; letter-spacing: 0.06em; text-transform: uppercase; color: #aab6dc; }
.ll-again { height: 44px; padding: 0 26px; border-radius: 9999px; border: 0; background: #ffd9a0; color: #1a1408; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
.ll-again:hover { background: #ffe6bf; }
.ll-card .ll-key { margin: 12px 0 0; font-size: 12px; line-height: 16px; color: #8f9cc6; }
.ll-touch .ll-card .ll-key { display: none; }

/* the ring that fills while a lantern is lit, where the hold began (its colour is the lantern's) */
.ll-ring { position: fixed; left: 0; top: 0; z-index: 12; width: 64px; height: 64px; margin: -32px 0 0 -32px; pointer-events: none; opacity: 0; transition: opacity 0.25s; }
.ll-ring.ll-show { opacity: 1; }
.ll-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ll-ring circle { fill: none; stroke-width: 3; }
.ll-ring .ll-ring-bg { stroke: rgb(255 255 255 / 0.16); }
.ll-ring .ll-ring-fg { stroke: currentColor; stroke-linecap: round; stroke-dasharray: 163.4; stroke-dashoffset: 163.4; }
.ll-btn span { display: inline-flex; }

/* a short dip to dark between the attract mode or a finished night and a fresh night */
.ll-fade { position: fixed; inset: 0; z-index: 40; background: #050915; opacity: 0; pointer-events: none; transition: opacity 0.4s; }
.ll-fade.ll-show { opacity: 1; }
