:root {
  color-scheme: light;
  --sun: #f8c84b;
  --sun-deep: #eca82f;
  --paper: #fff4d1;
  --sheet: #fffdf5;
  --sheet-warm: #fff0bf;
  --ink: #111111;
  --muted: #665333;
  --line: #17110b;
  --orange: #f0833f;
  --green: #6fbe66;
  --blue: #4c86dd;
  --red: #ef6044;
  --purple: #8463bd;
  --cream-shadow: rgba(126, 82, 11, 0.22);
  --hard-shadow: 6px 7px 0 #111111;
  --soft-shadow: 0 18px 34px rgba(82, 52, 9, 0.18);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

html {
  min-height: 100%;
  background: var(--sun);
}

body {
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.14) 0 1px, transparent 1px 56px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.13) 0 1px, transparent 1px 54px),
    linear-gradient(165deg, #ffd75c 0%, #f8c84b 46%, #f5bc3f 100%);
  color: var(--ink);
  font-family:
    "Microsoft YaHei",
    "PingFang SC",
    "Noto Sans CJK SC",
    system-ui,
    sans-serif;
  letter-spacing: 0;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  opacity: 0.28;
  background-image:
    repeating-linear-gradient(8deg, transparent 0 14px, rgba(255, 255, 255, 0.18) 15px 16px),
    repeating-linear-gradient(102deg, transparent 0 24px, rgba(142, 91, 9, 0.08) 25px 26px);
  mix-blend-mode: soft-light;
}

button,
input,
a {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.app-shell {
  width: min(100%, 520px);
  min-height: 100dvh;
  margin: 0 auto;
  padding: 14px 18px 30px;
}

.screen {
  position: relative;
  display: none;
  min-height: calc(100dvh - 48px);
  animation: fade-in 180ms ease-out;
}

.screen-active {
  display: flex;
  flex-direction: column;
}

.start-screen.screen-active {
  min-height: calc(100dvh - 44px);
}

.topline,
.nav-row,
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sticker-topline {
  position: relative;
  z-index: 3;
  padding-top: 4px;
}

.sticker-topline span,
.nav-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 2px solid var(--ink);
  background: var(--sheet);
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  box-shadow: 3px 4px 0 rgba(17, 17, 17, 0.18);
}

.sticker-topline span:first-child {
  transform: rotate(-2deg);
}

.sticker-topline span:last-child {
  transform: rotate(2deg);
}

.nav-row {
  position: relative;
  z-index: 4;
  padding: 4px 0 22px;
  color: var(--muted);
  font-size: 13px;
}

.hero-scene {
  position: relative;
  display: grid;
  gap: 14px;
  min-height: 0;
  margin-top: 8px;
  padding: 20px 18px 18px;
  border: 3px solid var(--ink);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(255, 244, 209, 0.9)),
    var(--sheet);
  box-shadow: 7px 8px 0 rgba(17, 17, 17, 0.2);
  overflow: hidden;
}

.hero-scene::after {
  position: absolute;
  right: 22px;
  top: 94px;
  width: 116px;
  height: 88px;
  border: 2px solid rgba(17, 17, 17, 0.74);
  border-radius: 8px;
  background:
    linear-gradient(90deg, transparent 0 27px, rgba(17, 17, 17, 0.16) 27px 29px, transparent 29px 58px, rgba(17, 17, 17, 0.16) 58px 60px, transparent 60px 88px, rgba(17, 17, 17, 0.16) 88px 90px, transparent 90px),
    linear-gradient(180deg, transparent 0 26px, rgba(17, 17, 17, 0.16) 26px 28px, transparent 28px 56px, rgba(17, 17, 17, 0.16) 56px 58px, transparent 58px),
    radial-gradient(circle at 26px 18px, var(--green) 0 9px, transparent 10px),
    radial-gradient(circle at 82px 46px, var(--red) 0 9px, transparent 10px),
    radial-gradient(circle at 54px 72px, var(--blue) 0 9px, transparent 10px),
    #fffdf5;
  box-shadow: 4px 5px 0 rgba(17, 17, 17, 0.14);
  content: "";
  transform: rotate(4deg);
}

.schedule-hero::after {
  display: none;
}

.schedule-hero {
  grid-template-rows: auto auto auto auto auto;
  min-height: calc(100dvh - 44px);
  margin-top: 0;
}

.hero-copy,
.paper-heading,
.result-hero {
  position: relative;
  z-index: 2;
  background: rgba(255, 253, 245, 0.92);
  box-shadow: var(--soft-shadow);
}

