/* Remote keyboard helper */
html,
body {
  height: auto;
  min-height: 100%;
}

.cover-container.h-100 {
  height: auto !important;
  min-height: 100vh;
  max-width: 100%;
}

.kb {
  --u: clamp(1.1rem, 4.6vw, 2.5rem);
  --accent: #ffd54f;
}

.kb-carousel {
  display: flex;
  align-items: center;
  gap: .4rem;
}

.kb-viewport {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.kb-steps {
  display: flex;
  gap: .4rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: .9rem;
  transition: transform .35s ease;
}

.kb-steps > li {
  flex: 0 0 calc((100% - .8rem) / 3);
  min-width: 0;
}

.kb-chevron {
  flex: none;
  width: 2.2rem;
  height: 3.5rem;
  border: 1px solid #666;
  border-radius: .3rem;
  background: transparent;
  color: #fff;
  font-size: 1.8rem;
  line-height: 1;
}

.kb-chevron:disabled {
  opacity: .3;
}

.kb-position {
  margin: .4rem 0 0;
  font-size: .8rem;
  text-align: center;
  color: rgba(255, 255, 255, .6);
}

@media (prefers-reduced-motion: reduce) {
  .kb-steps {
    transition: none;
  }
}

@media (max-width: 36em) {
  .kb-steps li {
    flex-direction: column;
    gap: .2rem;
    text-align: center;
  }
  .kb-combo {
    padding-left: 0;
    border-left: 0;
  }
  .kb-chevron {
    width: 1.6rem;
  }
}

.kb-steps li {
  display: flex;
  min-height: 3.5rem; /* room for a revealed combination and its keypad line: no jump on reveal */
  align-items: center;
  gap: .6rem;
  padding: .3rem .5rem;
  border: 1px solid #555;
  border-radius: .3rem;
  background: #3a3a3a;
  cursor: pointer;
}

.kb-steps li.active {
  border-color: var(--accent);
}

.kb-combo {
  flex: 1;
  padding-left: .6rem;
  border-left: 1px solid #666;
}

.kb-steps kbd {
  background: #555;
  white-space: nowrap;
}

.kb-alt {
  display: block;
  margin-top: .15rem;
  font-size: .8rem;
  color: rgba(255, 255, 255, .6);
}

.kb-alt kbd {
  font-size: .75rem;
}

.kb-missing {
  color: #ff8a80;
}

.kb-char {
  flex: none;
  min-width: 2rem;
  padding: .1rem .3rem;
  border: 1px solid #888;
  border-radius: .2rem;
  background: transparent;
  color: #fff;
  font-family: monospace;
  font-size: 1rem;
}

.kb-char.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #222;
  text-shadow: none;
}

.kb-board {
  display: flex;
  gap: calc(var(--u) / 3);
  margin: 1rem 0 .5rem;
  overflow-x: auto;
  text-shadow: none;
}

.kb-main,
.kb-pad {
  display: grid;
  gap: 2px;
  grid-auto-rows: var(--u);
}

.kb-main {
  grid-template-columns: repeat(60, calc(var(--u) / 4 - 2px));
}

.kb-pad {
  grid-template-columns: repeat(4, var(--u));
  align-self: start;
}

.kb-key {
  position: relative;
  border-radius: .2rem;
  background: #555;
  color: #fff;
  font-size: calc(var(--u) * .34);
  line-height: 1;
}

.kb-key span {
  position: absolute;
}

.kb-l2 { top: 12%; left: 12%; }
.kb-l1 { bottom: 12%; left: 12%; }
.kb-r2 { top: 12%; right: 12%; color: var(--accent); }
.kb-r1 { bottom: 12%; right: 12%; color: var(--accent); }

.kb-mod {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #474747;
  color: #aaa;
}

.kb-key.kb-hit {
  background: var(--accent);
  color: #222;
}

.kb-key.kb-hit span {
  color: #222;
}

.kb-legend {
  font-size: .8rem;
  color: rgba(255, 255, 255, .6);
}

.kb-hint {
  font-size: .85rem;
  color: rgba(255, 255, 255, .6);
}

.kb-hidden {
  color: rgba(255, 255, 255, .4);
  letter-spacing: .1em;
}

/* eye button */
.reveal {
  display: flex;
  align-items: center;
  padding: 0 .6rem;
}

.reveal svg {
  width: 1.2rem;
  height: 1.2rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.reveal .eye-off,
.reveal.revealed .eye-on {
  display: none;
}

.reveal.revealed .eye-off {
  display: inline;
}


.kb-rank {
  flex: none;
  min-width: 1.6rem;
  color: rgba(255, 255, 255, .5);
  font-size: .8rem;
  text-align: right;
}

.kb-steps li.active .kb-rank {
  color: var(--accent);
}

/* two numbered steps */
.step {
  --u: clamp(1.1rem, 4.6vw, 2.5rem);
  --accent: #ffd54f;
  max-width: calc(var(--u) * 20 + 4rem);
  margin: 0 auto 1.5rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: .5rem;
  background: rgba(255, 255, 255, .04);
}

.step-title {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: 1rem;
  font-size: 1.25rem;
  text-align: left;
}

.step-num {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 50%;
  background: var(--accent);
  color: #222;
  font-size: 1rem;
  font-weight: 700;
  text-shadow: none;
}

.step-lead {
  font-size: .9rem;
  color: rgba(255, 255, 255, .65);
}

.step-next {
  margin: 1rem 0 0;
}

.step-next a {
  color: var(--accent);
}

.kb-sentence {
  line-height: 2.4;
}

.kb-sentence select {
  display: inline-block;
  width: auto;
  vertical-align: baseline;
}

@media (max-width: 36em) {
  .step {
    padding: 1rem .75rem;
  }
}

.kb-separator {
  margin: 1.25rem 0 1rem;
  border-top: 1px solid rgba(255, 255, 255, .15);
}
