* { box-sizing: border-box; }
:root { color-scheme: light; font: 16px/1.6 "Microsoft YaHei", system-ui, sans-serif; background: #fffdf9; color: #192c42; }
body { margin: 0; }
header { background: #fff; border-bottom: 1px solid #dbe3eb; }
nav, main { max-width: 1120px; margin: auto; padding: 16px 20px; }
nav, .heading, .actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
nav a { color: #254f76; margin-left: 14px; }
main { padding-block: 28px 48px; }
h1 { font-size: clamp(1.55rem, 4vw, 2.4rem); line-height: 1.25; margin: 0; }
h2 { font-size: 1.15rem; margin: 0; }
p { color: #445c71; }
.panel, details { padding: 18px; background: #fff; border: 1px solid #dbe3eb; border-radius: 12px; margin: 16px 0; }
.scroll { overflow-x: auto; }
#columns { display: grid; grid-template-columns: repeat(9, 1fr); gap: 6px; min-width: 535px; padding: 4px; }
.column { display: flex; flex-direction: column; justify-content: end; gap: 5px; text-align: center; }
.slot { width: 100%; min-height: 39px; padding: 4px; background: #e6eef7; color: #284d72; border: 1px dashed #829bb5; }
.column:nth-child(5) .slot:not(.filled) { background: #f2f4f6; }
.slot.filled { background: #34648c; color: white; border-style: solid; }
.column strong { margin-top: 4px; }
.column small { color: #445c71; }
#pool { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(245px, 100%), 1fr)); gap: 8px; margin-top: 12px; }
.card { text-align: left; color: #192c42; background: #f8fbfe; border: 1px solid #cddce9; cursor: grab; }
.card b { margin-right: 8px; color: #224f79; }
button, input { font: inherit; border-radius: 7px; padding: 8px 12px; }
button { border: 1px solid transparent; background: #224f79; color: #fff; cursor: pointer; }
button:disabled { opacity: .5; cursor: default; }
button:focus-visible, a:focus-visible, input:focus-visible, .chosen, .over { outline: 3px solid #ce821c; outline-offset: 1px; }
input { min-width: 0; max-width: 100%; border: 1px solid #829bb5; }
.toolbar, .selection { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.selection { min-height: 24px; }
summary { cursor: pointer; font-weight: 600; overflow-wrap: anywhere; }
details p { overflow-wrap: anywhere; }
details li { margin: 6px 0; }
[hidden] { display: none !important; }

:root { background: #e8eef5; }
header { background: #e8eef5; }
.panel, details { background: #e8eef5; border-color: #f1f5fa; box-shadow: 5px 5px 14px #ccd6e3, -5px -5px 14px #f8fbff; }
.survey-workspace { display: grid; grid-template-columns: minmax(240px, 310px) minmax(0, 1fr); gap: 20px; align-items: start; }
.statement-list { min-width: 0; }
#pool { display: flex; flex-direction: column; padding: 5px; }
.card { background: #e8eef5; box-shadow: 2px 2px 5px #cdd8e4, -2px -2px 5px #f9fcff; }
.board { position: sticky; top: 12px; }
.slot, .column:nth-child(5) .slot:not(.filled), input { background: #e8eef5; box-shadow: inset 2px 2px 5px #cbd6e3, inset -2px -2px 5px #f9fcff; }
.slot.filled { box-shadow: 2px 2px 4px #cad4e0; }
.slot.over, .column:nth-child(5) .slot.over:not(.filled) { background: #f8e3bd; color: #192c42; }
.drag-preview { position: fixed; top: 0; left: 0; pointer-events: none; width: 56px; height: 36px; display: grid; place-items: center; border-radius: 7px; background: #34648c; color: #fff; }
@media (max-width: 850px) {
  .survey-workspace { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .board { position: static; }
  .board { grid-row: 1; }
}


.survey-workspace { gap: 0; }
.survey-workspace > .panel {
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}
.survey-workspace > .statement-list { border-right: 1px solid #bac8d7; padding-left: 0; }
.survey-workspace > .board { padding-right: 0; }
@media (max-width: 850px) {
  .survey-workspace > .statement-list { border-right: 0; padding-right: 0; }
  .survey-workspace > .board { border-bottom: 1px solid #bac8d7; padding-left: 0; }
}
.survey-page { height: 100dvh; overflow: hidden; }
.survey-main { max-width: none; height: 100%; display: flex; flex-direction: column; padding: 12px 16px 16px; }
.survey-main > p:first-child { margin: 0 0 12px; }
#survey { flex: 1; min-height: 0; }
.survey-workspace { height: 100%; grid-template-columns: minmax(180px, 27%) minmax(0, 1fr); align-items: stretch; }
.survey-workspace > .statement-list { display: flex; flex-direction: column; min-height: 0; padding-top: 0; padding-bottom: 0; }
#pool { overflow-y: auto; min-height: 0; }
#pool > .card { flex: none; }
.survey-workspace > .board { position: static; display: flex; flex-direction: column; min-width: 0; padding: 0 0 0 12px; }
.board .actions { justify-content: center; align-items: center; flex: 1; }
.actions button { min-width: 130px; }
.survey-main > #status { margin: 4px 0 0; }
.survey-main > #status:empty { display: none; }
@media (max-width: 850px) {
  .survey-workspace { grid-template-columns: minmax(105px, 34%) minmax(0, 1fr); }
  .survey-workspace > .board { grid-row: auto; border-bottom: 0; }
  .survey-workspace > .statement-list { border-right: 1px solid #bac8d7; padding-right: 6px; }
  #columns { min-width: 0; gap: 2px; }
  .slot, .column small { font-size: clamp(.55rem, 1.65vw, .8rem); }
  .slot { padding-inline: 0; }
  .actions button { min-width: 0; }
}
.survey-page {
  background: #edf2f7;
  color: #292b30;
}
.survey-main { padding: clamp(12px, 2vw, 28px); }
.survey-main > p:first-child {
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid #d5dfe9;
  font-size: .94rem;
}
.survey-workspace h2 { font-size: 1rem; }
.survey-workspace > .statement-list { border-color: #d5dfe9; }
.survey-workspace > .board { padding-left: clamp(8px, 2vw, 26px); }
#pool {
  gap: 9px;
  padding: 4px 9px 8px 2px;
  scrollbar-gutter: stable;
  overscroll-behavior-y: contain;
}
#pool .card {
  padding: 10px 11px;
  border: 1px solid #e4e2dd;
  border-radius: 9px;
  background: #fffdf9;
  box-shadow: 0 2px 4px #2332490a;
  font-size: .91rem;
}
#pool .card:not(:disabled):hover { border-color: #8aa7bf; }
#pool .card:disabled { opacity: 1; background: #eeefef; color: #595e64; box-shadow: none; }
.board .heading { margin-bottom: 14px; }
#progress { font-size: .85rem; font-variant-numeric: tabular-nums; color: #365c7a; }
#columns { gap: clamp(3px, .6vw, 10px); min-width: 0; }
.column { min-width: 0; }
.column strong { font-size: .88rem; }
.column small { font-variant-numeric: tabular-nums; white-space: nowrap; }
.slot { border-radius: 8px; min-height: clamp(30px, 5vh, 48px); }
.slot:not(.filled):not(.over), .column:nth-child(5) .slot:not(.filled):not(.over) {
  background: #e7edf4;
  border: 1px solid #c5d4e2;
  box-shadow: inset 2px 2px 4px #d3dfea, inset -2px -2px 4px #f5f9fc;
}
.slot.filled, .drag-preview {
  background: #dce7ee;
  color: #2d465a;
  border: 1px solid #aebfcd;
  font-weight: 600;
  box-shadow: 0 2px 4px #23324912;
}
.slot.filled.over { background: #f8e3bd; color: #302619; }
.slot.over { border-color: #ad6812; }
.board .actions button {
  border-radius: 10px;
  padding: 10px 26px;
  background: #294f73;
  font-weight: 600;
}
.board .actions button:disabled { opacity: 1; background: #dce6ee; color: #536d83; }
@media (max-width: 600px) {
  #pool { padding-right: 4px; }
  #pool .card { padding: 7px; font-size: .8rem; }
  #columns { gap: 2px; }
  .slot { font-size: .55rem; }
}
.survey-main > p:first-child, .survey-workspace .column small { color: #555b62; }
#pool .card:not(:disabled) { color: #292b30; }
#pool .card b, #progress { color: #4a5d6d; }
:root {
  --canvas: #d3dff2;
  --surface: #e6eefc;
  --ink: #273652;
  --muted: #4e607d;
  --accent: #405dcd;
  --focus: #3452b8;
  --line: #c1cee5;
  --highlight: #d8e3fb;
  --control-radius: 4px;
  --raised: 4px 5px 9px #8ca1c34a, -3px -3px 9px #f9fcff;
  --recessed: inset 2px 3px 6px #8ca1c34d, inset -2px -2px 6px #f8fbffb3;
  --primary-fill: linear-gradient(145deg, #506dde, #3651bc);
  background: radial-gradient(ellipse at 18% 0%, #e8f0ff, transparent 58%), var(--canvas);
  min-height: 100%;
  color: var(--ink);
}

:is(button, a, input, summary):focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.survey-page { background: transparent; color: var(--ink); }
.survey-main { max-width: 1500px; }
.survey-main > p:first-child {
  padding: 0 4px;
  margin-bottom: 14px;
  border: 0;
  color: var(--muted);
}

.survey-workspace { gap: clamp(8px, 2vw, 24px); }
.survey-workspace > .panel {
  padding: clamp(6px, 1.65vw, 22px);
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.survey-workspace > .board .scroll { min-height: 0; overflow: auto; }
.survey-workspace > .statement-list { border-inline-end: 1px solid var(--line); }
.survey-main > p:first-child { padding-bottom: 10px; border-bottom: 1px solid var(--line); }
#pool { gap: 0; margin-top: 0; padding: 0; }
#pool .card {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  color: var(--ink);
  box-shadow: none;
}
#pool .card:not(:disabled):hover { background: var(--highlight); border-color: var(--line); }
#pool .card:disabled {
  background: transparent;
  color: var(--muted);
  box-shadow: none;
  cursor: not-allowed;
}
#pool .card b, #progress, .survey-workspace .column small { color: var(--muted); }
#columns { gap: clamp(2px, .6vw, 9px); }
.board .column { gap: clamp(3px, .55vw, 8px); }
.board .slot { border-radius: var(--control-radius); padding-inline: 0; font-variant-numeric: tabular-nums; }
.board .slot:not(.filled):not(.over), .board .column:nth-child(5) .slot:not(.filled):not(.over) {
  background: #dfe9fa;
  border: 1px solid var(--line);
  box-shadow: var(--recessed);
}
.board .slot.filled, .survey-page .drag-preview {
  background: var(--surface);
  color: #304a99;
  border: 1px solid #aabce9;
  box-shadow: var(--raised);
}
.board .slot.over, .board .column:nth-child(5) .slot.over, .board .slot.chosen {
  background: var(--highlight);
  color: var(--ink);
  border-color: var(--focus);
}
.board .actions { flex: 0 0 auto; margin-top: clamp(10px, 2vw, 24px); }
.board .actions button {
  min-height: 44px;
  border-radius: var(--control-radius);
  background: var(--primary-fill);
  box-shadow: var(--raised);
}
.board .actions button:enabled:hover { background: #354fb6; }
.board .actions button:disabled {
  background: #dce6f8;
  color: var(--muted);
  box-shadow: var(--recessed);
}

@media (max-width: 600px) {
  .survey-main { padding: 9px; }
  #pool { padding: 4px; }
  #pool .card { overflow-wrap: anywhere; }
  .board .slot { border-radius: 5px; }
  .board .actions button { padding-inline: 16px; }
}

.survey-main { max-width: none; }


/* Native scrollbars across both pages and nested scroll areas. */
::-webkit-scrollbar { width: 3px; height: 3px; }
::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-thumb { background: #98aacc; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #637da7; }
::-webkit-scrollbar-button { display: none; }
@supports not selector(::-webkit-scrollbar) {
  * { scrollbar-width: thin; scrollbar-color: #98aacc transparent; }
}

#pool .card:disabled {
  background: #d9e4f5;
  color: #4e607d;
  box-shadow: inset 2px 0 #829bc0;
}
.survey-page .board .slot.filled {
  background: #c7daf7;
  color: #243e72;
  border-color: #829bc0;
  box-shadow: none;
}
.survey-page .board .slot.filled:is(.chosen, .over) {
  background: #b5cdf5;
  border-color: var(--focus);
}
:root {
  --canvas: #e1e9f5;
  --surface: #e5edf8;
  --ink: #293950;
  --muted: #4c607d;
  --line: #c4d1e3;
  --highlight: #d7e4f7;
  --raised: 3px 4px 8px #a1b3cc75, -3px -3px 8px #f8fbff;
  --recessed: inset 2px 2px 5px #9eafca65, inset -2px -2px 5px #f9fbff;
  --primary-fill: linear-gradient(145deg, #4e6caf, #38558f);
  background: var(--canvas);
}
.survey-main > p:first-child { padding-bottom: 14px; }
#pool { gap: 10px; padding: 7px 9px 10px 6px; }
#pool .card {
  border: 1px solid #eff5ff;
  border-radius: 6px;
  background: var(--surface);
  box-shadow: var(--raised);
}
#pool .card:not(:disabled):hover {
  background: #edf3fc;
  border-color: #c4d1e3;
}
#pool .card.chosen {
  background: #dce8fb;
  box-shadow: var(--recessed);
}
#pool .card:disabled {
  background: #d6e1f0;
  color: var(--muted);
  border-color: #c3d2e7;
  box-shadow: var(--recessed);
}
.survey-page .board .slot:not(.filled):not(.over) {
  background: var(--canvas);
  border-color: #c5d2e5;
  box-shadow: var(--recessed);
}
.survey-page .board .slot.filled {
  background: #cadcf5;
  border-color: #b2c7e7;
  box-shadow: var(--raised);
}
.survey-page .board .slot.filled:is(.chosen, .over) {
  background: #b5cdf5;
  border-color: var(--focus);
}

/* Keep score headings aligned above the slots on both sorting boards. */
#columns .column,
.record-grid .column { justify-content: flex-start; }
#columns .column > strong,
.record-grid .column > strong { order: -1; margin: 0 0 4px; }
