/* The original illustrated laptop is reused from the approved office sprite. */
.laptop-art {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 780 / 724;
  overflow: hidden;
}
.laptop-art img {
  position: absolute;
  top: 0;
  left: -178.4615%;
  width: 278.4615%;
  max-width: none;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
}
.game-hub .desk-interaction { width: clamp(200px, 24vw, 345px); }
.desk-laptop-button, button.desk-laptop-button { aspect-ratio: 780 / 724; }
.desk-laptop-button .laptop-art {
  transform-origin: 50% 88%;
  animation: deskLaptopJump 1.9s ease-in-out infinite;
  filter: drop-shadow(0 18px 9px #000a);
}
.desk-laptop-button .laptop-art img {
  width: 278.4615%;
  height: 100%;
  object-fit: fill;
  animation: none;
  filter: none;
  transform: none;
}
.desk-laptop-button:hover .laptop-art {
  filter: drop-shadow(0 0 12px #eaaa6577) drop-shadow(0 18px 9px #000a);
}
.desk-laptop-button:focus-visible {
  outline: 3px solid #ffe0a8;
  outline-offset: 9px;
  border-radius: 10px;
}
@keyframes deskLaptopJump {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  13% { transform: translateY(2px) rotate(2deg); }
  30% { transform: translateY(-30px) rotate(-4deg); }
  48% { transform: translateY(0) rotate(3deg); }
  64% { transform: translateY(-16px) rotate(2deg); }
  82% { transform: translateY(0) rotate(-2deg); }
}

/* Both authentication steps share the existing timer dock and host controls. */
.laptop-login {
  height: 100svh;
  min-height: 100svh;
  width: 100%;
  max-width: 1300px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(35px, 7vw, 110px);
  padding: 104px 6vw 120px;
  overflow: auto;
  overscroll-behavior: contain;
}
.laptop-login-art { min-width: 0; text-align: center; }
.laptop-login-art .laptop-art {
  max-width: 440px;
  margin: 0 auto;
  filter: drop-shadow(0 25px 24px #0009);
}
.laptop-owner {
  display: block;
  margin-top: 10px;
  color: #d9b17c;
  font-size: .875rem;
  letter-spacing: .25em;
}
.password-panel { min-width: 0; max-width: 540px; }
.password-panel .status-row { flex-wrap: wrap; gap: 8px 16px; }
.password-panel h1 {
  margin: 24px 0 12px;
  font-family: Georgia, serif;
  font-size: clamp(2.4rem, 4.4vw, 4rem);
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -.04em;
  color: #fff0d9;
  text-transform: none;
}
.password-intro { margin: 0 0 30px; color: #d3d5ce; font-size: 1rem; line-height: 1.5; }
#passwordForm { display: grid; gap: 16px; }
.password-label { display: block; margin-bottom: 12px; color: #e7d6bc; font-size: .875rem; }
#laptopPassword {
  display: block;
  width: 100%;
  min-width: 0;
  height: 62px;
  padding: 10px 16px;
  border: 1px solid #d4b28b88;
  border-radius: 5px;
  background: #070c0d;
  color: #fff4de;
  font: 1.6rem ui-monospace, monospace;
  letter-spacing: .16em;
}
#laptopPassword:disabled { opacity: .5; cursor: not-allowed; }
#passwordMessage { line-height: 1.5; min-height: 3em; }
.password-submit {
  min-height: 50px;
  padding: 13px 24px;
  background: #db9f67;
  color: #120d06;
  border: 1px solid #ecc090;
  box-shadow: none;
  text-transform: none;
}
.password-submit:hover { background: #efba84; color: #120d06; }
.password-panel.is-locked .terminal { border-color: #f07154; background: #351915; }
.password-panel.is-locked .message { color: #ffb5a4; font-weight: 600; }
.password-panel.is-locked .status-row { color: #ff987e; }
.riddle-laptop { width: min(360px, 85%); filter: drop-shadow(0 24px 24px #0009); }
body[data-phase="password"] .room-tools { left: 24px; right: auto; }
body[data-phase="riddle"] .data-chip strong { white-space: normal; text-align: right; }

@media (max-height: 700px) and (min-width: 701px) {
  .game-hub .desk-interaction { width: 225px; }
  .laptop-login { padding-top: 90px; padding-bottom: 100px; gap: 5vw; }
  .laptop-login-art .laptop-art { max-width: 320px; }
  .password-panel h1 { margin-top: 16px; }
  .password-intro { margin-bottom: 20px; }
}
@media (max-width: 700px) {
  .game-hub .desk-interaction { width: clamp(165px, 49vw, 235px); }
  .laptop-login {
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    gap: 24px;
    padding: 86px 24px 110px;
    max-width: 540px;
  }
  .laptop-login-art { display: none; }
  .password-panel { margin: auto 0; }
  .password-panel h1 { margin-top: 24px; font-size: clamp(2.2rem, 10vw, 3.4rem); }
  .password-panel .status-row { font-size: .7rem; }
  .password-intro { margin-bottom: 24px; }
  #laptopPassword { font-size: 1.5rem; }
  body[data-phase="password"] .room-tools { left: 16px; right: 16px; justify-content: center; }
}
@media (max-height: 500px) and (min-width: 701px) {
  .laptop-login { align-items: start; }
  .laptop-login-art .laptop-art { max-width: 250px; }
}
@media (prefers-reduced-motion: reduce) {
  .desk-laptop-button .laptop-art { animation: none !important; transform: none !important; }
}
