/* Karat: the chest game. Warm black, brass and the colours of cut stones.
   Display type is a dot matrix whose dots are little rhombi. */

html[data-game='karat'] {
  --ink: #0a0806;
  --paper: #f5ecd9;
  --dim: rgba(245, 236, 217, 0.68);
  --faint: rgba(245, 236, 217, 0.36);
  --line: rgba(245, 236, 217, 0.15);
  --signal: #f2c14e;
  --mint: #2fe6a0;
  --gold: #f2c14e;
  --gold-hi: #ffe9a6;
  --gold-lo: #9a6a16;
  --pale: #f8e7b4;
  --tier: #f2c14e;
  --f-dot: 'Handjet Variable', 'IBM Plex Mono', ui-monospace, monospace;
}

/* ---------- shared parts in Karat's clothes ---------- */

html[data-game='karat'] ::selection {
  background: var(--gold);
  color: #1d1402;
}
html[data-game='karat'] .bar::before {
  background: linear-gradient(180deg, rgba(8, 6, 4, 0.72), rgba(8, 6, 4, 0));
}
html[data-game='karat'] .iconbtn {
  border-radius: 4px;
  background: rgba(22, 17, 11, 0.6);
}
html[data-game='karat'] .seg {
  border-radius: 5px;
}
html[data-game='karat'] .seg-btn {
  border-radius: 3px;
}
html[data-game='karat'] .seg-btn.on {
  background: var(--gold);
  color: #1d1402;
}
html[data-game='karat'] .ghost {
  border-radius: 3px;
  background: rgba(22, 17, 11, 0.6);
}
html[data-game='karat'] .ghost:hover {
  border-color: var(--gold);
  background: rgba(242, 193, 78, 0.08);
}
html[data-game='karat'] .cta {
  border-radius: 3px;
  color: #1d1402;
}

html[data-game='karat'] .scrim {
  background: rgba(6, 4, 3, 0.8);
}
html[data-game='karat'] .sheet,
html[data-game='karat'] .answers-zone h3 {
  background: #130f0b;
}
html[data-game='karat'] .sheet-title,
html[data-game='karat'] .duel-verdict,
html[data-game='karat'] .answers-zone h3 {
  font-family: var(--f-ui);
  font-style: normal;
  font-weight: 650;
  letter-spacing: -0.012em;
}
html[data-game='karat'] .answers-zone h3 > span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
html[data-game='karat'] .answers-me b {
  font-family: var(--f-ui);
  font-weight: 650;
}
html[data-game='karat'] .page-title,
html[data-game='karat'] .rank-name {
  font-family: var(--f-dot);
  font-style: normal;
  font-variation-settings:
    'wght' 660,
    'ELGR' 1,
    'ELSH' 15;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--pale);
}
html[data-game='karat'] .page-title {
  font-size: clamp(60px, 11vw, 116px);
  line-height: 0.78;
  margin: 10px 0 12px;
  text-shadow: 0 0 40px rgba(242, 193, 78, 0.35);
}
html[data-game='karat'] .rank-name {
  font-size: clamp(34px, 5.4vw, 54px);
  line-height: 0.8;
  color: var(--gold);
}
html[data-game='karat'] .log-row-answer {
  font-family: var(--f-ui);
  font-weight: 600;
  font-size: 19px;
}
html[data-game='karat'] .log-row-depth {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
html[data-game='karat'] .first-badge {
  background: #fffdf4;
  color: #1d1402;
  border-radius: 2px;
  box-shadow: 0 0 24px rgba(255, 244, 200, 0.6);
}
html[data-game='karat'] .first-badge.record {
  background: var(--gold);
  box-shadow: 0 0 24px rgba(242, 193, 78, 0.55);
}
html[data-game='karat'] .note {
  background: rgba(242, 193, 78, 0.07);
}
html[data-game='karat'] .challenge-banner {
  border-color: rgba(242, 193, 78, 0.6);
  border-radius: 3px;
  background: rgba(30, 22, 8, 0.7);
}
html[data-game='karat'] .field-input {
  background: rgba(12, 9, 6, 0.7);
  border-radius: 3px;
}
html[data-game='karat'] .meta,
html[data-game='karat'] .home-streak {
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.8);
}

