/* The account page: burstfall.com's night, sun and font, in one narrow
   column, since a player comes here to do one thing at a time. */

@font-face {
  font-family: "Saira";
  src: url("/saira.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 50% 125%;
  font-display: swap;
}

:root {
  --night: #0f1067;
  --deep: #080936;
  --panel: #14167a;
  --line: #2b2e9a;
  --sun: #fcd744;
  --ember: #e56f14;
  --text: #fff4dc;
  --quiet: #a4a6e6;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  background: var(--deep);
  color: var(--text);
  font-family: "Saira", system-ui, sans-serif;
  font-size: 106%;
  line-height: 1.5;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(var(--night), var(--deep) 40rem);
}

header, main { width: min(30rem, 90vw); margin: 0 auto; }

/* A fixed height, so Sign out appearing never moves the page. */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 6rem;
  padding-top: 1rem;
}

.mark { display: block; width: 8.5rem; height: auto; }

main { padding-bottom: 5rem; }

h1, h2, h3 { font-weight: 640; font-stretch: 85%; line-height: 1.1; margin: 0; }
h1 { font-size: 2.4rem; margin: 2.5rem 0 0.75rem; }
h2 { font-size: 1.45rem; margin-bottom: 0.5rem; color: var(--sun); }
h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
p { margin: 0 0 1rem; }
.quiet { color: var(--quiet); }
.small { font-size: 0.85rem; }

.block { border-top: 1px solid var(--line); padding: 1.5rem 0 0.5rem; margin-top: 1.5rem; }
#me-email { margin-bottom: 0; }

form { display: flex; gap: 0.5rem; margin-bottom: 1rem; }
form input { flex: 1; min-width: 0; }

button, input {
  font: inherit;
  font-size: 1rem;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 0.55rem 0.9rem;
}

input::placeholder { color: var(--quiet); opacity: 0.6; }
input:focus-visible, button:focus-visible { outline: 2px solid var(--sun); outline-offset: 2px; }

button { cursor: pointer; font-weight: 600; white-space: nowrap; }
button:hover { border-color: var(--sun); }
button:disabled { opacity: 0.6; cursor: progress; }
button[type="submit"], #join { background: var(--sun); border-color: var(--sun); color: var(--deep); }
button.quiet { background: none; color: var(--quiet); }
button.danger { background: none; border-color: var(--ember); color: var(--ember); }
button.link {
  background: none;
  border: none;
  padding: 0;
  color: var(--sun);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.aside { color: var(--quiet); margin-top: 2rem; }
.aside .link + .link { margin-left: 1rem; }

#code-digits { letter-spacing: 0.3em; font-variant-numeric: tabular-nums; }

/* The pairing code, read off the screen and typed into the game. */
.big-code {
  font-size: 2.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--sun);
  font-variant-numeric: tabular-nums;
  min-height: 3.5rem;
  margin: 1.5rem 0 0.25rem;
}

.devices { list-style: none; margin: 0; padding: 0; }
.devices li {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  column-gap: 1rem;
  align-items: center;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
}
.devices li:last-child { border-bottom: none; }
.devices .device { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.devices button { grid-column: 2; grid-row: 1 / 3; padding: 0.35rem 0.7rem; font-size: 0.9rem; }

/* What an action did, at the foot of the window, where it never moves
   the page. */
.said {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%);
  width: max-content;
  max-width: 90vw;
  margin: 0;
  padding: 0.7rem 1.1rem;
  background: var(--panel);
  border: 1px solid var(--sun);
  border-radius: 3px;
}
.said.error { border-color: var(--ember); }

@media (max-width: 26rem) {
  form { flex-direction: column; }
  h1 { font-size: 2rem; }
}
