:root {
  color-scheme: light;
  --brand: #57BEAD;
  --brand-light: rgba(87, 190, 173, 0.1);
  --ink: #333333;
  --muted: #666666;
  --hint: #999999;
  --line: #E8E8E8;
  --paper: #FFFFFF;
  --wash: #F7F8FA;
  --inactive: #F0F2F5;
  --green: #57BEAD;
  --yellow: #B45309;
  --orange: #d7652a;
  --red: #cf1322;
  --blue: #57BEAD;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--wash);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

button,
input {
  font: inherit;
}

input[type="text"],
input[type="tel"],
input[type="file"] {
  width: 100%;
  min-height: 44px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
}

.app-shell {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 18px 14px 40px;
}

.page-view {
  display: grid;
  gap: 12px;
}

.intro-band {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 24px 18px;
  border: 1px solid var(--line);
  background: var(--paper);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
}

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

h1 {
  margin-bottom: 10px;
  font-size: 30px;
  line-height: 1.15;
}

h2 {
  margin-bottom: 10px;
  font-size: 24px;
  line-height: 1.25;
}

h3 {
  margin-bottom: 8px;
  font-size: 17px;
  line-height: 1.35;
}

.lead {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.status-dial {
  display: grid;
  place-items: center;
  width: 88px;
  aspect-ratio: 1;
  border: 2px solid var(--brand);
  border-radius: 50%;
  background: var(--brand-light);
}

.status-dial span {
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
}

.status-dial small {
  color: var(--muted);
  font-size: 12px;
}

.notice-band {
  margin: 0;
  padding: 14px 16px;
  border-left: 4px solid var(--brand);
  background: var(--brand-light);
}

.notice-band p {
  margin: 0;
  color: var(--ink);
  line-height: 1.7;
}

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

.question-card {
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line);
  background: var(--paper);
}

.question-title {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.45;
}

.question-title span {
  flex: 0 0 auto;
  color: var(--blue);
  font-size: 16px;
  line-height: 1.6;
}

.choice-list {
  display: grid;
  gap: 8px;
}

.choice-row {
  display: grid;
  grid-template-columns: auto 34px 1fr;
  gap: 10px;
  align-items: center;
  min-height: 56px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  background: var(--paper);
  cursor: pointer;
}

.choice-row.selected,
.choice-row:has(input:checked) {
  border-color: var(--brand);
  background: var(--brand-light);
}

.choice-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--brand);
}

.choice-key {
  display: grid;
  place-items: center;
  width: 30px;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-weight: 800;
}

.choice-text {
  color: var(--ink);
  line-height: 1.58;
}

.progress-line {
  display: grid;
  gap: 8px;
  padding: 4px 2px;
  color: var(--muted);
  font-size: 14px;
}

.progress-track {
  height: 8px;
  overflow: hidden;
  background: var(--line);
}

.progress-bar {
  width: 0;
  height: 100%;
  background: var(--brand);
  transition: width 0.2s ease;
}

.primary-button,
.secondary-button {
  width: 100%;
  min-height: 48px;
  border: 0;
  font-weight: 800;
  cursor: pointer;
}

.primary-button {
  color: #fff;
  background: var(--brand);
}

.primary-button:disabled {
  color: var(--hint);
  background: var(--inactive);
  cursor: not-allowed;
}

.secondary-button {
  margin-top: 14px;
  color: var(--ink);
  background: var(--inactive);
}

.form-error {
  min-height: 22px;
  margin: 0;
  color: var(--red);
  font-size: 14px;
}

.success-copy {
  color: var(--brand);
}

.result-panel {
  display: grid;
  gap: 12px;
}

.result-head,
.answer-block,
.next-step-band,
.score-layout {
  border: 1px solid var(--line);
  background: var(--paper);
}

.result-head,
.answer-block {
  padding: 18px;
}

