:root {
  --primary: #1764f5;
  --primary-hover: #0e51d6;
  --primary-soft: #edf4ff;
  --canvas: #f7f9fc;
  --surface: #fff;
  --ink: #142442;
  --muted: #718098;
  --line: #e0e6ef;
  --line-strong: #cbd5e3;
  --danger: #c73838;
  --danger-soft: #fff3f3;
  --success: #14845e;
  --radius: 8px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --sidebar-width: 224px;
  --control-height: 42px;
  --font-small: 12px;
  --font-body: 14px;
  --font-content: 16px;
  --font-heading: 20px;
  --font-title: 32px;
  --editor-header-height: 68px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-size: var(--font-body);
  line-height: 1.6;
  font-synthesis: weight style;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, textarea, select { font: inherit; }
button, a, input, textarea, select, summary { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; color: inherit; }
button:disabled { cursor: not-allowed; opacity: .5; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }
h1, h2, h3, p { margin: 0; }
h1 { font-size: var(--font-title); line-height: 1.35; letter-spacing: -.5px; font-weight: 700; }
h2 { font-size: var(--font-heading); line-height: 1.4; font-weight: 650; }
h3 { font-size: var(--font-content); line-height: 1.5; }
input, textarea, select { width: 100%; min-height: var(--control-height); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 9px var(--space-3); color: var(--ink); transition: border-color .15s, box-shadow .15s; }
textarea { resize: vertical; line-height: 1.6; }
input::placeholder, textarea::placeholder { color: #8d98a8; }
input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; min-height: 18px; margin: 0; accent-color: var(--survey-color, var(--primary)); flex-shrink: 0; }
input[type="color"] { width: 42px; padding: var(--space-1); }
fieldset { min-width: 0; }
input:focus, textarea:focus, select:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px #1764f51f; }
:focus-visible { outline: 3px solid #1764f588; outline-offset: 3px; }
main[tabindex="-1"]:focus { outline: none; }
input:disabled, textarea:disabled { color: #647087; background: #fcfdff; opacity: 1; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: var(--space-4); top: -60px; padding: var(--space-3); background: var(--surface); border: 1px solid var(--primary); z-index: 200; border-radius: var(--radius); }
.skip-link:focus { top: var(--space-3); }
.icon { width: 20px; height: 20px; display: inline-block; flex-shrink: 0; vertical-align: middle; }
.muted { color: var(--muted); }
.danger-text { color: var(--danger) !important; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: var(--control-height); padding: 9px var(--space-5); border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); color: var(--ink); font-size: var(--font-body); font-weight: 550; white-space: nowrap; line-height: 1.45; transition: background .15s, border-color .15s; }
.button:hover { background: var(--canvas); color: var(--ink); border-color: #aebbd0; }
.button.primary { color: #fff; background: var(--survey-color, var(--primary)); border-color: var(--survey-color, var(--primary)); }
.button.primary:hover { filter: brightness(.95); }
.button.danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.button.wide { width: 100%; }
.button-row { display: flex; flex-wrap: wrap; gap: var(--space-3); justify-content: center; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; background: transparent; border: 0; border-radius: 6px; color: var(--muted); font-size: 26px; line-height: 1; }
.icon-button:hover { background: var(--primary-soft); color: var(--primary); }
.text-action { display: inline-flex; align-items: center; gap: var(--space-2); background: transparent; border: 0; border-radius: 5px; padding: var(--space-2) var(--space-3); font-weight: 500; color: #52627b; }
.text-action:hover { background: var(--primary-soft); color: var(--primary); }
.text-action .icon { width: 17px; height: 17px; }
.text-link { font-weight: 550; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.field { display: flex; flex-direction: column; gap: var(--space-2); margin-bottom: var(--space-5); }
.field > span { font-weight: 550; }
.field small { color: var(--muted); font-size: var(--font-small); font-weight: 400; }
.field span small { margin-left: var(--space-1); }
.form-error, .modal-error { color: var(--danger); margin-bottom: var(--space-4); white-space: pre-wrap; overflow-wrap: anywhere; }
.form-error:empty, .modal-error:empty { display: none; }
.inline-error { color: var(--danger); background: var(--danger-soft); border-radius: var(--radius); padding: var(--space-4); }
.inline-note { border-radius: var(--radius); background: var(--canvas); color: #65748b; padding: var(--space-3) var(--space-4); font-size: 13px; margin-bottom: var(--space-4); }
.spinner { width: 26px; height: 26px; border: 3px solid #d7e2f4; border-top-color: var(--primary); border-radius: 50%; animation: spin .75s linear infinite; display: inline-block; }
.spinner.small { width: 16px; height: 16px; border-width: 2px; border-color: #ffffff55; border-top-color: currentColor; }
@keyframes spin { to { transform: rotate(360deg); } }
.initial-loading { min-height: 70dvh; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: var(--space-4); color: var(--muted); }
.error-screen { min-height: 80dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-5); text-align: center; padding: var(--space-8); }
.error-screen p { color: var(--muted); max-width: 540px; }
.brand { display: inline-flex; align-items: center; gap: var(--space-2); color: #113577; font-size: 23px; font-weight: 750; letter-spacing: -.5px; white-space: nowrap; }
.brand:hover { color: #113577; }
.brand-mark { display: inline-flex; align-items: center; justify-content: center; color: var(--primary); }
.brand-mark .icon { width: 26px; height: 26px; }
.workspace { display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); min-height: 100dvh; }
.sidebar { background: var(--surface); border-right: 1px solid var(--line); padding: var(--space-8) var(--space-3) var(--space-5); display: flex; flex-direction: column; position: sticky; top: 0; height: 100dvh; }
.sidebar > .brand { padding: 0 var(--space-3); margin-bottom: var(--space-8); }
.sidebar nav { display: flex; flex-direction: column; gap: var(--space-2); }
.nav-item { display: flex; align-items: center; gap: var(--space-4); padding: var(--space-3) var(--space-4); min-height: 48px; color: #4a5b77; font-size: 15px; border-radius: var(--radius); font-weight: 550; }
.nav-item.active { background: var(--primary-soft); color: var(--primary); }
.nav-item:hover { background: var(--canvas); }
.nav-item .icon { width: 21px; height: 21px; }
.sidebar-bottom { margin-top: auto; padding: var(--space-4) var(--space-2) 0; }
.account-mini { display: flex; align-items: center; gap: var(--space-3); padding-bottom: var(--space-4); }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: flex; align-items: center; justify-content: center; font-weight: 650; font-size: 17px; flex-shrink: 0; }
.account-mini > div { min-width: 0; }
.account-mini strong, .account-mini div span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-mini div span { font-size: var(--font-small); color: var(--muted); }
.logout-button { display: flex; align-items: center; gap: var(--space-2); color: var(--muted); background: transparent; border: 0; padding: var(--space-2); border-radius: var(--radius); }
.logout-button:hover { background: var(--canvas); }
.workspace-main { padding: var(--space-10) clamp(24px, 4vw, 64px); max-width: 1500px; width: 100%; }
.page-heading { display: flex; gap: var(--space-5); justify-content: space-between; align-items: center; margin-bottom: var(--space-8); }
.page-heading p { margin-top: var(--space-2); color: var(--muted); font-size: 15px; }
.stats-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--space-5) 0; margin-bottom: var(--space-8); }
.stats-strip > div { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 62px; gap: var(--space-1); }
.stats-strip > div + div { border-left: 1px solid var(--line); }
.stats-strip strong { font-size: 29px; line-height: 1.4; font-weight: 650; font-variant-numeric: tabular-nums; }
.stats-strip span { color: var(--muted); }
.list-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-5); margin-bottom: var(--space-6); border-bottom: 1px solid var(--line); }
.filter-tabs { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.filter-tabs button { border: 0; border-bottom: 3px solid transparent; background: transparent; min-height: 50px; padding: var(--space-3) var(--space-3); font-weight: 550; white-space: nowrap; }
.filter-tabs button.active { color: var(--primary); border-bottom-color: var(--primary); }
.search-field { display: flex; align-items: center; gap: var(--space-2); border: 1px solid var(--line-strong); background: var(--surface); border-radius: var(--radius); color: #8b99b0; width: 258px; padding-left: var(--space-3); margin-bottom: var(--space-2); }
.search-field input { border: 0; min-width: 0; }
.search-field:focus-within { outline: 3px solid #1764f51f; border-color: var(--primary); }
.search-field input:focus { box-shadow: none; }
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: var(--space-10) var(--space-6); min-height: 320px; text-align: center; }
.empty-state h2 { margin-bottom: var(--space-2); }
.empty-state > p { color: var(--muted); margin-bottom: var(--space-6); }
.empty-icon { display: flex; align-items: center; justify-content: center; color: #a4b4cc; margin-bottom: var(--space-5); }
.empty-icon .icon { width: 52px; height: 52px; stroke-width: 1.4; }
.quick-templates { margin-top: var(--space-6); }
.quick-templates h2 { margin-bottom: var(--space-4); }
.template-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4); }
.template-card { display: flex; align-items: flex-start; text-align: left; gap: var(--space-4); padding: var(--space-6); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .15s, background .15s; min-width: 0; }
.template-card:hover { border-color: #9bc0ff; background: #fbfdff; }
.template-icon { width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; background: var(--primary-soft); color: var(--primary); border-radius: var(--radius); flex-shrink: 0; }
.template-icon .icon { width: 26px; height: 26px; }
.template-info { display: flex; flex-direction: column; min-width: 0; gap: var(--space-1); }
.template-info strong { font-size: 16px; overflow-wrap: anywhere; }
.template-info small, .template-description { color: var(--muted); font-size: 13px; }
.full-templates .template-card { flex-direction: column; gap: var(--space-5); padding: var(--space-6); min-height: 248px; }
.template-description { margin: var(--space-2) 0 var(--space-3); line-height: 1.8; }
.template-use { display: flex; align-items: center; gap: var(--space-2); color: var(--primary); margin-top: auto; font-weight: 550; }
.template-use .icon { transform: rotate(180deg); width: 16px; height: 16px; }
.template-tip { margin-top: var(--space-6); }
.survey-list { display: flex; flex-direction: column; gap: var(--space-4); }
.survey-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.survey-main { display: flex; align-items: center; gap: var(--space-4); padding: var(--space-5) var(--space-6); }
.survey-file { background: var(--primary-soft); color: var(--primary); border-radius: var(--radius); padding: var(--space-3); display: inline-flex; }
.survey-file .icon { width: 26px; height: 26px; }
.survey-title { min-width: 0; flex: 1; }
.title-link { color: var(--ink); font-size: 17px; font-weight: 600; display: inline-block; overflow-wrap: anywhere; line-height: 1.55; }
.survey-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); margin-top: var(--space-2); color: var(--muted); font-size: 12px; }
.badge { display: inline-flex; align-items: center; min-height: 23px; background: #f0f2f5; color: #798498; font-size: 12px; padding: 1px var(--space-2); border-radius: 4px; font-weight: 500; white-space: nowrap; }
.badge.published { color: #14845e; background: #e9f6f0; }
.badge.closed { color: #8a7566; background: #f5f0eb; }
.response-count { display: flex; flex-direction: column; text-align: right; min-width: 75px; gap: var(--space-1); }
.response-count strong { font-size: 23px; line-height: 1.25; font-variant-numeric: tabular-nums; }
.response-count span { color: var(--muted); font-size: 12px; }
.survey-actions { display: flex; justify-content: flex-start; align-items: center; gap: var(--space-4); padding: var(--space-2) var(--space-4); border-top: 1px solid #edf0f5; }
.more-menu { position: relative; margin-left: auto; color: #52627b; }
.more-menu summary { cursor: pointer; display: flex; gap: var(--space-1); align-items: center; padding: var(--space-2) var(--space-3); border-radius: 5px; list-style: none; }
.more-menu summary::-webkit-details-marker { display: none; }
.more-menu summary .icon { width: 14px; height: 14px; }
.menu-popover { position: absolute; right: 0; top: calc(100% + 5px); padding: var(--space-1); min-width: 158px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 6px 24px #14244212; z-index: 10; }
.menu-popover button { width: 100%; display: flex; align-items: center; gap: var(--space-2); border: 0; border-radius: 5px; background: transparent; padding: var(--space-2) var(--space-3); text-align: left; }
.menu-popover button:hover { background: var(--canvas); }
.menu-popover .icon { width: 16px; height: 16px; }
.auth-page { min-height: 100dvh; display: flex; flex-direction: column; }
.auth-header { padding: var(--space-6) max(24px, calc((100vw - 1180px) / 2)); display: flex; justify-content: space-between; align-items: center; gap: var(--space-5); }
.auth-main { max-width: 1120px; width: 100%; margin: auto; padding: var(--space-10) var(--space-6) 64px; display: grid; grid-template-columns: minmax(0, 1fr) 400px; align-items: center; gap: 90px; }
.auth-intro h1 { font-size: 42px; line-height: 1.45; letter-spacing: -1px; }
.auth-intro > p { color: var(--muted); font-size: 17px; line-height: 1.9; margin-top: var(--space-6); }
.auth-steps { margin-top: var(--space-10); display: flex; flex-direction: column; gap: var(--space-5); }
.auth-steps > div { position: relative; padding-left: 44px; }
.auth-steps > div > span { color: var(--primary); font-size: 14px; font-weight: 600; position: absolute; top: 1px; left: 0; }
.auth-steps strong { font-size: 15px; font-weight: 600; }
.auth-steps p { font-size: 13px; color: var(--muted); margin-top: var(--space-1); }
.auth-card { padding: var(--space-8); box-shadow: 0 8px 40px #23395406; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); margin-bottom: var(--space-6); }
.auth-tabs button { border: 0; border-bottom: 3px solid transparent; padding: var(--space-3); color: var(--muted); background: transparent; font-weight: 600; }
.auth-tabs button.active { border-bottom-color: var(--primary); color: var(--primary); }
.auth-card h2 { margin-bottom: var(--space-2); }
.auth-card h2 + p { font-size: 13px; }
.auth-form { margin-top: var(--space-6); }
.auth-note { font-size: 12px; color: var(--muted); text-align: center; margin-top: var(--space-5); }
.entry-help { font-size: var(--font-small); color: var(--muted); margin-top: var(--space-5); }
.entry-manager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); border-top: 1px solid var(--line); margin-top: var(--space-6); padding-top: var(--space-5); color: var(--muted); }
.entry-form input { font-size: var(--font-content); }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 44px; }
.password-wrap .icon-button { position: absolute; right: 4px; top: 3px; }
.auth-footer { text-align: center; padding: var(--space-6); color: #91a0b6; font-size: 12px; }
.account-content { max-width: 640px; display: flex; flex-direction: column; gap: var(--space-6); }
.settings-panel { padding: var(--space-8); }
.settings-panel h2 { margin-bottom: var(--space-5); }
.settings-panel h2 + p { margin-top: calc(-1 * var(--space-3)); margin-bottom: var(--space-6); }
.account-details { margin: 0; }
.account-details > div { display: flex; padding: var(--space-2) 0; }
.account-details dt { width: 80px; color: var(--muted); flex-shrink: 0; }
.account-details dd { margin: 0; overflow-wrap: anywhere; }
.password-form { max-width: 400px; }
.editor-header { min-height: var(--editor-header-height); display: flex; align-items: center; gap: var(--space-6); padding: var(--space-3) var(--space-6); background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 25; }
.editor-back { display: flex; align-items: center; gap: var(--space-2); color: var(--ink); white-space: nowrap; font-weight: 500; }
.editor-back .icon { width: 18px; height: 18px; }
.editor-heading { min-width: 0; flex: 1; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--space-2); }
.editor-heading > strong { font-size: 18px; max-width: 430px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.editor-actions { display: flex; gap: var(--space-2); white-space: nowrap; }
.editor-actions .button { min-height: 38px; padding: 8px var(--space-4); }
.editor-actions .icon { width: 17px; height: 17px; }
.save-state { font-size: 11px; color: #8b97a8; white-space: nowrap; }
.save-state.unsaved { color: #ac741e; }
.editor-tabs { display: flex; justify-content: center; gap: var(--space-10); background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: var(--editor-header-height); z-index: 24; }
.editor-tabs button, .editor-tabs a, .editor-tabs > span { background: transparent; border: 0; border-bottom: 3px solid transparent; padding: var(--space-3) var(--space-4); min-height: 48px; color: #69758a; font-weight: 550; }
.editor-tabs .active { color: var(--primary); border-bottom-color: var(--primary); }
.editor-layout { display: grid; grid-template-columns: 224px minmax(0, 720px) 272px; gap: var(--space-6); padding: var(--space-6); align-items: start; justify-content: center; }
.editor-tools, .editor-properties { padding: var(--space-4); position: sticky; top: 140px; max-height: calc(100dvh - 162px); overflow-y: auto; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--space-5); gap: var(--space-2); }
.panel-heading h2 { font-size: 18px; font-weight: 650; }
.question-types { display: flex; flex-direction: column; gap: var(--space-2); }
.question-types button { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); display: flex; align-items: center; gap: var(--space-4); padding: var(--space-3) var(--space-4); min-height: 44px; text-align: left; }
.question-types button:hover { background: var(--primary-soft); border-color: #c4d8fa; color: var(--primary); }
.question-types .icon { width: 20px; height: 20px; }
.tool-hint { font-size: 12px; margin-top: var(--space-5); }
.survey-canvas { border-top: 5px solid var(--survey-color, var(--primary)); padding: var(--space-5); }
.canvas-survey-heading { width: 100%; background: transparent; border: 1px solid transparent; border-radius: var(--radius); padding: var(--space-3) var(--space-2) var(--space-6); text-align: left; margin-bottom: var(--space-3); }
.canvas-survey-heading h1 { font-size: 26px; overflow-wrap: anywhere; }
.canvas-survey-heading p { color: var(--muted); margin-top: var(--space-2); white-space: pre-wrap; overflow-wrap: anywhere; font-weight: 400; }
.canvas-survey-heading.selected { border-color: #8bb3ff; background: #f8fbff; padding: var(--space-3) var(--space-2); margin-bottom: var(--space-6); }
.canvas-questions { display: flex; flex-direction: column; gap: var(--space-3); }
.editor-question { position: relative; border: 1px solid var(--line); border-radius: 5px; padding: var(--space-4); cursor: pointer; background: var(--surface); }
.editor-question.selected { border-color: #5e94ff; background: #f6f9ff; }
.question-tools { display: flex; gap: var(--space-1); position: absolute; top: 8px; right: 7px; z-index: 1; }
.question-tools .icon-button { width: 28px; height: 28px; }
.question-tools .icon { width: 16px; height: 16px; }
.editor-question:not(.selected):not(:focus-within):not(:hover) .question-tools { opacity: 0; }
.question-field { border: 0; padding: 0; margin: 0; min-width: 0; }
.question-title { font-size: 16px; font-weight: 600; display: flex; align-items: baseline; gap: var(--space-3); padding: 0; max-width: 100%; overflow-wrap: anywhere; }
.editor-question .question-title { padding-right: 120px; min-height: 28px; }
.question-number { color: var(--survey-color, var(--primary)); font-size: 15px; font-weight: 650; min-width: 22px; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.required-mark { color: #e24646; margin-left: 5px; font-size: 14px; }
.question-description { font-size: 13px; color: var(--muted); padding-left: 35px; margin-top: var(--space-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.question-answer { margin: var(--space-3) 0 0 35px; }
.choice-list { display: flex; flex-direction: column; gap: var(--space-2); }
.choice { display: flex; align-items: flex-start; gap: var(--space-3); padding: 4px 0; cursor: pointer; line-height: 1.7; }
.choice input { margin-top: 3px; }
.choice > span { overflow-wrap: anywhere; min-width: 0; }
.choice:has(input:disabled) { cursor: inherit; color: #5d6a81; }
.rating-options { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.rating-option { display: flex; flex-direction: column; align-items: center; position: relative; cursor: pointer; }
.rating-option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rating-star { color: #a1aabb; font-size: 33px; line-height: 1.15; }
.rating-number { font-size: 11px; color: var(--muted); }
.rating-option:has(input:checked) .rating-star { color: var(--survey-color, var(--primary)); }
.rating-option:has(input:checked) .rating-number { color: var(--survey-color, var(--primary)); font-weight: 650; }
.rating-option:focus-within { outline: 3px solid #1764f555; outline-offset: 4px; border-radius: 4px; }
.rating-option:has(input:disabled) .rating-number { display: none; }
.question-error { margin-top: var(--space-2); color: var(--danger); font-size: 13px; }
.question-error:empty { display: none; }
.survey-section h2 { font-size: 18px; padding-right: 120px; overflow-wrap: anywhere; }
.survey-section p { margin-top: var(--space-2); color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; }
.canvas-empty { text-align: center; padding: var(--space-10) var(--space-4); }
.canvas-empty .empty-icon { margin-bottom: var(--space-4); }
.canvas-empty h2 { font-size: 17px; }
.canvas-empty p { color: var(--muted); margin: var(--space-2) 0 var(--space-5); }
.canvas-footer { margin-top: var(--space-6); border-top: 1px solid var(--line); padding: var(--space-4) var(--space-2) 0; display: flex; justify-content: space-between; font-size: 11px; color: #99a5b6; }
.property-fieldset { border: 0; padding: 0; margin: 0; }
.property-tip { font-size: 12px; color: #91a0b4; display: flex; align-items: center; gap: var(--space-2); border-top: 1px solid var(--line); padding-top: var(--space-5); margin-top: var(--space-5); }
.property-tip .icon { width: 15px; height: 15px; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); margin: var(--space-6) 0; }
.switch-row > span, .switch-row strong { font-weight: 550; }
.switch-row p { font-size: 12px; margin-top: var(--space-1); }
input.switch { appearance: none; -webkit-appearance: none; width: 38px; height: 22px; min-height: 22px; border-radius: 20px; background: #c9d3e0; border: 0; position: relative; flex-shrink: 0; cursor: pointer; padding: 0; }
input.switch::before { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); transition: transform .15s; }
input.switch:checked { background: var(--primary); }
input.switch:checked::before { transform: translateX(16px); }
.option-editor { display: flex; flex-direction: column; gap: var(--space-3); }
.option-row { display: flex; align-items: center; gap: var(--space-2); }
.option-row input { min-width: 0; padding: var(--space-2); min-height: 36px; }
.option-handle { color: #9aa7ba; font-size: 12px; width: 12px; flex-shrink: 0; }
.option-row .icon-button { width: 22px; height: 28px; flex-shrink: 0; font-size: 23px; }
.add-option { color: var(--primary); width: 100%; margin-top: var(--space-3); padding: var(--space-2); min-height: 36px; }
.add-option .icon { width: 16px; height: 16px; }
.theme-colors { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.color-swatch { display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; background: var(--swatch); border: 0; border-radius: 50%; color: #fff; outline-offset: 3px; }
.color-swatch.active { outline: 2px solid var(--swatch); }
.color-swatch .icon { width: 16px; height: 16px; }
.custom-color { display: flex; align-items: center; justify-content: space-between; color: var(--muted); margin-top: var(--space-3); font-size: 12px; }
.lock-notice { display: flex; align-items: center; justify-content: center; gap: var(--space-2); padding: var(--space-3) var(--space-6); background: #fff9ee; color: #8f713c; font-size: 13px; }
.lock-notice .icon { width: 16px; height: 16px; }
.lock-notice a { margin-left: var(--space-1); }
.editor-layout.settings-mode { grid-template-columns: minmax(0, 720px); }
.settings-mode .editor-tools, .settings-mode .editor-properties { display: none; }
.collection-panel h1 { font-size: 24px; }
.collection-panel > p.muted { margin-top: var(--space-2); margin-bottom: var(--space-8); }
.collection-panel .inline-note { margin-top: var(--space-6); margin-bottom: 0; }
.mobile-editor-controls, .drawer-close { display: none; }
.drawer-backdrop { position: fixed; inset: 0; background: #14244255; z-index: 35; }
.results-main { max-width: 1080px; margin: 0 auto; padding: var(--space-8) var(--space-6) 64px; }
.results-stats .stat-status { font-size: 21px; }
.results-tabs { margin-bottom: var(--space-5); border-bottom: 1px solid var(--line); }
.results-tabs button span { font-size: 12px; padding: 1px 6px; background: #edf1f7; border-radius: 12px; margin-left: var(--space-1); }
#summary-results { display: flex; flex-direction: column; gap: var(--space-5); }
.summary-card { padding: var(--space-6); }
.summary-title { display: flex; align-items: baseline; gap: var(--space-3); }
.summary-title h2 { font-size: 16px; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.summary-type { color: var(--muted); font-size: 12px; white-space: nowrap; }
.summary-total { font-size: 12px; margin: var(--space-2) 0 var(--space-5) 34px; }
.result-bars { display: flex; flex-direction: column; gap: var(--space-4); padding-left: 34px; }
.result-bar-row { display: grid; grid-template-columns: minmax(100px, 28%) minmax(40px, 1fr) 104px; align-items: center; gap: var(--space-4); }
.bar-label { overflow-wrap: anywhere; font-size: 13px; }
.bar-track { background: #edf2fa; height: 12px; border-radius: 3px; overflow: hidden; }
.bar-fill { height: 100%; width: var(--bar-width); background: var(--primary); border-radius: 3px; }
.bar-count { font-variant-numeric: tabular-nums; font-size: 13px; text-align: right; }
.bar-count small { color: var(--muted); }
.average-score { display: flex; align-items: baseline; gap: var(--space-3); margin: var(--space-3) 0 var(--space-5) 34px; }
.average-score strong { font-size: 32px; color: var(--primary); }
.average-score span { color: var(--muted); font-size: 13px; }
.summary-empty { color: #9aa5b5; padding-left: 34px; font-size: 13px; }
.text-answer-list { margin-left: 34px; }
.text-answer { padding: var(--space-3) 0; border-top: 1px solid #edf0f5; }
.text-answer p { overflow-wrap: anywhere; white-space: pre-wrap; }
.text-answer time { font-size: 11px; color: #98a3b3; display: block; margin-top: var(--space-1); }
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; min-width: 500px; text-align: left; }
th { font-weight: 550; color: var(--muted); background: #fcfdff; font-size: 13px; }
td, th { border-bottom: 1px solid var(--line); padding: var(--space-4) var(--space-6); }
td { font-size: 13px; }
td .text-action { padding: var(--space-1) 0; color: var(--primary); }
.table-empty { text-align: center; padding: var(--space-10); color: var(--muted); }
.pagination { padding: var(--space-4) var(--space-6); display: flex; justify-content: space-between; align-items: center; gap: var(--space-4); color: var(--muted); font-size: 12px; }
.pagination > div { display: flex; gap: var(--space-2); }
.pagination .button { min-height: 34px; padding: var(--space-2) var(--space-3); font-size: 12px; }
.response-detail section { border-top: 1px solid var(--line); padding: var(--space-4) 0; }
.response-detail h3 { display: flex; gap: var(--space-2); font-size: 14px; overflow-wrap: anywhere; }
.response-detail p { margin-top: var(--space-2); padding-left: 30px; white-space: pre-wrap; overflow-wrap: anywhere; color: #52627b; }
.respond-page { min-height: 100dvh; padding: var(--space-6) var(--space-4) var(--space-10); }
.respond-top { display: flex; justify-content: space-between; align-items: center; max-width: 720px; margin: 0 auto var(--space-4); }
.respond-brand { display: inline-flex; align-items: center; gap: var(--space-2); color: #7c8aa0; font-size: 14px; font-weight: 550; }
.respond-brand .icon { width: 18px; height: 18px; }
.respond-question-count { font-size: 12px; color: #98a4b5; }
.respond-form { max-width: 720px; margin: 0 auto; border-top: 5px solid var(--survey-color, var(--primary)); overflow: hidden; }
.respond-heading { padding: var(--space-8) var(--space-8) var(--space-6); border-bottom: 1px solid var(--line); }
.respond-heading h1 { font-size: 27px; overflow-wrap: anywhere; }
.respond-heading > p { color: #6f7b8f; margin-top: var(--space-3); white-space: pre-wrap; overflow-wrap: anywhere; }
.welcome-note { background: var(--canvas); border-radius: 5px; padding: var(--space-3) var(--space-4); color: #72809a; font-size: 13px; margin-top: var(--space-5); white-space: pre-wrap; overflow-wrap: anywhere; }
.progress-row { display: flex; gap: var(--space-3); justify-content: space-between; font-size: 11px; color: #97a2b3; margin-top: var(--space-6); }
.progress-row .required-mark { margin: 0; }
progress { width: 100%; height: 5px; display: block; margin-top: var(--space-2); border: 0; border-radius: 5px; accent-color: var(--survey-color, var(--primary)); overflow: hidden; background: #eef2f8; }
progress::-webkit-progress-bar { background: #eef2f8; }
progress::-webkit-progress-value { background: var(--survey-color, var(--primary)); border-radius: 5px; }
progress::-moz-progress-bar { background: var(--survey-color, var(--primary)); }
.respond-questions { padding: var(--space-6) var(--space-8) 0; }
.respond-questions .question-field { margin-bottom: var(--space-8); }
.respond-questions .question-title { font-size: 16px; }
.respond-questions .choice { min-height: 36px; padding: 6px 0; }
.respond-questions .choice input { width: 20px; height: 20px; }
.respond-questions .question-answer { margin-top: var(--space-4); }
.respond-questions textarea, .respond-questions .answer-input { font-size: 15px; }
.respond-questions .survey-section { background: var(--canvas); padding: var(--space-4); border-radius: var(--radius); margin-bottom: var(--space-6); }
.respond-questions .survey-section h2 { padding-right: 0; }
.question-field.invalid .question-title { color: var(--danger); }
.question-field.invalid .answer-input, .question-field.invalid textarea { border-color: var(--danger); }
.response-submit { padding: 0 var(--space-8) var(--space-8); text-align: center; }
.response-submit .button { min-width: 200px; min-height: 44px; font-size: 15px; }
.response-submit > p.muted { font-size: 11px; margin-top: var(--space-4); }
.respond-footer { text-align: center; color: #a3adbc; font-size: 11px; padding-top: var(--space-6); }
.preview-notice { display: flex; align-items: center; justify-content: center; gap: var(--space-2); padding: var(--space-3) var(--space-4); max-width: 720px; margin: 0 auto var(--space-5); font-size: 12px; color: #5c7aa9; background: #edf4ff; border: 1px solid #d8e6ff; border-radius: var(--radius); }
.preview-notice .icon { width: 16px; height: 16px; }
.preview-notice a { margin-left: auto; white-space: nowrap; }
.respond-state { max-width: 640px; margin: 10dvh auto 0; min-height: 320px; padding: 56px var(--space-8); text-align: center; }
.respond-state h1 { font-size: 26px; }
.respond-state > p { color: var(--muted); margin: var(--space-4) auto var(--space-6); max-width: 460px; white-space: pre-wrap; overflow-wrap: anywhere; }
.respond-state .respond-brand { margin-top: var(--space-6); }
.success-icon { width: 68px; height: 68px; border-radius: 50%; background: #e9f6f0; color: var(--success); display: flex; align-items: center; justify-content: center; margin: 0 auto var(--space-6); }
.success-icon .icon { width: 34px; height: 34px; stroke-width: 2; }
.modal { width: min(480px, calc(100vw - 32px)); max-height: 85dvh; padding: 0; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: var(--surface); box-shadow: 0 24px 80px #11244026; }
.modal::backdrop { background: #14244255; backdrop-filter: blur(2px); }
.modal-form { padding: var(--space-6); }
.modal-heading { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-5); }
.modal-heading h2 { font-size: 19px; }
.modal-body p { overflow-wrap: anywhere; }
.modal-body > p { margin-bottom: var(--space-5); }
.modal-actions { display: flex; justify-content: flex-end; gap: var(--space-3); margin-top: var(--space-6); }
.modal-error { font-size: 13px; margin-top: var(--space-3); }
.share-input { font-size: 13px; }
.share-info { font-size: 12px; color: var(--muted); margin-top: var(--space-4); }
.qr-area { display: flex; align-items: center; flex-direction: column; gap: var(--space-3); margin-bottom: var(--space-5); }
.qr-area > span { font-size: 12px; }
.qr-code { padding: var(--space-3); border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.qr-code img, .qr-code canvas { display: block; }
#toasts { position: fixed; bottom: var(--space-6); right: var(--space-6); z-index: 100; display: flex; flex-direction: column; gap: var(--space-2); max-width: min(420px, calc(100vw - 32px)); pointer-events: none; }
.toast { background: #1d324f; color: #fff; padding: var(--space-3) var(--space-5); border-radius: var(--radius); box-shadow: 0 4px 18px #1424421a; font-size: 13px; overflow-wrap: anywhere; }
.toast.error { background: #a83535; }
@media (min-width: 1400px) {
  .workspace { --sidebar-width: 244px; }
  .workspace-main { padding: 56px 56px var(--space-10); }
  .workspace .page-heading { margin-bottom: var(--space-8); }
  .workspace .page-heading p { font-size: var(--font-content); }
  .workspace .stats-strip { padding: var(--space-6) 0; min-height: 122px; }
  .workspace #survey-list .empty-state { min-height: 380px; }
  .workspace .quick-templates { margin-top: 28px; }
  .workspace .template-card.compact { min-height: 110px; align-items: center; }
  .workspace .button { font-size: var(--font-content); min-height: 48px; }
  .workspace .sidebar, .workspace .nav-item, .workspace .filter-tabs button { font-size: var(--font-content); }
  .editor-layout { grid-template-columns: 276px minmax(0, 1fr) 282px; gap: 64px; padding: 26px; }
  .editor-tools, .editor-properties { min-height: calc(100dvh - 162px); }
  .editor-heading > strong { font-size: 20px; }
  .survey-canvas { padding: var(--space-4); }
  .canvas-survey-heading { padding: var(--space-4) var(--space-4) var(--space-6); }
  .canvas-survey-heading h1 { font-size: 28px; }
  .editor-layout.settings-mode { grid-template-columns: minmax(0, 720px); justify-content: center; }
}
@media (max-width: 1200px) {
  :root { --sidebar-width: 200px; }
  .workspace-main { padding: var(--space-8); }
  .template-card.compact { padding: var(--space-4); gap: var(--space-3); }
  .template-card.compact .template-icon { width: 40px; height: 40px; }
  .editor-layout { grid-template-columns: minmax(0, 720px) 268px; }
  .editor-tools { display: none; }
  .mobile-editor-controls { display: flex; justify-content: center; gap: var(--space-3); padding: var(--space-4) var(--space-6) 0; }
  .mobile-editor-controls [data-drawer="properties"] { display: none; }
  .editor-tools.drawer-open { display: block; position: fixed; top: 0; bottom: 0; left: 0; width: 280px; max-height: 100dvh; border-radius: 0; z-index: 40; padding: var(--space-5); }
  .editor-tools .drawer-close { display: inline-flex; }
  .editor-question .question-title { padding-right: 0; }
  .editor-question .question-tools { position: static; justify-content: flex-end; margin: -8px -7px 5px 0; min-height: 26px; }
  .editor-question .survey-section h2 { padding-right: 0; }
  .auth-main { gap: var(--space-10); }
  .auth-intro h1 { font-size: 36px; }
}
@media (max-width: 900px) {
  :root { --sidebar-width: 180px; }
  .workspace-main { padding: var(--space-6); }
  .sidebar > .brand { padding: 0 var(--space-1); font-size: 20px; }
  .nav-item { gap: var(--space-3); padding: var(--space-3); font-size: 14px; }
  .list-toolbar { flex-direction: column-reverse; align-items: stretch; gap: var(--space-2); }
  .search-field { width: 100%; }
  .filter-tabs { gap: var(--space-2); }
  .template-grid { grid-template-columns: 1fr; }
  .full-templates .template-card { min-height: 0; flex-direction: row; flex-wrap: wrap; }
  .full-templates .template-info { flex: 1; }
  .full-templates .template-use { flex-basis: 100%; padding-left: 64px; }
  .template-card.compact { align-items: center; }
  .template-card.compact .template-info { flex-direction: row; justify-content: space-between; align-items: center; flex: 1; }
  .survey-actions { gap: var(--space-2); }
  .survey-actions .text-action { padding: var(--space-2); }
  .survey-actions .text-action .icon { display: none; }
  .editor-heading > strong { max-width: 250px; font-size: 16px; }
  .editor-actions .button { padding: var(--space-2) var(--space-3); }
  .editor-actions .icon { display: none; }
  .save-state { display: none; }
  .auth-main { grid-template-columns: minmax(0, 1fr) 360px; gap: var(--space-8); }
  .auth-intro h1 { font-size: 30px; }
  .auth-intro > p { font-size: 14px; }
  .auth-card { padding: var(--space-6); }
}
@media (max-width: 740px) {
  :root { --font-title: 26px; }
  .workspace { display: block; }
  .sidebar { position: static; height: auto; padding: var(--space-4); border-right: 0; border-bottom: 1px solid var(--line); gap: var(--space-4); }
  .sidebar > .brand { margin: 0; font-size: 21px; }
  .sidebar nav { flex-direction: row; gap: var(--space-2); }
  .nav-item { flex: 1; justify-content: center; min-height: 40px; padding: var(--space-2); font-size: 13px; gap: var(--space-2); white-space: nowrap; }
  .nav-item .icon { width: 17px; height: 17px; }
  .sidebar-bottom { padding: 0; margin: 0; position: absolute; right: var(--space-4); top: var(--space-3); }
  .account-mini { display: none; }
  .logout-button { font-size: 12px; padding: var(--space-2); }
  .logout-button .icon { width: 16px; height: 16px; }
  .workspace-main { padding: var(--space-6) var(--space-4) var(--space-10); }
  .page-heading { margin-bottom: var(--space-6); align-items: flex-start; gap: var(--space-3); }
  .page-heading h1 { font-size: 25px; }
  .page-heading p { font-size: 12px; }
  .page-heading > .button { padding: var(--space-2) var(--space-3); font-size: 13px; }
  .page-heading > .button .icon { width: 16px; height: 16px; }
  .stats-strip { padding: var(--space-4) 0; margin-bottom: var(--space-5); }
  .stats-strip strong { font-size: 25px; }
  .stats-strip span { font-size: 12px; }
  .stats-strip > div { min-height: 54px; }
  .filter-tabs { justify-content: space-between; gap: 0; }
  .filter-tabs button { font-size: 13px; padding: var(--space-3) var(--space-2); min-height: 44px; }
  .empty-state { min-height: 300px; padding: var(--space-8) var(--space-4); }
  .empty-state h2 { font-size: 18px; }
  .empty-state > p { font-size: 13px; }
  .empty-icon .icon { width: 44px; height: 44px; }
  .survey-main { gap: var(--space-3); padding: var(--space-4); }
  .survey-file { padding: var(--space-2); }
  .survey-file .icon { width: 21px; height: 21px; }
  .title-link { font-size: 15px; }
  .survey-meta { gap: var(--space-2); font-size: 11px; }
  .survey-meta > span:last-child { flex-basis: 100%; }
  .response-count { min-width: 45px; }
  .response-count strong { font-size: 21px; }
  .response-count span { font-size: 11px; }
  .survey-actions { padding: var(--space-2); gap: 0; }
  .survey-actions .text-action, .more-menu summary { font-size: 12px; padding: var(--space-2); }
  .quick-templates h2 { font-size: 18px; }
  .settings-panel { padding: var(--space-5); }
  .editor-header { position: static; flex-wrap: wrap; gap: var(--space-3); padding: var(--space-3) var(--space-4); }
  .editor-back { font-size: 13px; }
  .editor-heading { justify-content: flex-end; }
  .editor-heading > strong { font-size: 15px; max-width: 220px; }
  .editor-actions { width: 100%; justify-content: flex-end; }
  .editor-actions .button { min-height: 38px; padding: var(--space-2) var(--space-4); }
  .editor-actions [data-save] { margin-right: auto; }
  .save-state { display: block; width: 100%; text-align: right; font-size: 10px; }
  .editor-tabs { position: static; gap: var(--space-4); justify-content: space-around; }
  .editor-tabs button, .editor-tabs a, .editor-tabs > span { padding: var(--space-3); font-size: 13px; }
  .editor-layout { grid-template-columns: minmax(0, 1fr); padding: var(--space-4); gap: 0; }
  .editor-properties { display: none; }
  .mobile-editor-controls { padding: var(--space-4) var(--space-4) 0; justify-content: space-between; }
  .mobile-editor-controls [data-drawer="properties"] { display: inline-flex; }
  .mobile-editor-controls .button { flex: 1; min-height: 42px; font-size: 13px; }
  .editor-properties.drawer-open { display: block; position: fixed; right: 0; top: 0; bottom: 0; width: min(320px, 88vw); max-height: 100dvh; border-radius: 0; padding: var(--space-5); z-index: 40; }
  .drawer-close { display: inline-flex; }
  .survey-canvas { padding: var(--space-3); }
  .canvas-survey-heading h1 { font-size: 23px; }
  .canvas-survey-heading p { font-size: 13px; }
  .editor-question { padding: var(--space-3); }
  .editor-question .question-title { font-size: 15px; gap: var(--space-2); }
  .question-answer { margin-left: 30px; }
  .question-description { padding-left: 30px; }
  .question-number { font-size: 14px; }
  .rating-options { gap: var(--space-2); }
  .rating-star { font-size: 28px; }
  .lock-notice { padding: var(--space-3) var(--space-4); align-items: flex-start; font-size: 12px; }
  .lock-notice .icon { margin-top: 2px; }
  .auth-header { padding: var(--space-5); }
  .auth-header > span { display: none; }
  .auth-main { display: flex; flex-direction: column; gap: var(--space-6); padding: var(--space-4) var(--space-5) var(--space-8); margin: 0 auto; max-width: 440px; }
  .auth-intro { text-align: center; }
  .auth-intro h1 { font-size: 26px; line-height: 1.5; }
  .auth-intro > p { font-size: 12px; margin-top: var(--space-3); }
  .auth-steps { display: none; }
  .auth-card { width: 100%; padding: var(--space-6); }
  .auth-footer { margin-top: auto; }
  .results-main { padding: var(--space-6) var(--space-4) var(--space-10); }
  .results-main .page-heading p { display: none; }
  .results-stats .stat-status { font-size: 18px; }
  .results-tabs { justify-content: flex-start; gap: var(--space-4); }
  .summary-card { padding: var(--space-4); }
  .summary-title { gap: var(--space-2); flex-wrap: wrap; }
  .summary-title h2 { font-size: 14px; }
  .summary-type { font-size: 11px; }
  .summary-total { margin-left: 30px; }
  .result-bars { padding-left: 0; gap: var(--space-3); }
  .result-bar-row { grid-template-columns: minmax(64px, 1fr) 90px; gap: var(--space-2); }
  .bar-label { grid-column: 1 / -1; font-size: 12px; }
  .bar-count { font-size: 12px; }
  .bar-track { height: 9px; }
  .text-answer-list { margin-left: 0; }
  .text-answer { font-size: 13px; }
  .pagination { flex-wrap: wrap; padding: var(--space-3) var(--space-4); }
  .respond-page { padding: var(--space-4) var(--space-3) var(--space-8); }
  .respond-heading { padding: var(--space-6) var(--space-5); }
  .respond-heading h1 { font-size: 24px; }
  .respond-heading > p { font-size: 14px; }
  .respond-questions { padding: var(--space-6) var(--space-5) 0; }
  .respond-questions .question-title { font-size: 15px; gap: var(--space-2); }
  .respond-questions .question-number { min-width: 20px; }
  .respond-questions .question-answer { margin-left: 0; }
  .respond-questions .question-description { padding-left: 0; }
  .respond-questions .rating-options { gap: var(--space-2); }
  .respond-questions .rating-option { min-width: 24px; min-height: 44px; justify-content: center; }
  .respond-questions input:not([type="checkbox"]):not([type="radio"]), .respond-questions textarea { font-size: 16px; }
  .respond-questions .choice { min-height: 44px; }
  .response-submit { padding: 0 var(--space-5) var(--space-6); }
  .response-submit .button { width: 100%; }
  .progress-row { font-size: 10px; }
  .respond-state { padding: var(--space-10) var(--space-5); margin-top: 8dvh; }
  .respond-state h1 { font-size: 24px; }
  .preview-notice { font-size: 11px; padding: var(--space-2) var(--space-3); }
  .preview-notice .icon { display: none; }
  .modal-form { padding: var(--space-5); }
  #toasts { bottom: var(--space-4); right: var(--space-4); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
