/* Live 'Em · the results kit (results-kit.js): one screen per result on a phone. Each round sets the six tokens
   (--lk-bg, --lk-ink, --lk-gold, --lk-muted, --lk-display, --lk-ui) on the sheet or :root; the defaults are Round 4's.
   Text is 12px or larger, tap targets 44px or taller, the way on 48px. Where a sheet sits, and how wide it is, stays
   with each round. */
.lk-sheet {
  --lk-line: color-mix(in srgb, var(--lk-ink, #eef0ff) 16%, transparent);
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: 100%;
  color: var(--lk-ink, #eef0ff);
  font-family: var(--lk-ui, "Nunito", "Avenir Next", system-ui, sans-serif);
}
.lk-top {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 48px;
}
.lk-eyebrow {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font: 800 12px/1.3 var(--lk-ui, system-ui, sans-serif);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lk-gold, #e8c677);
}
.lk-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
/* overflow shows as a scroll (which fitCheck counts), never as squashed or clipped content */
.lk-body > *,
.lk-face > * {
  flex-shrink: 0;
}
.lk-face {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}
.lk-face.lk-off {
  display: none;
}
.lk-bar {
  flex: none;
  display: flex;
  align-items: stretch;
  gap: 10px;
}
.lk-bar > * {
  margin: 0;
}
.lk-bar .lk-primary,
.lk-bar .lk-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  box-sizing: border-box;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}
.lk-bar .lk-primary {
  flex: 1 1 auto;
}
.lk-bar .lk-secondary {
  flex: 0 1 auto;
}

/* Life | Map */
.lk-faces {
  flex: none;
  display: flex;
  padding: 2px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--lk-ink, #eef0ff) 10%, transparent);
  border: 1px solid var(--lk-line);
}
.lk-faces button {
  appearance: none;
  min-width: 58px;
  min-height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--lk-muted, #b9bdd9);
  font: 800 13px/1 var(--lk-ui, system-ui, sans-serif);
  cursor: pointer;
}
.lk-faces button[aria-selected="true"] {
  background: var(--lk-gold, #e8c677);
  color: #241a08;
}

/* chips: what moved behind a tap */
.lk-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.lk-chips:empty {
  display: none;
}
.lk-chip {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  margin: 0;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--lk-gold, #e8c677) 55%, transparent);
  background: color-mix(in srgb, var(--lk-gold, #e8c677) 12%, transparent);
  color: var(--lk-ink, #eef0ff);
  font: 800 13px/1.1 var(--lk-ui, system-ui, sans-serif);
  letter-spacing: 0.01em;
  text-transform: none;
  box-shadow: none;
  cursor: pointer;
}
.lk-chip i {
  font-style: normal;
  font-size: 16px;
  color: var(--lk-gold, #e8c677);
}
.lk-chip:hover {
  background: color-mix(in srgb, var(--lk-gold, #e8c677) 22%, transparent);
}

/* the room strip: 60px when the standings module fills it, nothing when it doesn't */
.lk-strip {
  min-width: 0;
}
.lk-strip:empty {
  display: none;
}

/* what waits behind the chips; inline only if the kit's script never ran */
.lk-wired .lk-store {
  display: none;
}

/* ---------------------------------------------------------------- drawers */
.lk-layer {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: var(--lk-ink, #eef0ff);
  font-family: var(--lk-ui, "Nunito", "Avenir Next", system-ui, sans-serif);
}
.lk-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 5, 20, 0.55);
}
.lk-drawer {
  position: relative;
  display: flex;
  flex-direction: column;
  max-height: 85dvh;
  border-radius: 20px 20px 0 0;
  background: var(
    --lk-bg,
    linear-gradient(180deg, rgb(38, 35, 92), rgb(22, 20, 56))
  );
  border-top: 1px solid
    color-mix(in srgb, var(--lk-gold, #e8c677) 45%, transparent);
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.45);
  outline: none;
  text-align: left;
}
.lk-drawer-head {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 6px 4px 18px;
  border-bottom: 1px solid
    color-mix(in srgb, var(--lk-ink, #eef0ff) 12%, transparent);
}
.lk-drawer-title {
  margin: 0;
  font: 800 17px/1.25 var(--lk-display, Georgia, serif);
  color: var(--lk-gold, #e8c677);
  letter-spacing: 0;
  text-transform: none;
}
.lk-x {
  appearance: none;
  flex: none;
  width: 48px;
  height: 48px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--lk-ink, #eef0ff);
  font:
    700 20px/1 system-ui,
    sans-serif;
  box-shadow: none;
  cursor: pointer;
}
.lk-x:hover {
  background: color-mix(in srgb, var(--lk-ink, #eef0ff) 12%, transparent);
}
.lk-drawer-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 12px 18px calc(16px + env(safe-area-inset-bottom, 0px));
  font-size: 14px;
  line-height: 1.4;
}
.lk-drawer :focus-visible,
.lk-sheet :focus-visible {
  outline: 3px solid #b9d5ff;
  outline-offset: 2px;
}
@media (min-width: 721px) {
  .lk-layer {
    flex-direction: row;
    justify-content: flex-end;
  }
  .lk-drawer {
    width: 420px;
    max-width: 100%;
    max-height: none;
    height: 100%;
    border-radius: 20px 0 0 20px;
    border-top: 0;
    border-left: 1px solid
      color-mix(in srgb, var(--lk-gold, #e8c677) 45%, transparent);
    box-shadow: -12px 0 40px rgba(0, 0, 0, 0.45);
  }
}
/* short phones: secondary headings go first */
@media (max-height: 660px) {
  .lk-optional {
    display: none;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .lk-drawer {
    animation: lk-rise 0.18s ease-out;
  }
  @media (min-width: 721px) {
    .lk-drawer {
      animation-name: lk-slide;
    }
  }
}
@keyframes lk-rise {
  from {
    transform: translateY(24px);
    opacity: 0;
  }
}
@keyframes lk-slide {
  from {
    transform: translateX(24px);
    opacity: 0;
  }
}
/* landscape phones (about 390 px tall): the result on the left, the way on (and a room's Done row) on the right, so
   the whole sheet fits one screen (Round 4's map | life grid is for taller screens). */
@media (orientation: landscape) and (max-height: 500px) {
  .lk-sheet {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(210px, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    column-gap: 16px;
    align-items: stretch;
  }
  .lk-sheet > .lk-top {
    grid-column: 1 / -1;
    grid-row: 1;
  }
  .lk-sheet > .lk-body {
    grid-column: 1;
    grid-row: 2;
  }
  .lk-sheet > .lk-bar {
    grid-column: 2;
    grid-row: 2;
    flex-direction: column;
    justify-content: center;
    align-self: center;
    padding-top: 0;
  }
}