.torn-paper {
  margin-top: 22px;
  padding: 34px 20px 30px;
  clip-path: polygon(
    1% 7%,
    11% 3%,
    25% 5%,
    38% 2%,
    52% 6%,
    67% 3%,
    82% 5%,
    98% 2%,
    97% 92%,
    86% 96%,
    72% 93%,
    59% 97%,
    43% 94%,
    30% 98%,
    15% 94%,
    2% 97%
  );
}

.start-screen .hero-copy {
  background: transparent;
  box-shadow: none;
}

.start-screen .schedule-copy {
  position: relative;
  z-index: 2;
  background: transparent;
  box-shadow: none;
}

.title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px;
  gap: 10px;
  align-items: center;
}

.title-cat {
  display: block;
  width: 120px;
  height: 92px;
  object-fit: contain;
  object-position: left center;
  border: 2px solid rgba(17, 17, 17, 0.18);
  border-radius: 16px;
  background: #e7f0c9;
  box-shadow: 4px 5px 0 rgba(17, 17, 17, 0.14);
  transform: rotate(3deg);
}

.start-deco {
  position: absolute;
  z-index: 3;
  pointer-events: none;
}

.deco-megaphone {
  right: 72px;
  top: 172px;
  width: 48px;
  filter: drop-shadow(3px 4px 0 rgba(17, 17, 17, 0.13));
  transform: rotate(12deg);
}

.deco-eyes {
  left: 24px;
  top: 224px;
  bottom: auto;
  width: 46px;
  filter: drop-shadow(2px 3px 0 rgba(17, 17, 17, 0.12));
  transform: rotate(-7deg);
}

.deco-paper {
  right: 20px;
  top: 176px;
  bottom: auto;
  display: grid;
  gap: 5px;
  width: 48px;
  height: 58px;
  padding: 11px 9px;
  border: 2px solid rgba(17, 17, 17, 0.72);
  border-radius: 6px;
  background: rgba(255, 253, 245, 0.92);
  box-shadow: 3px 4px 0 rgba(17, 17, 17, 0.12);
  transform: rotate(8deg);
}

.deco-paper::before {
  position: absolute;
  top: -9px;
  left: 16px;
  width: 16px;
  height: 12px;
  border: 2px solid rgba(17, 17, 17, 0.72);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  content: "";
}

.deco-paper i {
  display: block;
  height: 4px;
  border-radius: 999px;
  background: rgba(239, 96, 68, 0.8);
}

.deco-paper i:nth-child(2) {
  background: rgba(76, 134, 221, 0.78);
}

.deco-paper i:nth-child(3) {
  width: 70%;
  background: rgba(111, 190, 102, 0.8);
}

.start-screen .torn-paper {
  margin: 0;
  padding: 0;
  clip-path: none;
}

.start-screen .torn-paper::before {
  display: none;
}

.schedule-copy::before {
  display: none;
}

.torn-paper::before,
.paper-heading::before,
.result-hero::before {
  position: absolute;
  inset: 12px;
  z-index: -1;
  content: "";
  border: 2px dashed rgba(17, 17, 17, 0.16);
}

.eyebrow {
  margin: 0;
  font-size: 14px;
  font-weight: 900;
}

.black-ticket {
  display: inline-flex;
  width: fit-content;
  min-height: 32px;
  align-items: center;
  padding: 0 12px;
  background: var(--ink);
  color: #ffffff;
  transform: rotate(-2deg);
}

.start-screen .black-ticket {
  background: var(--blue);
  box-shadow: 3px 4px 0 rgba(17, 17, 17, 0.18);
  transform: rotate(-1deg);
}

h1,
h2 {
  margin: 0;
  color: var(--ink);
  font-weight: 900;
  line-height: 1.03;
  letter-spacing: 0;
}

h1 {
  display: flex;
  max-width: 8em;
  flex-direction: column;
  gap: 4px;
  margin-top: 12px;
  font-size: 32px;
}

h1 span {
  display: block;
  white-space: nowrap;
}

h2 {
  font-size: 36px;
}

.title-sticker {
  width: fit-content;
  padding: 8px 16px 10px;
  background: var(--green);
  color: #ffffff;
  font-size: 0.78em;
  transform: rotate(-2deg);
  text-shadow: 2px 2px 0 rgba(17, 17, 17, 0.24);
}

.paint-word {
  width: fit-content;
  color: var(--orange);
  -webkit-text-stroke: 0;
  text-shadow: none;
}

.lead {
  max-width: 22em;
  margin: 14px 0 0;
  color: #211b12;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.62;
}

.lead span {
  color: var(--orange);
  font-size: 1.12em;
}

