*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: #06040f;
  color: #e8dcc8;
  font-family: 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;
}

.void {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem;
  background:
    radial-gradient(ellipse 80% 55% at 50% 12%, rgba(88, 62, 28, 0.22), transparent 60%),
    radial-gradient(ellipse 120% 80% at 50% 100%, rgba(12, 8, 24, 0.9), #06040f);
}

.panel {
  width: min(22rem, 92vw);
  padding: 2.2rem 2rem 2rem;
  border: 1px solid rgba(212, 176, 121, 0.28);
  border-radius: 3px;
  background: linear-gradient(165deg, rgba(18, 14, 28, 0.96), rgba(8, 6, 14, 0.98));
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.6),
    0 24px 80px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(212, 176, 121, 0.12);
}

.eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.68rem;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: rgba(212, 176, 121, 0.55);
}

.title {
  margin: 0 0 1.6rem;
  font-size: 1.35rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #f0e6d4;
}

.display {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  min-height: 2.6rem;
  margin-bottom: 1.4rem;
  padding: 0.65rem 0.9rem;
  border: 1px solid rgba(212, 176, 121, 0.2);
  background: rgba(0, 0, 0, 0.45);
  font-family: 'Courier New', Courier, monospace;
  font-size: 1.45rem;
  letter-spacing: 0.42em;
  color: rgba(240, 230, 212, 0.92);
}

.display-dots {
  flex: 1;
  text-align: right;
  min-height: 1.2em;
}

.display-cursor {
  width: 0.55rem;
  height: 1.1rem;
  background: rgba(212, 176, 121, 0.75);
  animation: blink 1.1s step-end infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.55rem;
}

.key {
  appearance: none;
  border: 1px solid rgba(212, 176, 121, 0.22);
  border-radius: 2px;
  padding: 0.95rem 0;
  background: linear-gradient(180deg, rgba(32, 26, 40, 0.9), rgba(14, 11, 20, 0.95));
  color: #efe5d5;
  font-family: inherit;
  font-size: 1.15rem;
  letter-spacing: 0.08em;
  transition:
    background 0.08s,
    border-color 0.08s,
    transform 0.06s;
}

.key:active,
.key.is-down {
  transform: translateY(1px);
  border-color: rgba(212, 176, 121, 0.45);
  background: linear-gradient(180deg, rgba(48, 38, 58, 0.95), rgba(20, 16, 28, 0.98));
}

.key-wide {
  grid-column: span 1;
}

.key-enter {
  color: rgba(212, 176, 121, 0.95);
}

.key-clear {
  font-size: 0.82rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(200, 180, 160, 0.7);
}

.status {
  min-height: 1.25rem;
  margin-top: 1.1rem;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-align: center;
  color: rgba(212, 176, 121, 0.5);
}

.status.is-error {
  color: #c97878;
  animation: shake 0.45s ease;
}

.status.is-open {
  color: rgba(168, 210, 168, 0.85);
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-6px);
  }
  40% {
    transform: translateX(6px);
  }
  60% {
    transform: translateX(-4px);
  }
  80% {
    transform: translateX(4px);
  }
}

.panel.is-denied .display {
  border-color: rgba(180, 80, 80, 0.45);
}

.panel.is-open .display {
  border-color: rgba(140, 190, 140, 0.35);
}
