/* Launcher page for the MLU 1 web port, in the game's colours: the orange Mars start page behind,
   panels in the orange of the transmission screen with the #AA1111 frame of the applet page. */

:root {
  --orange: #cc6600;
  --frame: #aa1111;
  --panel: #f4a33c;
  --panel-edge: #ffd28a;
  --ink: #3a1500;
  --ink-soft: #6b3410;
  --title: "Commerce SF", Rockwell, "Rockwell Nova", "American Typewriter", serif;
  --narrow: "Niagara Solid", "Agency FB", "Arial Narrow", "Liberation Sans Narrow", sans-serif;
}

* { box-sizing: border-box; }

html { background: #1b0f05; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font: 15px/1.5 Arial, "Liberation Sans", Helvetica, sans-serif;
}

/* The start page, blurred and darkened, behind everything. */
body::before {
  content: "";
  position: fixed;
  inset: -24px;
  z-index: -1;
  background: url("images/startpage.jpg") center / cover;
  filter: blur(10px) brightness(0.5) saturate(1.2);
}

.page {
  max-width: 820px;
  margin: 0 auto;
  padding: 16px 16px 32px;
}

.top a {
  color: #ffd28a;
  text-decoration: none;
  font-weight: bold;
}

.top a:hover, .top a:focus-visible { text-decoration: underline; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* The title band of the game's start page: its logo, credits and version line. */
.hero { text-align: center; margin: 12px 0 24px; }

.logo {
  margin: 0 auto;
  aspect-ratio: 800 / 78;
  background: url("images/startpage.jpg") 0 1.92% / 100% auto no-repeat;
  border: 3px solid var(--frame);
  border-radius: 10px;
  box-shadow: 0 6px 24px rgb(0 0 0 / 50%);
}

.play {
  display: inline-block;
  margin-top: 20px;
  padding: 10px 56px 12px;
  font: bold 30px/1 var(--title);
  letter-spacing: 2px;
  color: #ffe9b0;
  text-decoration: none;
  text-shadow: 0 2px 0 rgb(0 0 0 / 50%);
  background: linear-gradient(#d23a1a, var(--frame));
  border: 2px solid #ffb35c;
  border-radius: 12px;
  box-shadow: 0 4px 0 #5e0808, 0 8px 20px rgb(0 0 0 / 45%);
}

.play:hover, .play:focus-visible { background: linear-gradient(#e8502a, #c01818); outline: none; }

.play:active { transform: translateY(2px); box-shadow: 0 2px 0 #5e0808, 0 4px 12px rgb(0 0 0 / 45%); }

.panel {
  margin: 0 0 20px;
  padding: 14px 20px 16px;
  background: linear-gradient(var(--panel), #ec9128);
  border: 3px solid var(--frame);
  border-radius: 10px;
  box-shadow: inset 0 0 0 2px var(--panel-edge), 0 6px 20px rgb(0 0 0 / 45%);
}

h2 {
  margin: 0 0 6px;
  font: bold 22px/1.2 var(--title);
  color: var(--frame);
  letter-spacing: 1px;
}

.hint { margin: 0 0 12px; color: var(--ink-soft); font-size: 14px; }

code { font-size: 0.95em; }

.saves { width: 100%; border-collapse: collapse; }

.saves td {
  padding: 6px 4px;
  border-top: 1px solid rgb(170 17 17 / 30%);
  vertical-align: middle;
}

.saves tr:first-child td { border-top: 0; }

.save-name { font: bold 18px/1.2 var(--narrow); letter-spacing: 0.5px; }

.save-info { color: var(--ink-soft); font-size: 13px; }

.save-info.finished { font-style: italic; }

.save-actions { text-align: right; white-space: nowrap; }

.snap-main .save-name { display: block; font-size: 16px; overflow-wrap: anywhere; }

.snap-main .save-info { display: block; margin-top: 2px; }

.empty { margin: 4px 0 8px; font-style: italic; color: var(--ink-soft); }

.actions { margin-top: 12px; }

button, .button {
  display: inline-block;
  margin-left: 6px;
  padding: 4px 12px;
  font: bold 13px/1.4 Arial, "Liberation Sans", Helvetica, sans-serif;
  color: var(--ink);
  background: linear-gradient(#ffe2a8, #f0b25c);
  border: 1px solid #a2500e;
  border-radius: 6px;
  cursor: pointer;
}

.actions .button { margin-left: 0; }

button:hover, .button:hover, button:focus-visible, .button:focus-within {
  background: linear-gradient(#fff0cc, #f6c47c);
  outline: none;
}

button.danger { color: #8a0a0a; }

.message { margin: 8px 0 0; font-size: 14px; }

.message:empty { margin: 0; }

.message.error { color: #8a0a0a; font-weight: bold; }

fieldset { margin: 8px 0 0; padding: 0; border: 0; }

legend { padding: 0; margin-bottom: 4px; font-weight: bold; }

fieldset label { display: block; margin: 2px 0; cursor: pointer; }

fieldset small { display: block; margin-left: 24px; color: var(--ink-soft); }

footer {
  margin-top: 8px;
  color: #e6b98a;
  font-size: 13px;
  text-align: center;
}

footer p { margin: 0; }

footer .links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 16px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

footer .links a {
  color: #ffd28a;
  font-weight: bold;
  text-decoration: none;
}

footer .links a:hover, footer .links a:focus-visible { text-decoration: underline; }

footer .updated { margin-top: 6px; opacity: 0.8; }

@media (max-width: 520px) {
  .saves tr { display: grid; grid-template-columns: 1fr auto; }
  .snaps tr { grid-template-columns: 1fr; }
  .save-actions {
    display: grid;
    grid-auto-columns: 1fr;
    grid-auto-flow: column;
    gap: 6px;
    grid-column: 1 / -1;
    padding-top: 0;
    border-top: 0;
    white-space: normal;
  }
  .save-actions button { margin-left: 0; padding: 4px 6px; }
}

/* Too narrow for four buttons in a row: two rows of two. */
@media (max-width: 360px) {
  .snaps .save-actions { grid-auto-flow: row; grid-template-columns: 1fr 1fr; }
}
