
.hall,
#hall-board-modal {
  --hall-parchment: #f0e4c8;
  --hall-parchment-dim: #d9c9a6;
  --hall-muted: #a8977a;
  --hall-rim: #6b4a2a;
  --hall-shadow: #1a110a;
  --hall-trim: #d8b24a;
  --hall-medal-gold: #e0b03a;
  --hall-medal-silver: #b9bfc9;
  --hall-medal-bronze: #b0783c;
  --hall-you: #8b7cc9;
  --month-accent: #c28f52;
  --month-accent-2: #d8b24a;
}
.hall {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.hall__stage { touch-action: pan-x pan-y; }
.hall__board[hidden] { display: none; }
.hall__board--compact .lb__title { height: calc(var(--u) * 16); font-size: 1em; }
.hall__board--compact .lb__row:nth-child(n + 4) { display: none; }
.hall__board--compact .lb__list { flex: none; height: calc(var(--u) * 54); }
.hall__board--compact .lb__you { display: none; }
.lb__empty {
  flex: 1;
  display: grid;
  place-content: center;
  gap: 0.5em;
  padding: 0 1em;
  text-align: center;
  color: var(--hall-parchment-dim);
}
.lb__empty small { font-size: 0.8em; color: var(--hall-muted); }
.hall__preview {
  position: absolute;
  z-index: 3;
  top: 0.6rem;
  right: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.45rem 0.3rem 0.6rem;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--hall-parchment-dim);
  background: rgb(14 9 5 / 88%);
  border: 1px dashed var(--hall-you);
  border-radius: 0.4rem;
  box-shadow: 0 4px 14px rgb(0 0 0 / 40%);
}
.hall__preview select {
  min-height: 2rem;
  padding: 0.15rem 0.4rem;
  font: inherit;
  text-transform: none;
  letter-spacing: 0;
  color: var(--hall-parchment);
  background: #1e140c;
  border: 1px solid #5a4630;
  border-radius: 0.3rem;
}
.hall__preview select:focus-visible { outline: 2px solid var(--hall-you); outline-offset: 1px; }
.hall__stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  background: #120a06;
}
.hall__scroller {
  position: absolute;
  inset: 0;
  overflow: hidden;
  scrollbar-width: none;
  overscroll-behavior: contain;
}
.hall__scroller::-webkit-scrollbar { display: none; }
.hall__scroller--pan-x { overflow-x: auto; }
.hall__canvas {
  display: block;
  max-width: none;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}
