/* hof.css — the Hall of Fame. One more Amiga Workbench 1.3 window in the
   account's chrome (pay.css: the .wb-bar gadgets, bevels, the orange): the
   seat's own card (the title, the pips of the ladder, three numbers, the way
   to the next title), the board (two-line rows; the seat's own lit orange),
   the ladder of titles. Also the title card's small Workbench key and the
   HUD's title chip. Phone first: one column, nothing wider than the screen. */

#hof-veil {
  position: fixed;
  inset: 0;
  z-index: 9700;                  /* over the drift, the title card, a challenge and the account window */
  display: none;
  align-items: center;
  justify-content: center;
  padding: 10px;
  background: rgba(0, 10, 30, 0.55);
  font-family: var(--px-body);
  image-rendering: pixelated;
  -webkit-font-smoothing: none;
  font-smooth: never;
  user-select: none;
  -webkit-user-select: none;
}
#hof-veil.on { display: flex; }

#hof-win {
  width: min(620px, 94vw);
  max-height: 92vh;
  max-height: 92dvh;
  display: flex;
  flex-direction: column;
  background: var(--wb-blue);
  color: var(--wb-white);
  border: 2px solid;
  border-color: var(--wb-white) var(--wb-black) var(--wb-black) var(--wb-white);
  box-shadow: 0 0 0 2px var(--wb-black), 8px 8px 0 0 rgba(0, 0, 0, 0.45);
  outline: none;
  font-size: 22px;
  line-height: 1.15;
}
#hof-win [hidden] { display: none !important; }
.hof-body { padding: 14px 16px 16px; overscroll-behavior: contain; }
.hof-lead { margin: 0 0 12px; font-size: 20px; opacity: 0.9; }
.hof-wait { margin: 4px 0 12px; font-size: 20px; opacity: 0.85; }

/* the seat's own card, sunk into the window */
.hof-me {
  margin: 0 0 14px;
  padding: 10px 12px 12px;
  border: 2px solid;
  border-color: var(--wb-black) var(--wb-white) var(--wb-white) var(--wb-black);
}
.hof-me-top { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; }
.hof-rank {
  font-family: var(--px-title);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.35;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--wb-orange);
  text-shadow: 2px 2px 0 var(--wb-black);
}
.hof-pips { display: inline-flex; gap: 3px; flex: none; }
.hof-pips i { display: block; width: 10px; height: 12px; box-sizing: border-box; border: 2px solid var(--wb-white); }
.hof-pips i.on { background: var(--wb-orange); border-color: var(--wb-black); }
.hof-me-who { margin: 6px 0 0; font-size: 20px; overflow-wrap: anywhere; }
.hof-me-who b { font-weight: 400; }
.hof-me-who span { opacity: 0.85; }
.hof-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 10px 0 0; }
.hof-stats > div {
  min-width: 0;
  padding: 6px 4px 5px;
  text-align: center;
  background: var(--wb-white);
  color: var(--wb-blue);
  border: 2px solid;
  border-color: var(--wb-white) var(--wb-black) var(--wb-black) var(--wb-white);
}
.hof-stats b { display: block; font-family: var(--px-title); font-weight: 400; font-size: 17px; line-height: 1.3; }
.hof-stats span { display: block; margin-top: 2px; font-size: 16px; line-height: 1.1; overflow-wrap: anywhere; }
.hof-stats .tot { background: var(--wb-orange); color: var(--wb-black); }
.hof-next { margin: 10px 0 0; font-size: 18px; }
.hof-next.top { color: var(--wb-orange); }
.hof-bar {
  height: 14px;
  margin: 0 0 4px;
  border: 2px solid;
  border-color: var(--wb-black) var(--wb-white) var(--wb-white) var(--wb-black);
  background: repeating-linear-gradient(45deg, var(--wb-blue) 0 4px, var(--wb-white) 4px 6px);
}
.hof-bar i { display: block; height: 100%; background: var(--wb-orange); }
.hof-anon p { margin: 0; font-size: 20px; }
.hof-anon .wb-row { margin-top: 10px; }

