* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: #ffffff;
  color: #111111;
}

body {
  min-height: 100dvh;
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Noto Sans KR",
    sans-serif;
}

button,
input {
  font: inherit;
}

[hidden] {
  display: none !important;
}

.lock-screen {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.password-box {
  width: min(100%, 360px);
  text-align: center;
  transform: translateY(-4vh);
}

.label {
  margin: 0 0 30px;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: lowercase;
}

.digit-row {
  display: flex;
  justify-content: center;
  gap: 13px;
  min-height: 34px;
  margin-bottom: 34px;
  cursor: text;
  user-select: none;
}

.digit-slot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 34px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
}

.hidden-input {
  position: fixed;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.enter-button {
  border: 0;
  padding: 8px 10px;
  background: transparent;
  color: #111111;
  font-size: 13px;
  letter-spacing: 0.06em;
  cursor: pointer;
}

.enter-button:disabled {
  opacity: 0.28;
  cursor: default;
}

.error-message {
  min-height: 20px;
  margin: 18px 0 0;
  color: #777777;
  font-size: 12px;
}

.letter-screen {
  min-height: 100dvh;
}

.letter-container {
  width: min(100%, 600px);
  margin: 0 auto;
  padding: 72px 26px 120px;
}

.letter .date {
  margin: 0 0 42px;
  color: #8a8a8a;
  font-size: 13px;
}

.letter {
  font-size: 16px;
  line-height: 2;
  word-break: keep-all;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.shake {
  animation: shake 180ms ease-in-out 2;
}