.schedule-board {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: clamp(252px, 36dvh, 292px);
  min-height: 0;
  overflow: hidden;
  padding: 10px;
  border: 3px solid var(--ink);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 250, 234, 0.98)),
    var(--sheet);
  box-shadow: 5px 6px 0 rgba(17, 17, 17, 0.18);
}

.schedule-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 30px;
  margin-bottom: 8px;
  padding: 0 8px;
  border: 2px solid var(--ink);
  border-radius: 7px;
  background: #e8f1ff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

.schedule-title-row strong {
  color: #1f5fac;
}

.week-grid {
  display: grid;
  grid-template-columns: 42px repeat(5, minmax(0, 1fr));
  grid-template-rows: repeat(5, minmax(36px, 1fr));
  gap: 4px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

.week-grid > span {
  display: grid;
  min-width: 0;
  place-items: center;
  overflow: hidden;
  border: 2px solid rgba(17, 17, 17, 0.18);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.86);
}

.week-grid > span:nth-child(n + 2):nth-child(-n + 6) {
  background: var(--ink);
  color: #ffffff;
  font-size: 13px;
}

.corner-cell {
  background: var(--sun) !important;
}

.time-cell {
  background: #fff0bf !important;
  color: #6a4a08;
  font-size: 10px;
}

.grid-cell {
  background:
    linear-gradient(135deg, rgba(17, 17, 17, 0.03), rgba(17, 17, 17, 0)),
    #ffffff;
}

.class-block {
  border-color: var(--ink) !important;
  color: #ffffff;
  font-size: 11px;
  line-height: 1;
  text-shadow: 1px 1px 0 rgba(17, 17, 17, 0.22);
  box-shadow: inset 0 -3px 0 rgba(17, 17, 17, 0.12);
}

.class-block.green {
  background: var(--green) !important;
}

.class-block.blue {
  background: var(--blue) !important;
}

.class-block.yellow {
  background: var(--sun) !important;
  color: var(--ink);
  text-shadow: none;
}

.class-block.red {
  background: var(--red) !important;
}

.start-chips {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.start-chips span {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--ink);
  border-radius: 999px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  box-shadow: 3px 4px 0 rgba(17, 17, 17, 0.14);
}

.start-chips span:nth-child(1) {
  background: #fff0bf;
  transform: rotate(-2deg);
}

.start-chips span:nth-child(2) {
  background: #ffe0d4;
  transform: rotate(1deg);
}

.start-chips span:nth-child(3) {
  background: #dcf3d8;
  transform: rotate(-1deg);
}

.start-chips span:nth-child(4) {
  background: #dfeaff;
  transform: rotate(2deg);
}

.privacy-banner {
  position: relative;
  display: grid;
  gap: 4px;
  margin: 14px 0 18px;
  padding: 14px 16px;
  border: 3px solid var(--ink);
  border-radius: 8px;
  background: var(--sheet);
  box-shadow: var(--hard-shadow);
  transform: rotate(-1deg);
}

.start-screen .privacy-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 8px 11px;
  border-width: 2px;
  border-radius: 999px;
  box-shadow: 3px 4px 0 rgba(17, 17, 17, 0.12);
  transform: none;
}

.start-screen .privacy-banner::after {
  display: none;
}

.privacy-banner::after {
  position: absolute;
  right: 24px;
  bottom: -15px;
  width: 18px;
  height: 18px;
  border-right: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
  background: var(--sheet);
  content: "";
  transform: rotate(45deg);
}

.privacy-banner strong {
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
}

.start-screen .privacy-banner strong {
  flex: 0 0 auto;
  color: #2c681f;
  font-size: 12px;
  line-height: 1;
}

.privacy-banner span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.55;
}

.start-screen .privacy-banner span {
  min-width: 0;
  color: #6b5a39;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
}

.start-screen .primary-action {
  min-height: 58px;
  background: var(--red);
  color: #ffffff;
  font-size: 18px;
  box-shadow: 5px 6px 0 var(--ink);
}

.persona-preview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  max-width: 340px;
  margin: 8px auto 20px;
}

.persona-preview article {
  position: relative;
  display: grid;
  min-height: 122px;
  align-items: end;
  overflow: hidden;
  padding: 10px;
  border: 3px solid var(--ink);
  border-radius: 8px;
  background: rgba(255, 253, 245, 0.92);
  box-shadow: 5px 6px 0 rgba(17, 17, 17, 0.2);
}

.persona-preview img {
  position: absolute;
  top: 8px;
  left: 50%;
  width: 128px;
  max-width: 88%;
  transform: translateX(-50%);
}

.persona-preview article:nth-child(2) img {
  width: 116px;
}

