/* Sim Universe Web: the world behind, the sign-in sheets, the round menu and its panes. His phone: phone.css. */
:root {
  --bg: #f2f2f7; --surface: #ffffff; --me: #0a84ff; --her: #e5e5ea; --text: #111; --muted: #8e8e93;
  --good: #34c759; --bad: #ff3b30; --shade: rgba(0, 0, 0, .35); --radius: 16px; --line: #c7c7cc;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #000; --surface: #1c1c1e; --her: #262628; --text: #f2f2f7; --shade: rgba(0, 0, 0, .55); --line: #48484a; }
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--text); background: #1f2a33; overflow: hidden; }
.hidden { display: none !important; }

#world { position: fixed; inset: 0; background: radial-gradient(circle at 30% 30%, #3b5560, #141c22); display: flex;
  align-items: center; justify-content: center; }
#world img { max-width: 100%; max-height: 100%; opacity: .55; }
#world img:not([src]) { display: none; }

.langpick { position: fixed; top: 16px; right: 16px; z-index: 50; font-size: 15px; padding: 6px 10px; border-radius: 10px;
  background: var(--surface); color: var(--text); border: 1px solid var(--line); }
.sheet { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(420px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px); overflow-y: auto; background: var(--surface); border-radius: var(--radius); padding: 24px;
  box-shadow: 0 20px 60px var(--shade); }
.sheet h1 { margin: 0 0 16px; font-size: 22px; }
label { display: block; margin: 0 0 12px; font-size: 14px; color: var(--muted); }
label input:not([type=checkbox]) { display: block; width: 100%; margin-top: 4px; font-size: 16px; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: transparent; color: var(--text); }
label.check { display: flex; gap: 8px; align-items: center; color: var(--text); }
button { font: inherit; cursor: pointer; }
button.primary { font-size: 16px; padding: 10px 18px; border: 0; border-radius: 20px; background: var(--me); color: #fff; width: 100%; }
button.ghost { border: 0; background: transparent; color: var(--me); font-size: 15px; padding: 6px 10px; }
.msg { min-height: 20px; color: var(--bad); font-size: 14px; margin: 4px 0 10px; }
.hint { color: var(--muted); font-size: 14px; }
.k { font-size: 12px; color: var(--muted); }
code { font-size: 17px; letter-spacing: 1px; word-break: break-all; user-select: all; }
/* the QR code on white, whatever the theme: a scanner reads dark on light */
.qr { display: block; margin: 4px auto 12px; background: #fff; border-radius: 8px; }
/* Shown only where the main input is a finger with no hover - a phone or a tablet, never a PC (whatever its width). */
.touchonly { display: none; }
@media (hover: none) and (pointer: coarse) { .touchonly { display: block; } }

/* ----- the menu: a round button bottom right; a tick before what is shown */
#menubtn { position: fixed; right: 24px; bottom: 24px; width: 56px; height: 56px; border-radius: 50%; border: 0; background: var(--me);
  color: #fff; box-shadow: 0 6px 20px var(--shade); display: flex; align-items: center; justify-content: center; z-index: 30; }
#menu { position: fixed; right: 24px; bottom: 92px; min-width: 220px; background: var(--surface); border-radius: 14px; padding: 6px;
  box-shadow: 0 10px 40px var(--shade); z-index: 31; }
#menu button { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; border: 0; background: transparent;
  color: var(--text); font-size: 16px; padding: 10px 14px 10px 8px; border-radius: 10px; }
#menu button:hover, #menu button:focus-visible { background: var(--her); }
#menu .tick { width: 18px; flex: none; color: var(--me); font-weight: 700; text-align: center; }
#menu button.on .tick::before { content: "\2713"; }
#menu hr { border: 0; border-top: 1px solid var(--her); margin: 4px 8px; }

.pane { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(520px, calc(100vw - 32px)); max-height: calc(100dvh - 120px);
  overflow-y: auto; background: var(--surface); border-radius: var(--radius); padding: 18px 22px; box-shadow: 0 20px 60px var(--shade); z-index: 20; }
.pane header { display: flex; align-items: center; margin-bottom: 12px; } .pane header b { flex: 1; font-size: 19px; }
.pane select { font-size: 16px; padding: 8px; border-radius: 10px; background: transparent; color: var(--text); border: 1px solid var(--line); }
.pane table td { padding: 4px 14px 4px 0; vertical-align: top; } .pane table td:first-child { color: var(--muted); }

/* ----- a small screen is only a phone (PLAN #206: "alleen de GSM mode"): no world, no round menu; the phone's
   Settings app holds the language, About and signing out */
@media (max-width: 700px), (max-height: 520px) {
  #world { display: none; }
  body { background: #000; }
  #menubtn, #menu { display: none !important; }
  .pane { inset: 0; transform: none; width: auto; max-height: none; border-radius: 0; z-index: 40; }
}
