:root {
  color-scheme: dark;
  --panel: #090b09;
  --panel-soft: #151810;
  --olive: #858665;
  --olive-dark: #454724;
  --green: #00d000;
  --gold: #d4b534;
  --text: #f2f2e9;
  --muted: #c7c8bb;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-width: 320px;
  min-height: 100%;
  background: #000;
  font-family: Arial, Helvetica, sans-serif;
}

body { display: grid; place-items: start center; }

.guestbook-stage {
  position: relative;
  width: min(1024px, 100vw);
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #000 url("guestbook_background.png") center / 100% 100% no-repeat;
}

.hotspot {
  position: absolute;
  display: block;
  border: 0;
  padding: 0;
  background: transparent;
  color: transparent;
  cursor: pointer;
  text-decoration: none;
  border-radius: 2px;
}

.hotspot:hover,
.hotspot:focus-visible {
  outline: 2px solid #00d000;
  outline-offset: 1px;

}

/* Main menu: recovered 1024x768 coordinates converted to percentages. */
.nav-home       { left: 1.17%; top: 19.14%; width: 10.16%; height: 3.26%; }
.nav-men        { left: 1.17%; top: 22.40%; width: 10.16%; height: 3.26%; }
.nav-machine    { left: 1.17%; top: 25.65%; width: 10.16%; height: 3.26%; }
.nav-mission    { left: 1.17%; top: 28.91%; width: 10.16%; height: 3.26%; }
.nav-heroes     { left: 1.17%; top: 32.16%; width: 10.16%; height: 3.26%; }
.nav-audio      { left: 1.17%; top: 35.42%; width: 10.16%; height: 3.26%; }
.nav-video      { left: 1.17%; top: 38.67%; width: 10.16%; height: 3.26%; }
.nav-slideshow  { left: 1.17%; top: 41.93%; width: 10.16%; height: 3.26%; }
.nav-graphics   { left: 1.17%; top: 45.18%; width: 10.16%; height: 3.26%; }
.nav-gear       { left: 1.17%; top: 48.44%; width: 10.16%; height: 3.26%; }
.nav-guestbook  { left: 1.17%; top: 51.69%; width: 10.16%; height: 3.39%; }

.action-sign     { left: 70.12%; top: 20.31%; width: 12.11%; height: 3.65%; }
.action-read     { left: 70.12%; top: 24.87%; width: 12.11%; height: 3.65%; }
.action-archives { left: 70.12%; top: 29.43%; width: 12.11%; height: 3.65%; }

.action-photos    { left: 57.62%; top: 45.96%; width: 9.08%; height: 2.08%; }
.action-webmaster { left: 68.07%; top: 45.96%; width: 9.18%; height: 2.08%; }
.action-awards    { left: 78.71%; top: 45.96%; width: 9.08%; height: 2.08%; }

.sound-button {
  position: absolute;
  right: 1.2%;
  bottom: 1.4%;
  z-index: 3;
  display: none;
  border: 1px solid #00a900;
  background: rgb(0 0 0 / 82%);
  color: var(--green);
  padding: .42rem .7rem;
  font: 700 clamp(.65rem, 1.2vw, .82rem)/1 Arial, sans-serif;
  cursor: pointer;
}

.sound-button.show { display: block; }

.modal-shell {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  place-items: center;
  padding: clamp(10px, 2vw, 24px);
  background: rgb(0 0 0 / 78%);
}

.modal-shell.open { display: grid; }

.modal-card {
  position: relative;
  width: min(760px, 96vw);
  max-height: min(720px, 94vh);
  overflow: auto;
  border: 3px solid var(--olive);
  box-shadow: 0 0 0 2px #161806, 0 20px 60px #000;
  background: linear-gradient(#171a10, #080a07);
  color: var(--text);
  padding: clamp(18px, 3vw, 30px);
}

.modal-card.archive-card {
  width: min(950px, 97vw);
  height: min(740px, 95vh);
  max-height: none;
  padding: 14px;
  overflow: hidden;
}

.modal-close {
  position: absolute;
  top: 7px;
  right: 8px;
  z-index: 2;
  width: 34px;
  height: 34px;
  border: 2px solid #ddd;
  border-radius: 50%;
  background: #050505;
  color: #fff;
  font: 700 22px/28px Arial, sans-serif;
  cursor: pointer;
}

.modal-card h1 {
  margin: 0 44px 8px 0;
  color: var(--green);
  font-size: clamp(1.35rem, 3vw, 2rem);
  text-transform: uppercase;
}

.intro, .privacy-note, .status { color: var(--muted); }
.privacy-note { font-size: .86rem; }

.guestbook-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 18px;
  margin-top: 18px;
}

.field { display: grid; gap: 5px; }
.field.full { grid-column: 1 / -1; }
.field label { color: #f4e7a2; font-weight: 700; font-size: .9rem; }
.field small { color: var(--muted); }

.field input,
.field textarea {
  width: 100%;
  border: 2px solid var(--olive-dark);
  background: #f4f2df;
  color: #111;
  padding: 9px 10px;
  font: 1rem/1.3 Arial, sans-serif;
}

.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: 3px solid rgb(0 208 0 / 35%); }

.honeypot { position: absolute !important; left: -10000px !important; }

.submit-button,
.admin-button {
  border: 2px solid #c7c73a;
  background: #1a1e08;
  color: #fff04a;
  padding: 10px 18px;
  font-weight: 800;
  cursor: pointer;
}

.submit-button:hover, .admin-button:hover { background: #313912; }
.submit-button:disabled { opacity: .55; cursor: wait; }

.status { min-height: 1.4em; margin: 10px 0 0; }
.status.error { color: #ff8d8d; }
.status.success { color: #7cff7c; }

.entries { display: grid; gap: 14px; margin-top: 18px; }

.entry {
  border: 1px solid var(--olive-dark);
  background: rgb(255 255 255 / 4%);
  padding: 14px;
}

.entry header { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 7px 16px; }
.entry-name { color: #fff04a; font-weight: 800; }
.entry-date { color: #aeb09e; font-size: .82rem; }
.entry-details { color: #c8c9b8; margin-top: 4px; font-size: .88rem; }
.entry-comment { white-space: pre-wrap; margin: 11px 0 0; line-height: 1.45; }

.archive-note {
  height: 52px;
  padding: 2px 46px 8px 5px;
  color: var(--muted);
  font-size: .85rem;
}

.archive-frame {
  display: block;
  width: 100%;
  height: calc(100% - 52px);
  border: 1px solid var(--olive-dark);
  background: #fff;
}

@media (max-width: 620px) {
  .guestbook-form { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .modal-card { padding: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}

/* The original movie owns mouse hover effects and aircraft motion.
   HTML controls remain available to keyboard and assistive technology. */
#guestbook-animation { position:absolute; inset:0; }
#guestbook-animation ruffle-player { display:block; width:100%; height:100%; }
.guestbook-stage.animated .hotspot { pointer-events:none; }
.guestbook-stage.animated .hotspot:hover { outline:none; }
