/* ==========================================================================
   Digital Escape Room styles (typewriter look from the original rooms)
   ========================================================================== */
:root { --er-ink: #111; --er-red: #d93025; --er-green: #188038; --er-card: #fff; --er-line: #dadce0; --er-orange: #ff6a13; }
body.er { margin: 0; background: #fff; color: var(--er-ink); font-family: "Spinnaker", system-ui, sans-serif; }
.er-type { font-family: "Special Elite", "Courier New", monospace; }

/* ---------- Entry ---------- */
.er-enter { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.er-enter button {
  font-family: "Special Elite", monospace; font-size: clamp(28px, 5vw, 46px); background: none; border: 0; cursor: pointer; color: #111;
  padding: 20px 30px; letter-spacing: .02em; transition: letter-spacing .4s, opacity .3s;
}
.er-enter button:hover { letter-spacing: .08em; }
.er-enter .blink { animation: blink 1.2s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Modal ---------- */
.er-modal { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; background: rgba(0,0,0,.6); padding: 16px; }
.er-modal.open { display: flex; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; } }
.er-modal-box { position: relative; background: #fff; max-width: 820px; width: 100%; max-height: calc(100vh - 32px); overflow: auto; padding: 34px 30px; box-shadow: 0 20px 60px rgba(0,0,0,.4); }
.er-modal-box.dark { background: #2b2b2b; color: #fff; max-width: 440px; }
.er-modal-box.story { background: #000; max-width: 640px; font-family: "Special Elite", monospace; font-size: 17px; line-height: 1.6; }
.er-modal-box.story .note { text-align: center; font-style: italic; }
.er-modal-box.image { padding: 14px; max-width: 960px; }
.er-modal-box.image img { margin: 0 auto; max-height: calc(100vh - 80px); width: auto; }
.er-modal-box.reading { max-width: 760px; font-size: 16px; line-height: 1.7; }
.er-modal-box.reading h3 { font-family: "Special Elite", monospace; font-weight: 400; margin: 1.4em 0 .3em; }
.er-close { position: absolute; top: 6px; right: 10px; background: none; border: 0; font-size: 30px; line-height: 1; cursor: pointer; color: inherit; opacity: .7; padding: 4px 8px; }
.er-close:hover { opacity: 1; }

.er-pass h2 { font-family: "Noticia Text", Georgia, serif; font-size: 40px; margin: 0 0 6px; }
.er-pass p { margin: 0 0 26px; font-size: 14px; color: #ccc; }
.er-pass label { display: block; font-size: 12px; color: #bbb; }
.er-pass input { width: 100%; background: transparent; border: 0; border-bottom: 1px solid var(--er-orange); color: #fff; font-size: 18px; padding: 8px 0; outline: none; }
.er-pass .er-err { color: #ff8a80; min-height: 1.4em; margin: 8px 0 14px; }
.er-go { width: 100%; background: var(--er-orange); color: #fff; border: 0; padding: 12px; font-size: 16px; cursor: pointer; }
.er-go:hover { filter: brightness(1.1); }

.er-btn {
  display: inline-block; font-family: "Special Elite", monospace; font-size: 16px; padding: 10px 22px; border: 1px solid #111;
  background: #fff; color: #111; text-decoration: none; cursor: pointer; box-shadow: 3px 3px 0 #111; transition: transform .1s, box-shadow .1s;
}
.er-btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 #111; }
.er-btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 #111; }
.er-btn.light { box-shadow: none; }

/* ---------- Room layout ---------- */
.er-top { max-width: 1100px; margin: 0 auto; padding: 24px 16px 6px; display: grid; grid-template-columns: 60px 1fr 60px; align-items: center; }
.er-top h1 { font-family: "Special Elite", monospace; font-weight: 400; text-align: center; margin: 0; font-size: clamp(30px, 5.5vw, 60px); line-height: 1.1; }
.er-back { color: #0b1f5c; display: inline-flex; padding: 6px; }
.er-back svg { width: 42px; height: 28px; }
.er-grid { max-width: 1100px; margin: 0 auto; padding: 16px; display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 34px; align-items: start; }
.er-grid.main { grid-template-columns: 340px minmax(0, 1fr); }
@media (max-width: 820px) { .er-grid, .er-grid.main { grid-template-columns: 1fr; } .er-grid.main .lock { order: 2; } }
.er-col > * + * { margin-top: 26px; }
.er-cipher { font-family: "Special Elite", monospace; font-size: 19px; line-height: 1.6; word-spacing: .2em; margin: 0; }
.er-hint { font-family: "Special Elite", monospace; font-size: 19px; margin: 6px 0 0; }
.er-def { border: 2px solid #555; border-radius: 6px; padding: 14px 16px; font-family: "Special Elite", monospace; font-size: 18px; line-height: 1.5; box-shadow: 0 14px 18px -12px rgba(0,0,0,.6); }
.er-def b { font-size: 20px; }
.er-figure { position: relative; margin: 0; box-shadow: 0 16px 20px -14px rgba(0,0,0,.55); }
.er-figure img, .er-figure video { width: 100%; height: auto; display: block; }
.er-figure a.er-img-link { display: block; }
.er-video video { background: #000; }
.er-box { border: 1px solid #222; padding: 30px; display: grid; place-items: center; background: #fff; }

/* Hidden hotspots — like the original site: invisible until the cursor enters,
   then a red dot fades in; it fades back out when the cursor leaves.
   Position = centre, width = % of image. */
.er-hot { position: relative; margin: 0; }
.er-hot img { width: 100%; height: auto; display: block; }
.clue, .er-map .spot {
  position: absolute; display: block; aspect-ratio: 1; transform: translate(-50%, -50%);
  border-radius: 50%; border: 0; padding: 0; margin: 0; cursor: pointer;
  background: rgba(217, 48, 37, 0);
  transition: background-color .35s ease, box-shadow .35s ease;
}
.clue { min-width: 24px; }
.clue:hover, .er-map .spot:hover,
.clue:focus-visible, .er-map .spot:focus-visible {
  background: rgba(217, 48, 37, .8); outline: none;
}
/* map locations that are already solved stay visible as a green dot */
.er-map .spot.done, .er-map .spot.done:hover, .er-map .spot.done:focus-visible {
  background: rgba(24, 128, 56, .85); box-shadow: 0 0 0 2px rgba(255,255,255,.8);
}

/* ---------- Lock (replaces the old Google Forms) ---------- */
.lock { font-family: Roboto, "Spinnaker", system-ui, sans-serif; scroll-margin-top: 16px; }
.lock .lk-head, .lock .lk-q, .lock .lk-done { background: var(--er-card); border: 1px solid var(--er-line); border-radius: 8px; padding: 18px 20px; margin-bottom: 10px; }
.lock .lk-head { border-top: 10px solid #9e9e9e; }
.lock.solved .lk-head { border-top-color: var(--er-green); }
.lock h2 { font-family: Roboto, system-ui, sans-serif; font-weight: 400; font-size: 26px; line-height: 1.2; margin: 0 0 8px; }
.lock .lk-head p { margin: 0 0 6px; font-size: 14px; }
.lock .lk-req { color: var(--er-red); font-size: 13px !important; }
.lock label { font-size: 15px; display: block; }
.lock .req { color: var(--er-red); }
.lock .lk-help { font-size: 13px; color: #444; margin-top: 2px; }
.lock input { width: 100%; border: 0; border-bottom: 1px solid #bbb; padding: 8px 0; font-size: 15px; margin-top: 12px; outline: none; background: transparent; }
.lock input:focus { border-bottom: 2px solid #673ab7; }
.lock .lk-q.bad { border-color: var(--er-red); }
.lock .lk-q.bad input { border-bottom-color: var(--er-red); }
.lock .lk-q.good { border-color: var(--er-green); }
.lock .lk-msg { font-size: 13px; min-height: 1.2em; margin-top: 6px; color: var(--er-red); }
.lock .lk-q.good .lk-msg { color: var(--er-green); }
.lock .lk-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; }
.lock .lk-page { font-size: 13px; color: #666; }
.lock.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.lock .lk-done { text-align: center; }
.lock .lk-done h3 { font-family: "Special Elite", monospace; font-weight: 400; font-size: 26px; margin: 8px 0; }
.lock .lk-code-label { margin: 0; font-size: 14px; color: #555; }
.lock .lk-code { font-family: "Special Elite", monospace; font-size: 34px; margin: 4px 0 12px; letter-spacing: .06em; user-select: all; background: #f6f6f6; padding: 8px; }
.lock .lk-reset { background: none; border: 0; color: #777; text-decoration: underline; cursor: pointer; font-size: 13px; }
.lk-icon { width: 120px; height: 140px; margin: 0 auto; display: block; }
.lk-icon.small { width: 60px; height: 70px; }
.lk-icon .shackle { transform-origin: 90px 62px; animation: unlock .8s .2s ease-out both; }
@keyframes unlock { from { transform: translateY(14px); } to { transform: translateY(0) rotate(0); } }
.lock.final .lk-done { padding: 40px 20px; border: 3px solid var(--er-green); }
.lock.final h2 { font-family: "Special Elite", monospace; font-size: 40px; margin-top: 16px; }
.lock .lk-mission { font-family: "Special Elite", monospace; font-size: 20px; color: var(--er-green); }
body.escaped .er-top h1 { animation: glow 2s ease-in-out 3; }
@keyframes glow { 50% { color: var(--er-green); } }

.er-foot { text-align: center; color: #999; font-size: 12px; padding: 40px 16px; }
.er-foot a { color: #777; }
