/* life-game design harness (task #2189) - reset + harness chrome ONLY.
   This file deliberately ships NO palette and NO typography. Each direction is a
   complete world and owns its colour, type and depth entirely; anything shared
   here would show up as family resemblance between three things that are meant
   to feel unrelated.

   Hooks a direction may rely on:
     html.ready / body.ready   - set by LifeKit.boot() after fonts settle, so a
                                 direction can design its own first paint with
                                 `html:not(.ready) .whatever { ... }`.
     #lk-fx                    - the shared particle canvas (pointer-events none).
     .lk-fly                   - a flying reward token (LifeKit.Juice.flyTo).
     .lk-chrome                - the harness bar. Restyle position if it clashes,
                                 but leave it reachable.
*/

*, *::before, *::after { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  min-height: 100dvh;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg, canvas { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
input, textarea { background: none; border: 0; }
input:focus, textarea:focus, button:focus { outline: none; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; border-radius: 4px; }
a { color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p, figure { margin: 0; }
::selection { background: rgba(255, 209, 102, .35); }

/* the shared particle layer */
#lk-fx {
  position: fixed; inset: 0; z-index: 9000;
  pointer-events: none;
}

/* a flying reward token */
.lk-fly {
  position: fixed; z-index: 9100; pointer-events: none;
  transform: translate(-50%, -50%);
  font: 700 15px/1 system-ui, sans-serif;
  display: flex; align-items: center; gap: 5px;
  white-space: nowrap;
}

/* ------------------------------------------------------------- chrome ---- */

.lk-chrome {
  position: fixed; z-index: 9200;
  left: max(10px, env(safe-area-inset-left));
  bottom: max(10px, env(safe-area-inset-bottom));
  display: flex; align-items: flex-end; gap: 8px;
  font: 500 12px/1 ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  letter-spacing: .02em;
}
.lk-chrome-toggle {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 12px 8px 10px;
  border-radius: 999px;
  background: rgba(18, 16, 14, .62);
  color: rgba(255, 255, 255, .88);
  border: 1px solid rgba(255, 255, 255, .14);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: 0 6px 20px -8px rgba(0, 0, 0, .7);
  transition: transform .18s cubic-bezier(.34,.9,.3,1), background .18s;
}
.lk-chrome-toggle:hover { transform: translateY(-1px); background: rgba(18, 16, 14, .78); }
.lk-chrome-toggle:active { transform: translateY(0) scale(.98); }
.lk-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #ffd166; box-shadow: 0 0 10px 1px rgba(255, 209, 102, .8);
  flex: none;
}
.lk-tag { opacity: .92; }

/* `display: flex` beats the [hidden] attribute, so the panel painted OPEN over
   every direction on first load until this was pinned. */
.lk-chrome-panel[hidden] { display: none !important; }
.lk-chrome-panel {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  max-width: min(64vw, 380px);
  animation: lk-panel-in .22s cubic-bezier(.34,.9,.3,1) both;
}
@keyframes lk-panel-in { from { opacity: 0; transform: translateX(-8px) } to { opacity: 1; transform: none } }
.lk-btn {
  display: inline-flex; align-items: center;
  padding: 8px 11px; border-radius: 999px;
  text-decoration: none;
  background: rgba(18, 16, 14, .62);
  color: rgba(255, 255, 255, .82);
  border: 1px solid rgba(255, 255, 255, .13);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  transition: background .16s, color .16s, transform .16s;
  white-space: nowrap;
}
.lk-btn:hover { background: rgba(18, 16, 14, .82); color: #fff; }
.lk-btn:active { transform: scale(.97); }
.lk-btn.on { background: rgba(255, 209, 102, .92); color: #2b2116; border-color: transparent; font-weight: 700; }

@media (max-width: 520px) {
  .lk-chrome { gap: 6px; }
  .lk-chrome-panel { max-width: calc(100vw - 130px); }
  .lk-btn, .lk-chrome-toggle { padding: 7px 10px; font-size: 11.5px; }
}

@media print { .lk-chrome, #lk-fx { display: none; } }