.brush-label {
  position: relative;
  z-index: 1;
  display: inline-flex;
  width: fit-content;
  min-height: 34px;
  align-items: center;
  justify-self: center;
  padding: 0 12px;
  color: #ffffff;
  font-size: 17px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 2px 2px 0 rgba(17, 17, 17, 0.44);
  clip-path: polygon(2% 17%, 12% 8%, 28% 14%, 44% 6%, 62% 12%, 83% 6%, 98% 17%, 94% 88%, 72% 93%, 51% 88%, 34% 95%, 15% 87%, 4% 92%);
}

.brush-label.green {
  background: var(--green);
}

.brush-label.blue {
  background: var(--blue);
}

.brush-label.red {
  background: var(--red);
}

.brush-label.purple {
  background: var(--purple);
}

.paper-heading {
  min-height: 150px;
  margin-bottom: 18px;
  padding: 24px 20px;
  clip-path: polygon(2% 6%, 18% 2%, 34% 5%, 49% 1%, 66% 5%, 81% 3%, 98% 7%, 97% 91%, 82% 96%, 67% 92%, 50% 97%, 31% 93%, 14% 97%, 2% 91%);
}

.paper-heading h2 {
  margin-top: 18px;
}

.paper-heading img {
  position: absolute;
  right: 28px;
  bottom: 28px;
  width: 72px;
  transform: rotate(7deg);
}

.upload-box,
.question-group,
.dimension-panel,
.persona-text-panel section,
.heatmap-panel,
.poster-panel,
.preview-panel {
  border: 3px solid var(--ink);
  border-radius: 8px;
  background: rgba(255, 253, 245, 0.94);
  box-shadow: 6px 7px 0 rgba(17, 17, 17, 0.18);
}

.upload-box {
  position: relative;
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 4px 16px;
  align-items: center;
  min-height: 142px;
  margin: 0 0 14px;
  padding: 18px;
  border-style: dashed;
  cursor: pointer;
}

.upload-box::before {
  position: absolute;
  inset: 10px;
  border: 2px dashed rgba(236, 168, 47, 0.74);
  border-radius: 7px;
  content: "";
  pointer-events: none;
}

.upload-icon {
  grid-row: span 2;
  width: 72px;
  justify-self: center;
  filter: drop-shadow(3px 4px 0 rgba(17, 17, 17, 0.12));
}

.upload-title {
  position: relative;
  z-index: 1;
  color: var(--ink);
  font-size: 24px;
  font-weight: 900;
}

.upload-copy {
  position: relative;
  z-index: 1;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.upload-box input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.preview-panel {
  margin: 0 0 18px;
  overflow: hidden;
  background: var(--sheet);
  transform: rotate(1deg);
}

.preview-panel img {
  display: block;
  width: 100%;
  max-height: 260px;
  object-fit: contain;
  background: #fff6df;
}

.quiz-form {
  display: grid;
  gap: 14px;
  padding-bottom: 96px;
}

.persona-quiz-heading {
  margin-top: 4px;
}

.quiz-questions {
  display: grid;
  gap: 14px;
}

.question-group {
  position: relative;
  margin: 0;
  padding: 16px 14px 14px;
}

.question-group legend {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  padding: 0 12px;
  border: 2px solid var(--ink);
  color: #ffffff;
  font-weight: 900;
  text-shadow: 2px 2px 0 rgba(17, 17, 17, 0.34);
  transform: rotate(-1deg);
  clip-path: polygon(2% 12%, 20% 5%, 40% 12%, 62% 5%, 82% 11%, 98% 6%, 94% 91%, 71% 96%, 49% 90%, 28% 97%, 7% 90%);
}

.question-group:nth-of-type(4n + 1) legend {
  background: var(--orange);
}

.question-group:nth-of-type(4n + 2) legend {
  background: var(--purple);
}

.question-group:nth-of-type(4n + 3) legend {
  background: var(--blue);
}

.question-group:nth-of-type(4n) legend {
  background: var(--red);
}

.option-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.option-row button {
  position: relative;
  min-height: 46px;
  overflow: hidden;
  padding: 0 22px 0 8px;
  border: 3px solid var(--ink);
  border-radius: 8px;
  background: #ffffff;
  color: #211b12;
  cursor: pointer;
  font-size: 14px;
  font-weight: 900;
  box-shadow: 3px 4px 0 rgba(17, 17, 17, 0.16);
}

.persona-option-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.persona-option-row button {
  display: grid;
  gap: 5px;
  min-height: 88px;
  align-content: center;
  padding: 10px 28px 10px 12px;
  text-align: left;
}

.persona-option-row strong {
  display: block;
  font-size: 16px;
}

.persona-option-row span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.option-row button.selected {
  background: var(--sun);
  color: var(--ink);
  transform: translate(2px, 2px);
  box-shadow: 1px 2px 0 rgba(17, 17, 17, 0.2);
}

.option-row button.selected::after {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 10px;
  height: 18px;
  border-right: 4px solid var(--ink);
  border-bottom: 4px solid var(--ink);
  content: "";
  transform: rotate(40deg);
}

.primary-action,
.secondary-action,
.ghost-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  border: 3px solid var(--ink);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 900;
  text-decoration: none;
  transition:
    transform 120ms ease,
    box-shadow 120ms ease,
    background-color 120ms ease;
}