/* the board: # · the operator (name, title, branches, points) · the total */
.hof-head, .hof-row { display: grid; grid-template-columns: 2.4em minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.hof-head {
  padding: 2px 8px;
  background: var(--wb-white);
  color: var(--wb-blue);
  font-family: var(--px-ui);
  font-size: 15px;
  letter-spacing: 1px;
}
.hof-head span:first-child { text-align: right; }
.hof-list { list-style: none; margin: 0; padding: 0; }
.hof-row { padding: 6px 8px; border-bottom: 2px solid rgba(0, 0, 0, 0.35); }
.hof-pos { font-family: var(--px-title); font-size: 13px; text-align: right; }
.hof-row:nth-child(-n+3) .hof-pos { color: var(--wb-orange); }
.hof-who { min-width: 0; }
.hof-name { font-weight: 400; overflow-wrap: anywhere; }
.hof-who small { display: block; margin-top: 1px; font-size: 16px; opacity: 0.85; overflow-wrap: anywhere; }
.hof-tot { font-family: var(--px-title); font-size: 14px; color: var(--wb-orange); }
.hof-tag {
  display: inline-block;
  margin-left: 4px;
  padding: 0 5px;
  font-style: normal;
  font-family: var(--px-ui);
  font-size: 13px;
  letter-spacing: 1px;
  line-height: 1.35;
  vertical-align: 2px;
  background: var(--wb-white);
  color: var(--wb-blue);
}
.hof-row.me { background: var(--wb-orange); color: var(--wb-black); border-bottom-color: var(--wb-black); }
.hof-row.me .hof-pos, .hof-row.me .hof-tot { color: var(--wb-black); }
.hof-row.me small { opacity: 1; }
.hof-tag.you { background: var(--wb-black); color: var(--wb-orange); }
.hof-gap { padding: 2px 0; text-align: center; opacity: 0.7; letter-spacing: 3px; }
.hof-empty { margin: 4px 0 12px; padding: 10px; background: var(--wb-white); color: var(--wb-blue); }

/* the ladder of titles, the seat's own pressed in */
.hof-ladder { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.hof-ladder li {
  padding: 3px 8px 2px;
  font-size: 16px;
  border: 2px solid;
  border-color: var(--wb-white) var(--wb-black) var(--wb-black) var(--wb-white);
}
.hof-ladder li b { margin-right: 6px; font-family: var(--px-title); font-weight: 400; font-size: 10px; color: var(--wb-orange); }
.hof-ladder li.on { background: var(--wb-orange); color: var(--wb-black); border-color: var(--wb-black) var(--wb-white) var(--wb-white) var(--wb-black); }
.hof-ladder li.on b { color: var(--wb-black); }
.hof-how { font-size: 17px; line-height: 1.25; }

@media (max-width: 480px) {
  #hof-win { font-size: 20px; }
  .hof-body { padding: 12px 10px 14px; }
  .hof-rank, .hof-stats b { font-size: 14px; }
  .hof-stats span { font-size: 14px; }
  .hof-head, .hof-row { grid-template-columns: 2em minmax(0, 1fr) auto; gap: 6px; }
  .hof-head { padding: 2px 6px; }
  .hof-row { padding: 6px; }
  .hof-tot { font-size: 12px; }
}

/* the account window's block (pay.js) */
.wb-fame .hof-me { margin: 0; }
.wb-fame .wb-row { margin-top: 10px; }

/* the title card's small Workbench key, under the two answers */
#game-gate .gg-fame { margin: 16px auto 0; }
#game-gate .gg-hof {
  display: inline-block;
  min-height: 38px;
  padding: 9px 14px 7px;
  border: 2px solid;
  border-color: #FFFFFF #000000 #000000 #FFFFFF;
  border-radius: 0;
  background: #0055AA;
  color: #FFFFFF;
  box-shadow: 0 0 0 2px #000000;
  font-family: var(--px-title);
  font-size: 11px;
  letter-spacing: 1px;
  line-height: 1.4;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
#game-gate .gg-hof:hover, #game-gate .gg-hof:focus-visible { outline: none; background: #FF8800; color: #000000; }
#game-gate .gg-hof:active { border-color: #000000 #FFFFFF #FFFFFF #000000; transform: translate(1px, 1px); }

/* the HUD's title chip under the user key (game.js mounts it: Hof.chip) — a sign, it takes no touch.
   It holds the slot under the two keys; while it shows, the goal box (game.css) steps down under it */
#game-rank {
  position: absolute;
  top: 164px;
  right: 20px;
  z-index: 20;
  max-width: 46vw;
  padding: 4px 8px 3px;
  background: rgba(3, 14, 9, 0.85);
  color: var(--px-amber);
  box-shadow: 0 0 0 2px var(--px-ink), 0 0 0 4px var(--px-green-dim);
  font-family: var(--px-ui);
  font-size: 15px;
  letter-spacing: 1px;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
  transition: opacity 0.15s steps(2);
}
#game-rank[hidden] { display: none; }
#game-screen.hof-ranked #game-goal { top: 200px; }
body.ui-quiet #game-rank { opacity: 0.16; transition: opacity 0.9s steps(4); }
@media (max-width: 760px), ((pointer: coarse) and (max-height: 560px)) {
  #game-rank { top: 96px; right: auto; left: 50%; transform: translateX(-50%); max-width: 78vw; font-size: 13px; padding: 3px 6px 2px; }
  #game-screen.hof-ranked #game-goal { top: 128px; }
}
