.qp-heading{max-width:820px}.qp-heading h1{margin:18px 0 24px}.qp-heading em{font-weight:normal;color:#9a572c}.qp-note{font-size:14px;color:#566660}.qp-filters{display:flex;flex-wrap:wrap;gap:20px;margin:28px 0}.qp-filters label{margin:0;font-size:14px;font-weight:600}.qp-filters select{display:block;margin:6px 0;min-width:145px}.qp-card{display:flex;flex-direction:column}.qp-card .button{margin-top:auto;align-self:start}.qp-art{display:grid;grid-template-columns:repeat(4,1fr);gap:4px;align-self:start;background:#f3e7ca;padding:12px;border-radius:12px;margin-bottom:12px;width:148px;height:148px}.qp-art span{display:grid;place-items:center;background:#fffaf0;border-radius:4px;font-size:18px}.qp-card h2{margin:12px 0}.qp-link{background:transparent!important;color:var(--ink)!important;padding-left:0;text-decoration:underline}.qp-play-layout{display:grid;grid-template-columns:minmax(0,540px) minmax(200px,1fr);gap:40px;align-items:start}#qp-board{display:grid;grid-template-columns:repeat(var(--n),minmax(0,1fr));border:3px solid #193b42;border-radius:5px;overflow:hidden;touch-action:manipulation;background:#193b42;gap:1px;max-width:540px}#qp-board button{border:0;border-radius:0;aspect-ratio:1;padding:0;font-size:clamp(16px,3vw,24px);background:white;color:#2a6468;min-width:0;line-height:1;position:relative}#qp-board button.given{background:#eee8d8;font-weight:800;color:#193b42}#qp-board button.chosen{background:#efd395;box-shadow:inset 0 0 0 3px #a76722}#qp-board button.found{background:#cde3d6;color:#183f33}#qp-board button.start{background:#f2ca77}#qp-board button.hinted:after{content:'•';position:absolute;bottom:1px;right:4px;font-size:12px;color:#955017}#qp-board button.box-right{border-right:2px solid #193b42}#qp-board button.box-bottom{border-bottom:2px solid #193b42}#qp-keypad{display:flex;flex-wrap:wrap;gap:6px;margin:18px 0}#qp-keypad button{min-width:40px;padding:10px}#qp-words{display:flex;flex-wrap:wrap;gap:8px}#qp-words button{background:#f0e6ce;color:#193b42;padding:7px 12px;font-size:15px}#qp-words button.done{text-decoration:line-through;background:#cde3d6}#qp-words button.target{outline:2px solid #a76722}.qp-actions{display:flex;flex-direction:column;align-items:start;gap:12px}#qp-message{min-height:3em;font-weight:600}#qp-title{font-size:42px;margin:12px 0}#qp-player{scroll-margin-top:20px}button:focus-visible{z-index:1;outline-offset:-3px}#qp-player[hidden],#qp-library[hidden],#qp-keypad[hidden]{display:none}@media(max-width:700px){.qp-play-layout{grid-template-columns:1fr;gap:12px}.qp-filters{gap:10px}.qp-filters select{min-width:120px}#qp-board{max-width:100%}#qp-title{font-size:34px}#qp-board button{font-size:clamp(14px,4.5vw,24px)}}
/* Dark mystery dossier palette, while the game board remains high contrast. */
.qp-heading em{color:var(--coral)}.qp-note,.cw-note{color:var(--muted)}
#qp-board.qp-choice-board{display:block;background:#1b344b;border:1px solid var(--line);padding:20px;border-radius:16px;max-width:620px}#qp-board.qp-choice-board fieldset{border:0;border-top:1px solid var(--line);padding:14px 0;margin:0}#qp-board.qp-choice-board fieldset:first-child{border-top:0}#qp-board.qp-choice-board legend{font-weight:800;padding-top:8px}#qp-board .qp-choice{display:block;background:#29465c;border-radius:10px;padding:10px 12px;margin:9px 0;cursor:pointer}#qp-board .qp-choice input{width:auto;display:inline;margin:0 10px 0 0;accent-color:var(--mint)}#qp-board .qp-evidence{white-space:pre-line;background:#10263b;border-left:4px solid var(--mint);padding:16px;border-radius:7px;color:var(--ink)}
/* Lock and symbol rounds use native selects for keyboard and touch access. */
#qp-board .qp-code-clues,#qp-board .qp-code-history{padding-left:24px;line-height:1.6}
#qp-board .qp-code-clues li,#qp-board .qp-code-history li{margin:7px 0}
#qp-board .qp-code-slots{display:flex;flex-wrap:wrap;gap:12px;margin:20px 0}
#qp-board .qp-code-slots label{display:flex;flex-direction:column;gap:6px;min-width:86px;font-weight:700}
#qp-board .qp-code-slots select{width:100%;min-height:44px;background:#fff;color:#163047;border:2px solid #4b7486;border-radius:8px;padding:8px;font-size:18px}
#qp-board .qp-code-slots select:focus-visible{outline:3px solid var(--mint);outline-offset:2px}

/* Codebreaker attempt ladder; kept in sync with the public playtest. */
.qp-code-ladder{max-width:690px;margin:23px 0;padding:18px clamp(12px,3vw,24px);background:linear-gradient(160deg,#193851,#11283e);border:1px solid #7191a1;border-radius:18px}.qp-code-ladder h3{margin:0 0 8px}.qp-code-legend{display:flex;align-items:center;gap:7px;flex-wrap:wrap;font-size:14px;line-height:1.35;margin-bottom:20px}.qp-code-legend .misplaced{margin-left:14px}.qp-code-track{position:relative;display:grid;gap:10px}.qp-code-track:before{content:"";position:absolute;left:21px;top:20px;bottom:20px;width:3px;background:linear-gradient(var(--coral),var(--mint));border-radius:4px}.qp-code-rung{position:relative;display:grid;grid-template-columns:44px minmax(0,1fr);gap:12px;align-items:center;background:#24455e;border:1px solid #66889d;border-radius:12px;padding:11px 12px 11px 5px}.qp-code-rung.active{border-color:var(--coral);background:#2b4960}.qp-code-rung.solved{border-color:var(--mint)}.qp-code-step{position:relative;z-index:1;display:grid;place-items:center;width:42px;height:42px;border-radius:50%;background:#122a40;color:var(--ink);border:2px solid var(--gold);font-size:14px;font-weight:850}.qp-code-rung.active .qp-code-step{background:var(--coral);border-color:var(--coral);color:#14263b}.qp-code-rung-body{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}.qp-code-tiles{display:flex;gap:6px;flex-wrap:wrap}.qp-code-tile{display:grid;place-items:center;width:clamp(36px,7vw,44px);height:44px;background:#e4c47a;color:#14273d;border:2px solid #fff9ed;border-radius:10px;box-shadow:0 3px 0 #0a1e30;font-weight:900;font-size:19px}.qp-code-tile.symbol-a{background:#fca48c}.qp-code-tile.symbol-b{background:#f3d17c}.qp-code-tile.symbol-c{background:#8fe3d1}.qp-code-tile.symbol-d{background:#a7bbf4}.qp-code-tile.symbol-e{background:#d6a8ee}.qp-code-tile.symbol-f{background:#e7f0a1}.qp-code-score{display:grid;gap:4px;min-width:106px}.qp-code-marks{display:flex;gap:5px;min-height:15px;align-items:center;flex-wrap:wrap}.qp-code-peg{display:inline-block;flex:none;width:14px;height:14px;border:2px solid var(--gold);border-radius:50%}.qp-code-peg.exact{background:var(--mint);border-color:var(--mint)}.qp-code-peg.misplaced{background:transparent;border-color:var(--gold)}.qp-code-score small{font-size:12px;color:var(--ink)}.qp-code-rung .qp-code-slots{margin:5px 0 0;gap:7px}.qp-code-rung .qp-code-slots label{min-width:60px;flex:1 1 65px;font-size:13px}.qp-code-rung .qp-code-slots select{margin:3px 0 0;min-height:44px;font-size:16px;padding:6px}.qp-code-remaining{margin:13px 0 0;font-size:14px}
@media(max-width:480px){.qp-code-rung{grid-template-columns:38px minmax(0,1fr);gap:7px;padding-right:8px}.qp-code-track:before{left:19px}.qp-code-step{width:38px;height:38px}.qp-code-rung-body{align-items:flex-start}.qp-code-tiles{gap:4px}.qp-code-tile{width:36px;height:39px}.qp-code-score{min-width:0}.qp-code-rung .qp-code-slots label{min-width:55px;flex-basis:55px}}

/* Each catalogue card displays its own board or clue. */
.qp-heading{max-width:none;display:grid;grid-template-columns:minmax(0,1.4fr) minmax(290px,.8fr);gap:38px;align-items:center;margin:18px 0 32px}.qp-heading h1{font-size:clamp(2.5rem,5vw,4.7rem);line-height:1.06}.qp-hero-art{transform:rotate(3deg);border:1px solid #78a9b2;border-radius:26px;background:linear-gradient(135deg,#194153,#34587c 55%,#513960);box-shadow:16px 18px 0 #071d32,0 30px 50px #0005;padding:18px;max-width:430px;width:100%;justify-self:center}.qp-hero-cap,.qp-hero-foot{font-size:12px;letter-spacing:.15em;font-weight:850;color:#f9dcaa}.qp-hero-cap{display:flex;justify-content:space-between}.qp-hero-cap span{font-size:24px;line-height:1}.qp-hero-tiles{display:grid;grid-template-columns:repeat(3,1fr);gap:9px;margin:23px auto;max-width:265px}.qp-hero-tiles span{display:grid;place-items:center;aspect-ratio:1;background:#fff8e9;color:#213b54;border-radius:15px;box-shadow:0 6px 0 #10253b;font-size:clamp(26px,4vw,42px);font-weight:900}.qp-hero-tiles span:nth-child(2),.qp-hero-tiles span:nth-child(6){background:var(--coral)}.qp-hero-tiles span:nth-child(3),.qp-hero-tiles span:nth-child(7){background:var(--mint)}.qp-hero-foot{text-align:right}.qp-card{overflow:hidden;min-height:350px;transition:transform .16s,border-color .16s}.qp-card:hover{transform:translateY(-4px);border-color:var(--gold)}.qp-card .puzzle-preview{margin:-20px -20px 15px}.qp-card h2{margin:8px 0}.qp-card .eyebrow{margin:3px 0}
.puzzle-preview{--preview-accent:#8fe3d1;min-height:168px;position:relative;overflow:hidden;display:flex;justify-content:center;align-items:center;flex-direction:column;gap:12px;margin:0 -18px;padding:34px 16px 14px;background:radial-gradient(circle at 85% 5%,#ffffff30,transparent 32%),linear-gradient(135deg,#254e64,#15334e);border-bottom:1px solid #7296a6}.preview-sudoku{--preview-accent:#f3d17c;background:linear-gradient(140deg,#805444,#3e4464)}.preview-wordsearch{--preview-accent:#9eefd8;background:linear-gradient(140deg,#145d66,#244660)}.preview-crossword{--preview-accent:#d9b2f2;background:linear-gradient(140deg,#664d77,#343d60)}.preview-safecracker{--preview-accent:#ffd17b;background:linear-gradient(140deg,#83523e,#43384b)}.preview-codebreaker{--preview-accent:#ff9d82;background:linear-gradient(140deg,#754460,#354366)}.preview-quiz{--preview-accent:#ffce8e;background:linear-gradient(140deg,#375b78,#69486a)}.preview-logic{--preview-accent:#a6ddf1;background:linear-gradient(140deg,#2f5562,#394b75)}.preview-tag{position:absolute;top:11px;left:14px;color:var(--preview-accent);font-size:10px;letter-spacing:.13em;text-transform:uppercase;font-weight:900}.preview-grid{display:grid;grid-template-columns:repeat(var(--preview-n),1fr);gap:2px;width:138px;max-width:100%;transform:rotate(-5deg);box-shadow:7px 9px 0 #071d3066}.preview-cell{display:grid;place-items:center;aspect-ratio:1;background:#fff8ec;color:#22465a;font-weight:850;font-size:14px;border-radius:2px;line-height:1}.preview-cell:nth-child(3n){background:#d4ece3}.preview-cell.blocked{background:#152538}.preview-dials{display:flex;gap:6px;transform:rotate(-4deg)}.preview-dials span{display:grid;place-items:center;width:clamp(37px,4vw,49px);height:59px;border:3px solid #fff8ea;border-radius:10px;background:var(--preview-accent);color:#253b51;font-size:29px;font-weight:900;box-shadow:0 6px 0 #14283d}.puzzle-preview>small{max-width:240px;text-align:center;color:#fff5e2;font-weight:700;line-height:1.25}.preview-note{width:94%;max-width:260px;padding:12px 15px;background:#fff8e9;border-radius:11px;box-shadow:7px 8px 0 #122b4190;transform:rotate(-3deg);color:#20374e;min-height:96px}.preview-note small{display:block;color:#98534f;font-size:10px;letter-spacing:.15em;font-weight:900;margin-bottom:5px}.preview-note strong{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;line-height:1.25;font-size:15px}.preview-note span{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#58677a;font-size:12px;margin-top:8px}
@media(max-width:760px){.qp-heading{grid-template-columns:1fr;gap:25px}.qp-hero-art{max-width:310px;justify-self:start;transform:rotate(2deg);box-shadow:9px 11px 0 #071d32}.qp-hero-tiles{max-width:180px;margin:15px auto}.qp-hero-tiles span{border-radius:9px}}@media(prefers-reduced-motion:reduce){.qp-card{transition:none}.qp-card:hover{transform:none}}

/* caper-clear-sudoku-boxes-v1 */
#qp-board button.box-right{border-right:4px solid #193b42}
#qp-board button.box-bottom{border-bottom:4px solid #193b42}

/* caper-wordsearch-readable-v21 */
#qp-board button[data-cell] {
    background-color: #fffaf0 !important;
    color: #193b42 !important;
}
