:root {
  --ink: #242124;
  --soft-ink: #51474d;
  --muted: #8c8087;
  --line: #eadfe4;
  --paper: #fff8fb;
  --panel: rgba(255, 255, 255, .86);
  --rose: #e96f93;
  --rose-deep: #b94f70;
  --coral: #f0a17f;
  --mint: #9bc8bc;
  --blue: #9fb6d8;
  --lilac: #d9c4df;
  --cream: #fffdf9;
  --shadow: 0 22px 60px rgba(185, 79, 112, .13);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(120deg, rgba(255, 223, 232, .72) 0%, rgba(255, 250, 252, .92) 38%, rgba(232, 246, 242, .76) 100%),
    var(--paper);
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(185, 79, 112, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(185, 79, 112, .035) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, .45), transparent 72%);
}

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

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
  position: relative;
}

.side-panel {
  height: 100vh;
  position: sticky;
  top: 0;
  padding: 30px 20px;
  border-right: 1px solid rgba(255, 255, 255, .64);
  background: rgba(255, 255, 255, .48);
  backdrop-filter: blur(26px);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
}

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(135deg, var(--rose), var(--coral));
  box-shadow: 0 14px 30px rgba(233, 111, 147, .28);
}

.brand strong,
.brand span {
  display: block;
}

.brand strong {
  font-size: 17px;
  letter-spacing: 0;
}

.brand span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.nav-list {
  display: grid;
  gap: 10px;
}

.nav-item {
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 14px;
  color: var(--soft-ink);
  background: transparent;
  text-align: left;
  font-weight: 700;
}

.nav-item.active,
.nav-item:hover {
  color: var(--rose-deep);
  border-color: rgba(233, 111, 147, .2);
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 14px 36px rgba(185, 79, 112, .1);
}

.notice {
  margin-top: auto;
  border: 1px solid rgba(233, 111, 147, .18);
  border-radius: 8px;
  padding: 16px;
  background: rgba(255, 255, 255, .58);
}

.notice span {
  display: block;
  margin-bottom: 8px;
  color: var(--rose-deep);
  font-weight: 800;
}

.notice p,
.form-note,
.eyebrow,
.brand span {
  color: var(--muted);
  font-size: 13px;
}

.notice p {
  margin-bottom: 0;
  line-height: 1.75;
}

.main-panel {
  padding: 34px clamp(20px, 4vw, 58px) 54px;
  overflow-x: hidden;
}

.topbar,
.section-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 22px;
  margin-bottom: 24px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 820px;
  margin-bottom: 0;
  color: #30282e;
  font-size: clamp(32px, 4.5vw, 58px);
  line-height: 1.1;
  font-weight: 850;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 14px;
  color: var(--ink);
  font-size: 24px;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 12px;
  color: var(--ink);
  font-size: 18px;
  letter-spacing: 0;
}

.eyebrow {
  width: fit-content;
  margin-bottom: 12px;
  padding: 7px 11px;
  border: 1px solid rgba(233, 111, 147, .2);
  border-radius: 999px;
  color: var(--rose-deep);
  background: rgba(255, 255, 255, .66);
  font-weight: 800;
}

.user-box {
  min-width: 168px;
  padding-top: 6px;
  color: var(--muted);
  text-align: right;
}

.grid.two {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(330px, .85fr);
  gap: 22px;
}

.panel,
.question-panel,
.confirm-panel {
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
  padding: 26px;
}

.intro-panel {
  min-height: 390px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 18px;
  background:
    linear-gradient(140deg, rgba(255, 255, 255, .92), rgba(255, 246, 250, .74)),
    linear-gradient(90deg, rgba(233, 111, 147, .12), rgba(155, 200, 188, .16));
}

.intro-panel > p:last-child {
  margin: 0;
  padding-top: 16px;
  border-top: 1px solid rgba(233, 111, 147, .12);
  color: var(--soft-ink);
  line-height: 1.75;
}

.lead {
  max-width: 640px;
  color: var(--soft-ink);
  font-size: 16px;
  line-height: 1.9;
}

.mood-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0 22px;
}

.mood-strip div {
  min-height: 112px;
  border: 1px solid rgba(255, 255, 255, .76);
  border-radius: 8px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 16px 34px rgba(185, 79, 112, .09);
}

.mood-strip div:nth-child(1) {
  background: linear-gradient(145deg, rgba(255, 255, 255, .92), rgba(255, 226, 235, .88));
}

.mood-strip div:nth-child(2) {
  background: linear-gradient(145deg, rgba(255, 255, 255, .92), rgba(232, 247, 242, .9));
}

.mood-strip div:nth-child(3) {
  background: linear-gradient(145deg, rgba(255, 255, 255, .92), rgba(235, 241, 253, .9));
}

.mood-strip span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.mood-strip b {
  color: var(--ink);
  font-size: 21px;
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0;
}

.metric-row div {
  border: 1px solid rgba(233, 111, 147, .15);
  border-radius: 8px;
  padding: 16px;
  background: rgba(255, 255, 255, .58);
}

.metric-row strong,
.metric-row span {
  display: block;
}

.metric-row strong {
  color: var(--rose-deep);
  font-size: 34px;
  line-height: 1;
}