/* Real, focusable button laid exactly over the painted Leaderboard. */
.hall__board-hit {
  position: absolute;
  z-index: 2;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  border-radius: 2px;
}
.hall__board-hit:focus-visible { outline: 3px solid #ffd36a; outline-offset: 2px; }
/* Nav floats over the scene, top-left, exactly like the village. */
.hall__hud {
  position: absolute;
  z-index: 3;
  top: 0.6rem;
  left: 0.6rem;
  display: grid;
}
.hall__title, .hall__subtitle {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.hall__board {
  position: absolute;
  z-index: 1;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  padding: 0 calc(var(--u) * 1.5);
  color: var(--hall-parchment);
  font-size: calc(var(--u) * var(--fs, 4.5));
  line-height: 1;
  pointer-events: none;
}
.lb__title {
  flex: none;
  height: calc(var(--u) * 11);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3em;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #ffe08a;
  text-shadow: 0 1px 0 #000;
  border-bottom: max(1px, calc(var(--u) * 0.5)) solid color-mix(in srgb, var(--month-accent) 70%, #3a281a);
}
.lb__list {
  flex: none;
  min-height: 0;
  margin: 0;
  padding: calc(var(--u) * 0.8) 0 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: calc(var(--u) * 0.35);
}
.lb__row {
  flex: none;
  min-height: calc(var(--u) * 4.5);
  display: grid;
  grid-template-columns: 1.7em 1.8em minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.55em;
  padding: 0 0.6em 0 0.2em;
}
.lb__row:nth-child(even) { background: rgb(255 255 255 / 5%); }
.lb__rank { text-align: center; font-weight: 800; color: #c4a06a; }
.lb__row--1 .lb__rank { color: var(--hall-medal-gold); }
.lb__row--2 .lb__rank { color: var(--hall-medal-silver); }
.lb__row--3 .lb__rank { color: var(--hall-medal-bronze); }
.lb__head { width: 1.8em; height: 1.8em; image-rendering: pixelated; }
.lb__name { font-weight: 700; color: #f4ead6; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb__you { padding: 0.18em 0.45em; font-size: 0.78em; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: #120c20; background: var(--hall-you); border-radius: 0.2em; }
.lb__lv { font-weight: 700; color: #c4a06a; font-variant-numeric: tabular-nums; }
.lb__row--you { background: color-mix(in srgb, var(--hall-you) 34%, transparent); box-shadow: inset 0.3em 0 0 var(--hall-you); }
.lb__row--private {
  opacity: 0.72;
  background: rgb(36 24 15 / 45%);
  box-shadow: none;
}
.lb__row--private .lb__name,
.lb__row--private .lb__lv { color: rgb(244 234 214 / 72%); font-style: italic; }
.lb__row--empty {
  opacity: 0.42;
}
.lb__row--empty .lb__name {
  color: var(--hall-parchment-dim, #8a7a62);
}
.hall__tip {
  position: absolute;
  z-index: 4;
  max-width: 15rem;
  padding: 0.25rem 0.55rem;
  border-radius: 0.3rem;
  font-size: 0.75rem;
  line-height: 1.25;
  white-space: nowrap;
  color: #f4ead6;
  background: rgba(10, 8, 6, 0.9);
  border: 1px solid rgba(196, 122, 42, 0.55);
  pointer-events: none;
  transform: translate(-50%, -130%);
}
.hall__tip[hidden] { display: none; }
.hall__tip small { display: block; color: var(--hall-muted); font-size: 0.65rem; }
.hall__hint {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 0.7rem;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  padding: 0.32rem 0.8rem 0.32rem 0.55rem;
  font-size: 0.75rem;
  color: var(--hall-parchment);
  white-space: nowrap;
  background: rgba(14, 9, 5, 0.88);
  border: 1px solid color-mix(in srgb, var(--month-accent) 55%, #2a1c10);
  border-radius: 999px;
  box-shadow: 0 4px 14px rgb(0 0 0 / 40%);
}
.hall__hint[hidden] { display: none; }
.hall__hint-icon {
  width: 1.15rem;
  height: 1.15rem;
  display: grid;
  place-items: center;
  color: #1a1008;
  background: var(--hall-medal-gold);
  border-radius: 50%;
}
.hall__hint-touch { display: none; }
.hall__links {
  position: absolute;
  z-index: 3;
  left: 0.6rem;
  bottom: 0.6rem;
  display: flex;
  gap: 0.4rem;
}
.hall__links a:not(:focus-visible) {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.hall__links a:focus-visible {
  padding: 0.25rem 0.6rem;
  border-radius: 0.3rem;
  font-size: 0.8rem;
  color: #f4ead6;
  background: rgba(10, 8, 6, 0.9);
  border: 1px solid rgba(196, 122, 42, 0.7);
}
.hall__sr {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---- full leaderboard (site dialog.modal, wood-bar head) ---- */
.modal--hall-board .modal__panel { width: min(40rem, calc(100vw - 1.5rem)); }
.modal--hall-board .modal__body { padding: 0.6rem 0.8rem 0; color: var(--hall-parchment); }
.hall-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.hall-list__row > a,
.hall-list__row > div {
  display: grid;
  grid-template-columns: 1.8rem 2.4rem minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.6rem;
  min-height: 2.8rem;
  padding: 0.25rem 0.6rem 0.25rem 0.45rem;
  color: inherit;
  text-decoration: none;
  background: #24180f;
  border: 1px solid #3c2a1a;
  border-bottom: 3px solid var(--hall-shadow);
  border-radius: 3px;
}
.hall-list__row > a:hover { background: #2c1e13; }
.hall-list__row > a:focus-visible { outline: 2px solid #ffd36a; outline-offset: 1px; }
.hall-list__rank {
  width: 1.65rem;
  height: 1.65rem;
  display: grid;
  place-items: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--hall-parchment-dim);
  background: #1a120b;
  border: 2px solid #4a3622;
  border-radius: 50%;
}
.hall-list__row--1 .hall-list__rank { color: #1a1008; background: var(--hall-medal-gold); border-color: var(--hall-shadow); }
.hall-list__row--2 .hall-list__rank { color: #1a1008; background: var(--hall-medal-silver); border-color: var(--hall-shadow); }
.hall-list__row--3 .hall-list__rank { color: #1a1008; background: var(--hall-medal-bronze); border-color: var(--hall-shadow); }
.hall-list__portrait {
  width: 2.4rem;
  height: 2.4rem;
  box-sizing: border-box;
  image-rendering: pixelated;
  background: #3a2a1a;
  border: 2px solid #b08a3a;
  box-shadow: 0 0 0 1px var(--hall-shadow);
}
.hall-list__who { min-width: 0; display: grid; }
.hall-list__name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hall-list__bird { font-size: 0.72rem; color: var(--hall-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hall-list__stat { font-size: 0.7rem; color: var(--hall-parchment-dim); text-align: right; white-space: nowrap; }
.hall-list__stat b { display: block; font-size: 0.95rem; color: var(--hall-parchment); }
.hall-list__row--you > a,
.hall-list__row--you > div {
  background: color-mix(in srgb, var(--hall-you) 16%, #24180f);
  border-color: var(--hall-you);
  box-shadow: inset 4px 0 0 var(--hall-you);
}
.hall-list__row--private > div {
  opacity: 0.72;
  background: rgb(36 24 15 / 45%);
  border-color: #3c2a1a;
  box-shadow: none;
}
.hall-list__row--private .hall-list__name,
.hall-list__row--private .hall-list__bird { color: rgb(244 234 214 / 70%); font-style: italic; }
.hall-list__portrait--empty { background: rgb(58 42 26 / 45%); border-color: rgb(176 138 58 / 45%); }
.hall-you-tag {
  margin-left: 0.35rem;
  padding: 0 0.3rem;
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #120c20;
  background: var(--hall-you);
  border-radius: 2px;
  vertical-align: 0.1rem;
}
.hall-list__empty { margin: 1rem 0; text-align: center; color: var(--hall-parchment-dim); }
.hall-list__note { margin: 0.7rem 0 0.6rem; font-size: 0.72rem; color: var(--hall-muted); text-align: center; }
.hall-list__you {
  position: sticky;
  bottom: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.3rem 0.6rem;
  margin: 0 -0.8rem;
  padding: 0.55rem 1rem;
  font-size: 0.82rem;
  background: color-mix(in srgb, var(--hall-you) 22%, #1e140c);
  border-top: 2px solid var(--hall-you);
}
.hall-list__you b { color: #fff; }
.hall-list__row--you { scroll-margin: 1rem 0 4.5rem; }

/* ---- phone ---- */
@media (max-width: 45rem) {
  .hall__hud {
    top: auto;
    left: 50%;
    bottom: 0.45rem;
    transform: translateX(-50%);
  }
  .hall__hud .community__tabs { flex-wrap: nowrap; gap: 0.35rem; }
  .hall__hud .btn { min-height: 2.25rem; font-size: 0.82rem; }
  .hall__tip { display: none; }
  .hall__hint { bottom: 4.1rem; font-size: 0.7rem; padding: 0.22rem 0.65rem 0.22rem 0.4rem; }
  .hall__hint-click { display: none; }
  .hall__hint-touch { display: inline; }
  .hall__preview { top: auto; bottom: 7rem; right: 0.5rem; }
  .modal--hall-board .modal__body { padding: 0.5rem 0.6rem 0; }
  .hall-list__row > a,
  .hall-list__row > div { grid-template-columns: 1.6rem 2.2rem minmax(0, 1fr) auto; gap: 0.45rem; }
  .hall-list__stat--streak { display: none; }
  .hall-list__portrait { width: 2.2rem; height: 2.2rem; }
  .hall-list__you { margin: 0 -0.6rem; }
}
/* Short windows (phone on its side): keep the tabs top-left and slim. */
@media (max-height: 32.5rem) and (min-width: 45rem) {
  .hall__hud .btn { min-height: 1.9rem; }
  .hall__hint { display: none; }
}