.result-sentence {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.score-layout {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: center;
  padding: 18px;
}

.score-badge {
  display: grid;
  place-items: center;
  width: 92px;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 3px solid var(--brand);
  background: var(--brand-light);
}

.score-badge span {
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
}

.score-badge small {
  color: var(--muted);
}

.score-badge.tone-yellow {
  border-color: var(--yellow);
  background: #fffaf0;
}

.score-badge.tone-orange {
  border-color: var(--orange);
  background: #fff6f0;
}

.score-badge.tone-red {
  border-color: var(--red);
  background: #fff5f5;
}

.soft-copy,
.disclaimer {
  color: var(--muted);
  line-height: 1.7;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.result-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  background: var(--paper);
}

.type-table {
  min-width: 820px;
}

.composite-table {
  min-width: 760px;
}

.result-table th,
.result-table td {
  padding: 14px 12px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  line-height: 1.72;
}

.result-table th {
  color: var(--ink);
  background: var(--inactive);
  font-weight: 800;
  text-align: center;
  vertical-align: middle;
}

.result-table td {
  color: var(--ink);
}

.type-table th:first-child,
.type-table td:first-child {
  width: 84px;
  white-space: nowrap;
}

.type-table th:nth-child(2),
.type-table td:nth-child(2) {
  width: 112px;
}

.result-table .active-row td {
  border-color: rgba(87, 190, 173, 0.38);
  background: var(--brand-light);
  font-weight: 700;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.summary-card {
  display: grid;
  gap: 7px;
  padding: 13px;
  border: 1px solid var(--line);
  background: var(--paper);
}

.summary-card span {
  color: var(--muted);
  font-size: 13px;
}

.summary-card strong {
  color: var(--ink);
  line-height: 1.45;
}

.manager-panel {
  display: grid;
  gap: 14px;
}

.manager-form {
  display: grid;
  gap: 12px;
}

.inline-form {
  grid-template-columns: 1fr auto;
  align-items: end;
}

.field-row {
  display: grid;
  gap: 6px;
  color: var(--ink);
  font-weight: 700;
}

.field-row span {
  font-size: 14px;
}

.compact-button {
  width: auto;
  min-width: 108px;
  padding: 0 18px;
}

.link-panel {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  background: var(--paper);
}

.leader-qr-preview {
  width: 96px;
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid var(--line);
}

.muted-copy {
  margin: 0 0 6px;
  color: var(--muted);
  line-height: 1.55;
}

.share-link {
  color: var(--brand);
  word-break: break-all;
}

.manager-table,
.admin-table {
  min-width: 720px;
}

.admin-shell {
  width: min(100%, 1040px);
}

.admin-kpis {
  margin: 12px 0;
}

.analysis-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.metric-list {
  display: grid;
  gap: 8px;
}

.metric-row {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  overflow: hidden;
  padding: 10px;
  border: 1px solid var(--line);
  background: var(--paper);
}

.metric-row span,
.metric-row strong {
  position: relative;
  z-index: 1;
}

.metric-row i {
  position: absolute;
  inset: auto auto 0 0;
  height: 3px;
  background: var(--brand);
}

.next-step-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 156px;
  gap: 18px;
  align-items: center;
  padding: 18px;
  background: var(--paper);
}

.fixed-cta {
  margin: 10px 0 0;
  color: var(--ink);
  line-height: 1.7;
}

.next-step-copy {
  display: grid;
  gap: 8px;
}

.next-step-copy p {
  margin: 0;
  color: var(--ink);
  line-height: 1.7;
}

.qr-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  max-width: 156px;
  aspect-ratio: 1;
  border: 1px dashed var(--line);
  color: var(--muted);
  background: var(--paper);
  text-align: center;
  font-size: 14px;
}

.qr-card {
  grid-template-rows: 1fr auto;
  gap: 10px;
  aspect-ratio: auto;
  min-height: 184px;
  padding: 10px;
  border-color: var(--line);
  border-style: solid;
  color: var(--ink);
}

.qr-image {
  display: block;
  width: 100%;
  max-width: 134px;
  aspect-ratio: 1;
  object-fit: contain;
}

.qr-card span {
  display: block;
  width: 100%;
  min-height: 18px;
  font-size: 12px;
  line-height: 1.35;
}

.disclaimer {
  padding: 0 4px;
  font-size: 13px;
}

@media (max-width: 560px) {
  .app-shell {
    padding-inline: 10px;
  }

  .intro-band,
  .score-layout,
  .next-step-band {
    grid-template-columns: 1fr;
  }

  .status-dial {
    width: 76px;
  }

  h1 {
    font-size: 26px;
  }

  .choice-row {
    grid-template-columns: auto 30px 1fr;
    align-items: flex-start;
  }

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

  .inline-form,
  .link-panel,
  .analysis-grid {
    grid-template-columns: 1fr;
  }

  .qr-placeholder {
    width: 100%;
    max-width: 180px;
    justify-self: center;
  }

  .qr-image {
    width: 100%;
    max-width: 164px;
  }
}
