/* Join, the lobby and unlocks (join.js), over the viewer's HUD. Same tokens as style.css: plain text. */
#join-ui { position: fixed; inset: 0; pointer-events: none; z-index: 30; text-shadow: var(--shade); }
#join-ui > * { pointer-events: auto; }
.join-cta {
  position: absolute; left: 50%; top: calc(var(--gap) + var(--sat)); transform: translateX(-50%);
  font-size: 13px; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap;
}

/* the lobby: top right, a line per player */
#lobby { pointer-events: auto; display: grid; grid-template-columns: auto auto auto; column-gap: 7px; align-items: center; justify-content: end; }
#lobby li { display: contents; }
#lobby .head { width: 14px; height: 14px; display: block; image-rendering: pixelated; image-rendering: crisp-edges; }
#lobby i.head { width: 10px; height: 10px; margin: 2px; }
#lobby .nm { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 20px; }
#lobby .ag { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
#lobby .me .nm { font-weight: bold; }

/* the join and unlocks sheets: flat, over a dimmed world */
#join-sheet { position: fixed; inset: 0; display: grid; place-items: center; background: var(--sheet-bg); pointer-events: auto; z-index: 40; text-shadow: none; padding: 16px; }
#join-sheet[hidden] { display: none; }
.join-card { width: min(720px, 100%); max-height: calc(100vh - 32px); overflow: auto; scrollbar-width: none; font-size: 12px; line-height: 1.5; -webkit-user-select: text; user-select: text; }
.join-card h1 { font: bold 13px/1.4 var(--font); margin: 0; }
.join-card p { color: var(--muted); margin: 6px 0; }
.join-card .lead { color: var(--text); margin: 6px 0 14px; }
.join-card .x { color: var(--muted); }
.name-row { display: flex; gap: 10px; align-items: baseline; margin-bottom: 18px; }
.name-row label { color: var(--muted); }
.name-row input, .share input { flex: 1; max-width: 240px; padding: 2px 0; border: 0; background: none; color: var(--text); font: inherit; outline: none; text-decoration: underline; text-decoration-color: var(--dim); text-underline-offset: 3px; }
.apps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.app { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.big { font-size: 13px; text-align: left; }
a.big, button.big { text-decoration: underline; text-underline-offset: 3px; }
.big.term { color: var(--text); }
.app > small { color: var(--muted); font-size: 12px; margin-bottom: 6px; }
.primary { display: inline-block; margin-top: 10px; font-size: 13px; }
.steps { display: grid; gap: 2px; color: var(--muted); }
.steps li { display: flex; gap: 6px; }
.steps .n { flex: none; }
.steps b { font-weight: normal; color: var(--text); }
.cmd { display: flex; gap: 10px; align-items: baseline; min-width: 0; }
.cmd code { flex: 1; min-width: 0; color: var(--text); white-space: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-user-select: all; user-select: all; }
.cmd code::-webkit-scrollbar { display: none; }
.cmd .copy { flex: none; color: var(--muted); }
.warn { color: var(--accent) !important; margin: 0; }
.warn b { font-weight: normal; }
.others { margin-top: 18px; color: var(--muted); }
.others summary { cursor: pointer; list-style: none; text-decoration: underline; text-underline-offset: 3px; }
.others summary::-webkit-details-marker { display: none; }
.others .grid { display: grid; grid-template-columns: 90px 1fr; gap: 4px 12px; align-items: baseline; margin-top: 8px; }
.others .grid a { color: var(--text); justify-self: start; }
.wait { margin-top: 18px; color: var(--text) !important; }
.unlocks { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 12px; }
.unlock .row { gap: 8px; }
.unlock p { margin: 2px 0 0; }
.unlock .badge { color: var(--muted); }
.unlock.available .badge { color: var(--text); }
.share { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; margin-top: 4px; align-items: baseline; }
.share a { white-space: nowrap; }
.share input { max-width: none; }
.m-compact .join-cta { left: calc(var(--gap) + var(--sal)); transform: none; top: calc(var(--bar-bottom) + 2px); padding: 4px 0; }
html.spectating #pointing, html.spectating #tb-proposals { display: none; }
@media (max-width: 720px) {
  .apps { grid-template-columns: 1fr; gap: 16px; }
  #join-sheet { place-items: start stretch; }
}
