:root{font-family:"Microsoft YaHei","PingFang SC",Arial,sans-serif;color:#344451;background:#f5f7f8;font-size:16px;line-height:1.65;color-scheme:light}*{box-sizing:border-box}body{margin:0}main{max-width:980px;margin:0 auto;padding:30px 24px 18px}h1{font-size:29px;margin:0}h2{font-size:20px;margin:0 0 12px}p{margin:10px 0}header{text-align:center;margin-bottom:28px}header p,.muted{color:#75828a;font-size:13px}button,input,select{font:inherit}button{border:1px solid transparent;background:#5c92c7;color:white;border-radius:4px;padding:9px 18px;cursor:pointer;min-height:42px;touch-action:manipulation}button:hover{background:#467eb5}button:disabled{cursor:default;opacity:.45}.secondary{background:#fff;color:#526777;border-color:#ccd7df}.secondary:hover{background:#eaf0f5}.small{font-size:13px;min-height:32px;padding:4px 10px}input:not([type=checkbox]),select{min-width:0;border:1px solid #cbd5dd;background:#fff;color:#344451;border-radius:4px;padding:9px 10px}input[type=checkbox]{accent-color:#5c92c7}button:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible,a:focus-visible{outline:3px solid #86b4de;outline-offset:2px}[hidden]{display:none!important}.panel{background:#fff;border:1px solid #dce3e8;border-radius:5px;padding:24px}.seed-row,.input-row{display:flex;align-items:center;gap:10px}.seed-row{margin-top:22px}.seed-row input,.input-row input{flex:1}.checks{display:flex;flex-wrap:wrap;gap:12px 24px;margin-top:18px}.game-header,.history-heading{display:flex;justify-content:space-between;align-items:center;gap:12px}.game-header h2{margin:0}.game-header p{margin:3px 0 15px;overflow-wrap:anywhere}.stats{display:flex;flex-wrap:wrap;gap:12px 32px;border-top:1px solid #dce3e8;border-bottom:1px solid #dce3e8;padding:13px 0;font-size:14px}.benchmarks{margin:12px 0 18px}.search-panel label{font-size:14px}.input-row{margin-top:6px}.filters{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:14px 0}.filters label{display:flex;flex-direction:column;gap:4px}summary{cursor:pointer;color:#526777}#advanced{border-top:1px solid #edf0f2;padding-top:10px;margin-top:12px}.suggestions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.suggestion{display:flex;border:1px solid #dce3e8;border-radius:4px;overflow:hidden}.suggestion>button:first-child{min-width:0;flex:1;text-align:left;background:#f7f9fb;color:#344451;padding:7px 10px;border-radius:0}.suggestion>button:first-child:hover{background:#eaf2fa}.suggestion.selected{border-color:#5c92c7;box-shadow:0 0 0 1px #5c92c7}.suggestion small{display:block;color:#788791;font-size:11px}.suggestion .detail{border:0;border-left:1px solid #dce3e8;padding:6px;font-size:12px;border-radius:0}#more{margin-top:10px}#message{min-height:1.6em;color:#8b623a;margin-bottom:0}.history-heading{margin:24px 0 8px}.history-heading h2{margin:0}.history-heading label{font-size:13px}.history-heading select{padding:4px}.table-wrap{background:white;border:1px solid #dce3e8;border-radius:4px;padding:0 12px}table{width:100%;border-collapse:collapse;table-layout:fixed}th,td{padding:12px 8px;text-align:left;border-bottom:1px solid #edf0f2;overflow-wrap:anywhere}th{font-size:13px;color:#788791;font-weight:normal}th:first-child{width:13%}th:nth-child(2){width:47%}th:nth-child(3),th:nth-child(4){width:20%}td{font-variant-numeric:tabular-nums;font-size:14px}td .name-button{padding:0;min-height:30px;text-align:left;background:transparent;color:#467da9;border:0}td small{font-size:11px;color:#85949d}.rank-good{color:#34846a;font-weight:bold}.rank-close{color:#477ea8;font-weight:bold}.actions{display:flex;flex-wrap:wrap;gap:10px;margin:18px 0 28px}.answer{border:1px solid #a9cbbd;background:#f1f8f4;padding:16px;margin:16px 0}.answer button{margin-top:8px}.rules{border-top:1px solid #dce3e8;margin-top:28px;padding-top:16px;font-size:13px;color:#75828a}.rules summary{font-size:15px}footer{display:flex;justify-content:center;flex-wrap:wrap;gap:8px 20px;font-size:12px;color:#88959d;margin-top:30px}a{color:#4a80ad;text-decoration:none}a:hover{text-decoration:underline}dialog{width:min(720px,calc(100% - 24px));max-height:90dvh;overflow:auto;border:1px solid #ccd7df;border-radius:6px;padding:24px;color:inherit;background:#fff}dialog::backdrop{background:#20303c80}.dialog-close{float:right;padding:0 12px;min-height:36px;font-size:22px}#card-title,#top-title{padding-right:38px}.card-detail-grid{display:grid;grid-template-columns:180px 1fr;gap:22px}.card-detail-grid img{width:100%;height:auto;max-height:300px;object-fit:contain}.card-detail-grid h3{font-size:14px;margin:16px 0 5px}.card-detail-grid p{white-space:pre-wrap;font-size:14px}#top-content button{display:block;width:100%;text-align:left;margin:4px 0;font-size:13px}.answer p{margin:0}.filters button{justify-self:start}
@media(max-width:600px){main{padding:18px 12px}h1{font-size:25px}h2{font-size:18px}header{margin-bottom:20px}.panel{padding:16px}.seed-row{flex-wrap:wrap}.seed-row label{width:100%}.seed-row input{width:130px}.checks{font-size:13px;gap:10px}.filters{grid-template-columns:repeat(2,minmax(0,1fr))}.suggestions{gap:6px}.suggestion>button:first-child{font-size:13px;padding:6px}.suggestion .detail{font-size:11px}.stats{gap:8px 16px;font-size:13px}.input-row button{padding:9px 14px}.input-row input{width:120px}th,td{padding:10px 4px}td{font-size:13px}th:first-child{width:12%}th:nth-child(2){width:44%}th:nth-child(3),th:nth-child(4){width:22%}.table-wrap{padding:0 6px}.actions{gap:8px}.actions button{font-size:13px;flex:1}.card-detail-grid{grid-template-columns:1fr;gap:8px}.card-detail-grid img{max-width:160px;margin:auto}.card-detail-grid h3{margin-top:10px}dialog{padding:18px}.game-header{align-items:flex-start}.game-header button{font-size:13px;white-space:nowrap;padding:6px 12px}.history-heading select{max-width:120px}}

/* Match the original guessing UI: highlight the newest result. */
.cost-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cost-controls { display: flex; gap: 6px; }
.cost-controls select { flex: 0 0 auto; max-width: 60%; padding-inline: 5px; }
.cost-controls input { flex: 1; width: 0; }
#history tr.highlight { background: #fff3a6; }
#history tr.highlight td { border-bottom-color: #e8d779; }
#history .latest-label { display: inline-block; margin-left: 6px; color: #806511; font-size: 11px; white-space: nowrap; }
#debug-dialog { width: min(1060px,calc(100% - 24px)); }
.debug-controls { display: grid; grid-template-columns: 1fr 1.6fr 1fr; gap: 10px; }
.debug-controls label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; min-width: 0; }
.debug-nav { display: flex; align-items: center; gap: 12px; margin: 12px 0; }
.debug-table-wrap { overflow-x: auto; margin-top: 16px; }
.debug-table { min-width: 620px; table-layout: fixed; }
.debug-table th:first-child { width: 9%; }
.debug-table th:nth-child(2) { width: 47%; }
.debug-table th:nth-child(n+3) { width: 11%; }
.debug-table td { vertical-align: top; }
.debug-effect { font-size: 12px; }
.debug-effect p,.debug-effect pre { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; }
.debug-effect pre { background: #f5f7f8; padding: 8px; }
@media(max-width:600px){.debug-controls{grid-template-columns:1fr}.debug-table{min-width:600px}}
