/* The question chooser. Flat, not a 3D panel: picking one of ninety-nine is
   reading and scanning, which a screen does well and a headset does badly.
   Matched to the environment's own palette -- gold on near-black, mono for
   labels, serif for the questions themselves. */

#qpick {
  position: fixed; inset: 0; z-index: 9000;
  display: none; place-items: center;
  background: rgba(6, 6, 10, .82);
  backdrop-filter: blur(12px);
  font-family: "JetBrains Mono", ui-monospace, monospace;
}
#qpick.on { display: grid; }

.qpick-panel {
  width: min(94vw, 60rem); max-height: 84vh;
  display: flex; flex-direction: column;
  background: #0b0b12;
  border: 1px solid rgba(212, 175, 55, .22);
  box-shadow: 0 40px 120px rgba(0, 0, 0, .8);
}

.qpick-head {
  display: flex; align-items: center; gap: 1rem;
  padding: 1.1rem 1.3rem .9rem;
  border-bottom: 1px solid rgba(212, 175, 55, .14);
}
.qpick-title {
  font-size: .82rem; letter-spacing: .26em; text-transform: uppercase;
  color: #d4af37; white-space: nowrap;
}
#qpick-search {
  flex: 1; min-width: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.15rem; color: #f5f0e8;
  background: none; border: none;
  border-bottom: 1px solid rgba(212, 175, 55, .25);
  padding: .35em 0; outline: none;
}
#qpick-search::placeholder { color: #8f7434; }
#qpick-search:focus { border-bottom-color: #d4af37; }
#qpick-close {
  background: none; border: none; color: #8f7434;
  font-size: 1.6rem; line-height: 1; cursor: pointer;
  padding: 0 .3rem; min-height: 2.4rem;
}
#qpick-close:hover { color: #f5f0e8; }

.qpick-modes { display: flex; gap: .5rem; padding: .8rem 1.3rem; }
.qpick-modes button {
  font-family: inherit; font-size: .76rem;
  letter-spacing: .14em; text-transform: uppercase;
  background: none; border: 1px solid rgba(212, 175, 55, .2);
  color: #a49c8c; padding: .6em 1em; cursor: pointer; min-height: 2.5rem;
  transition: color .25s, border-color .25s, background .25s;
}
.qpick-modes button:hover { color: #f5f0e8; border-color: rgba(212, 175, 55, .45); }
.qpick-modes button.on { color: #06060a; background: #d4af37; border-color: #d4af37; }

#qpick-list {
  list-style: none; margin: 0; padding: 0 .5rem 1rem;
  overflow-y: auto; flex: 1;
  scrollbar-width: thin; scrollbar-color: #8f7434 transparent;
}

/* A theme heading inside the grouped view. Not selectable, not a question. */
.qpick-theme {
  padding: 1.4em .8rem .5em;
  font-size: .74rem; letter-spacing: .24em; text-transform: uppercase;
  border-bottom: 1px solid rgba(212, 175, 55, .1);
}

.qpick-q {
  display: grid; grid-template-columns: 3.2rem 1fr auto;
  gap: 1rem; align-items: baseline;
  padding: .75em .8rem; cursor: pointer;
  border-left: 2px solid transparent;
}
.qpick-q:hover { background: rgba(212, 175, 55, .07); border-left-color: rgba(212, 175, 55, .5); }
.qpick-q.on { background: rgba(212, 175, 55, .12); border-left-color: #d4af37; }
.qpick-q.loading { opacity: .5; cursor: progress; }
.qpick-q.failed { border-left-color: #c25555; }

.qpick-n { font-size: .78rem; color: #8f7434; letter-spacing: .08em; }
.qpick-t {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.12rem; line-height: 1.34; color: #f5f0e8;
}
/* How many people answered it. The number is the reason to pick one question
   over another -- a table of 196 is a different room than a table of 12. */
.qpick-v { font-size: .74rem; letter-spacing: .1em; white-space: nowrap; }

.qpick-empty { padding: 2rem .8rem; color: #8f7434; text-align: center; }

.qpick-foot {
  margin: 0; padding: .9rem 1.3rem;
  border-top: 1px solid rgba(212, 175, 55, .12);
  font-size: .72rem; letter-spacing: .14em; text-transform: uppercase;
  color: #8f7434;
}
.qpick-foot b { color: #d4af37; font-weight: 400; }

@media (max-width: 860px) {
  .qpick-panel { width: 100vw; max-height: 92vh; }
  .qpick-head { flex-wrap: wrap; }
  .qpick-title { width: 100%; }
  .qpick-q { grid-template-columns: 2.6rem 1fr; }
  .qpick-v { grid-column: 2; }

  /* Held at reading distance in a hand rather than read across a room, so the
     floor the rest of this work keeps applies here too: the question itself at
     17px, nothing meaningful under 15. The mono labels were 11.5px, which is a
     size you can see is there and cannot read. Letter-spacing comes down
     instead, which buys the width back without costing legibility. */
  .qpick-t     { font-size: 1.0625rem; }          /* 17px */
  .qpick-n     { font-size: .95rem; letter-spacing: .05em; }
  .qpick-v     { font-size: .95rem; letter-spacing: .06em; }
  .qpick-theme { font-size: .95rem; letter-spacing: .16em; }
  .qpick-title { font-size: .95rem; letter-spacing: .18em; }
  .qpick-foot  { font-size: .9rem;  letter-spacing: .08em; }
  .qpick-modes button { font-size: .9rem; letter-spacing: .08em; }
  .qpick-empty { font-size: 1rem; }
}
