/* ---- Scroll cues (2026-10-31, Kiran: "people should know there is more below") ----
   paper/ink/brick theme. 1) page rail: slim teal thumb on the right edge whenever the page scrolls (Android hides
   its own overlay scrollbar); 2) "More below" pill on first view; 3) edge fades + arrows on the question-number strip;
   4) in the app, Module/Year/Count selects open a themed sheet whose list shows its own rail + fades. */
.kp-rail { position: fixed; right: 3px; top: 8px; bottom: 8px; width: 4px; border-radius: 4px; z-index: 60; pointer-events: none;
  background: rgba(19, 48, 47, .08); opacity: 0; transition: opacity .25s; }
.kp-rail.on { opacity: 1; }
.kp-rail i { position: absolute; left: 0; right: 0; border-radius: 4px; background: #17707a; min-height: 24px; }
.kp-more { position: fixed; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom)); transform: translate(-50%, 8px); z-index: 61;
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px 7px 12px; border-radius: 999px; border: 1px solid rgba(19,48,47,.18);
  background: #fffcf6; color: #13302f; font: 500 .74rem/1 'JetBrains Mono', ui-monospace, monospace; letter-spacing: .04em;
  box-shadow: 0 6px 18px rgba(19,48,47,.16); opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; }
.kp-more.on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.kp-more b { display: inline-block; color: #b8432a; font-size: .95rem; animation: kpBob 1.6s ease-in-out infinite; }
@keyframes kpBob { 50% { transform: translateY(3px); } }
/* horizontal strips (question numbers) */
.kp-hx { position: relative; }
.kp-hx > .qx-palette { -webkit-mask-image: none; mask-image: none; }
.kp-hx.r > .qx-palette { -webkit-mask-image: linear-gradient(90deg, #000 82%, transparent); mask-image: linear-gradient(90deg, #000 82%, transparent); }
.kp-hx.l > .qx-palette { -webkit-mask-image: linear-gradient(270deg, #000 82%, transparent); mask-image: linear-gradient(270deg, #000 82%, transparent); }
.kp-hx.l.r > .qx-palette { -webkit-mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent); mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent); }
.kp-hx .kp-ar { position: absolute; top: 50%; transform: translateY(-50%); width: 26px; height: 26px; border-radius: 50%; border: 1px solid rgba(19,48,47,.2);
  background: #fffcf6; color: #17707a; font: 700 15px/24px system-ui, sans-serif; text-align: center; padding: 0; display: none; z-index: 2; box-shadow: 0 2px 6px rgba(19,48,47,.15); }
.kp-hx.r .kp-ar.r { display: block; right: -4px; } .kp-hx.l .kp-ar.l { display: block; left: -4px; }
/* picker sheet (app) */
.kp-sheet { position: fixed; inset: 0; z-index: 1000; display: none; }
.kp-sheet.on { display: block; }
.kp-sheet .bg { position: absolute; inset: 0; background: rgba(19,48,47,.42); }
.kp-sheet .card { position: absolute; left: 0; right: 0; bottom: 0; max-height: 78dvh; display: flex; flex-direction: column; border-radius: 18px 18px 0 0;
  background: #fffcf6; color: #13302f; box-shadow: 0 -8px 30px rgba(0,0,0,.18); padding-bottom: env(safe-area-inset-bottom); animation: kpUp .22s ease-out; }
@keyframes kpUp { from { transform: translateY(24px); opacity: .6; } }
.kp-sheet .hd { padding: 14px 18px 10px; border-bottom: 1px dashed rgba(19,48,47,.2); display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.kp-sheet .hd h4 { margin: 0; font: 400 1.5rem/1.1 'Instrument Serif', Georgia, serif; }
.kp-sheet .hd span { font: 500 .7rem/1 'JetBrains Mono', ui-monospace, monospace; color: #b8432a; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.kp-sheet .wrap { position: relative; flex: 1; min-height: 0; display: flex; }
.kp-sheet .ls { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 6px 14px 10px 10px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.kp-sheet .ls::-webkit-scrollbar { display: none; }
.kp-sheet .wrap::before, .kp-sheet .wrap::after { content: ''; position: absolute; left: 0; right: 0; height: 34px; pointer-events: none; opacity: 0; transition: opacity .2s; z-index: 1; }
.kp-sheet .wrap::before { top: 0; background: linear-gradient(#fffcf6, rgba(255,252,246,0)); }
.kp-sheet .wrap::after { bottom: 0; background: linear-gradient(rgba(255,252,246,0), #fffcf6); }
.kp-sheet .wrap.t::before, .kp-sheet .wrap.b::after { opacity: 1; }
.kp-sheet .srail { position: absolute; right: 4px; top: 6px; bottom: 6px; width: 4px; border-radius: 4px; background: rgba(19,48,47,.08); }
.kp-sheet .srail i { position: absolute; left: 0; right: 0; border-radius: 4px; background: #17707a; min-height: 22px; }
.kp-sheet .hint { position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); z-index: 2; pointer-events: none;
  font: 500 .68rem/1 'JetBrains Mono', ui-monospace, monospace; color: #13302f; background: #fffcf6; border: 1px solid rgba(19,48,47,.18);
  padding: 5px 10px; border-radius: 999px; box-shadow: 0 3px 10px rgba(19,48,47,.12); transition: opacity .2s; }
.kp-sheet .hint b { color: #b8432a; }
.kp-sheet .wrap:not(.b) .hint { opacity: 0; }
.kp-sheet .op { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 10px 12px; border: 0;
  border-bottom: 1px solid rgba(19,48,47,.08); background: none; color: inherit; font: 400 1rem/1.3 -apple-system, 'Segoe UI', Roboto, sans-serif; text-align: left; border-radius: 10px; }
.kp-sheet .op small { font: 500 .78rem/1 'JetBrains Mono', ui-monospace, monospace; color: #4f5f5c; }
.kp-sheet .op.sel { background: rgba(23,112,122,.10); font-weight: 600; }
.kp-sheet .op.sel::after { content: '✓'; color: #17707a; font-weight: 700; margin-left: 6px; }
.kp-sheet .grp { margin: 10px 12px 2px; font: 500 .66rem/1 'JetBrains Mono', ui-monospace, monospace; letter-spacing: .08em; text-transform: uppercase; color: #b8432a; }
@media (prefers-color-scheme: dark) {
  .kp-more, .kp-hx .kp-ar { background: #1d2422; color: #eee9dd; border-color: rgba(238,233,221,.2); }
  .kp-rail { background: rgba(238,233,221,.1); } .kp-rail i, .kp-sheet .srail i { background: #4fc3cf; }
  .kp-sheet .card { background: #1d2422; color: #eee9dd; } .kp-sheet .op small { color: #b3b9b1; }
  .kp-sheet .wrap::before { background: linear-gradient(#1d2422, rgba(29,36,34,0)); } .kp-sheet .wrap::after { background: linear-gradient(rgba(29,36,34,0), #1d2422); }
  .kp-sheet .hint { background: #1d2422; color: #eee9dd; }
}
@media (prefers-reduced-motion: reduce) { .kp-more b, .kp-sheet .card { animation: none; } }
