/* Kuittilento-peli. Brändin muuttujat tulevat tiedostosta tyyli.css. */
.ln-sivu { padding: clamp(24px, 5vw, 56px) 0 clamp(40px, 7vw, 80px); }
.ln-yla { max-width: 640px; margin: 0 auto 24px; text-align: center; }
.ln-yla .lead { margin-top: 10px; }

.ln-peli {
  position: relative;
  max-width: 1000px;
  height: clamp(420px, 68vh, 640px);
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--hero);
  box-shadow: var(--shadow);
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.ln-peli canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: pointer; outline: none; }
.ln-peli canvas:focus-visible { box-shadow: inset 0 0 0 3px var(--accent); }

.ln-hud { position: absolute; inset: 12px 12px auto; display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 8px; pointer-events: none; font-size: 14px; font-weight: 700; }
.ln-hud[hidden], .ln-kortti[hidden] { display: none; }
.ln-aika { min-width: 170px; padding: 8px 12px; border-radius: 14px; background: var(--surface); color: var(--ink); }
.ln-aika-rivi { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.ln-aika-rivi span { color: var(--muted); font-size: 12px; }
.ln-aika strong { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.ln-palkki { height: 8px; margin-top: 5px; overflow: hidden; border-radius: 999px; background: var(--surface-2); }
.ln-palkki i { display: block; height: 100%; border-radius: 999px; background: var(--lehti); transition: width 0.2s linear; }
.ln-palkki i.on-vahissa { background: var(--accent); }
.ln-luvut { display: flex; flex-wrap: wrap; gap: 6px; }
.ln-luvut span { padding: 6px 11px; border-radius: 999px; background: var(--surface); color: var(--ink); font-variant-numeric: tabular-nums; }

.ln-kortti {
  position: absolute;
  inset: 0;
  display: grid;
  justify-items: center;
  gap: 10px;
  width: min(440px, calc(100% - 32px));
  height: fit-content;
  max-height: calc(100% - 32px);
  margin: auto;
  padding: 22px;
  overflow: auto;
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: center;
}
.ln-kortti h2 { font-size: 1.5rem; letter-spacing: -0.02em; }
.ln-kortti ul { display: grid; gap: 6px; margin: 0; padding-left: 18px; list-style: disc; color: var(--ink-2); font-size: 15px; text-align: left; }
.ln-kortti p { margin: 0; color: var(--ink-2); }
.ln-kortti img { width: 80px; height: auto; }
.ln-pieni { font-size: 14px; color: var(--muted); }
.ln-tulos { font-size: clamp(2.2rem, 7vw, 3rem); font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.ln-napit { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 4px; }
.ln-huom { margin: 18px auto 0; text-align: center; font-size: 14px; color: var(--muted); }
.ln-teema { padding: 4px 12px; border-radius: 999px; background: var(--hero); color: var(--ink); font-size: 13px; font-weight: 700; }
.ln-saannot { width: 100%; font-size: 14px; }
.ln-saannot summary { font-weight: 700; color: var(--ink); text-align: center; cursor: pointer; }
.ln-saannot ul { margin-top: 8px; font-size: 14px; }
.ln-alarivi { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; }
.ln-vaihda { padding: 0; border: 0; background: none; font-family: inherit; text-decoration: underline; cursor: pointer; }
.ln-tehot { flex-basis: 100%; }
.ln-tehot span { display: inline-block; padding: 6px 12px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-variant-numeric: tabular-nums; }
.ln-tehot span[hidden] { display: none; }
.ln-luvut span.on-kova { background: var(--accent); color: var(--on-accent); }
.ln-tulos small { font-size: 0.38em; font-weight: 700; color: var(--muted); }
.ln-tilastot { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; width: 100%; }
.ln-tilastot div { padding: 8px 4px; border-radius: 14px; background: var(--surface-2); }
.ln-tilastot strong { display: block; font-size: 17px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.ln-tilastot span { font-size: 11px; color: var(--muted); }
.ln-jaatila { min-height: 18px; font-size: 13px; color: var(--muted); white-space: pre-line; }
.ln-linkki { font-size: 14px; font-weight: 700; color: var(--ink); }
@media (max-width: 460px) {
  .ln-tilastot { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ln-kortti { gap: 8px; padding: 18px; }
  .ln-kortti img { width: 64px; }
}
@media (max-height: 760px) and (min-width: 461px) {
  .ln-kortti { gap: 6px; padding: 14px 22px; }
}
