/* Crossword: the grid on the left; the clues, or the clue being answered, on the right ---------- */
.xb { position: absolute; inset: 0; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: calc(20 * var(--u)); }
.xb-gridbox { position: relative; min-width: 0; min-height: 0; display: grid; place-items: center; }
.xb-grid { position: relative; display: grid; grid-template-columns: repeat(var(--w), var(--cs, 40px)); grid-template-rows: repeat(var(--h), var(--cs, 40px)); }
.xb-c { position: relative; margin: -1px; border: 2px solid var(--ink); border-radius: 0; background: var(--card); color: var(--ink); padding: 0; font: inherit; cursor: pointer;
  display: grid; place-items: center; transition: background .2s; }
.xb-c .n { position: absolute; left: 6%; top: 4%; font-size: calc(var(--cs, 40px) * .27); font-weight: 700; line-height: 1; color: var(--muted); }
.xb-c .l { font-family: var(--display); font-weight: 800; font-size: calc(var(--cs, 40px) * .6); line-height: 1; margin-top: 10%; text-transform: uppercase; }
.xb-c:hover { background: var(--web-soft); }
.xb-c.on, .xb-c.on:hover { background: var(--hi); color: #151935; }   /* the clue being answered */
.xb-c.on .n { color: #151935; }
.xb-c.got { background: color-mix(in srgb, var(--tc) 20%, var(--card)); }
.xb-c.got .l { color: var(--tc); }
[data-page="dark"] .xb-c.got .l { color: color-mix(in srgb, var(--tc) 55%, #fff); }
.xb-c.gone .l { color: var(--muted); }
.xb-input { position: absolute; width: var(--cs); height: var(--cs); padding: 0; opacity: 0; pointer-events: none; font-size: 16px; }
.xb-c.current { z-index: 1; box-shadow: inset 0 0 0 max(3px, calc(var(--cs) * .08)) #174a8a; }
.xb-c.wrong .l { color: #a31628; text-decoration: underline wavy; }
.xb-c.pop { animation: xb-pop .5s ease both; }
@keyframes xb-pop { 0% { transform: scale(.6); } 60% { transform: scale(1.14); } 100% { transform: scale(1); } }
.xb-side { position: relative; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.xb-lists { flex: 1; min-height: 0; overflow: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 0 calc(18 * var(--u)); align-content: start; font-size: var(--lf, 22px); }
.xb-col { min-width: 0; }
.xb-col h2 { margin: 0 0 .3em; font-family: var(--display); font-weight: 800; font-size: 1.1em; }
.xb-col h2::after { display: none; }
.xb-col ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .2em; }
.xb-clue { width: 100%; display: grid; grid-template-columns: 1.7em minmax(0, 1fr) auto; gap: .35em; align-items: baseline; text-align: left; font: inherit; line-height: 1.25;
  padding: .3em .45em; border-radius: .45em; border: 2px solid transparent; background: none; color: var(--ink); cursor: pointer; }
.xb-clue:hover { border-color: var(--ink); background: var(--card); }
.xb-clue .num { font-weight: 800; }
.xb-en { color: var(--muted); font-size: .8em; white-space: nowrap; font-weight: 400; }
.xb-val, .xb-by { font-family: var(--display); font-weight: 800; font-size: .85em; padding: 0 .45em; border-radius: 99px; background: var(--hi); color: #151935; }
.xb-by { background: var(--tc); color: #fff; }
.xb-by.none { background: var(--line); color: var(--muted); }
.xb-clue.done { cursor: default; color: var(--muted); }
.xb-clue.done:hover { border-color: transparent; background: none; }
.xb-ans { color: var(--tc, var(--muted)); font-weight: 800; text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; }
.xb-tip { flex: none; margin: .5em 0 0; color: var(--muted); font-size: calc(14 * var(--u)); }
.xb-open { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: calc(14 * var(--u)); padding: calc(18 * var(--u)) calc(20 * var(--u));
  border-radius: calc(22 * var(--u)); background: var(--card); border: calc(3 * var(--u)) solid var(--ink); box-shadow: 0 18px 50px rgba(21,25,53,.18); }
.xb-q { flex: 1 1 0; min-height: 0; overflow: hidden; display: flex; flex-direction: column; justify-content: center; gap: .3em; font-size: var(--lf, 40px); line-height: 1.25; font-weight: 700; }
.xb-q .xb-en { font-size: .7em; }
.xb-open .bg-mark { flex: none; }
.xb-open .bg-acts { margin-left: 0; }
@media (prefers-reduced-motion: reduce) { .xb-c.pop { animation: none; } }
@media (max-width: 680px) and (orientation: portrait) {
  .xb { grid-template-columns: 1fr; grid-template-rows: minmax(0,.9fr) minmax(0,1fr); }
  .xb-lists { font-size: max(13px,var(--lf)); }
  .xb-open { overflow: auto; }
  .xb-q { flex: 1 0 auto; }
}