.primary-action {
  width: 100%;
  background: var(--ink);
  color: #ffffff;
  box-shadow: var(--hard-shadow);
}

.primary-action:active,
.secondary-action:active,
.ghost-action:active {
  transform: translate(3px, 3px);
  box-shadow: 2px 3px 0 rgba(17, 17, 17, 0.28);
}

.primary-action:disabled {
  cursor: not-allowed;
  background: #8d8062;
  color: rgba(255, 255, 255, 0.78);
  box-shadow: none;
}

.secondary-action {
  width: 100%;
  background: var(--sheet);
  color: var(--ink);
  box-shadow: 4px 5px 0 rgba(17, 17, 17, 0.18);
}

.ghost-action {
  min-height: 40px;
  padding: 0 12px;
  background: var(--sheet);
  color: var(--ink);
  box-shadow: 3px 4px 0 rgba(17, 17, 17, 0.16);
}

.sticky-action {
  position: fixed;
  right: max(18px, calc((100vw - 520px) / 2 + 18px));
  bottom: 18px;
  left: max(18px, calc((100vw - 520px) / 2 + 18px));
  z-index: 5;
  width: auto;
}

.result-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 136px;
  gap: 14px;
  align-items: end;
  min-height: 214px;
  margin-bottom: 18px;
  padding: 24px 16px 18px;
  clip-path: polygon(2% 6%, 18% 2%, 34% 5%, 49% 1%, 66% 5%, 81% 3%, 98% 7%, 97% 91%, 82% 96%, 67% 92%, 50% 97%, 31% 93%, 14% 97%, 2% 91%);
}

.result-hero h2 {
  width: fit-content;
  max-width: 100%;
  margin-top: 16px;
  padding: 5px 14px 8px;
  background: var(--trait-color, var(--green));
  color: #ffffff;
  font-size: 34px;
  overflow-wrap: anywhere;
  text-shadow: 3px 3px 0 rgba(17, 17, 17, 0.38);
  clip-path: polygon(2% 17%, 18% 7%, 34% 13%, 52% 6%, 72% 13%, 98% 7%, 95% 87%, 78% 94%, 58% 88%, 34% 96%, 12% 88%, 4% 94%);
}

.result-copy {
  max-width: 16em;
  margin: 14px 0 0;
  color: #211b12;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.55;
}

.persona-badge {
  display: grid;
  width: 132px;
  min-height: 150px;
  align-self: center;
  place-items: center;
  padding: 14px 10px;
  border: 4px solid var(--ink);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(255, 240, 191, 0.94)),
    var(--sheet);
  color: var(--ink);
  box-shadow: 5px 6px 0 rgba(17, 17, 17, 0.18);
  transform: rotate(2deg);
}

.persona-badge span {
  display: block;
  color: var(--trait-color, var(--green));
  font-size: 38px;
  font-weight: 900;
  line-height: 0.98;
  text-align: center;
}

.persona-badge strong {
  display: block;
  color: #211b12;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.25;
  text-align: center;
}

.score-layout {
  display: grid;
  grid-template-columns: 146px 1fr;
  gap: 14px;
  align-items: center;
  margin: 0 0 18px;
}

