:root {
  --page: #f4f7fc;
  --ink: #162033;
  --muted: #52617a;
  --card: #fff;
  --input: #f7faff;
  --line: #e3e9f1;
  --pink: #fb7299;
  --pink-soft: #fff1f6;
  --blue: #007caa;
  --error: #ac2e4e;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}
h1, h2, p { margin: 0; }
h1 { font-size: 24px; line-height: 32px; }
h2 { font-size: 16px; line-height: 24px; }
button, textarea, input { font: inherit; color: inherit; }
a { color: var(--blue); }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .6; }
:focus-visible, .choice:has(:focus-visible) { outline: 2px solid var(--blue); outline-offset: 3px; }
.primary, .secondary {
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 40px;
  padding: 8px 16px;
  font-weight: 600;
}
.primary { background: var(--pink); border-color: var(--pink); }
.secondary { background: var(--card); }
.card { border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
.fill-shell {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  gap: 32px;
  max-width: 1184px;
  padding: 0 24px;
  margin: 36px auto;
}
.brand-heading { display: flex; align-items: center; gap: 8px; }
.brand-logo { width: 64px; height: 64px; object-fit: contain; mix-blend-mode: multiply; }
.brand-heading h1 span { display: block; }
.scope { margin: 26px 6px 0; padding-top: 16px; border-top: 1px solid var(--line); }
.scope, .privacy { color: var(--muted); }
.scope { font-size: 12px; }
.privacy { margin: 5px 0 18px; }
.steps {
  display: flex;
  gap: 22px;
  padding: 0 26px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}
.step { padding: 17px 0 14px; border-bottom: 3px solid transparent; white-space: nowrap; }
.step[aria-current="step"] { color: var(--ink); border-color: var(--pink); font-weight: 700; }
#questions { padding: 22px 26px 0; }
.section-title { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 18px; }
.hint, .count, .anchors { color: var(--muted); font-size: 12px; }
fieldset { border: 0; padding: 0; margin: 0 0 16px; min-width: 0; }
legend { margin-bottom: 8px; padding: 0; font-weight: 700; }
legend .hint, legend .required { margin-left: 7px; font-weight: 400; }
.required, .error { color: var(--error); }
.choices { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.choices.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.choices.scores { grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 6px; }
.choice {
  display: flex;
  position: relative;
  justify-content: center;
  align-items: center;
  min-height: 42px;
  padding: 7px 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
}
.choice:hover { background: var(--input); }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; inset: 50%; }
.choice:has(:checked) { border-color: var(--pink); background: var(--pink-soft); font-weight: 700; }
.choice:has(:disabled) { color: var(--muted); background: var(--input); cursor: default; }
.anchors { display: flex; justify-content: space-between; margin-top: 4px; }
.basic-input, textarea, .admin-input, .link-value {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--input);
  border-radius: 8px;
  padding: 8px 12px;
  min-height: 42px;
}
textarea { min-height: 86px; resize: vertical; }
.form-bottom { padding: 0 26px 22px; }
.error { min-height: 20px; margin-bottom: 6px; }
.actions { display: flex; justify-content: flex-end; gap: 10px; }
.state-message { padding: 45px 26px; font-size: 16px; font-weight: 600; }
.admin-shell { max-width: 1080px; padding: 0 24px; margin: 30px auto; }
.admin-header { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.admin-card { padding: 20px; }
.issue-form { display: grid; grid-template-columns: minmax(140px, 370px) max-content; gap: 8px; align-items: end; }
.issue-form label { display: grid; gap: 4px; font-weight: 600; }
.issue-form .primary { min-height: 42px; }
.list-title { margin: 8px 0; }
.survey-list { padding: 0; margin: 0; list-style: none; }
.survey-row {
  display: grid;
  grid-template-columns: minmax(140px, 2fr) minmax(64px, 1fr) minmax(145px, 1fr) minmax(140px, auto);
  gap: 10px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding: 7px 0;
  min-height: 52px;
}
.survey-row span { overflow-wrap: anywhere; }
.row-actions, .pagination, .dialog-actions { display: flex; gap: 8px; justify-content: flex-end; }
.row-actions .secondary { padding: 6px 10px; min-height: 36px; }
.pagination { margin-top: 12px; }
.empty { padding: 14px 0; color: var(--muted); }
dialog {
  width: min(780px, calc(100% - 32px));
  max-height: calc(100dvh - 36px);
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--ink);
}
dialog::backdrop { background: #16203366; }
.dialog-head { display: flex; justify-content: space-between; gap: 12px; align-items: start; margin-bottom: 12px; }
.dialog-head h2 { overflow-wrap: anywhere; }
dialog p { margin: 8px 0; }
.dialog-actions { margin-top: 12px; }
.result-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; margin: 0; }
.result-grid > div { border-top: 1px solid var(--line); padding-top: 4px; }
.result-grid dt { font-weight: 600; font-size: 13px; }
.result-grid dd { margin: 1px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 760px) {
  h1 { font-size: 20px; line-height: 28px; }
  .fill-shell { display: block; margin: 10px auto; padding: 0 16px 20px; max-width: 600px; }
  .brand-logo { width: 88px; height: 88px; }
  .brand-heading h1 span { display: inline; }
  .scope { margin: 0 0 12px; padding: 0; border: 0; }
  .scope br { display: none; }
  .privacy { margin-bottom: 14px; }
  .steps { justify-content: space-between; gap: 4px; padding: 0 14px; }
  #questions { padding: 18px 14px 0; }
  .form-bottom { padding: 0 14px 18px; }
  .choices, .choices.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .choice { min-height: 44px; }
  .choices.scores { gap: 2px; }
  .scores .choice { padding-inline: 1px; font-size: 16px; }
  .basic-input, textarea, .admin-input, .link-value { font-size: 16px; min-height: 44px; }
  .admin-shell { margin: 16px auto; padding: 0 12px; }
  .admin-card { padding: 14px; }
  .admin-header { flex-wrap: wrap; }
  .survey-row { grid-template-columns: minmax(0, 1fr) max-content; }
  .row-actions { flex-wrap: wrap; }
  .result-grid { grid-template-columns: minmax(0, 1fr); }
}
