:root {
  --paper: #f8f5ed;
  --surface: #fffdf8;
  --ink: #293b34;
  --muted: #5b675f;
  --green: #2f594b;
  --line: #ded6c8;
  --sage: #e6ebde;
  --gold: #ba9556;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input {
  font: inherit;
}
button,
a,
input {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button {
  color: inherit;
}
a {
  color: inherit;
}
button:disabled {
  cursor: not-allowed;
}
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid #ba9556;
  outline-offset: 4px;
}
button {
  transition:
    background 0.18s,
    transform 0.18s;
}
button:active:not(:disabled) {
  transform: translateY(1px);
}
p {
  line-height: 1.75;
  margin: 0 0 16px;
}
h1,
h2,
h3 {
  margin: 0;
  font-family: "Songti SC", "Noto Serif CJK SC", SimSun, serif;
  font-weight: 700;
}
h2 {
  font-size: 24px;
  line-height: 1.5;
}
h3 {
  font-size: 20px;
  line-height: 1.5;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  letter-spacing: 3px;
  text-decoration: none;
  font-weight: 600;
}
.brand-leaf {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid #85977a;
  border-radius: 50%;
  color: var(--green);
  font-size: 24px;
  transform: rotate(-12deg);
}
.brand-en {
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--muted);
  margin-left: 5px;
}
.eyebrow {
  font-size: 13px;
  letter-spacing: 3px;
  color: var(--muted);
  margin-bottom: 24px;
}
.text-button {
  border: 0;
  background: none;
  padding: 8px 0;
  min-height: 44px;
  font-size: 14px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.text-button:hover {
  text-decoration: underline;
}
.text-button.danger {
  color: #9c5346;
}
.icon-button {
  border: 0;
  background: none;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  font-size: 24px;
}
.icon-button svg {
  width: 22px;
  height: 22px;
}
#app {
  width: 100%;
  max-width: 520px;
  outline: none;
}
.page {
  padding: 0 4px 20px;
  min-height: 640px;
}
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 -8px 24px;
  min-height: 48px;
}
.page-header h2 {
  font-size: 21px;
}
.header-right {
  width: 44px;
}
.demo-label {
  font-size: 11px;
  letter-spacing: 1px;
  background: #eee6d7;
  color: #736246;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 20px;
}
.demo-label:before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #a99063;
}
.welcome {
  text-align: center;
  padding: 0 8px;
}
.welcome .mobile-brand {
  display: none;
}
.profile-greeting {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  max-width: 100%;
  min-height: 44px;
  padding: 6px 10px;
  margin-bottom: 4px;
  border: 0;
  background: none;
  color: var(--green);
  overflow-wrap: anywhere;
}
.profile-greeting svg {
  width: 16px;
  height: 16px;
}
.welcome .eyebrow {
  margin-top: 8px;
  font-size: 12px;
  letter-spacing: 2px;
  margin-bottom: 18px;
}
.welcome h2 {
  font-size: 30px;
  line-height: 1.48;
  letter-spacing: 1px;
}
.welcome .subtitle {
  font-family: "Songti SC", SimSun, serif;
  font-size: 21px;
  margin: 17px 0 12px;
  letter-spacing: 2px;
  position: relative;
  display: inline-block;
}
.welcome .subtitle:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: #ead9a8;
  opacity: 0.5;
  transform: rotate(-1deg);
  z-index: -1;
}
.welcome .intro {
  font-size: 14px;
  color: var(--muted);
  margin: 0 auto;
  max-width: 350px;
}
.hero-art {
  width: 100%;
  height: 270px;
  object-fit: contain;
  mix-blend-mode: multiply;
  display: block;
  margin: 5px auto 3px;
}
.flow-preview {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin: 8px 0 26px;
}
.flow-item {
  width: 30%;
  font-size: 14px;
}
.flow-circle {
  width: 43px;
  height: 43px;
  border-radius: 50%;
  background: #eee9de;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 8px;
}
.flow-circle svg {
  width: 20px;
  height: 20px;
  color: var(--green);
}
.flow-line {
  width: 25px;
  height: 1px;
  background: var(--line);
  margin-top: 22px;
}
.primary,
.secondary {
  width: 100%;
  min-height: 50px;
  border-radius: 14px;
  border: 1px solid var(--green);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-weight: 500;
  letter-spacing: 0.5px;
  font-size: 16px;
  line-height: 1.5;
}
.primary {
  background: var(--green);
  color: var(--surface);
  box-shadow: 0 3px 10px #2f594b0a;
}
.primary:hover {
  background: #23483d;
}
.primary:disabled {
  background: #a8b7ae;
  border-color: #a8b7ae;
  color: #fffdf8;
}
.secondary {
  background: transparent;
  color: var(--green);
}
.secondary:hover {
  background: var(--sage);
}
.primary svg,
.secondary svg {
  width: 20px;
  height: 20px;
}
.consent {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 8px;
  margin: 15px 0 7px;
  font-size: 12px;
  line-height: 1.8;
  text-align: left;
}
.consent input {
  appearance: none;
  flex: none;
  width: 19px;
  height: 19px;
  border: 1px solid #9b9e8e;
  border-radius: 4px;
  background: var(--surface);
  margin: 2px 0 0;
  cursor: pointer;
}
.consent input:checked {
  background: var(--green);
  border-color: var(--green);
}
.consent input:checked:after {
  content: "✓";
  display: block;
  text-align: center;
  color: var(--surface);
  font-size: 14px;
  line-height: 17px;
}
.consent label {
  cursor: pointer;
}
.link {
  border: 0;
  background: none;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  color: var(--green);
  font-size: inherit;
  line-height: inherit;
}
.welcome-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  align-items: center;
  margin: 5px 0 18px;
}
.welcome-links .text-button {
  font-size: 14px;
}
.small-note {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
}
.fine-divider {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  letter-spacing: 1px;
  color: #7c8072;
}
.fine-divider:before,
.fine-divider:after {
  content: "";
  width: 30px;
  height: 1px;
  background: var(--line);
}
.stepper {
  display: flex;
  justify-content: center;
  margin: 4px 16px 27px;
}
.step {
  flex: 1;
  text-align: center;
  position: relative;
  color: var(--muted);
  font-size: 14px;
}
.step:not(:last-child):after {
  content: "";
  height: 1px;
  background: var(--line);
  position: absolute;
  left: calc(50% + 25px);
  right: calc(-50% + 25px);
  top: 17px;
}
.step span {
  display: grid;
  place-items: center;
  border-radius: 50%;
  width: 35px;
  height: 35px;
  margin: 0 auto 5px;
  background: #ece7dd;
  font-family: Georgia, serif;
  font-size: 20px;
}
.step.active {
  color: var(--green);
  font-weight: 600;
}
.step.active span,
.step.done span {
  background: var(--green);
  color: var(--surface);
}
.page-intro {
  text-align: center;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 23px;
}
.upload-box {
  min-height: 260px;
  border: 1.5px dashed #c6c5b2;
  border-radius: 20px;
  position: relative;
  background: #fffdf860;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 24px;
  text-align: center;
}
.upload-box .drawing-ghost {
  width: 220px;
  height: 136px;
  opacity: 0.48;
  object-fit: contain;
  mix-blend-mode: multiply;
  margin: 0 0 12px;
}
.upload-box .primary {
  max-width: 270px;
}
.upload-box > p {
  font-size: 13px;
  color: var(--muted);
  margin: 12px 0 0;
}
.upload-preview {
  width: 100%;
  height: 235px;
  object-fit: contain;
}
.upload-box.filled {
  border-style: solid;
  padding: 12px;
}
.upload-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 4px 0 0;
  flex-wrap: wrap;
}
.upload-actions .text-button {
  font-size: 13px;
  gap: 4px;
  padding: 4px 8px;
}
.upload-tips {
  display: flex;
  justify-content: space-between;
  margin: 27px 0 20px;
  text-align: center;
}
.upload-tip {
  width: 31%;
  font-size: 14px;
}
.tip-icon {
  font-size: 29px;
  color: var(--gold);
  display: block;
  font-family: Georgia, serif;
  margin-bottom: 6px;
  height: 38px;
}
.upload-tip small {
  display: block;
  line-height: 1.6;
  color: var(--muted);
  font-size: 12px;
  margin-top: 5px;
}
.upload-bottom {
  text-align: center;
}
.upload-bottom > p {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 2px;
}
.upload-bottom > .text-button {
  font-size: 14px;
}
.upload-bottom .primary {
  margin-top: 14px;
}
.separate-uploads {
  display: grid;
  gap: 14px;
}
.separate-uploads .upload-box {
  min-height: 180px;
  padding: 16px;
}
.slot-label {
  font-size: 16px;
  text-align: left;
  width: 100%;
  margin-bottom: 10px;
  font-weight: 600;
}
.separate-uploads .upload-preview {
  height: 160px;
}
.separate-uploads .drawing-ghost {
  height: 60px;
  width: 120px;
}
.question {
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 24px;
}
.question:first-child {
  padding-top: 3px;
}
.question-title {
  display: flex;
  gap: 11px;
  align-items: baseline;
  margin-bottom: 14px;
}
.question-title > span {
  font-family: Georgia, serif;
  font-size: 21px;
  color: #819078;
}
.question-title h3 {
  font-family: inherit;
  font-size: 17px;
  font-weight: 600;
}
.options {
  display: grid;
  gap: 4px;
}
.option {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 10px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 15px;
  transition: background 0.15s;
}
.option:hover {
  background: #eceee5;
}
.option:has(input:checked) {
  background: #e7ecdf;
  color: var(--green);
}
.option input {
  appearance: none;
  margin: 0;
  width: 22px;
  height: 22px;
  flex: none;
  border: 1px solid #8b9385;
  border-radius: 50%;
  background: var(--surface);
}
.option input:checked {
  border: 1.5px solid var(--green);
  background: radial-gradient(circle, var(--green) 0 6px, transparent 7px);
}
.question-art {
  display: block;
  margin-left: auto;
  margin-top: 10px;
  height: 86px;
  width: 120px;
  object-fit: contain;
  opacity: 0.7;
  mix-blend-mode: multiply;
}
.sticky-actions {
  position: sticky;
  bottom: 0;
  background: linear-gradient(#f8f5ed00, var(--paper) 15px);
  padding: 20px 0 max(12px, env(safe-area-inset-bottom));
  z-index: 4;
  margin-top: 12px;
}
.sticky-actions p {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 9px;
}
.waiting {
  text-align: center;
}
.waiting h2 {
  font-size: 32px;
  line-height: 1.55;
  margin: 28px 0 10px;
}
.waiting .poem {
  font-family: "Songti SC", SimSun, serif;
  font-size: 17px;
  color: var(--muted);
}
.waiting .wait-art {
  width: 240px;
  height: 245px;
  object-fit: contain;
  margin: 14px auto;
}
.stage-list {
  text-align: left;
  display: grid;
  gap: 22px;
  margin: 12px 0 28px;
}
.stage-row {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  position: relative;
}
.stage-row:not(:last-child):after {
  content: "";
  position: absolute;
  left: 18px;
  top: 43px;
  width: 1px;
  height: 22px;
  background: #bbc5b3;
}
.stage-dot {
  width: 37px;
  height: 37px;
  flex: none;
  background: #ece7dd;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: Georgia, serif;
  font-size: 18px;
  color: #747a70;
}
.stage-row.current .stage-dot {
  background: var(--green);
  box-shadow:
    0 0 0 4px var(--paper),
    0 0 0 5px #a3b299;
  color: var(--surface);
}
.stage-row.done .stage-dot {
  background: #718c70;
  color: var(--surface);
}
.stage-row strong {
  display: block;
  font-weight: 500;
  font-size: 16px;
  margin-top: 1px;
}
.stage-row small {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
}
.hint-box {
  background: #eeeadd;
  border-radius: 12px;
  padding: 16px 18px;
  font-size: 13px;
  line-height: 1.8;
  color: var(--muted);
  margin-bottom: 18px;
  text-align: left;
}
.hint-box strong {
  color: var(--green);
  font-weight: 500;
}
.waiting .small-note {
  margin-top: 18px;
}
.role-page {
  text-align: center;
}
.role-card {
  border: 1px solid #d8bc89;
  border-radius: 24px;
  padding: 25px 18px 23px;
  background: radial-gradient(ellipse at 50% 55%, #fff8e8, #f6edda);
  position: relative;
  box-shadow: 0 8px 24px #8c775c0a;
  outline: 1px solid #e2cda8;
  outline-offset: -8px;
  margin: 8px 0 21px;
}
.role-id {
  font-family: Georgia, serif;
  color: #8c7451;
  font-size: 14px;
  border: 1px solid #cab083;
  display: inline-block;
  padding: 5px 25px;
  border-radius: 6px;
  letter-spacing: 2px;
}
.role-card h2 {
  font-size: 32px;
  margin: 20px 0 3px;
  color: #244639;
  letter-spacing: 2px;
}
.role-family {
  font-family: "Songti SC", SimSun, serif;
  color: #817258;
  font-size: 16px;
  margin: 0;
}
.role-image {
  width: 100%;
  height: 280px;
  object-fit: contain;
  display: block;
  margin: 15px auto 2px;
  cursor: pointer;
}
.role-placeholder {
  height: 240px;
  display: grid;
  place-items: center;
  font-size: 16px;
  color: var(--muted);
}
.traits {
  display: flex;
  gap: 7px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 10px;
}
.trait {
  border: 1px solid #dcc69c;
  border-radius: 30px;
  background: #fbf4e4;
  padding: 6px 11px;
  font-size: 13px;
  white-space: nowrap;
}
.ornament {
  font-family: Georgia, serif;
  font-size: 20px;
  color: #a49468;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 17px 0 8px;
}
.ornament:before,
.ornament:after {
  content: "";
  width: 65px;
  height: 1px;
  background: #dbc9a4;
}
.role-quote {
  font-family: "Songti SC", SimSun, serif;
  font-size: 18px;
  line-height: 1.6;
  margin-bottom: 13px;
}
.role-card .small-note {
  font-size: 12px;
  margin-bottom: 20px;
}
.role-card .primary {
  margin-top: 12px;
}
.report-summary {
  display: flex;
  gap: 17px;
  align-items: center;
  margin: 0 0 20px;
}
.avatar {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: #eee5cf;
  object-fit: contain;
  padding: 3px;
}
.report-summary h2 {
  font-size: 25px;
}
.report-summary p {
  font-size: 13px;
  color: var(--muted);
  margin: 4px 0 0;
}
.report-drawing {
  width: 100%;
  height: 175px;
  object-fit: contain;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  display: block;
}
.report-tabs {
  position: sticky;
  top: 0;
  display: flex;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  z-index: 3;
  margin: 12px 0 23px;
}
.report-tabs a {
  flex: 1;
  text-align: center;
  padding: 14px 0;
  text-decoration: none;
  color: var(--muted);
  font-size: 14px;
  border-bottom: 2px solid transparent;
}
.report-tabs a.active {
  color: var(--green);
  border-color: var(--green);
  font-weight: 600;
}
.report-section {
  scroll-margin-top: 65px;
  padding: 4px 0 22px;
}
.report-section > h3 {
  font-size: 21px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-number {
  font-family: Georgia, serif;
  color: var(--gold);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.5px;
}
.report-section > p {
  font-size: 15px;
  line-height: 1.9;
}
.report-item {
  padding: 15px 17px;
  background: #f0ecdf;
  border-radius: 10px;
  margin-bottom: 10px;
}
.report-item h4 {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 5px;
}
.report-item p {
  font-size: 14px;
  line-height: 1.8;
  margin: 0;
  color: var(--muted);
}
details.evidence {
  font-size: 13px;
  margin: 16px 0;
  color: var(--muted);
}
details.evidence summary {
  min-height: 44px;
  cursor: pointer;
  display: flex;
  align-items: center;
  color: var(--green);
}
details.evidence p {
  background: #eeeee4;
  padding: 12px;
  border-radius: 8px;
  margin: 4px 0;
  line-height: 1.8;
}
.report-actions {
  display: flex;
  gap: 10px;
}
.report-actions .secondary {
  flex: 0.85;
}
.report-actions .primary {
  flex: 1.15;
}
.report .fine-divider {
  margin: 20px 0 0;
}
.history-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 6px 0 26px;
}
.history-heading h2 {
  font-size: 28px;
}
.history-heading span {
  font-size: 12px;
  color: var(--muted);
}
.history-list {
  display: grid;
  gap: 0;
}
.history-row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.history-thumb {
  width: 76px;
  height: 94px;
  object-fit: contain;
  border-radius: 8px;
  background: #eee8dc;
  border: 1px solid #e3dece;
  flex: none;
}
.history-info {
  min-width: 0;
  flex: 1;
}
.history-info h3 {
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  padding-right: 28px;
  margin: 0 0 3px;
}
.history-info time {
  font-size: 12px;
  color: var(--muted);
}
.history-status {
  display: block;
  font-size: 12px;
  color: var(--green);
  margin: 6px 0 2px;
}
.history-status.warning {
  color: #9a7049;
}
.history-info .text-button {
  font-size: 13px;
  min-height: 35px;
}
.history-menu {
  position: absolute;
  right: -8px;
  top: 18px;
}
.history-row details summary {
  list-style: none;
  cursor: pointer;
}
.history-row details summary::-webkit-details-marker {
  display: none;
}
.row-menu {
  position: absolute;
  right: 0;
  top: 40px;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 5px 12px;
  border-radius: 9px;
  z-index: 2;
  box-shadow: 0 4px 20px #293b3412;
  white-space: nowrap;
}
.history-new {
  margin-top: 30px;
}
.empty-state {
  text-align: center;
  padding: 50px 20px;
}
.empty-state img {
  height: 190px;
  width: 200px;
  object-fit: contain;
  opacity: 0.9;
}
.empty-state h3 {
  margin: 20px 0 10px;
}
.empty-state p {
  font-size: 14px;
  color: var(--muted);
}
.empty-state .primary {
  margin-top: 24px;
}
.error-state {
  padding-top: 30px;
  text-align: center;
}
.error-state h2 {
  margin: 20px 0 15px;
}
.error-state p {
  color: var(--muted);
}
.error-state .primary {
  margin: 20px 0 12px;
}
.error-sign {
  font-family: Georgia, serif;
  font-size: 55px;
  display: inline-grid;
  place-items: center;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: #ece5d4;
  color: #9b835e;
}
.reveal {
  animation: reveal 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
#toast {
  position: fixed;
  left: 50%;
  bottom: max(28px, env(safe-area-inset-bottom));
  transform: translate(-50%, 15px);
  padding: 13px 22px;
  background: #293b34;
  color: var(--surface);
  border-radius: 12px;
  font-size: 14px;
  max-width: min(90vw, 440px);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.2s,
    transform 0.2s;
  z-index: 30;
  box-shadow: 0 6px 20px #293b3420;
}
#toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
dialog {
  border: 1px solid var(--line);
  border-radius: 22px;
  width: calc(100% - 32px);
  max-width: 470px;
  background: var(--surface);
  color: var(--ink);
  padding: 22px 24px;
  max-height: 85dvh;
  overflow: auto;
  box-shadow: 0 20px 80px #293b3425;
}
dialog::backdrop {
  background: #293b3466;
}
.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.sheet-header h2 {
  font-size: 21px;
}
.sheet-header .icon-button {
  margin-right: -10px;
}
#sheet-body {
  font-size: 14px;
  line-height: 1.85;
}
#sheet-body h3 {
  font-family: inherit;
  font-size: 16px;
  margin: 18px 0 8px;
}
#sheet-body .primary {
  margin-top: 20px;
}
.entry-form label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}
.entry-form input {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-size: 16px;
}
.entry-form .small-note {
  margin: 8px 0 0;
  text-align: left;
}
.entry-form .form-error[hidden] {
  display: none;
}
.sheet-preview {
  max-width: 100%;
  max-height: 65vh;
  object-fit: contain;
  display: block;
  margin: auto;
}
.poster-preview {
  display: block;
  width: 100%;
  border-radius: 16px;
}
.sheet-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}
.atlas-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 18px;
}
.atlas-role {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.atlas-role img {
  height: 100px;
  width: 100%;
  object-fit: contain;
}
.atlas-role h3 {
  font-size: 15px;
  font-family: inherit;
  margin: 6px 0 2px;
}
.atlas-role p {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}
.asset-missing {
  height: 100px;
  display: grid;
  place-items: center;
  background: #eee9dd;
  border-radius: 10px;
  color: var(--muted);
  font-size: 12px;
}
.screen-notice {
  font-size: 12px;
  background: #f0eadb;
  padding: 10px 13px;
  border-radius: 8px;
  color: #72664e;
  margin-bottom: 15px;
}
.loading {
  padding: 80px 0;
  text-align: center;
  color: var(--muted);
}
.spinner {
  height: 28px;
  width: 28px;
  border-radius: 50%;
  border: 2px solid var(--line);
  border-top-color: var(--green);
  animation: spin 1s linear infinite;
  display: block;
  margin: 0 auto 15px;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.form-error {
  color: #a05745;
  font-size: 13px;
  margin-top: 10px;
}
.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;
}
@media (max-width: 1000px) {
  .hero-art {
    height: 250px;
  }
}
@media (max-width: 760px) {
  #app {
    max-width: 480px;
    margin: 0 auto;
  }
  .page {
    padding: 16px 0 22px;
    min-height: 100dvh;
  }
  .page-header {
    margin: 0 -9px 22px;
  }
  .welcome {
    padding: 26px 2px 24px;
  }
  .welcome .mobile-brand {
    display: flex;
    justify-content: center;
    font-size: 17px;
    letter-spacing: 3px;
    align-items: center;
    gap: 8px;
    margin: 0 0 24px;
  }
  .mobile-brand .brand-leaf {
    height: 26px;
    width: 26px;
    font-size: 19px;
  }
  .welcome > .demo-label {
    position: absolute;
    top: 19px;
    right: 18px;
    font-size: 10px;
    padding: 3px 7px;
  }
  .welcome .eyebrow {
    font-size: 11px;
    margin-bottom: 13px;
  }
  .welcome h2 {
    font-size: 29px;
  }
  .welcome .subtitle {
    font-size: 19px;
    margin: 18px 0 14px;
  }
  .welcome .intro {
    font-size: 14px;
    line-height: 1.8;
    max-width: 310px;
  }
  .hero-art {
    height: 270px;
    width: calc(100% + 32px);
    margin-left: -16px;
  }
  .flow-preview {
    margin: 5px 0 24px;
  }
  .consent {
    font-size: 12px;
    margin-top: 15px;
  }
  .welcome-links {
    margin: 7px 0 19px;
  }
  .page-header h2 {
    font-size: 22px;
  }
  .upload-box {
    min-height: 285px;
  }
  .upload-tips {
    margin-top: 31px;
  }
  .role-image {
    height: 290px;
  }
  .report-section > h3 {
    font-size: 20px;
  }
  .sticky-actions {
    padding-bottom: max(14px, env(safe-area-inset-bottom));
  }
  .history-heading {
    margin-top: 14px;
  }
  .role-card {
    padding-top: 22px;
  }
  .role-card h2 {
    font-size: 30px;
  }
  .waiting h2 {
    margin-top: 32px;
  }
  .waiting .wait-art {
    height: 255px;
  }
  .stage-list {
    margin-top: 18px;
  }
  .report-tabs {
    top: 0;
  }
}
@media (max-width: 360px) {
  .welcome h2 {
    font-size: 25px;
  }
  .welcome .subtitle {
    font-size: 17px;
  }
  .welcome .intro {
    font-size: 13px;
  }
  .hero-art {
    height: 230px;
  }
  .flow-item {
    font-size: 12px;
  }
  .consent {
    font-size: 11px;
  }
  .question-title h3 {
    font-size: 16px;
  }
  .role-card h2 {
    font-size: 27px;
  }
  .role-image {
    height: 245px;
  }
  .trait {
    font-size: 12px;
    padding: 5px 8px;
  }
  .report-section > h3 {
    font-size: 18px;
  }
  .page-header h2 {
    font-size: 20px;
  }
  .welcome .mobile-brand {
    justify-content: flex-start;
    margin-left: 4px;
  }
  .upload-tips small {
    font-size: 11px;
  }
  .history-thumb {
    width: 65px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
svg {
  width: 20px;
  height: 20px;
  flex: none;
}
.welcome-links .text-button {
  white-space: nowrap;
}
.consent {
  min-height: 35px;
  align-items: center;
}
.consent input {
  margin-top: 0;
}
.consent .link {
  min-height: 35px;
}
.demo-scenarios {
  font-size: 12px;
  color: var(--muted);
  padding: 16px 0;
}
.demo-scenarios summary {
  cursor: pointer;
  min-height: 44px;
  display: flex;
  align-items: center;
}
.demo-scenarios label {
  display: block;
  margin: 8px 0;
}
.demo-scenarios select {
  width: 100%;
  font: inherit;
  font-size: 14px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  padding: 10px;
}
@media (max-width: 360px) {
  .report-actions .primary,
  .report-actions .secondary {
    font-size: 14px;
    padding: 12px 10px;
    gap: 6px;
  }
}

.site-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 32px 20px;
}
.site-header {
  width: 100%;
  max-width: 860px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 32px;
}
.site-footer {
  margin-top: auto;
  padding-top: 28px;
  font-size: 11px;
  line-height: 1.8;
  color: var(--muted);
  text-align: center;
}
@media (max-width: 760px) {
  .site-shell {
    padding: 0 20px;
  }
  .site-header,
  .site-footer {
    display: none;
  }
  .page-header h2,
  .report-summary > div,
  .history-info {
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .page-header h2 {
    flex: 1;
    text-align: center;
  }
  .report-actions button {
    min-width: 0;
    white-space: normal;
  }
  dialog {
    max-height: calc(100dvh - 32px - env(safe-area-inset-bottom));
  }
}
@media (max-width: 360px) {
  .site-shell {
    padding: 0 16px;
  }
  .welcome-links {
    gap: 12px;
    flex-wrap: wrap;
  }
  .upload-tips {
    gap: 6px;
  }
  .upload-tip {
    min-width: 0;
    overflow-wrap: anywhere;
  }
}