.score-ring {
  position: relative;
  display: grid;
  width: 146px;
  height: 146px;
  place-items: center;
  padding: 20px;
  border: 4px solid var(--ink);
  border-radius: 50%;
  background:
    radial-gradient(circle at center, var(--sheet) 0 56%, transparent 57%),
    conic-gradient(var(--red) var(--score-angle, 0deg), #f3dfae 0);
  text-align: center;
  box-shadow: 5px 7px 0 rgba(17, 17, 17, 0.2);
}

.score-ring::after {
  position: absolute;
  inset: 14px;
  border: 2px dashed rgba(17, 17, 17, 0.18);
  border-radius: 50%;
  content: "";
}

.score-ring strong {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 10px;
  font-size: 44px;
  line-height: 0.9;
}

.score-ring span {
  position: relative;
  z-index: 1;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.result-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.result-tags span {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  padding: 0 12px;
  border: 3px solid var(--ink);
  border-radius: 8px;
  background: var(--sheet);
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
  box-shadow: 4px 5px 0 rgba(17, 17, 17, 0.16);
}

.result-tags span:nth-child(1) {
  background: var(--sun);
}

.result-tags span:nth-child(2) {
  background: #ffffff;
  transform: rotate(1deg);
}

.heatmap-panel,
.dimension-panel,
.persona-text-panel section,
.poster-panel {
  position: relative;
  padding: 16px;
}

.heatmap-panel::before,
.dimension-panel::before,
.persona-text-panel section::before,
.poster-panel::before {
  position: absolute;
  top: -12px;
  left: 24px;
  width: 88px;
  height: 22px;
  background: rgba(255, 255, 255, 0.56);
  border: 2px solid rgba(17, 17, 17, 0.16);
  content: "";
  transform: rotate(-3deg);
}

.dimension-panel,
.heatmap-panel,
.persona-text-panel {
  margin-bottom: 18px;
}

.dimension-bars {
  display: grid;
  gap: 13px;
  margin-top: 16px;
}

.dimension-bar {
  display: grid;
  gap: 7px;
}

.dimension-bar-label {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.dimension-bar-label span:last-child {
  text-align: right;
}

.dimension-bar-label strong {
  display: inline-grid;
  min-height: 30px;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--sun);
  color: var(--ink);
  font-size: 17px;
  box-shadow: 2px 3px 0 rgba(17, 17, 17, 0.14);
}

.dimension-track {
  position: relative;
  height: 18px;
  overflow: hidden;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: #dfeaff;
}

.dimension-track span {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--left-percent);
  min-width: 16px;
  border-right: 3px solid var(--ink);
  background: var(--green);
}

.persona-text-panel {
  display: grid;
  gap: 18px;
}

.section-heading {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.section-heading span {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  padding: 0 12px;
  background: var(--blue);
  color: #ffffff;
  text-shadow: 2px 2px 0 rgba(17, 17, 17, 0.34);
  clip-path: polygon(2% 16%, 20% 5%, 41% 13%, 63% 6%, 86% 12%, 98% 6%, 94% 88%, 72% 94%, 52% 89%, 29% 96%, 8% 88%);
}

.section-heading strong {
  color: var(--ink);
}

.mini-heatmap {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-top: 16px;
}

.mini-heatmap span {
  min-height: 30px;
  border: 2px solid rgba(17, 17, 17, 0.16);
  border-radius: 7px;
  background: #fff4d1;
}

.mini-heatmap .level-1 {
  background: rgba(111, 190, 102, 0.76);
}

.mini-heatmap .level-2 {
  background: rgba(248, 200, 75, 0.88);
}

.mini-heatmap .level-3 {
  background: rgba(239, 96, 68, 0.86);
}

.quip-list {
  display: grid;
  gap: 12px;
  margin: 16px 0;
  padding: 0;
  list-style: none;
}

.quip-list li {
  position: relative;
  padding: 14px 16px 14px 46px;
  border: 3px solid var(--ink);
  border-radius: 8px;
  background: var(--sheet);
  color: #211b12;
  font-weight: 800;
  line-height: 1.62;
  box-shadow: 5px 6px 0 rgba(17, 17, 17, 0.16);
}

.quip-list li::before {
  position: absolute;
  top: 15px;
  left: 16px;
  width: 18px;
  height: 18px;
  border: 3px solid var(--ink);
  content: "";
}

.quip-list li::after {
  position: absolute;
  top: 12px;
  left: 22px;
  width: 10px;
  height: 22px;
  border-right: 4px solid var(--orange);
  border-bottom: 4px solid var(--orange);
  content: "";
  transform: rotate(38deg);
}

.poster-panel img {
  display: block;
  width: 100%;
  margin-top: 14px;
  border: 3px solid var(--ink);
  border-radius: 8px;
  background: #fff6df;
  box-shadow: 4px 5px 0 rgba(17, 17, 17, 0.16);
}

.action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 430px) {
  .app-shell {
    padding-right: 14px;
    padding-left: 14px;
  }

  .hero-scene {
    margin-top: 0;
    padding: 18px 14px 14px;
  }

  h1 {
    font-size: 34px;
  }

  h2 {
    font-size: 31px;
  }

  .lead {
    font-size: 15px;
  }

  .title-row {
    grid-template-columns: minmax(0, 1fr) 110px;
    gap: 8px;
  }

  .title-cat {
    width: 110px;
    height: 84px;
    border-radius: 14px;
  }

  .deco-megaphone {
    right: 64px;
    top: 164px;
    width: 42px;
  }

  .deco-eyes {
    left: 18px;
    top: 218px;
    width: 40px;
  }

  .deco-paper {
    right: 18px;
    top: 170px;
    width: 42px;
    height: 52px;
  }

  .schedule-board {
    height: clamp(242px, 34dvh, 276px);
    padding: 8px;
  }

  .schedule-title-row {
    min-height: 28px;
    padding: 0 6px;
    font-size: 11px;
  }

  .week-grid {
    grid-template-columns: 40px repeat(5, minmax(0, 1fr));
    grid-template-rows: repeat(5, minmax(34px, 1fr));
    gap: 3px;
    font-size: 11px;
  }

  .class-block {
    font-size: 10px;
  }

  .paper-heading img {
    width: 60px;
  }

  .score-layout {
    grid-template-columns: 132px 1fr;
  }

  .score-ring {
    width: 132px;
    height: 132px;
  }

  .score-ring strong {
    font-size: 38px;
  }

  .result-hero {
    grid-template-columns: minmax(0, 1fr) 112px;
  }

  .result-hero h2 {
    padding-right: 12px;
    padding-left: 12px;
    font-size: 30px;
  }

  .persona-badge {
    width: 112px;
    min-height: 138px;
  }

  .persona-badge span {
    font-size: 32px;
  }

  .persona-badge strong {
    font-size: 14px;
  }

  .option-row {
    gap: 6px;
  }

  .option-row button {
    min-height: 44px;
    padding-right: 18px;
    font-size: 13px;
  }
}

@media (max-width: 360px) {
  h1 {
    font-size: 32px;
  }

  .title-row {
    grid-template-columns: minmax(0, 1fr) 100px;
  }

  .title-cat {
    width: 100px;
    height: 78px;
  }

  .schedule-title-row {
    font-size: 10px;
  }

  .week-grid {
    grid-template-columns: 38px repeat(5, minmax(0, 1fr));
    grid-template-rows: repeat(5, minmax(32px, 1fr));
  }

  .time-cell,
  .class-block {
    font-size: 9px;
  }

  .deco-megaphone {
    width: 42px;
  }

  .deco-paper {
    width: 38px;
    height: 48px;
  }

  .result-hero {
    grid-template-columns: minmax(0, 1fr) 104px;
  }

  .result-hero h2 {
    font-size: 28px;
  }

  .persona-badge {
    width: 104px;
    min-height: 132px;
    padding-right: 8px;
    padding-left: 8px;
  }

  .persona-badge span {
    font-size: 29px;
  }

  .upload-box {
    grid-template-columns: 68px 1fr;
    gap: 4px 10px;
    padding: 16px 14px;
  }

  .upload-icon {
    width: 58px;
  }

  .score-layout {
    grid-template-columns: 1fr;
  }

  .score-ring {
    justify-self: center;
  }

  .action-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 720px) {
  .app-shell {
    padding-top: 34px;
    padding-bottom: 42px;
  }

  .screen {
    min-height: calc(100dvh - 76px);
  }

  .sticky-action {
    position: static;
    width: 100%;
  }

  .quiz-form {
    padding-bottom: 18px;
  }
}

/* 识别加载状态 */
.recognition-loading {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 40px 20px;
  margin: 14px 0;
  border: 3px solid var(--ink);
  border-radius: 8px;
  background: rgba(255, 253, 245, 0.94);
  box-shadow: 6px 7px 0 rgba(17, 17, 17, 0.18);
}

.recognition-loading:not([hidden]) {
  display: flex;
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--sun);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* 首页和结果页图片替换 */
.schedule-hero {
  display: block;
  width: min(100%, 440px);
  min-height: 0;
  margin: 0 auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.home-visual {
  position: relative;
  width: 100%;
}

.home-visual-image {
  display: block;
  width: 100%;
  height: auto;
}

.home-start-hotspot {
  position: absolute;
  left: 9.5%;
  top: 80.4%;
  width: 81%;
  height: 6.7%;
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: transparent;
  color: transparent;
  cursor: pointer;
  font-size: 0;
}

.home-start-hotspot:focus-visible {
  outline: 4px solid rgba(76, 134, 221, 0.84);
  outline-offset: 4px;
}

.result-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: start;
  min-height: 0;
  margin-bottom: 18px;
  padding: 0;
  background: transparent;
  box-shadow: none;
  clip-path: none;
}

.result-hero::before {
  display: none;
}

.result-hero .black-ticket {
  margin-left: 8px;
}

.result-hero h2.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.result-persona-image {
  display: block;
  width: 100%;
  height: auto;
  border: 3px solid var(--ink);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 6px 7px 0 rgba(17, 17, 17, 0.18);
}

.recognition-loading p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  font-weight: 800;
}

