/* The web front page's own rules, beside the desktop launcher's stylesheet (style.css, which the
 * build brings here): the canvas the game draws into under the launcher, the log over it, what only
 * the web page shows, and the shell at phone width, where the rail is a bar along the top. */

#stage { position: fixed; inset: 0; display: grid; place-items: center; }
#view { display: block; background: #000; outline: none; image-rendering: auto; cursor: default; }
#launch { position: fixed; inset: 0; z-index: 10; background: var(--ink); }
#status { position: fixed; left: 8px; bottom: 6px; z-index: 40; font: 11px ui-monospace, monospace; color: var(--muted); pointer-events: none; text-shadow: 0 0 3px #000; }
#log { position: fixed; right: 8px; bottom: 6px; z-index: 40; max-width: 46vw; max-height: 30vh; overflow: auto; margin: 0; font: 11px/1.3 ui-monospace, monospace; color: var(--muted); white-space: pre-wrap; pointer-events: none; text-shadow: 0 0 3px #000; }
.hidden { display: none !important; }
/* The name a world's password is kept under in the browser (the account and the world), in the
 * login form for the browser's password manager to read, never seen. */
.login-name { position: absolute; width: 1px; height: 1px; padding: 0; border: 0; opacity: 0; pointer-events: none; }

/* No window to drag: no strip to drag it by, and the shell starts nearer the top. */
.drag { display: none; }
.shell { padding-top: 28px; }
.notice { top: 28px; }

/* A line of a world's page that spans both of its form's columns: the local relay's fold. */
.form .wide-cell { grid-column: 1 / -1; }
.form .wide-cell details.fold > summary h2 { margin: 6px 0; font-size: 12px; }
.form .wide-cell .form { margin-top: 8px; }
.form .join { overflow-wrap: anywhere; user-select: text; -webkit-user-select: text; }
.form a, .panel p a { color: var(--gold-bright); }

/* ----- phone width ------------------------------------------------------------------------------ */

@media (max-width: 760px) {
  .shell {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    gap: 12px;
    padding: 12px 16px 16px;
  }
  .side { gap: 10px; }
  .lockup .crest { width: 36px; height: 36px; }
  .lockup .word { font-size: 16px; }
  .rail { flex-direction: row; width: auto; gap: 4px; }
  .rail button { flex: 1 1 0; min-width: 0; height: 34px; padding: 0 2px; font-size: 9px; letter-spacing: 0.04em; }
  .rail-divider, .foot { display: none; }
  .main { align-items: stretch; }
  .column.narrow, .column.wide { max-width: none; }
  .panel { padding: 4px 12px 12px; }
  .panel > header { flex-wrap: wrap; gap: 8px; }
  .panel > header h1 { font-size: 16px; }
  .notice { top: 12px; left: 16px; right: 16px; width: auto; }
  .form { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .form .note { grid-column: 1; }
  .form .pair { flex-wrap: wrap; }
  .row { gap: 8px; padding: 6px 8px; }
  .row .name { font-size: 18px; }
  .row .btns { flex-wrap: wrap; justify-content: flex-end; }
  .play { height: 54px; font-size: 26px; }
  .field.mini-field { width: auto; }
  .plugin-line { flex-wrap: wrap; margin: 0 4px 6px; }
  .ifaces { grid-template-columns: minmax(0, 1fr); }
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-top { flex-direction: column; }
  /* The worlds' list keeps its state, name and players; the rest is in each world's open row. */
  table.worlds col.c-emu, table.worlds col.c-era, table.worlds col.c-rules { width: 0; }
  table.worlds col.c-players { width: 88px; }
  table.worlds tr:not(.section):not(.detail) > :is(td, th):is(:nth-child(3), :nth-child(4), :nth-child(5)) {
    padding: 0; font-size: 0; border-left: 0; border-right: 0;
  }
}
