:root {
  --bg: #f5f6fb;
  --surface: rgba(255, 255, 255, 0.86);
  --surface-solid: #ffffff;
  --ink: #19213a;
  --muted: #70778f;
  --soft: #969cb2;
  --line: rgba(68, 76, 120, 0.12);
  --primary: #5b5ed7;
  --primary-deep: #4548b9;
  --primary-soft: #ededff;
  --teal: #22a992;
  --teal-soft: #e6f8f3;
  --danger: #d95968;
  --warning: #c9852f;
  --shadow-sm: 0 8px 24px rgba(39, 43, 85, 0.07);
  --shadow-md: 0 18px 50px rgba(39, 43, 85, 0.11);
  --shadow-lg: 0 30px 90px rgba(39, 43, 85, 0.16);
  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 30px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  font-family: Inter, "SF Pro Display", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(91, 94, 215, 0.25);
  outline-offset: 3px;
}

::selection {
  color: #fff;
  background: var(--primary);
}

.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;
}

.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(circle at 15% 0%, rgba(125, 124, 235, 0.09), transparent 32%),
    radial-gradient(circle at 90% 85%, rgba(63, 190, 170, 0.08), transparent 30%);
}

.ambient-grid {
  position: absolute;
  inset: 0;
  opacity: 0.16;
  background-image: radial-gradient(rgba(77, 80, 140, 0.22) 0.6px, transparent 0.6px);
  background-size: 24px 24px;
  mask-image: linear-gradient(to bottom, black, transparent 75%);
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(4px);
  opacity: 0.5;
  animation: ambientFloat 16s ease-in-out infinite alternate;
}

.orb-one {
  width: 380px;
  height: 380px;
  top: -210px;
  right: -80px;
  background: radial-gradient(circle at 35% 35%, rgba(145, 139, 255, 0.35), rgba(103, 98, 218, 0.04) 70%);
}

.orb-two {
  width: 300px;
  height: 300px;
  left: -170px;
  top: 45%;
  background: radial-gradient(circle at 60% 40%, rgba(89, 211, 190, 0.24), rgba(89, 211, 190, 0.02) 70%);
  animation-delay: -6s;
}

.orb-three {
  width: 220px;
  height: 220px;
  right: 8%;
  bottom: -130px;
  background: radial-gradient(circle, rgba(242, 183, 142, 0.2), transparent 70%);
  animation-delay: -10s;
}

@keyframes ambientFloat {
  to { transform: translate3d(30px, 24px, 0) scale(1.08); }
}

#app {
  min-height: 100vh;
}

.initial-loader {
  min-height: 100vh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 18px;
  color: var(--muted);
}