/* 课程表编辑面板 */
.course-table-panel {
  position: relative;
  padding: 16px;
  margin: 14px 0;
  border: 3px solid var(--ink);
  border-radius: 8px;
  background: rgba(255, 253, 245, 0.94);
  box-shadow: 6px 7px 0 rgba(17, 17, 17, 0.18);
}

.course-table-panel::before {
  position: absolute;
  top: -12px;
  left: 24px;
  width: 88px;
  height: 22px;
  background: rgba(255, 255, 255, 0.56);
  border: 2px solid rgba(17, 17, 17, 0.16);
  content: "";
  transform: rotate(-3deg);
}

.course-table-panel .section-heading {
  margin-bottom: 16px;
}

.course-metric-summary {
  margin: -4px 0 14px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.5;
}

.course-grid-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.course-grid {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  font-weight: 800;
  table-layout: fixed;
}

.course-grid th,
.course-grid td {
  border: 2px solid var(--ink);
  text-align: center;
  vertical-align: middle;
}

.course-grid th {
  background: var(--blue);
  color: #ffffff;
  text-shadow: 1px 1px 0 rgba(17, 17, 17, 0.34);
  font-weight: 900;
  padding: 6px 4px;
  font-size: 12px;
}

.course-grid .corner-cell {
  width: 40px;
  background: var(--purple);
}

