/* The glossary: a game on top (guess the word from the emojis), then every word in a grid with
   search and topic filters. Mobile first. Green and red only ever mean right or wrong. */
.gl-hero { padding-bottom: 24px; }
.gl-hero h1 { text-wrap: balance; }

/* the game on top */
.guess {
  max-width: 720px; margin: 0 auto 34px; padding: 22px 22px 24px; border-radius: 26px; background: var(--game, #E2559C);
  display: flex; flex-direction: column; gap: 16px; color: var(--ink);
}
.guess[hidden], .guess-after[hidden] { display: none; }
.guess-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.guess-label { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 14px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.guess-label img { width: 32px; height: 32px; border-radius: 9px; box-shadow: 0 0 0 2px var(--ink); }
.guess-score { margin: 0; font-family: var(--display); font-size: 26px; line-height: 1; }
.guess-score:empty { display: none; }
.guess-clue {
  margin: 0; padding: 22px 10px; border-radius: 20px; background: var(--white); text-align: center;
  font-size: clamp(60px, 18vw, 96px); line-height: 1.1; letter-spacing: .06em;
}
.guess-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pick {
  min-height: 70px; padding: 10px 12px; border: 2px solid var(--ink); border-radius: 18px; background: var(--white); color: var(--ink);
  font: 800 18px/1.15 var(--body); cursor: pointer; transition: transform .1s ease, opacity .2s ease, background-color .15s ease;
}
@media (hover: hover) { .pick:hover:not(:disabled) { transform: translateY(-2px); } }
.pick:active:not(:disabled) { transform: scale(.98); }
.pick:disabled { cursor: default; }
.pick.is-right { background: var(--right); border-color: var(--right-dark); }
.pick.is-wrong { background: var(--wrong); border-color: var(--wrong-dark); }
.pick.is-other { opacity: .5; }
.guess-after { display: flex; flex-direction: column; gap: 8px; padding: 18px; border-radius: 20px; background: var(--white); }
.guess-verdict { margin: 0; font-family: var(--display); font-size: 30px; line-height: 1.05; }
.guess.is-win .guess-verdict { color: var(--right-dark); }
.guess.is-loss .guess-verdict { color: var(--wrong-dark); }
.guess-meaning { margin: 0; font-size: 18px; line-height: 1.4; font-weight: 600; }
.guess-actions { display: flex; gap: 10px; margin-top: 6px; }
.guess-actions .btn { flex: 1 1 0; min-height: 54px; padding: 0 14px; font-size: 17px; }

/* every word: search and filters on top, then a grid of small cards */
.gl { max-width: 1160px; margin: 0 auto 44px; padding: 0 20px; }
.gl-tools { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
.gl-head { margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(30px, 4vw, 44px); line-height: 1; letter-spacing: .02em; text-transform: uppercase; }
.gl-tools input {
  width: 100%; max-width: 560px; min-height: 54px; border: 2px solid var(--line); border-radius: 999px; background: var(--white); color: var(--ink);
  font: 500 17px/1.2 var(--body); padding: 0 22px;
}
.gl-tools input:focus { outline: none; border-color: var(--ink); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; border: 2px solid var(--line); background: var(--white); color: var(--ink); border-radius: 999px; padding: 9px 14px;
  font: 700 15px/1 var(--body); cursor: pointer; white-space: nowrap;
}
.chip b { font-weight: 800; color: var(--muted); margin-left: 3px; }
.chip.is-on { background: var(--ink); border-color: var(--ink); color: var(--white); }
.chip.is-on b { color: #A3AAB5; }
@media (hover: hover) { .chip:not(.is-on):hover { border-color: var(--ink); } }
.gl-count { margin: 0; font-size: 14px; font-weight: 700; color: var(--muted); }
.gl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.gl-term {
  border: 2px solid var(--line); border-radius: 18px; padding: 16px 18px; display: flex; flex-direction: column; gap: 6px;
  background: var(--white); scroll-margin-top: 16px;
}
.gl-term[hidden], .gl-none[hidden] { display: none; }
.gl-term:target { border-color: var(--ink); box-shadow: 0 0 0 4px var(--mark); }
.gl-cat { margin: 0; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.gl-term h3 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 27px; line-height: 1.05; letter-spacing: .01em; }
.gl-meaning { margin: 0; font-size: 16px; line-height: 1.4; font-weight: 600; }
.gl-term details { margin-top: 2px; }
.gl-term summary { cursor: pointer; font-size: 14px; font-weight: 800; color: var(--muted); list-style: none; display: inline-flex; align-items: center; gap: 6px; }
.gl-term summary::-webkit-details-marker { display: none; }
.gl-term summary::after { content: "+"; font-size: 17px; line-height: 1; }
.gl-term details[open] summary::after { content: "–"; }
.gl-term details[open] summary { color: var(--ink); margin-bottom: 6px; }
.gl-aka { margin: 0 0 6px; font-size: 14px; color: var(--muted); font-weight: 600; }
.gl-line { margin: 0 0 6px; font-size: 15px; line-height: 1.45; color: #3A3F47; }
.gl-line b { color: var(--ink); }
.gl-none { margin: 30px 0; font-size: 18px; text-align: center; color: var(--muted); }
.gl-none a { color: var(--ink); font-weight: 700; }

@media (max-width: 640px) {
  .guess { margin: 0 16px 28px; padding: 18px 16px 18px; border-radius: 22px; }
  .gl { padding: 0 16px; }
  .gl-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .gl-term { padding: 14px 16px; }
  .gl-term h3 { font-size: 25px; }
}
.gl-hero h1 { font-size: clamp(34px, 6.4vw, 68px); }