.metric-row span {
  margin-top: 9px;
  color: var(--muted);
  font-size: 13px;
}

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

.steps div {
  min-height: 82px;
  border: 1px solid rgba(36, 33, 36, .06);
  border-radius: 8px;
  padding: 15px;
  background: #fff;
}

.steps b,
.steps span {
  display: block;
}

.steps b {
  margin-bottom: 8px;
  color: var(--coral);
  font-size: 18px;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 18px;
  padding: 5px;
  border-radius: 8px;
  background: rgba(233, 111, 147, .08);
}

.tab {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  font-weight: 800;
}

.tab.active {
  color: #fff;
  background: linear-gradient(135deg, var(--rose), var(--coral));
  box-shadow: 0 10px 22px rgba(233, 111, 147, .24);
}

label {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--soft-ink);
  font-size: 14px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(36, 33, 36, .09);
  border-radius: 8px;
  padding: 13px 14px;
  color: var(--ink);
  background: rgba(255, 255, 255, .9);
  outline: none;
}

textarea {
  min-height: 88px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(233, 111, 147, .62);
  box-shadow: 0 0 0 4px rgba(233, 111, 147, .13);
}

.primary,
.secondary,
.danger {
  min-height: 48px;
  border-radius: 8px;
  padding: 12px 19px;
  font-weight: 800;
}

.primary {
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, var(--rose), var(--coral));
  box-shadow: 0 16px 32px rgba(233, 111, 147, .25);
}

.primary:hover {
  filter: saturate(1.06) brightness(.98);
}

.secondary {
  border: 1px solid rgba(233, 111, 147, .2);
  color: var(--rose-deep);
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 10px 24px rgba(185, 79, 112, .08);
}

.danger {
  border: 1px solid rgba(185, 79, 112, .16);
  color: var(--rose-deep);
  background: rgba(255, 237, 242, .85);
}

.hidden,
.view {
  display: none;
}

.view.active,
.question-panel.active,
.confirm-panel.active {
  display: block;
}

.question-panel,
.confirm-panel {
  margin-top: 22px;
}

#progressText {
  min-width: 92px;
  min-height: 40px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: var(--rose-deep);
  background: rgba(255, 255, 255, .72);
  font-weight: 900;
}

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

.question-card {
  border: 1px solid rgba(36, 33, 36, .06);
  border-radius: 8px;
  padding: 18px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 12px 28px rgba(185, 79, 112, .06);
}

.question-card.full {
  grid-column: 1 / -1;
}

.question-card p {
  margin-bottom: 12px;
  color: var(--ink);
  font-weight: 800;
  line-height: 1.58;
}

.actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 22px;
}

.answer-list,
.report-grid,
.code-table {
  display: grid;
  gap: 14px;
}

.answer-item,
.report-card,
.code-row {
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 8px;
  padding: 18px;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 12px 28px rgba(185, 79, 112, .06);
}

.answer-item b,
.answer-item span {
  display: block;
}

.answer-item span {
  margin-top: 7px;
  color: var(--muted);
}

.report-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}

.report-card {
  min-height: 210px;
  position: relative;
  overflow: hidden;
}

.report-card:nth-child(3n + 1) {
  background: linear-gradient(145deg, rgba(255, 255, 255, .94), rgba(255, 241, 247, .9));
}

.report-card:nth-child(3n + 2) {
  background: linear-gradient(145deg, rgba(255, 255, 255, .94), rgba(237, 249, 246, .9));
}

.report-card:nth-child(3n) {
  background: linear-gradient(145deg, rgba(255, 255, 255, .94), rgba(242, 246, 255, .9));
}

.report-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: linear-gradient(90deg, var(--rose), var(--coral), var(--mint), var(--blue));
}

.report-card h3 {
  padding-top: 8px;
  color: var(--rose-deep);
}

.report-card p,
.report-card li {
  color: var(--soft-ink);
  line-height: 1.85;
}

.report-card ul {
  margin: 0;
  padding-left: 20px;
}

.admin-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
}

.admin-tools label {
  margin-bottom: 0;
}

.code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
}

.pill {
  min-width: 70px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  color: #5b8b7d;
  background: rgba(155, 200, 188, .22);
  font-size: 13px;
  font-weight: 800;
}

.pill.used {
  color: var(--rose-deep);
  background: rgba(233, 111, 147, .16);
}

@media (max-width: 920px) {
  .app-shell,
  .grid.two,
  #questionsWrap,
  .report-grid {
    grid-template-columns: 1fr;
  }

  .side-panel {
    height: auto;
    position: static;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, .7);
  }

  .main-panel {
    padding: 22px;
  }

  .topbar,
  .section-title,
  .actions {
    flex-direction: column;
    align-items: stretch;
  }

  .user-box {
    text-align: left;
  }

  .metric-row,
  .mood-strip,
  .admin-tools,
  .code-row {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 34px;
  }
}

@media print {
  body {
    background: #fff;
  }

  body::before,
  .side-panel,
  .topbar,
  .nav-list,
  #downloadButton {
    display: none;
  }

  .app-shell,
  .report-grid {
    display: block;
  }

  .main-panel {
    padding: 0;
  }

  .report-card {
    break-inside: avoid;
    margin-bottom: 12px;
    box-shadow: none;
  }
}