.course-grid .slot-header {
  width: 40px;
  background: var(--blue);
  font-size: 11px;
  padding: 4px;
}

.course-grid .course-cell {
  min-height: 40px;
  padding: 4px;
  background: var(--sheet);
  color: var(--ink);
  position: relative;
}

.course-grid .course-cell.empty {
  background: #fffdf5;
  cursor: pointer;
  transition: background 150ms ease;
  position: relative;
}

.course-grid .course-cell.empty::after {
  content: "+";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: rgba(17, 17, 17, 0.15);
  font-size: 18px;
  font-weight: 700;
}

.course-grid .course-cell.empty:hover {
  background: var(--sun);
}

.course-grid .course-cell.empty:hover::after {
  color: rgba(17, 17, 17, 0.4);
}

.course-grid .course-cell.filled {
  background: var(--sun);
  font-size: 11px;
}

.course-edit-label {
  display: grid;
  gap: 6px;
  justify-items: center;
  color: var(--muted);
  font-size: 12px;
}

.slot-edit-cell {
  display: table-cell;
  min-width: 112px;
}

.course-number-input {
  width: 44px;
  min-height: 34px;
  border: 2px solid var(--ink);
  border-radius: 7px;
  background: #fffef8;
  color: var(--ink);
  font-weight: 900;
  text-align: center;
}

.course-number-input:focus {
  background: var(--sun);
  outline: 2px solid var(--ink);
  outline-offset: 1px;
}

.delete-course-btn {
  padding: 4px 10px;
  border: 2px solid var(--red);
  border-radius: 6px;
  background: var(--red);
  color: #fff;
  font-size: 12px;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
}

.course-grid .course-cell.filled:hover .delete-course-btn {
  display: flex;
}

/* 调试面板 */
.debug-panel {
  position: relative;
  padding: 16px;
  margin: 14px 0;
  border: 3px solid var(--red);
  border-radius: 8px;
  background: rgba(255, 245, 245, 0.94);
  box-shadow: 6px 7px 0 rgba(239, 96, 68, 0.18);
}

.debug-panel::before {
  position: absolute;
  top: -12px;
  left: 24px;
  width: 88px;
  height: 22px;
  background: rgba(255, 255, 255, 0.56);
  border: 2px solid rgba(239, 96, 68, 0.16);
  content: "";
  transform: rotate(-3deg);
}

.debug-output {
  margin: 12px 0 0;
  padding: 14px;
  border: 2px solid var(--red);
  border-radius: 6px;
  background: #1a1a1a;
  color: #ff6b6b;
  font-family: "Consolas", "Monaco", "Courier New", monospace;
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 300px;
  overflow-y: auto;
}

/* AI题目样式 */
.ai-question {
  border-color: var(--blue) !important;
  background: rgba(76, 134, 221, 0.05);
}

.ai-badge {
  display: inline-block;
  padding: 2px 6px;
  margin-left: 6px;
  background: var(--blue);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 4px;
  vertical-align: middle;
}
