/* Ski-Free Llama — scoped styles. Everything lives under .lsk so theme CSS (Salient etc.) can't leak in or out. */
.lsk {
  --lsk-snow: #eef4fa;
  --lsk-ink: #13233f;
  --lsk-ink-soft: #4a5b78;
  --lsk-red: #d42f45;
  --lsk-red-dark: #a51d31;
  --lsk-pine: #1d6a4c;
  --lsk-gold: #f2b53a;
  --lsk-panel: #ffffff;
  --lsk-line: #d3deea;
  --lsk-display: "Press Start 2P", "Courier New", monospace;
  --lsk-body: "Pixelify Sans", "Trebuchet MS", system-ui, sans-serif;

  position: relative;
  width: 100%;
  height: var(--lsk-h, 640px);
  height: min(var(--lsk-h, 640px), calc(100vh - 40px));
  height: min(var(--lsk-h, 640px), calc(100dvh - 40px));
  min-height: 420px;
  overflow: hidden;
  background: var(--lsk-snow);
  color: var(--lsk-ink);
  font-family: var(--lsk-body);
  font-size: 16px;
  line-height: 1.35;
  border-radius: 0;
  border: 4px solid var(--lsk-ink);
  image-rendering: pixelated;
  outline: none;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  box-sizing: border-box;
  font-variant-ligatures: none;
}
.lsk *, .lsk *::before, .lsk *::after { box-sizing: border-box; }
.lsk h2, .lsk h3, .lsk p, .lsk ol, .lsk ul, .lsk li, .lsk dl, .lsk dt, .lsk dd { letter-spacing: normal; text-transform: none; text-shadow: none; }
.lsk ol, .lsk ul { list-style: none; margin: 0; padding: 0; }
.lsk li::before, .lsk li::marker { content: none; }
.lsk:focus-visible { box-shadow: 0 0 0 3px var(--lsk-gold); }
.lsk:fullscreen { border: 0; height: 100% !important; width: 100% !important; }
.lsk:-webkit-full-screen { border: 0; height: 100% !important; width: 100% !important; }
/* Fallback "full screen": fills the browser window when the Fullscreen API isn't available (iPhone, blocked by the site) */
.lsk.is-expanded { position: fixed !important; inset: 0 !important; width: 100% !important; height: 100% !important; min-height: 0 !important; max-width: none !important; margin: 0 !important; border: 0 !important; z-index: 2147483000 !important; }
/* Tighter start screen when the game box is short */
.lsk.lsk-compact .lsk-logo img { height: clamp(90px, 18vh, 130px); }
.lsk.lsk-compact .lsk-card { gap: 12px 22px; padding-block: 14px; }
.lsk.lsk-compact .lsk-sub { margin-bottom: 8px; font-size: 15px; }
.lsk.lsk-compact2 .lsk-start .lsk-keys { display: none; }
.lsk.lsk-compact .lsk-btn { padding: 11px 16px; }
.lsk.lsk-compact form[data-f] input[type="text"], .lsk.lsk-compact form[data-f] input[type="email"] { padding: 6px 10px; }
.lsk.lsk-compact2 .lsk-logo { display: none; }
.lsk.lsk-compact2.has-logo .lsk-start .lsk-title { position: static; width: auto; height: auto; clip: auto; }
.lsk canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* HUD */
.lsk-hud {
  position: absolute; top: 10px; right: 10px; z-index: 3;
  display: grid; grid-template-columns: auto auto; gap: 1px 12px;
  padding: 10px 12px; border: 3px solid var(--lsk-ink); border-radius: 0;
  background: #fff; box-shadow: 4px 4px 0 rgba(19,35,63,.35);
  font-size: 13px; font-variant-numeric: tabular-nums; pointer-events: none;
}
.lsk-hud dt { margin: 0; color: var(--lsk-ink-soft); font: 8px/1.9 var(--lsk-display); text-transform: uppercase; align-self: center; }
.lsk-hud dd { margin: 0; text-align: right; font: 10px/1.9 var(--lsk-display); }
.lsk-hud .lsk-score dd, .lsk-hud .lsk-score dt { color: var(--lsk-red); }
.lsk-status {
  position: absolute; top: 10px; left: 10px; z-index: 3; display: flex; flex-direction: column; gap: 6px;
  pointer-events: none;
}
.lsk-hearts { font-size: 20px; letter-spacing: 2px; color: var(--lsk-red); text-shadow: 0 1px 0 #fff; line-height: 1; }
.lsk-hearts .off { color: #b8c4d3; }
.lsk-turbo { width: 110px; height: 12px; border: 3px solid var(--lsk-ink); border-radius: 0; background: #fff; overflow: hidden; }
.lsk-turbo i { display: block; height: 100%; width: 100%; background: var(--lsk-gold); transform-origin: left; }
.lsk-turbo-label { font: 8px/1.6 var(--lsk-display); text-transform: uppercase; color: var(--lsk-ink-soft); }
.lsk-iconbtns { position: absolute; bottom: 10px; right: 10px; z-index: 6; display: flex; gap: 6px; }
.lsk-iconbtn {
  appearance: none; border: 3px solid var(--lsk-ink); background: #fff; color: var(--lsk-ink);
  border-radius: 0; height: 34px; min-width: 34px; padding: 0 8px; font: 800 12px var(--lsk-body);
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.lsk-iconbtn:hover { background: var(--lsk-snow); }
.lsk-iconbtn:focus-visible { outline: 3px solid var(--lsk-gold); outline-offset: 1px; }

/* Toast */
.lsk-toasts { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 3; display: flex; flex-direction: column-reverse; gap: 6px; align-items: center; pointer-events: none; width: min(92%, 420px); }
.lsk-toast {
  background: var(--lsk-ink); color: #fff; border-radius: 0; padding: 9px 14px; text-align: center;
  font-weight: 600; border: 3px solid #fff; outline: 3px solid var(--lsk-ink); box-shadow: 6px 6px 0 rgba(19,35,63,.3); animation: lsk-pop .25s ease-out;
}
.lsk-toast small { display: block; font-weight: 600; opacity: .75; font-size: 12px; }
.lsk-toast b { color: var(--lsk-gold); }
@keyframes lsk-pop { from { transform: translateY(8px) scale(.96); opacity: 0; } }

/* Panels */
.lsk-panel {
  position: absolute; inset: 0; z-index: 5; display: flex; align-items: center; justify-content: center;
  padding: 16px; background: rgba(19, 35, 63, .35); overflow-y: auto;
}
.lsk-card {
  width: min(100%, 780px); background: var(--lsk-panel); border: 4px solid var(--lsk-ink); border-radius: 0;
  box-shadow: 8px 8px 0 var(--lsk-ink); padding: 22px; display: grid; grid-template-columns: 1.15fr 1fr; gap: 22px;
  margin: auto;
}
.lsk-card.narrow { width: min(100%, 420px); grid-template-columns: 1fr; text-align: center; }
.lsk-card > * { min-width: 0; }
@media (max-width: 640px) { .lsk-card { grid-template-columns: 1fr; padding: 16px; gap: 16px; } }

.lsk .lsk-title { font-family: var(--lsk-display) !important; font-weight: 400 !important; font-size: clamp(18px, 3.4vw, 26px) !important; letter-spacing: normal !important; text-transform: none !important; padding: 0; line-height: 1.35; margin: 0 0 10px; color: var(--lsk-ink); text-wrap: balance; }
.lsk-title span { color: var(--lsk-red); }
.lsk-sub { margin: 0 0 14px; color: var(--lsk-ink-soft); font-size: 16px; }
.lsk .lsk-h { font-family: var(--lsk-display) !important; font-weight: 400 !important; font-size: 12px !important; line-height: 1.5 !important; margin: 0 0 10px !important; padding: 0 !important; color: var(--lsk-ink) !important; letter-spacing: normal !important; text-transform: none !important; }

.lsk form[data-f] { display: grid; gap: 10px; }
.lsk .lsk-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lsk form[data-f] label { display: grid; gap: 5px; font: 8px/1.5 var(--lsk-display); text-transform: uppercase; color: var(--lsk-ink-soft); }
.lsk form[data-f] input[type="text"], .lsk form[data-f] input[type="email"] {
  width: 100%; font: 500 17px var(--lsk-body); color: var(--lsk-ink); background: #fff;
  border: 3px solid var(--lsk-ink); border-radius: 0; padding: 9px 10px; margin: 0; height: auto; box-shadow: none;
  user-select: text; -webkit-user-select: text;
}
.lsk form[data-f] input[type="text"]:focus, .lsk form[data-f] input[type="email"]:focus { outline: 3px solid var(--lsk-gold); outline-offset: 0; }
.lsk form[data-f] label.lsk-check { display: flex; gap: 8px; align-items: flex-start; text-transform: none; font: 500 15px/1.3 var(--lsk-body); color: var(--lsk-ink); }
.lsk form[data-f] .lsk-check input { margin: 2px 0 0; width: 16px; height: 16px; flex: none; accent-color: var(--lsk-red); }
.lsk-err { color: var(--lsk-red-dark); font-weight: 600; font-size: 15px; min-height: 1em; margin: 0; }
.lsk-fine { font-size: 14px; color: var(--lsk-ink-soft); margin: 0; }

.lsk-btn {
  appearance: none; border: 4px solid var(--lsk-ink); background: var(--lsk-red); color: #fff;
  font: 400 14px/1.4 var(--lsk-display); padding: 14px 18px; border-radius: 0; cursor: pointer;
  box-shadow: inset -4px -4px 0 var(--lsk-red-dark), 4px 4px 0 var(--lsk-ink); text-shadow: 2px 2px 0 var(--lsk-red-dark); transition: transform .06s, box-shadow .06s; width: 100%;
}
.lsk-btn:hover { background: var(--lsk-red-dark); }
.lsk-btn:active { transform: translate(4px, 4px); box-shadow: inset -4px -4px 0 var(--lsk-red-dark); }
.lsk-btn:focus-visible { outline: 3px solid var(--lsk-gold); outline-offset: 2px; }
.lsk-btn[disabled] { opacity: .6; cursor: wait; }
.lsk-link { background: none; border: 0; padding: 0; color: var(--lsk-red-dark); font: 600 14px var(--lsk-body); text-decoration: underline; cursor: pointer; }

.lsk .lsk-keys { display: grid; grid-template-columns: auto 1fr; gap: 5px 10px; font-size: 15px; margin: 12px 0 0; color: var(--lsk-ink-soft); }
.lsk .lsk-keys kbd { font: 8px/1.8 var(--lsk-display); border: 2px solid var(--lsk-ink); border-bottom-width: 4px; border-radius: 0; padding: 0 5px; background: #fff; color: var(--lsk-ink); white-space: nowrap; }
.lsk .lsk-keys dt { text-align: right; margin: 0; padding: 0; font: inherit; color: inherit; float: none; width: auto; }
.lsk .lsk-keys dd { margin: 0; padding: 0; font: inherit; color: inherit; float: none; }

/* Leaderboard */
.lsk-board { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; font-variant-numeric: tabular-nums; counter-reset: none; }
.lsk-board li { display: grid; grid-template-columns: 28px 1fr auto; gap: 8px; align-items: center; padding: 6px 8px; border-radius: 0; font-weight: 600; font-size: 17px; }
.lsk-board li:nth-child(odd) { background: #f1f5fa; }
.lsk-board li.me { background: #fff3d6; outline: 3px solid var(--lsk-gold); outline-offset: -3px; }
.lsk-board .rk { color: var(--lsk-ink-soft); font: 10px var(--lsk-display); text-align: right; }
.lsk-board li:nth-child(1) .rk { color: var(--lsk-red); }
.lsk-board .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lsk-board .sc { font: 10px var(--lsk-display); }
.lsk-board-empty { color: var(--lsk-ink-soft); font-size: 14px; padding: 6px 0; }
.lsk-mode { font-size: 13px; color: var(--lsk-ink-soft); margin: 8px 0 0; }

/* Game over */
.lsk-bigscore { font: 400 clamp(30px, 6vw, 44px)/1.2 var(--lsk-display); color: var(--lsk-red); margin: 4px 0; font-variant-numeric: tabular-nums; }
.lsk-stats { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 15px; color: var(--lsk-ink-soft); font-weight: 500; margin: 0 0 12px; }
.lsk-stats b { color: var(--lsk-ink); }
.lsk-badge { display: inline-block; background: var(--lsk-gold); color: var(--lsk-ink); font: 8px/1.6 var(--lsk-display); padding: 4px 8px; border: 2px solid var(--lsk-ink); text-transform: uppercase; }
.lsk-res { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 6px; }
.lsk-res a {
  display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; padding: 8px 10px; border: 3px solid var(--lsk-ink);
  border-radius: 0; text-decoration: none; color: var(--lsk-ink); background: #fff; font-weight: 600; font-size: 16px; box-shadow: 3px 3px 0 rgba(19,35,63,.25);
}
.lsk-res a:hover { background: #fff6dc; }
.lsk-res a small { display: block; color: var(--lsk-pine); font: 7px/1.8 var(--lsk-display); text-transform: uppercase; }
.lsk-res a span.go { color: var(--lsk-red); font: 8px var(--lsk-display); white-space: nowrap; }

/* Touch controls */
.lsk-touch { position: absolute; left: 10px; bottom: 10px; z-index: 4; display: none; gap: 8px; }
.lsk.is-touch.is-playing .lsk-touch { display: flex; }
.lsk-touch button {
  appearance: none; width: 68px; height: 68px; border-radius: 0; border: 4px solid var(--lsk-ink); background: #fff;
  font: 400 9px var(--lsk-display); color: var(--lsk-ink); box-shadow: 4px 4px 0 var(--lsk-ink); touch-action: none;
}
.lsk-touch button.turbo { background: var(--lsk-gold); }

.lsk [hidden] { display: none !important; }
/* Klaviyo embedded sign-up: let Klaviyo style its own form */
.lsk-kl { user-select: text; -webkit-user-select: text; touch-action: auto; min-height: 60px; }
.lsk-kl [class^="klaviyo-form-"] { width: 100%; }
@media (max-width: 520px) {
  .lsk-hud { padding: 6px 8px; gap: 0 8px; top: 8px; right: 8px; }
  .lsk-hud dt { font-size: 7px; } .lsk-hud dd { font-size: 8px; }
  .lsk-turbo { width: 80px; }
}
@media (prefers-reduced-motion: reduce) { .lsk-toast { animation: none; } .lsk-btn { transition: none; } }

/* Logo banner on the start screen */
.lsk-logo { grid-column: 1 / -1; margin: -8px 0 -6px; background: transparent; display: flex; justify-content: center; }
.lsk-logo img { display: block; width: auto; max-width: 100%; height: clamp(140px, 24vh, 220px); object-fit: contain; image-rendering: auto; }
.lsk.has-logo .lsk-start .lsk-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.lsk-start .lsk-keys { margin-top: 16px; }
@media (max-width: 640px) { .lsk-logo img { height: auto; width: 100%; max-height: 190px; } }
