/* Launcher page for the MLU 2 web port, in the game's colours: the ash-grey Crematoria start page
   behind, panels in the blue-grey metal of the start page's frame, the dashboard's green light
   for the Play button. */

:root {
  --metal: #4a525e;
  --metal-dark: #2c3139;
  --edge: #9aa6b8;
  --edge-light: #c9d2df;
  --ink: #e9edf3;
  --ink-soft: #b4bdca;
  --green: #5fc24a;
  --title: "Ultra Serif SF", "Cooper Black", "Bookman Old Style", "URW Bookman", Bookman, serif;
  --narrow: "Niagara Solid", "Agency FB", "Arial Narrow", "Liberation Sans Narrow", sans-serif;
}

* { box-sizing: border-box; }

html { background: #14161a; }

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/startpage2.jpg") center / cover;
  filter: blur(10px) brightness(0.45);
}

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

.top a {
  color: var(--edge-light);
  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: the logo and "Crematoria Edition". */
.hero { text-align: center; margin: 12px 0 24px; }

.logo {
  margin: 0 auto;
  aspect-ratio: 700 / 77;
  background: url("images/startpage2.jpg") 60% 2.87% / 114.2857% auto no-repeat;
  border: 2px solid var(--edge);
  border-radius: 10px;
  box-shadow: inset 0 0 0 1px var(--edge-light), 0 6px 24px rgb(0 0 0 / 60%);
}

.play {
  display: inline-block;
  margin-top: 20px;
  padding: 10px 56px 12px;
  font: bold 30px/1 var(--title);
  letter-spacing: 2px;
  color: #f2ffe9;
  text-decoration: none;
  text-shadow: 0 2px 0 rgb(0 0 0 / 55%);
  background: linear-gradient(#78d65f, #3a8f2b);
  border: 2px solid #c6f5b5;
  border-radius: 12px;
  box-shadow: 0 4px 0 #1f4f17, 0 8px 20px rgb(0 0 0 / 55%);
}

.play:hover, .play:focus-visible { background: linear-gradient(#8be571, #45a234); outline: none; }

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

.panel {
  margin: 0 0 20px;
  padding: 14px 20px 16px;
  background: linear-gradient(var(--metal), var(--metal-dark));
  border: 2px solid var(--edge);
  border-radius: 10px;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 15%), 0 6px 20px rgb(0 0 0 / 55%);
}

h2 {
  margin: 0 0 6px;
  font: bold 22px/1.2 var(--title);
  color: var(--edge-light);
  letter-spacing: 1px;
  text-shadow: 0 2px 0 rgb(0 0 0 / 50%);
}

.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(201 210 223 / 20%);
  vertical-align: middle;
}

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

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

.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: #1d2127;
  background: linear-gradient(#e4e9f0, #aeb8c6);
  border: 1px solid #1d2127;
  border-radius: 6px;
  cursor: pointer;
}

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

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

button.danger { color: #9a1010; }

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

.message:empty { margin: 0; }

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

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

legend { padding: 0; margin-bottom: 4px; font-weight: bold; color: var(--ink); }

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

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

input[type="radio"], input[type="checkbox"] { accent-color: var(--green); }

footer {
  margin-top: 8px;
  color: var(--ink-soft);
  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: var(--edge-light);
  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; }
}