.loader-mark {
  width: 44px;
  height: 44px;
  border: 3px solid rgba(91, 94, 215, 0.15);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

.page {
  min-height: 100vh;
  animation: pageIn 0.55s var(--ease) both;
}

.page-shell {
  width: min(1220px, calc(100% - 48px));
  margin: 0 auto;
  padding-bottom: 64px;
}

@keyframes pageIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.topbar {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand-mark {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  color: #fff;
  border-radius: 14px;
  background: linear-gradient(145deg, #7375e8, #4d50c6);
  box-shadow: 0 10px 25px rgba(78, 80, 190, 0.25);
}

.brand-mark svg {
  width: 25px;
  height: 25px;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.brand-title {
  font-size: 18px;
  font-weight: 750;
  letter-spacing: 0.04em;
}

.brand-subtitle {
  margin-top: 4px;
  color: var(--soft);
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 0.16em;
}

.topbar-actions,
.topbar-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-actions {
  gap: 16px;
}

.nav-link {
  min-height: 42px;
  padding: 9px 15px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 0;
  border-radius: 12px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  transition: 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
  background: rgba(255, 255, 255, 0.72);
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 10px;
  border-left: 1px solid var(--line);
}

.avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border-radius: 12px;
  color: var(--primary-deep);
  background: var(--primary-soft);
  font-size: 14px;
  font-weight: 750;
}

.user-chip-copy {
  max-width: 150px;
  line-height: 1.35;
}

.user-chip-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 650;
}

.user-chip-role {
  color: var(--soft);
  font-size: 11px;
}

.icon {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn {
  min-height: 46px;
  padding: 11px 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: 13px;
  cursor: pointer;
  font-weight: 650;
  line-height: 1.3;
  transition: transform 0.25s var(--ease), box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0) scale(0.98);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #686be0, #5053c8);
  box-shadow: 0 10px 24px rgba(80, 83, 200, 0.23);
}

.btn-primary:hover {
  box-shadow: 0 14px 30px rgba(80, 83, 200, 0.3);
}

.btn-secondary {
  color: var(--primary-deep);
  border-color: rgba(91, 94, 215, 0.16);
  background: var(--primary-soft);
}

.btn-ghost {
  color: var(--muted);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.7);
}

.btn-ghost:hover {
  color: var(--ink);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.btn-white {
  color: var(--primary-deep);
  background: #fff;
  box-shadow: 0 12px 30px rgba(19, 22, 62, 0.18);
}

.btn-text {
  min-height: 40px;
  padding: 8px 10px;
  color: var(--primary);
  background: transparent;
}

.btn-danger {
  color: var(--danger);
  background: #fff0f2;
}

.btn-sm {
  min-height: 38px;
  padding: 8px 13px;
  border-radius: 11px;
  font-size: 13px;
}

.btn-block {
  width: 100%;
}

.btn-loading::before {
  content: "";
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* 登录 */
.login-page {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(420px, 0.88fr);
  min-height: 100vh;
  overflow: hidden;
}

.login-story {
  position: relative;
  padding: clamp(36px, 5vw, 76px) clamp(36px, 7vw, 104px);
  display: flex;
  flex-direction: column;
  color: #fff;
  background:
    radial-gradient(circle at 82% 12%, rgba(150, 151, 255, 0.45), transparent 30%),
    radial-gradient(circle at 12% 85%, rgba(47, 189, 166, 0.25), transparent 35%),
    linear-gradient(145deg, #242650 0%, #363879 52%, #4b4da5 100%);
  isolation: isolate;
}

.login-story::before,
.login-story::after {
  content: "";
  position: absolute;
  z-index: -1;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}

.login-story::before {
  width: 460px;
  height: 460px;
  right: -180px;
  top: 16%;
  animation: slowRotate 28s linear infinite;
}

.login-story::after {
  width: 340px;
  height: 340px;
  right: -120px;
  top: calc(16% + 60px);
  border-style: dashed;
  animation: slowRotate 22s linear infinite reverse;
}

@keyframes slowRotate {
  to { transform: rotate(360deg); }
}

.login-story .brand-mark {
  background: rgba(255, 255, 255, 0.16);
  box-shadow: none;
  backdrop-filter: blur(10px);
}

.login-story .brand-subtitle {
  color: rgba(255, 255, 255, 0.5);
}

.login-hero {
  margin: auto 0;
  padding: 54px 0 30px;
  max-width: 630px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 20px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 24px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.login-story .eyebrow {
  color: #a9ede1;
}

.login-title {
  margin: 0;
  font-size: clamp(38px, 4.3vw, 66px);
  font-weight: 730;
  line-height: 1.18;
  letter-spacing: -0.035em;
  animation: fadeUp 0.8s 0.1s var(--ease) both;
}

.login-title span {
  color: #b8b9ff;
}

.login-description {
  max-width: 510px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.67);
  font-size: 16px;
  line-height: 1.9;
  animation: fadeUp 0.8s 0.2s var(--ease) both;
}

.login-mini-card {
  width: min(420px, 92%);
  margin-top: 42px;
  padding: 19px 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  animation: fadeUp 0.8s 0.32s var(--ease) both, gentleFloat 5s 1.2s ease-in-out infinite;
}

@keyframes gentleFloat {
  50% { transform: translateY(-7px); }
}

.mini-card-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border-radius: 14px;
  color: #b9f3e8;
  background: rgba(89, 211, 190, 0.13);
}

.login-mini-card strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
}

.login-mini-card p {
  margin: 3px 0 0;
  color: rgba(255, 255, 255, 0.53);
  font-size: 12px;
}

.login-footer {
  color: rgba(255, 255, 255, 0.36);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.login-panel {
  padding: 40px clamp(30px, 5vw, 80px);
  display: grid;
  place-items: center;
  background: rgba(250, 250, 255, 0.8);
}

.login-box {
  width: min(410px, 100%);
  animation: fadeUp 0.7s 0.15s var(--ease) both;
}

.login-box-header {
  margin-bottom: 32px;
}

.login-kicker {
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.login-box h2 {
  margin: 8px 0 8px;
  font-size: 30px;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.login-box-header p {
  margin: 0;
  color: var(--muted);
}

.form-group {
  margin-bottom: 19px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  color: #4e556e;
  font-size: 13px;
  font-weight: 600;
}

.input-wrap {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  width: 18px;
  height: 18px;
  color: var(--soft);
  transform: translateY(-50%);
  pointer-events: none;
}

.form-input {
  width: 100%;
  min-height: 50px;
  padding: 12px 15px;
  border: 1px solid rgba(76, 82, 125, 0.15);
  border-radius: 13px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.88);
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}

.input-wrap .form-input {
  padding-left: 46px;
}

.form-input::placeholder {
  color: #b0b4c4;
}

.form-input:focus {
  outline: none;
  border-color: rgba(91, 94, 215, 0.55);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(91, 94, 215, 0.09);
}

.form-input.has-icon-right {
  padding-right: 46px;
}

.password-toggle {
  position: absolute;
  right: 7px;
  top: 50%;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 0;
  color: var(--soft);
  background: transparent;
  transform: translateY(-50%);
  cursor: pointer;
}

.form-error {
  margin: 8px 0 0;
  color: var(--danger);
  font-size: 12px;
}

.login-submit {
  margin-top: 8px;
  min-height: 52px;
}

.login-assurance {
  margin-top: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: var(--soft);
  font-size: 12px;
}

.login-assurance .icon {
  width: 15px;
  height: 15px;
}

/* 用户首页 */
.dashboard-hero {
  position: relative;
  min-height: 280px;
  margin-top: 20px;
  padding: clamp(30px, 4.5vw, 55px);
  display: flex;
  align-items: center;
  overflow: hidden;
  border-radius: var(--radius-lg);
  color: #fff;
  background:
    radial-gradient(circle at 84% 10%, rgba(142, 145, 255, 0.6), transparent 35%),
    radial-gradient(circle at 55% 120%, rgba(41, 187, 165, 0.27), transparent 45%),
    linear-gradient(120deg, #27294f, #3f4289 65%, #5659b3);
  box-shadow: 0 25px 60px rgba(44, 46, 100, 0.18);
}

.dashboard-hero::after {
  content: "";
  position: absolute;
  width: 330px;
  height: 330px;
  right: -75px;
  top: -105px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 44% 56% 60% 40%;
  animation: slowRotate 25s linear infinite;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 690px;
  animation: fadeUp 0.7s 0.1s var(--ease) both;
}

.hero-content .eyebrow {
  margin-bottom: 14px;
  color: #a9ede1;
}

.hero-content h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.025em;
}

.hero-content p {
  max-width: 570px;
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.67);
  font-size: 15px;
}

.hero-badges {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-badge {
  padding: 7px 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.08);
  font-size: 12px;
  backdrop-filter: blur(8px);
}

.hero-badge .icon {
  width: 14px;
  height: 14px;
}

.hero-art {
  position: absolute;
  right: 7%;
  top: 50%;
  width: 150px;
  height: 150px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 40px;
  background: rgba(255, 255, 255, 0.07);
  transform: translateY(-50%) rotate(8deg);
  backdrop-filter: blur(12px);
  animation: artFloat 6s ease-in-out infinite;
}

.hero-art svg {
  width: 82px;
  height: 82px;
  color: rgba(255, 255, 255, 0.82);
  transform: rotate(-8deg);
}

@keyframes artFloat {
  0%, 100% { transform: translateY(-50%) rotate(8deg); }
  50% { transform: translateY(calc(-50% - 10px)) rotate(5deg); }
}

.section-heading {
  margin: 40px 0 20px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.section-heading h2 {
  margin: 0;
  font-size: 23px;
  letter-spacing: -0.02em;
}

.section-heading p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.section-count {
  color: var(--soft);
  font-size: 13px;
}

.scale-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.scale-card {
  --accent: #6466d9;
  --accent-soft: #efefff;
  position: relative;
  min-height: 300px;
  padding: 25px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(72, 77, 123, 0.09);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(16px);
  transition: transform 0.35s var(--ease), box-shadow 0.35s ease, border-color 0.35s ease;
  animation: fadeUp 0.65s var(--delay, 0s) var(--ease) both;
}

.scale-card::before {
  content: "";
  position: absolute;
  width: 130px;
  height: 130px;
  top: -70px;
  right: -50px;
  border-radius: 50%;
  background: var(--accent-soft);
  transition: transform 0.45s var(--ease);
}

.scale-card:hover {
  transform: translateY(-7px);
  border-color: rgba(91, 94, 215, 0.18);
  box-shadow: var(--shadow-md);
}

.scale-card:hover::before {
  transform: scale(1.45);
}

.scale-card-top {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.scale-number {
  color: var(--accent);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.12em;
}

.status-pill,
.level-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--muted);
  background: #f0f1f6;
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}

.status-pill.in-progress {
  color: #9c6a24;
  background: #fff5df;
}

.status-pill.completed {
  color: #16816f;
  background: var(--teal-soft);
}

.scale-card h3 {
  position: relative;
  min-height: 54px;
  margin: 21px 0 9px;
  font-size: 19px;
  line-height: 1.45;
  letter-spacing: -0.01em;
}

.scale-description {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
}

.scale-meta {
  margin: 17px 0 20px;
  display: flex;
  gap: 16px;
  color: var(--soft);
  font-size: 12px;
}

.scale-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.scale-meta .icon {
  width: 15px;
  height: 15px;
}

.scale-card-actions {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.scale-card-actions .btn-primary {
  flex: 1;
}

.scale-card-actions .btn {
  min-height: 43px;
  font-size: 13px;
}

.empty-state {
  padding: 70px 24px;
  text-align: center;
  border: 1px dashed rgba(78, 84, 130, 0.2);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.55);
}

.empty-state-icon {
  width: 68px;
  height: 68px;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  color: var(--primary);
  background: var(--primary-soft);
}

.empty-state h3 {
  margin: 0 0 8px;
}

.empty-state p {
  margin: 0;
  color: var(--muted);
}

/* 答题 */
.quiz-page {
  min-height: 100vh;
  padding-bottom: max(30px, env(safe-area-inset-bottom));
}

.quiz-shell {
  width: min(900px, calc(100% - 40px));
  margin: 0 auto;
}

.quiz-topbar {
  min-height: 84px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
}

.quiz-back {
  justify-self: start;
}

.quiz-scale-name {
  max-width: 450px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 650;
  text-align: center;
}

.save-state {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--soft);
  font-size: 12px;
  transition: color 0.25s;
}

.save-state.saved {
  color: var(--teal);
}

.save-state.saving .icon {
  animation: spin 1s linear infinite;
}

.quiz-progress-wrap {
  margin: 12px 0 28px;
}

.quiz-progress-copy {
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
}

.quiz-progress-copy strong {
  color: var(--primary);
  font-weight: 700;
}

.progress-track {
  height: 7px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(91, 94, 215, 0.1);
}

.progress-bar {
  position: relative;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #5b5ed7, #7b7de8, #40bca7);
  box-shadow: 0 2px 10px rgba(91, 94, 215, 0.25);
  transition: width 0.6s var(--ease);
}

.progress-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: translateX(-100%);
  animation: progressShine 2.4s ease-in-out infinite;
}

@keyframes progressShine {
  60%, 100% { transform: translateX(100%); }
}

.question-card {
  position: relative;
  padding: clamp(26px, 5vw, 48px);
  overflow: hidden;
  border: 1px solid rgba(75, 80, 125, 0.1);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(18px);
}

.question-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 46px;
  width: 4px;
  height: 46px;
  border-radius: 0 4px 4px 0;
  background: linear-gradient(var(--primary), #8a8ced);
}

.question-index {
  margin-bottom: 13px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.12em;
}

.question-title {
  margin: 0 0 30px;
  font-size: clamp(20px, 3vw, 26px);
  font-weight: 650;
  line-height: 1.55;
  letter-spacing: -0.01em;
}

.options-list {
  display: grid;
  gap: 12px;
}

.option-button {
  position: relative;
  width: 100%;
  min-height: 62px;
  padding: 12px 52px 12px 13px;
  display: flex;
  align-items: center;
  gap: 15px;
  border: 1.5px solid rgba(75, 80, 125, 0.11);
  border-radius: 16px;
  color: #3d445e;
  background: rgba(249, 249, 253, 0.85);
  text-align: left;
  cursor: pointer;
  transition: transform 0.28s var(--ease), border-color 0.25s, background 0.25s, box-shadow 0.25s;
  animation: optionIn 0.5s calc(var(--i) * 0.065s + 0.08s) var(--ease) both;
}

@keyframes optionIn {
  from { opacity: 0; transform: translateX(16px); }
  to { opacity: 1; transform: translateX(0); }
}

.option-button:hover {
  z-index: 1;
  border-color: rgba(91, 94, 215, 0.35);
  background: #fff;
  box-shadow: 0 8px 24px rgba(60, 64, 125, 0.08);
  transform: translateX(4px);
}

.option-button.selected {
  border-color: var(--primary);
  color: var(--primary-deep);
  background: linear-gradient(100deg, #f0f0ff, #f7f7ff);
  box-shadow: 0 8px 25px rgba(91, 94, 215, 0.12);
  animation: optionSelect 0.35s var(--ease);
}

@keyframes optionSelect {
  45% { transform: scale(0.985); }
  75% { transform: scale(1.008); }
}

.option-letter {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border: 1px solid rgba(75, 80, 125, 0.1);
  border-radius: 11px;
  color: var(--muted);
  background: #fff;
  font-size: 13px;
  font-weight: 700;
  transition: 0.25s;
}

.option-button.selected .option-letter {
  border-color: var(--primary);
  color: #fff;
  background: var(--primary);
  box-shadow: 0 6px 15px rgba(91, 94, 215, 0.24);
}

.option-text {
  font-size: 15px;
  font-weight: 520;
  line-height: 1.55;
}

.option-check {
  position: absolute;
  right: 18px;
  top: 50%;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--primary);
  opacity: 0;
  transform: translateY(-50%) scale(0.3) rotate(-20deg);
  transition: 0.3s var(--ease);
}

.option-check .icon {
  width: 13px;
  height: 13px;
  stroke-width: 2.5;
}

.option-button.selected .option-check {
  opacity: 1;
  transform: translateY(-50%) scale(1) rotate(0);
}

.quiz-navigation {
  margin-top: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.quiz-navigation-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.quiz-hint {
  color: var(--soft);
  font-size: 12px;
  text-align: center;
}

.quiz-instruction {
  margin: 0 0 20px;
  padding: 13px 16px;
  border-radius: 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.55);
  font-size: 12px;
}

/* 提交成功 */
.submitted-page {
  min-height: 100vh;
  padding: 30px 20px;
  display: grid;
  place-items: center;
}

.submitted-card {
  position: relative;
  width: min(620px, 100%);
  padding: clamp(40px, 7vw, 70px) clamp(25px, 6vw, 60px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-lg);
  text-align: center;
  backdrop-filter: blur(20px);
  animation: successCardIn 0.75s var(--ease) both;
}

@keyframes successCardIn {
  from { opacity: 0; transform: translateY(30px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.success-visual {
  position: relative;
  width: 126px;
  height: 126px;
  margin: 0 auto 28px;
  display: grid;
  place-items: center;
}

.success-ring {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(34, 169, 146, 0.2);
  border-radius: 50%;
  animation: successPulse 2.2s ease-out infinite;
}

.success-ring:nth-child(2) {
  animation-delay: 0.7s;
}

@keyframes successPulse {
  from { opacity: 0.8; transform: scale(0.65); }
  to { opacity: 0; transform: scale(1.35); }
}

.success-check {
  width: 96px;
  height: 96px;
  display: grid;
  place-items: center;
  border-radius: 32px;
  color: #fff;
  background: linear-gradient(145deg, #42c7ae, #20a78f);
  box-shadow: 0 20px 40px rgba(34, 169, 146, 0.25);
  transform: rotate(-6deg);
  animation: checkPop 0.7s 0.25s var(--ease) both;
}

.success-check svg {
  width: 50px;
  height: 50px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.success-check path {
  stroke-dasharray: 50;
  stroke-dashoffset: 50;
  animation: drawCheck 0.6s 0.75s ease forwards;
}

@keyframes checkPop {
  from { opacity: 0; transform: rotate(-16deg) scale(0.4); }
  to { opacity: 1; transform: rotate(-6deg) scale(1); }
}

@keyframes drawCheck {
  to { stroke-dashoffset: 0; }
}

.submitted-card h1 {
  margin: 0;
  font-size: clamp(28px, 5vw, 38px);
  letter-spacing: -0.03em;
}

.submitted-card > p {
  max-width: 420px;
  margin: 15px auto 0;
  color: var(--muted);
  line-height: 1.85;
}

.submitted-ticket {
  margin: 26px 0;
  padding: 13px 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 12px;
  color: #18816f;
  background: var(--teal-soft);
  font-size: 12px;
}

.submitted-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.confetti {
  position: absolute;
  width: 7px;
  height: 12px;
  left: 50%;
  top: 45%;
  border-radius: 3px;
  background: var(--color);
  opacity: 0;
  animation: confettiFly 1.25s var(--delay) var(--ease) forwards;
}

@keyframes confettiFly {
  0% { opacity: 0; transform: translate(-50%, -50%) rotate(0); }
  15% { opacity: 0.8; }
  100% { opacity: 0; transform: translate(var(--x), var(--y)) rotate(var(--r)); }
}

/* 报告 */
.report-header {
  margin: 26px 0 22px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.report-header h1 {
  margin: 5px 0 5px;
  font-size: clamp(25px, 4vw, 36px);
  line-height: 1.35;
  letter-spacing: -0.025em;
}

.report-header p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.report-primary {
  position: relative;
  padding: clamp(28px, 5vw, 46px);
  display: grid;
  grid-template-columns: minmax(180px, 0.65fr) minmax(0, 1.35fr);
  align-items: center;
  gap: 40px;
  overflow: hidden;
  border-radius: 28px;
  color: #fff;
  background:
    radial-gradient(circle at 90% 0%, rgba(132, 136, 255, 0.6), transparent 40%),
    linear-gradient(125deg, #2b2d59, #4c4fa3);
  box-shadow: 0 22px 55px rgba(46, 48, 105, 0.18);
  animation: fadeUp 0.65s var(--ease) both;
}

.report-primary::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  right: -90px;
  bottom: -120px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 50%;
}

.primary-score {
  position: relative;
  z-index: 1;
  padding-right: 35px;
  border-right: 1px solid rgba(255, 255, 255, 0.14);
  text-align: center;
}

.primary-score-label {
  color: rgba(255, 255, 255, 0.57);
  font-size: 12px;
  letter-spacing: 0.12em;
}

.primary-score-value {
  margin: 5px 0;
  font-size: clamp(52px, 7vw, 74px);
  font-weight: 720;
  line-height: 1.2;
  letter-spacing: -0.05em;
}

.primary-score-value.text-value {
  font-size: clamp(25px, 4vw, 38px);
  line-height: 1.4;
  letter-spacing: -0.02em;
}

.primary-score-level {
  display: inline-block;
  padding: 5px 11px;
  border-radius: 999px;
  color: #d4d5ff;
  background: rgba(255, 255, 255, 0.1);
  font-size: 12px;
}

.primary-interpretation {
  position: relative;
  z-index: 1;
}

.primary-interpretation h2 {
  margin: 0 0 12px;
  font-size: 19px;
}

.primary-interpretation p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.95;
}

.report-facts {
  margin: 18px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.report-fact {
  padding: 13px 17px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.68);
  font-size: 12px;
}

.report-fact span {
  color: var(--muted);
}

.report-fact strong {
  color: var(--ink);
  font-weight: 650;
}

.dimension-section {
  margin-top: 30px;
}

.dimension-section h2 {
  margin: 0 0 17px;
  font-size: 21px;
}

.dimension-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px;
}

.dimension-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  animation: fadeUp 0.6s var(--delay, 0s) var(--ease) both;
}

.dimension-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.dimension-top h3 {
  margin: 0;
  font-size: 16px;
}

.level-pill {
  color: var(--primary);
  background: var(--primary-soft);
}

.dimension-score {
  margin: 16px 0 10px;
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.dimension-score strong {
  font-size: 32px;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.dimension-score span {
  color: var(--soft);
  font-size: 12px;
}

.dimension-track {
  height: 6px;
  margin-bottom: 17px;
  overflow: hidden;
  border-radius: 99px;
  background: #ececf4;
}

.dimension-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), #8b8de9);
  transition: width 1s 0.25s var(--ease);
}

.dimension-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.85;
}

.report-notes {
  margin-top: 22px;
  padding: 22px 24px;
  border: 1px solid rgba(91, 94, 215, 0.1);
  border-radius: 18px;
  background: rgba(237, 237, 255, 0.55);
}

.report-notes h3 {
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.report-notes ul {
  margin: 0;
  padding-left: 19px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.9;
}

.medical-disclaimer {
  margin: 18px 0 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 7px;
  color: var(--soft);
  font-size: 11px;
  text-align: center;
}

.medical-disclaimer .icon {
  width: 15px;
  height: 15px;
  margin-top: 2px;
}

.report-actions {
  margin-top: 26px;
  display: flex;
  justify-content: center;
  gap: 12px;
}

/* 后台 */
.admin-hero {
  margin: 22px 0 26px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.admin-hero h1 {
  margin: 4px 0 5px;
  font-size: 32px;
  letter-spacing: -0.025em;
}

.admin-hero p {
  margin: 0;
  color: var(--muted);
}

.admin-stats {
  margin-bottom: 24px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.stat-card {
  padding: 20px 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.stat-icon {
  width: 45px;
  height: 45px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border-radius: 14px;
  color: var(--primary);
  background: var(--primary-soft);
}

.stat-card:nth-child(2) .stat-icon {
  color: var(--teal);
  background: var(--teal-soft);
}

.stat-card:nth-child(3) .stat-icon {
  color: var(--warning);
  background: #fff4df;
}

.stat-copy strong {
  display: block;
  font-size: 25px;
  line-height: 1.2;
}

.stat-copy span {
  color: var(--muted);
  font-size: 12px;
}

.admin-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(16px);
}

.admin-card-header {
  min-height: 72px;
  padding: 17px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
}

.admin-card-header h2 {
  margin: 0;
  font-size: 17px;
}

.admin-card-header p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.data-table th {
  padding: 13px 20px;
  color: var(--soft);
  background: rgba(247, 247, 252, 0.7);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.data-table td {
  padding: 17px 20px;
  border-top: 1px solid rgba(72, 77, 123, 0.07);
  font-size: 13px;
  vertical-align: middle;
}

.data-table tbody tr {
  transition: background 0.2s;
}

.data-table tbody tr:hover {
  background: rgba(245, 245, 253, 0.7);
}

.table-user {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 180px;
}

.table-user .avatar {
  width: 36px;
  height: 36px;
  border-radius: 11px;
}

.table-user strong {
  display: block;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 650;
}

.table-user small {
  color: var(--soft);
}

.scale-tags {
  max-width: 310px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.scale-tag {
  padding: 3px 7px;
  border-radius: 7px;
  color: #656b87;
  background: #f0f1f7;
  font-size: 10px;
  white-space: nowrap;
}

.table-actions {
  display: flex;
  gap: 5px;
  white-space: nowrap;
}

.status-dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--teal);
  font-size: 12px;
}

.status-dot::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 4px rgba(34, 169, 146, 0.09);
}

.status-dot.disabled {
  color: var(--soft);
}

.admin-tabs {
  margin: 22px 0 0;
  display: flex;
  gap: 8px;
}

.admin-empty {
  padding: 45px 20px;
  color: var(--muted);
  text-align: center;
}

.filter-select {
  min-height: 40px;
  padding: 8px 34px 8px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--ink);
  background: #fff;
}

/* 弹窗与提示 */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  padding: 22px;
  display: grid;
  place-items: center;
  background: rgba(24, 27, 54, 0.42);
  backdrop-filter: blur(8px);
  animation: modalFade 0.25s ease both;
}

@keyframes modalFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal {
  width: min(540px, 100%);
  max-height: min(820px, calc(100vh - 44px));
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 24px;
  background: #fdfdff;
  box-shadow: 0 35px 100px rgba(20, 23, 55, 0.28);
  animation: modalIn 0.4s var(--ease) both;
}

.modal-sm {
  width: min(440px, 100%);
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(18px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  padding: 23px 25px 16px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.modal-header h2 {
  margin: 0;
  font-size: 21px;
}

.modal-header p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.modal-close {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border: 0;
  border-radius: 11px;
  color: var(--muted);
  background: #f0f1f6;
  cursor: pointer;
}

.modal-body {
  padding: 8px 25px 25px;
}

.modal-footer {
  padding: 17px 25px 23px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--line);
}

.modal-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 14px;
}

.modal-form-grid .full {
  grid-column: 1 / -1;
}

.checkbox-grid {
  display: grid;
  gap: 9px;
}

.checkbox-card {
  position: relative;
  padding: 13px 14px;
  display: flex;
  align-items: center;
  gap: 11px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  cursor: pointer;
  transition: 0.25s;
}

.checkbox-card:hover {
  border-color: rgba(91, 94, 215, 0.35);
}

.checkbox-card:has(input:checked) {
  border-color: rgba(91, 94, 215, 0.5);
  background: var(--primary-soft);
}

.checkbox-card input {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: var(--primary);
}

.checkbox-card-copy {
  flex: 1;
}

.checkbox-card-copy strong {
  display: block;
  font-size: 13px;
  font-weight: 650;
}

.checkbox-card-copy small {
  color: var(--soft);
  font-size: 11px;
}

.switch-row {
  min-height: 52px;
  padding: 10px 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
}

.switch {
  position: relative;
  width: 44px;
  height: 25px;
  flex-shrink: 0;
}

.switch input {
  position: absolute;
  opacity: 0;
}

.switch-track {
  position: absolute;
  inset: 0;
  border-radius: 99px;
  background: #d9dce7;
  cursor: pointer;
  transition: 0.25s;
}

.switch-track::after {
  content: "";
  position: absolute;
  width: 19px;
  height: 19px;
  left: 3px;
  top: 3px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(30, 33, 65, 0.2);
  transition: 0.25s var(--ease);
}

.switch input:checked + .switch-track {
  background: var(--teal);
}

.switch input:checked + .switch-track::after {
  transform: translateX(19px);
}

.confirm-visual {
  width: 60px;
  height: 60px;
  margin-bottom: 16px;
  display: grid;
  place-items: center;
  border-radius: 19px;
  color: var(--primary);
  background: var(--primary-soft);
}

.confirm-text {
  margin: 0;
  color: var(--muted);
  line-height: 1.85;
}

.toast-root {
  position: fixed;
  z-index: 200;
  left: 50%;
  bottom: max(26px, env(safe-area-inset-bottom));
  width: min(420px, calc(100% - 32px));
  display: grid;
  gap: 8px;
  transform: translateX(-50%);
  pointer-events: none;
}

.toast {
  padding: 13px 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  color: #fff;
  background: rgba(34, 38, 70, 0.93);
  box-shadow: 0 14px 35px rgba(29, 32, 65, 0.2);
  backdrop-filter: blur(12px);
  font-size: 13px;
  animation: toastIn 0.4s var(--ease) both;
}

.toast.error {
  background: rgba(174, 64, 78, 0.95);
}

.toast.success {
  background: rgba(24, 137, 117, 0.95);
}

.toast.leaving {
  animation: toastOut 0.3s ease both;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(14px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toastOut {
  to { opacity: 0; transform: translateY(8px); }
}

.loading-block {
  min-height: 55vh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 15px;
  color: var(--muted);
}

.loading-block .loader-mark {
  width: 36px;
  height: 36px;
}

.error-page {
  min-height: 70vh;
  display: grid;
  place-content: center;
  justify-items: center;
  padding: 30px;
  text-align: center;
}

.error-page h2 {
  margin: 18px 0 8px;
}

.error-page p {
  margin: 0 0 22px;
  color: var(--muted);
}


.login-mobile-brand {
  display: none;
}

@media (max-width: 1100px) {
  .scale-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-art {
    right: 5%;
    width: 125px;
    height: 125px;
  }

  .login-story {
    padding-left: 50px;
    padding-right: 50px;
  }
}

@media (max-width: 900px) {
  .login-page {
    grid-template-columns: minmax(0, 1fr) 400px;
  }

  .login-story {
    padding: 35px;
  }

  .login-title {
    font-size: 38px;
  }

  .login-description {
    font-size: 14px;
  }

  .login-mini-card {
    width: 100%;
  }

  .hero-art {
    display: none;
  }

  .topbar-nav .nav-link {
    padding-left: 11px;
    padding-right: 11px;
  }

  .user-chip-copy {
    display: none;
  }

  .user-chip {
    padding-left: 12px;
  }

  .dimension-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .page-shell {
    width: min(100% - 30px, 620px);
    padding-bottom: 40px;
  }

  .login-page {
    display: block;
    background:
      radial-gradient(circle at 100% 0%, rgba(112, 114, 222, 0.18), transparent 35%),
      radial-gradient(circle at 0% 90%, rgba(57, 188, 167, 0.12), transparent 35%);
  }

  .login-story {
    display: none;
  }

  .login-panel {
    min-height: 100vh;
    padding: 30px 22px;
    background: transparent;
  }

  .login-mobile-brand {
    margin-bottom: 42px;
    display: inline-flex;
  }

  .login-box {
    width: min(430px, 100%);
  }

  .login-box h2 {
    font-size: 27px;
  }

  .topbar {
    min-height: 76px;
    gap: 10px;
  }

  .brand-mark {
    width: 39px;
    height: 39px;
    border-radius: 12px;
  }

  .brand-title {
    font-size: 16px;
  }

  .brand-subtitle {
    display: none;
  }

  .topbar-actions {
    gap: 5px;
  }

  .topbar-nav {
    gap: 2px;
  }

  .topbar-nav .nav-link {
    min-height: 40px;
    padding: 8px 9px;
    font-size: 12px;
  }

  .topbar-nav .nav-link .icon {
    display: none;
  }

  .user-chip {
    padding-left: 6px;
    border-left: 0;
  }

  .user-chip .avatar {
    display: none;
  }

  .dashboard-hero {
    min-height: 290px;
    margin-top: 12px;
    padding: 30px 25px;
    border-radius: 24px;
  }

  .hero-content h1 {
    font-size: 31px;
  }

  .hero-content p {
    font-size: 14px;
  }

  .section-heading {
    margin-top: 30px;
  }

  .scale-card {
    min-height: 285px;
  }

  .quiz-shell {
    width: calc(100% - 28px);
  }

  .quiz-topbar {
    min-height: 72px;
    grid-template-columns: auto 1fr auto;
    gap: 10px;
  }

  .quiz-back {
    width: 42px;
    height: 42px;
    min-height: 42px;
    padding: 0;
  }

  .quiz-back .btn-label {
    display: none;
  }

  .quiz-scale-name {
    font-size: 13px;
  }

  .save-state .save-label {
    display: none;
  }

  .quiz-progress-wrap {
    margin-top: 7px;
    margin-bottom: 18px;
  }

  .question-card {
    padding: 26px 20px;
    border-radius: 22px;
  }

  .question-card::before {
    top: 31px;
    height: 38px;
  }

  .question-title {
    margin-bottom: 23px;
    font-size: 20px;
  }

  .option-button {
    min-height: 60px;
    padding-right: 44px;
    gap: 12px;
  }

  .option-button:hover {
    transform: none;
  }

  .option-check {
    right: 13px;
  }

  .quiz-hint {
    display: none;
  }

  .quiz-navigation .btn {
    min-height: 44px;
    padding: 10px 15px;
    font-size: 13px;
  }

  .report-header {
    margin-top: 15px;
    align-items: flex-start;
    flex-direction: column;
  }

  .report-primary {
    grid-template-columns: 1fr;
    gap: 25px;
    padding: 28px 24px;
  }

  .primary-score {
    padding: 0 0 24px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  }

  .primary-score-value {
    font-size: 56px;
  }

  .admin-hero {
    margin-top: 15px;
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-hero h1 {
    font-size: 27px;
  }

  .admin-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 9px;
  }

  .stat-card {
    padding: 15px 10px;
    flex-direction: column;
    gap: 9px;
    text-align: center;
  }

  .stat-icon {
    width: 38px;
    height: 38px;
  }

  .stat-copy strong {
    font-size: 22px;
  }

  .admin-card-header {
    padding: 15px;
  }

  .responsive-table,
  .responsive-table tbody,
  .responsive-table tr,
  .responsive-table td {
    display: block;
    width: 100%;
  }

  .responsive-table thead {
    display: none;
  }

  .responsive-table tbody tr {
    padding: 14px 16px;
    border-top: 1px solid var(--line);
  }

  .responsive-table tbody tr:first-child {
    border-top: 0;
  }

  .responsive-table td {
    padding: 7px 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    border: 0;
    text-align: right;
  }

  .responsive-table td::before {
    content: attr(data-label);
    flex-shrink: 0;
    color: var(--soft);
    font-size: 11px;
  }

  .responsive-table td:first-child {
    padding-top: 0;
  }

  .responsive-table td:first-child::before {
    display: none;
  }

  .responsive-table .table-user {
    min-width: 0;
    text-align: left;
  }

  .responsive-table .scale-tags {
    justify-content: flex-end;
  }

  .responsive-table .table-actions {
    justify-content: flex-end;
  }
}

@media (max-width: 650px) {
  .scale-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .scale-card {
    min-height: 0;
    padding: 16px;
    border-radius: 18px;
  }

  .scale-card-top {
    align-items: center;
  }

  .scale-number {
    font-size: 10px;
    letter-spacing: 0.08em;
  }

  .scale-card .status-pill {
    padding: 4px 7px;
    font-size: 10px;
  }

  .scale-card h3 {
    min-height: 66px;
    margin: 14px 0 0;
    font-size: 15px;
    line-height: 1.45;
  }

  .scale-description {
    display: none;
  }

  .scale-meta {
    margin: 12px 0 14px;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    font-size: 11px;
  }

  .scale-card-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 7px;
  }

  .scale-card-actions .btn {
    width: 100%;
    min-height: 40px;
    padding: 8px 10px;
    font-size: 12px;
  }

  .scale-card-actions .btn .icon {
    width: 15px;
    height: 15px;
  }

  .section-count {
    display: none;
  }

  .submitted-page {
    padding: 18px 14px;
  }

  .submitted-card {
    border-radius: 26px;
  }

  .submitted-actions,
  .report-actions {
    flex-direction: column;
  }

  .submitted-actions .btn,
  .report-actions .btn {
    width: 100%;
  }

  .report-facts {
    display: grid;
    grid-template-columns: 1fr;
  }

  .report-fact {
    justify-content: space-between;
  }

  .dimension-card {
    padding: 21px;
  }

  .modal-backdrop {
    padding: 12px;
    align-items: end;
  }

  .modal {
    width: 100%;
    max-height: calc(100vh - 24px);
    border-radius: 24px 24px 16px 16px;
  }

  .modal-form-grid {
    grid-template-columns: 1fr;
  }

  .modal-form-grid .full {
    grid-column: auto;
  }
}

@media (max-width: 390px) {
  .page-shell {
    width: calc(100% - 22px);
  }

  .brand-copy {
    display: none;
  }

  .topbar-nav .nav-link {
    padding: 8px;
  }

  .dashboard-hero {
    padding: 26px 21px;
  }

  .hero-content h1 {
    font-size: 28px;
  }

  .hero-badges {
    gap: 7px;
  }

  .hero-badge {
    font-size: 11px;
  }

  .quiz-shell {
    width: calc(100% - 20px);
  }

  .question-card {
    padding: 24px 16px;
  }

  .option-button {
    padding-left: 10px;
    gap: 10px;
  }

  .option-letter {
    width: 34px;
    height: 34px;
  }

  .option-text {
    font-size: 14px;
  }

  .quiz-navigation {
    gap: 7px;
  }

  .quiz-navigation-right {
    gap: 7px;
  }

  .quiz-navigation .btn {
    padding-left: 12px;
    padding-right: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .confetti {
    display: none;
  }
}