html[data-game='karat'] .stat-num {
  font-family: var(--f-dot);
  font-weight: 400;
  font-variation-settings:
    'wght' 620,
    'ELGR' 1,
    'ELSH' 15;
  font-size: clamp(40px, 6.4vw, 60px);
  line-height: 0.74;
  letter-spacing: 0.01em;
  color: var(--pale);
}
html[data-game='karat'] .stat-num small {
  font-family: var(--f-mono);
  font-variation-settings: normal;
}
html[data-game='karat'] .stat-num .sep {
  margin: 0 -0.03em;
}

/* numbers set in the dot matrix: the thousands point needs no tightening */
.k-total-num .sep,
.k-carat-num .sep,
.k-loot-num .sep,
.k-score-num .sep {
  margin: 0 -0.03em;
}

/* ---------- the gold key: every main button of Karat ---------- */

.k-cta {
  --d: 5px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border: 0;
  border-radius: 3px;
  padding: 12px 14px 12px 22px;
  font-family: var(--f-ui);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  color: #1d1402;
  background:
    linear-gradient(180deg, #ffe9a6 0 2px, rgba(255, 233, 166, 0) 2px),
    linear-gradient(180deg, #f6cb5c, #e7ae38);
  box-shadow:
    0 var(--d) 0 var(--gold-lo, #9a6a16),
    0 calc(var(--d) + 12px) 28px -8px rgba(242, 193, 78, 0.55);
  transition:
    transform 0.12s,
    box-shadow 0.12s,
    filter 0.2s;
}
.k-cta:hover {
  filter: brightness(1.07);
  transform: translateY(-1px);
  box-shadow:
    0 calc(var(--d) + 1px) 0 var(--gold-lo, #9a6a16),
    0 calc(var(--d) + 16px) 32px -8px rgba(242, 193, 78, 0.75);
}
.k-cta:active {
  transform: translateY(var(--d));
  box-shadow:
    0 0 0 var(--gold-lo, #9a6a16),
    0 6px 14px -6px rgba(242, 193, 78, 0.5);
  transition-duration: 0.05s;
}
.k-cta:focus-visible,
.k-send:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
}
.k-cta-key {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 3px;
  background: rgba(29, 20, 2, 0.15);
  box-shadow: inset 0 -2px 0 rgba(29, 20, 2, 0.2);
}
.k-cta-xl {
  --d: 7px;
  font-size: 18px;
  padding: 15px 16px 15px 28px;
  gap: 20px;
}
.k-cta-xl .k-cta-key {
  width: 38px;
  height: 38px;
}

/* ---------- start screen ---------- */

.k-home {
  height: 100%;
  min-height: 560px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 20px 5vh;
  position: relative;
}
.k-mark {
  font-family: var(--f-dot);
  font-variation-settings:
    'wght' 560,
    'ELGR' 1,
    'ELSH' 15;
  font-size: clamp(88px, min(26vw, 19.5vh), 250px);
  line-height: 0.74;
  letter-spacing: 0.03em;
  margin: 0.12em 0 0.06em;
  color: var(--pale);
  text-shadow:
    0 0 36px rgba(242, 193, 78, 0.45),
    0 0 2px rgba(255, 255, 255, 0.5);
  white-space: nowrap;
  flex: none;
}
.k-mark .l {
  display: inline-block;
  animation:
    k-letter 0.9s var(--out) both,
    k-shimmer 5.4s ease-in-out infinite;
  animation-delay:
    calc(var(--i) * 70ms + 80ms),
    calc(var(--i) * 0.15s + 1.6s);
}
@keyframes k-letter {
  from {
    opacity: 0;
    transform: translateY(-0.16em);
    font-variation-settings:
      'wght' 100,
      'ELGR' 1,
      'ELSH' 15;
  }
}
/* a wave of light runs through the stones the letters are made of */
@keyframes k-shimmer {
  0%,
  14%,
  100% {
    font-variation-settings:
      'wght' 560,
      'ELGR' 1,
      'ELSH' 15;
    color: var(--pale);
  }
  7% {
    font-variation-settings:
      'wght' 900,
      'ELGR' 1,
      'ELSH' 15;
    color: #fff;
  }
}
#view.leaving .k-mark .l {
  animation: none;
  transition:
    font-variation-settings 0.24s,
    opacity 0.22s;
  transition-delay: calc(var(--i) * 20ms);
  font-variation-settings:
    'wght' 100,
    'ELGR' 1,
    'ELSH' 15;
  opacity: 0;
}
.k-lede {
  font-size: clamp(15px, 1.7vw, 19px);
  font-weight: 500;
  line-height: 1.35;
  color: var(--dim);
  max-width: 36ch;
  margin: 0;
  flex: none;
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.8);
}
.k-lede em {
  font-style: normal;
  color: var(--paper);
}
.k-stage {
  flex: 1 1 0;
  min-height: 120px;
  width: 100%;
  display: grid;
  place-items: center;
  color: var(--gold);
}
.k-home .k-stage {
  max-height: 330px;
  max-width: 560px;
  background: none;
  border: 0;
  margin: 2px 0 14px;
  cursor: pointer;
}
.k-home .k-stage:focus-visible {
  outline-offset: -6px;
}
.k-home-go,
.k-home-done {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: none;
}
.k-home .home-nav,
.k-home .home-streak,
.k-home > .eyebrow {
  flex: none;
}
.k-home .meta {
  margin-top: 20px;
}
.k-scoreline {
  display: flex;
  align-items: baseline;
  gap: 10px;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 4px 6px 12px;
  color: var(--paper);
  transition: border-color 0.3s;
}
.k-scoreline:hover {
  border-color: var(--gold);
}
.k-score-num {
  font-family: var(--f-dot);
  font-variation-settings:
    'wght' 660,
    'ELGR' 1,
    'ELSH' 15;
  font-size: clamp(52px, 7.4vw, 82px);
  line-height: 0.72;
  color: var(--pale);
  text-shadow: 0 0 30px rgba(242, 193, 78, 0.4);
}
.k-score-unit {
  font-family: var(--f-mono);
  color: var(--dim);
}
.k-score-rank {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 650;
  font-size: 18px;
  margin-left: 10px;
  color: var(--gold);
}
.k-haul {
  display: flex;
  gap: 7px;
  margin: 14px 0 0;
}
.k-home .k-home-done .meta {
  margin-top: 12px;
}

.gemladder {
  list-style: none;
  margin: 0;
  padding: 0;
}
.gemladder li {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 2px 0;
  font-size: 13px;
}
.gemladder-name {
  min-width: 74px;
}
.gemladder-range {
  font-size: 11px;
  color: var(--dim);
}
.gemladder.in-sheet {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 6px 14px;
  margin: 22px 0;
}
.mini-gems {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

/* ---------- a run: seven chests ---------- */

.k-play {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.k-hud {
  flex: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: min(820px, 100%);
  height: 46px;
  margin: 0 auto;
  padding: 0 clamp(16px, 5vw, 40px);
}
.k-sockets {
  display: flex;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.k-socket {
  position: relative;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
}
.k-socket.current::after {
  content: '';
  position: absolute;
  inset: 4px;
  border: 1.5px solid var(--gold);
  transform: rotate(45deg);
  animation: k-pulse 1.3s ease-in-out infinite;
}
.k-socket.current .gem-ico {
  opacity: 0;
}
@keyframes k-pulse {
  50% {
    transform: rotate(45deg) scale(1.18);
    box-shadow: 0 0 14px rgba(242, 193, 78, 0.8);
  }
}
.k-socket.pop .gem-ico {
  animation: k-pop 0.55s var(--spring);
}
@keyframes k-pop {
  from {
    transform: scale(2.4);
    filter: brightness(3);
  }
}
.k-total {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.k-total-num {
  font-family: var(--f-dot);
  font-variation-settings:
    'wght' 700,
    'ELGR' 1,
    'ELSH' 15;
  font-size: 38px;
  line-height: 0.72;
  color: var(--pale);
}
.k-total-unit {
  font-family: var(--f-mono);
  font-size: 13px;
  color: var(--dim);
}
.k-total.bump .k-total-num {
  animation: k-bump 0.6s var(--spring);
}
@keyframes k-bump {
  30% {
    transform: scale(1.3);
    color: #fff;
    text-shadow: 0 0 24px var(--tier);
  }
}

.k-top {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
  padding: 0 clamp(16px, 5vw, 60px);
}
.k-ask {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: clamp(2px, 2.4vh, 30px);
}
.k-ask-eyebrow {
  animation: rise 0.5s var(--out) both;
}
.k-prompt {
  font-weight: 650;
  font-size: clamp(25px, min(4.5vw, 5.4vh), 52px);
  line-height: 1.07;
  letter-spacing: -0.022em;
  margin: 10px 0 18px;
  max-width: 21em;
  text-wrap: balance;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.7);
}
.k-prompt .w {
  display: inline-block;
  animation: k-word 0.6s var(--out) both;
  animation-delay: calc(var(--i) * 45ms + 40ms);
}
@keyframes k-word {
  from {
    opacity: 0;
    transform: translateY(0.4em);
    filter: blur(6px);
  }
}

/* the torch: a bar that burns down, with an ember at its end */
.k-torch {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(480px, 88vw);
  margin-bottom: 14px;
  color: var(--gold);
  opacity: 0;
  transition: opacity 0.4s;
}
.k-ask.ready .k-torch {
  opacity: 1;
}
.k-torch > .ico {
  transform-origin: 50% 80%;
  animation: k-flame 0.42s ease-in-out infinite alternate;
}
@keyframes k-flame {
  to {
    transform: scale(1.08, 1.16) rotate(-3deg);
  }
}
.k-torch-bar {
  position: relative;
  flex: 1;
  height: 4px;
  border-radius: 1px;
  background: rgba(245, 236, 217, 0.13);
}
.k-torch-bar i {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: calc(var(--p) * 100%);
  border-radius: 1px;
  background: linear-gradient(90deg, #8a5a12, #f2c14e);
  transition: background 0.4s;
}
.k-torch-bar b {
  position: absolute;
  top: 50%;
  left: calc(var(--p) * 100%);
  width: 9px;
  height: 9px;
  margin: -4.5px 0 0 -4.5px;
  border-radius: 50%;
  background: #fff3c9;
  box-shadow:
    0 0 14px 4px rgba(255, 186, 76, 0.85),
    0 0 2px 1px #fff;
  animation: k-ember 0.14s steps(2) infinite;
}
@keyframes k-ember {
  to {
    transform: scale(1.25);
  }
}
.k-torch-num {
  font-size: 15px;
  min-width: 2ch;
  text-align: right;
  color: var(--paper);
}
.k-torch.low .k-torch-bar i {
  background: linear-gradient(90deg, #8a3312, #ff9a3c);
}
.k-torch.crit {
  color: #ff5a4a;
}
.k-torch.crit .k-torch-bar i {
  background: #ff4a3c;
}
.k-torch.crit .k-torch-bar b {
  box-shadow:
    0 0 16px 5px rgba(255, 74, 60, 0.9),
    0 0 2px 1px #fff;
}
.k-torch.crit .k-torch-num {
  color: #ff6a55;
  animation: beat 0.5s ease-in-out infinite alternate;
}

/* the answer: typed like a command, struck into the lock plate */
.k-answer {
  display: flex;
  align-items: stretch;
  gap: 10px;
  width: min(620px, 100%);
  opacity: 0.35;
  transition: opacity 0.4s;
}
.k-ask.ready .k-answer {
  opacity: 1;
}
.k-caret {
  display: grid;
  place-items: center;
  width: 18px;
  font-family: var(--f-mono);
  font-size: 28px;
  color: var(--gold);
}
.k-input {
  flex: 1;
  min-width: 0;
  background: rgba(12, 9, 6, 0.74);
  border: 1px solid rgba(242, 193, 78, 0.42);
  border-radius: 3px;
  padding: 13px 16px;
  font-family: var(--f-mono);
  font-weight: 500;
  font-size: clamp(17px, 2.3vw, 22px);
  line-height: 1.2;
  color: var(--paper);
  caret-color: var(--gold);
  outline: none;
  box-shadow: inset 0 2px 0 rgba(0, 0, 0, 0.55);
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
.k-input:focus {
  border-color: var(--gold);
  box-shadow:
    inset 0 2px 0 rgba(0, 0, 0, 0.55),
    0 0 0 3px rgba(242, 193, 78, 0.16),
    0 0 28px -4px rgba(242, 193, 78, 0.5);
}
.k-input::placeholder {
  color: rgba(245, 236, 217, 0.36);
}
.k-answer.bad {
  animation: shake 0.45s both;
}
.k-answer.bad .k-input {
  border-color: #ff5a4a;
}
.k-answer.suggesting .k-input {
  border-color: var(--mint);
}
.k-send {
  flex: none;
  width: 54px;
  margin-bottom: 5px;
  border: 0;
  border-radius: 3px;
  display: grid;
  place-items: center;
  color: #1d1402;
  background:
    linear-gradient(180deg, #ffe9a6 0 2px, rgba(255, 233, 166, 0) 2px),
    linear-gradient(180deg, #f6cb5c, #e7ae38);
  box-shadow:
    0 5px 0 var(--gold-lo, #9a6a16),
    0 16px 26px -8px rgba(242, 193, 78, 0.55);
  transition:
    transform 0.12s,
    box-shadow 0.12s,
    filter 0.2s;
}
.k-send:hover {
  filter: brightness(1.08);
}
.k-send:active {
  transform: translateY(5px);
  box-shadow: 0 0 0 var(--gold-lo, #9a6a16);
  transition-duration: 0.05s;
}
.k-send:disabled {
  filter: saturate(0.2) brightness(0.6);
}
.k-hint {
  min-height: 2.9em;
  margin: 10px 0 0;
  font-size: 14px;
  color: var(--dim);
  max-width: 50ch;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.8);
}
.k-hint b {
  color: var(--mint);
  font-weight: 600;
}
.k-answer.bad + .k-hint {
  color: #ffb4a8;
}
.k-ask.out {
  opacity: 0;
  transform: translateY(-10px) scale(0.985);
  filter: blur(4px);
  transition:
    opacity 0.18s,
    transform 0.2s,
    filter 0.18s;
}

.k-caption {
  width: 100%;
  max-width: 760px;
  padding-top: 4px;
  animation: fade 0.4s both;
}
.k-caption-q {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.14em;
}
.k-engraved {
  margin: 6px 0 0;
  font-family: var(--f-mono);
  font-weight: 500;
  font-size: clamp(15px, 1.9vw, 19px);
  color: var(--pale);
  text-shadow: 0 0 18px rgba(242, 193, 78, 0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.k-flat {
  display: grid;
  place-items: center;
  animation: k-pop 0.4s var(--spring);
}

.k-bottom {
  flex: 0 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: 0 16px calc(12px + env(safe-area-inset-bottom));
}
.k-readout {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  opacity: 0;
  transition: opacity 0.25s;
}
.k-readout.on {
  opacity: 1;
}
.k-tier {
  font-family: var(--f-dot);
  font-weight: 400;
  font-variation-settings:
    'wght' 720,
    'ELGR' 1,
    'ELSH' 15;
  font-size: clamp(46px, min(9.4vw, 8.4vh), 108px);
  line-height: 0.76;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin: 0;
  color: var(--tier);
  text-shadow: 0 0 40px color-mix(in srgb, var(--tier) 60%, transparent);
}
.k-tier.flip {
  animation: k-flip 0.34s var(--out);
}
@keyframes k-flip {
  from {
    opacity: 0.2;
    transform: scale(1.2);
    filter: blur(5px);
    font-variation-settings:
      'wght' 260,
      'ELGR' 1,
      'ELSH' 15;
  }
}
.k-carat {
  display: flex;
  align-items: baseline;
  gap: 0.12em;
  font-family: var(--f-dot);
  font-variation-settings:
    'wght' 600,
    'ELGR' 1,
    'ELSH' 15;
  font-size: clamp(34px, min(6vw, 5.6vh), 66px);
  line-height: 0.82;
  margin-top: 6px;
}
.k-carat-unit {
  font-family: var(--f-mono);
  font-size: 0.32em;
  color: var(--dim);
}
.k-readout.landed .k-carat {
  animation: k-land 0.7s var(--spring);
}
@keyframes k-land {
  0% {
    transform: scale(1.3);
    color: #fff;
  }
}
.k-readout.afk .k-carat {
  color: var(--dim);
}
.k-verdict {
  margin: 8px 0 0;
  min-height: 1.5em;
  max-width: 50ch;
  font-size: clamp(14px, 1.5vw, 16px);
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 0.5s 0.1s,
    transform 0.6s var(--out) 0.1s;
}
.k-readout.landed .k-verdict {
  opacity: 1;
  transform: none;
}
/* the note under a find, written like a comment in code */
.k-lore {
  margin: 4px 0 0;
  min-height: 1.4em;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.03em;
  color: var(--dim);
  opacity: 0;
  transition: opacity 0.5s 0.3s;
}
.k-lore:not(:empty)::before {
  content: '// ';
  color: var(--faint);
}
.k-lore.near {
  color: #ffcf7a;
}
.k-readout.landed .k-lore {
  opacity: 1;
}

.k-panel {
  width: min(640px, 100%);
  min-height: 0;
  margin-top: 10px;
  overflow-y: auto;
  scrollbar-width: none;
  animation: rise 0.7s var(--out) both;
}
.k-panel-title {
  margin-bottom: 6px;
  text-align: left;
}
.k-finds {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.k-finds li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 100px 54px 96px;
  align-items: center;
  gap: 12px;
  padding: 7px 6px;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  text-align: left;
  animation: rise 0.5s var(--out) both;
}
.k-finds li:nth-child(2) {
  animation-delay: 0.05s;
}
.k-finds li:nth-child(3) {
  animation-delay: 0.1s;
}
.k-finds li:nth-child(4) {
  animation-delay: 0.15s;
}
.k-finds li:nth-child(5) {
  animation-delay: 0.2s;
}
.k-finds li:nth-child(n + 6) {
  animation-delay: 0.27s;
}
.k-find-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.k-find-name em {
  font-family: var(--f-mono);
  font-style: normal;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-left: 9px;
}
.k-find-bar {
  height: 3px;
  background: rgba(245, 236, 217, 0.1);
  overflow: hidden;
}
.k-find-bar i {
  display: block;
  height: 100%;
  width: calc(var(--w) * 100%);
  background: var(--c);
  animation: grow 0.9s var(--out) 0.2s both;
  transform-origin: left;
}
.k-find-count {
  text-align: right;
  font-size: 13px;
  color: var(--dim);
}
.k-find-gem {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--c);
}
.k-finds li.me {
  background: linear-gradient(90deg, rgba(242, 193, 78, 0.2), rgba(242, 193, 78, 0.03));
  border-bottom-color: rgba(242, 193, 78, 0.5);
}
.k-finds li.gap {
  display: block;
  font-size: 11px;
  color: var(--dim);
  letter-spacing: 0.1em;
  padding: 5px 6px;
  border-bottom-style: dashed;
}
.k-best {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  margin: 10px 6px 0;
  font-size: 14px;
  text-align: left;
}
.k-best .gem-ico {
  margin-right: 7px;
}
.k-panel-actions {
  position: sticky;
  bottom: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 4px 8px;
  background: linear-gradient(180deg, rgba(10, 8, 6, 0), rgba(10, 8, 6, 0.95) 36%);
}

/* a run of good finds */
.k-streak {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: 4px;
  padding: 3px 9px 3px 7px;
  border-radius: 2px;
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #1d1402;
  background: linear-gradient(180deg, #ffd76e, #f29a2e);
  box-shadow: 0 0 22px rgba(255, 160, 60, 0.55);
  vertical-align: 1px;
  animation: k-pop 0.5s var(--spring);
}

/* ---------- the loot ---------- */

.k-loot-total {
  display: flex;
  align-items: baseline;
  gap: 0.08em;
  margin: 12px 0 8px;
}
.k-loot-num {
  font-family: var(--f-dot);
  font-variation-settings:
    'wght' 640,
    'ELGR' 1,
    'ELSH' 15;
  font-size: clamp(92px, 22vw, 220px);
  line-height: 0.72;
  color: var(--pale);
  text-shadow: 0 0 60px rgba(242, 193, 78, 0.4);
}
.k-loot-unit {
  font-family: var(--f-mono);
  font-size: clamp(18px, 3vw, 30px);
  color: var(--dim);
}
.k-tray {
  list-style: none;
  margin: 20px 0 20px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}
.k-slot {
  min-width: 0;
  transition:
    opacity 0.35s,
    transform 0.5s var(--spring);
}
.k-slot.wait {
  opacity: 0;
  transform: translateY(16px);
}
.k-slot button {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 0;
  padding: 2px 4px 10px;
  border: 1px solid var(--line);
  border-top: 2px solid var(--c);
  border-radius: 2px;
  background: rgba(245, 236, 217, 0.03);
  color: var(--paper);
  transition:
    background 0.2s,
    transform 0.3s var(--spring);
}
.k-slot button:hover {
  background: rgba(245, 236, 217, 0.07);
  transform: translateY(-3px);
}
.k-slot.best button {
  box-shadow:
    0 0 0 1px var(--c),
    0 0 34px -10px var(--c);
}
.k-slot-stone,
.vitrine-stone {
  width: 100%;
  aspect-ratio: 1;
  max-height: 112px;
  display: grid;
  place-items: center;
}
.k-slot-tier,
.vitrine-name {
  font-family: var(--f-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--c);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.k-slot-ct {
  font-size: 14px;
}
.k-slot-answer {
  max-width: 100%;
  font-size: 12px;
  color: var(--dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* the showcase in the profile */
.vitrine {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}
.vitrine li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 0;
  padding: 2px 2px 10px;
  border: 1px solid var(--line);
  border-top: 2px solid var(--c);
  background: rgba(245, 236, 217, 0.03);
}
.vitrine li.none {
  border-top-color: var(--line);
}
.vitrine li.none .vitrine-name {
  color: var(--faint);
}
.vitrine-count {
  font-size: 12px;
  color: var(--dim);
}

/* ---------- small screens ---------- */

@media (max-width: 700px) {
  .k-home {
    min-height: 500px;
    padding-bottom: 4vh;
  }
  .k-home > .eyebrow {
    font-size: 10px;
    letter-spacing: 0.12em;
  }
  .k-home .k-stage {
    max-height: 240px;
    margin-bottom: 10px;
  }
  .k-cta-xl {
    font-size: 16px;
    padding: 13px 14px 13px 22px;
    gap: 14px;
  }
  .k-hud {
    height: 42px;
  }
  .k-socket {
    width: 27px;
    height: 27px;
  }
  .k-total-num {
    font-size: 32px;
  }
  .k-total .eyebrow {
    display: none;
  }
  .k-caret {
    display: none;
  }
  .k-prompt {
    margin: 8px 0 14px;
  }
  .k-torch {
    margin-bottom: 10px;
  }
  .k-input {
    padding: 12px 13px;
  }
  .k-hint {
    font-size: 13px;
    margin-top: 8px;
    min-height: 2.6em;
  }
  .k-finds li {
    grid-template-columns: minmax(0, 1fr) 46px 88px;
    font-size: 14px;
    padding: 6px 4px;
  }
  .k-find-bar {
    display: none;
  }
  .k-cta-key {
    display: none;
  }
  .k-cta {
    padding: 12px 18px;
  }
  .k-cta-xl .k-cta-key {
    display: grid;
  }
  .k-panel-actions .textbtn {
    letter-spacing: 0.1em;
    font-size: 11px;
  }
  .k-best {
    margin-top: 8px;
    font-size: 13px;
  }
  .k-tray,
  .vitrine {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .k-slot-stone,
  .vitrine-stone {
    max-height: 84px;
  }
}

/* on short screens the list shows the top three, so the stone keeps its room */
@media (max-height: 1000px) {
  .k-finds li:nth-child(4):not(.me):not(.gap),
  .k-finds li:nth-child(5):not(.me):not(.gap) {
    display: none;
  }
}
@media (max-height: 880px) {
  .k-tier {
    font-size: clamp(42px, min(8.6vw, 7.4vh), 92px);
  }
  .k-panel {
    margin-top: 6px;
  }
}

@media (max-height: 640px) {
  .k-lede {
    display: none;
  }
  .k-ask {
    padding-top: 0;
  }
  .k-prompt {
    font-size: clamp(21px, 4.2vw, 32px);
    margin: 6px 0 10px;
  }
  .k-hint {
    min-height: 1.4em;
  }
  .k-lore {
    display: none;
  }
}
