:root {
  --ink: #111111;
  --muted: #555555;
  --paper: #fbfbf5;
  --grass: #111111;
  --grass-deep: #111111;
  --lime: #f7f7ef;
  --line: #111111;
  --white: #ffffff;
  --danger: #111111;
  --bg-a: #ffffff;
  --bg-b: #f7f7f0;
  --bg-c: #eeeeea;
  --card-a: #ffffff;
  --card-b: #fbfbf5;
  --card-c: #f2f2ed;
  --card-d: #ffffff;
  --shadow: 7px 8px 0 #111111;
  --design-width: 390px;
  --design-height: 845px;
  --app-scale: 1;
  --scaled-width: 390px;
  --scaled-height: 845px;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  display: grid;
  place-items: center;
  overflow: auto;
  padding: 8px;
  background:
    radial-gradient(circle at 20% 18%, rgba(0, 0, 0, 0.035), transparent 22%),
    linear-gradient(180deg, #ffffff, #f5f5ef);
  color: var(--ink);
  font-family: "YouYuan", "STKaiti", "KaiTi", "Comic Sans MS", "Microsoft YaHei", cursive, sans-serif;
}

.app-viewport {
  width: var(--scaled-width);
  height: var(--scaled-height);
  display: grid;
  place-items: start center;
  flex: 0 0 auto;
}

button,
summary {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.phone-shell {
  position: relative;
  width: var(--design-width);
  height: var(--design-height);
  aspect-ratio: 9 / 19.5;
  overflow: hidden;
  transform: scale(var(--app-scale));
  transform-origin: top center;
  background:
    linear-gradient(0deg, rgba(0, 0, 0, 0.03) 1px, transparent 1px),
    radial-gradient(circle at 12% 18%, rgba(0, 0, 0, 0.025), transparent 18%),
    #fbfbf5;
  background-size: 100% 34px, 100% 100%, 100% 100%;
  border-left: 2px solid var(--line);
  border-right: 2px solid var(--line);
  box-shadow: 10px 12px 0 rgba(17, 17, 17, 0.22);
}

.screen {
  position: absolute;
  inset: 0;
  display: none;
  height: 100%;
  padding: 20px 18px 18px;
  z-index: 1;
}

.screen.is-active {
  display: grid;
}

.brand,
.result-header {
  flex: 0 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: var(--grass-deep);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.screen-home {
  background: transparent;
  grid-template-rows: 6% 65% 17% 5%;
  row-gap: 2%;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 2px solid var(--line);
  border-radius: 47% 53% 44% 56% / 54% 46% 57% 43%;
  background: var(--white);
  color: var(--line);
  font-size: 11px;
  box-shadow: 3px 3px 0 var(--line);
  transform: rotate(-4deg);
}

.home-hero {
  display: grid;
  grid-template-rows: 36% auto auto auto auto auto;
  align-content: center;
  justify-items: center;
  align-items: center;
  text-align: center;
  padding: 0;
}

.visual-placeholder,
.result-visual-placeholder {
  display: grid;
  place-items: center;
  border: 2px solid var(--line);
  background: transparent;
  color: rgba(17, 17, 17, 0.42);
  font-size: 11px;
  font-weight: 800;
  box-shadow: none;
}

.visual-placeholder {
  width: 76%;
  max-width: 280px;
  aspect-ratio: 16 / 8;
  margin-bottom: 22px;
  border-radius: 24% 76% 20% 80% / 82% 22% 78% 18%;
  transform: rotate(1.5deg);
}

.home-image-slot {
  width: min(72%, 280px);
  max-width: 260px;
  margin-bottom: 8px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transform: none;
}

.home-image-slot img,
.quiz-image-slot img,
.result-visual-placeholder img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.eyebrow,
.section-label {
  margin: 0;
  color: var(--line);
  font-size: 14px;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-decoration-color: var(--danger);
  text-underline-offset: 4px;
}

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

h1 {
  max-width: 320px;
  margin-bottom: 12px;
  color: var(--grass-deep);
  font-size: 34px;
  font-weight: 500;
  line-height: 1.08;
  text-shadow: none;
  white-space: nowrap;
}

.home-subtitle {
  max-width: 300px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
}

.primary-button,
.ghost-button {
  min-height: 46px;
  border: 2px solid var(--line);
  border-radius: 47% 53% 45% 55% / 58% 45% 55% 42%;
  padding: 0 20px;
  font-weight: 500;
  box-shadow: 3px 4px 0 rgba(17, 17, 17, 0.85);
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.primary-button:active,
.ghost-button:active {
  transform: translate(3px, 4px) rotate(-1deg);
  box-shadow: 1px 1px 0 var(--line);
}

.primary-button {
  background: var(--white);
  color: var(--line);
}

.ghost-button {
  background: var(--white);
  color: var(--line);
}

.helper-text {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.author-block {
  margin-top: 14px;
  display: grid;
  justify-items: center;
  gap: 9px;
}

.author-block p {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
}

.contact-button {
  min-height: 38px;
  padding: 0 18px;
}

.quick-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 0;
  align-self: center;
}

.quick-facts div {
  min-height: 70px;
  border: 2px solid var(--line);
  border-radius: 34% 66% 28% 72% / 70% 30% 64% 36%;
  display: grid;
  place-items: center;
  align-content: center;
  background: rgba(255, 255, 255, 0.42);
  box-shadow: 3px 4px 0 rgba(17, 17, 17, 0.78);
}

.quick-facts div:nth-child(2) {
  border-radius: 68% 32% 72% 28% / 38% 64% 36% 62%;
  background: rgba(255, 255, 255, 0.58);
  transform: rotate(1deg);
}

.quick-facts div:nth-child(3) {
  border-radius: 26% 74% 30% 70% / 66% 32% 68% 34%;
  background: rgba(255, 255, 255, 0.48);
  transform: rotate(-1deg);
}

.quick-facts strong {
  color: var(--line);
  font-size: 28px;
  line-height: 1;
}

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

.test-note {
  flex: 0 0 auto;
  border: 2px solid var(--line);
  border-radius: 8px 18px 10px 16px;
  padding: 11px 12px;
  background: rgba(255, 255, 255, 0.5);
  box-shadow: 4px 4px 0 var(--line);
  color: var(--muted);
  font-size: 13px;
}

.test-note summary {
  color: var(--line);
  font-weight: 800;
  cursor: pointer;
}

.test-note p {
  margin: 10px 0 0;
  line-height: 1.6;
}

.disclaimer {
  align-self: end;
  padding-top: 0;
  text-align: center;
  color: rgba(16, 32, 24, 0.46);
  font-size: 11px;
}

.screen-quiz {
  grid-template-rows: 6% 24% 14% 36% 8% 4%;
  row-gap: 2%;
}

.progress-wrap {
  align-self: center;
  padding-top: 0;
}

.progress-track {
  position: relative;
  height: 34px;
  overflow: visible;
  border: 2px solid var(--line);
  border-radius: 41% 59% 46% 54% / 56% 44% 60% 40%;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 3px 4px 0 rgba(17, 17, 17, 0.75);
  --progress-ratio: 0;
  --ball-rotation: 0deg;
  --number-rotation: 0deg;
}

.progress-clip {
  position: absolute;
  inset: 2px;
  overflow: hidden;
  border-radius: 41% 59% 46% 54% / 56% 44% 60% 40%;
  pointer-events: none;
}

.progress-fill {
  position: absolute;
  inset: 0 auto 0 0;
  height: 100%;
  width: 0;
  max-width: 100%;
  border-radius: inherit;
  background: #111111;
  transform: none;
  transition: width 220ms ease;
}

.progress-ball {
  position: absolute;
  left: calc(19px + (100% - 38px) * var(--progress-ratio));
  top: 50%;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 2px solid var(--line);
  border-radius: 48% 52% 45% 55% / 54% 46% 58% 42%;
  background:
    radial-gradient(circle at 50% 50%, rgba(17, 17, 17, 0.2) 0 12%, transparent 13%),
    radial-gradient(circle at 26% 30%, rgba(17, 17, 17, 0.2) 0 7%, transparent 8%),
    radial-gradient(circle at 74% 30%, rgba(17, 17, 17, 0.2) 0 7%, transparent 8%),
    radial-gradient(circle at 30% 72%, rgba(17, 17, 17, 0.2) 0 7%, transparent 8%),
    radial-gradient(circle at 70% 72%, rgba(17, 17, 17, 0.2) 0 7%, transparent 8%),
    #ffffff;
  color: transparent;
  font-size: 14px;
  font-weight: 500;
  transform: translate(-50%, -50%) rotate(var(--ball-rotation));
  transition: left 240ms ease, transform 240ms ease;
  box-shadow: 2px 3px 0 rgba(17, 17, 17, 0.65);
  z-index: 2;
}

.progress-ball::after {
  content: attr(data-current-question);
  position: absolute;
  inset: 7px;
  z-index: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.88);
  color: var(--line);
  font-size: 14px;
  line-height: 1;
  transform: rotate(var(--number-rotation));
}

.question-zone {
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 10px 6px 8px;
  text-align: center;
}

.quiz-image-slot {
  width: min(76%, 310px);
  align-self: center;
  justify-self: center;
  margin: 0 auto;
}

.question-zone h2 {
  margin: 0;
  color: var(--grass-deep);
  font-size: 23px;
  font-weight: 500;
  line-height: 1.22;
  text-shadow: none;
}

.option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-self: stretch;
}

.option-card {
  min-height: 0;
  border: 2px solid var(--line);
  border-radius: 16px 8px 18px 10px;
  padding: 13px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.58);
  color: var(--ink);
  text-align: center;
  box-shadow: 3px 4px 0 rgba(17, 17, 17, 0.78);
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.option-card:nth-child(1) {
  background: rgba(255, 255, 255, 0.62);
  transform: rotate(-1deg);
}

.option-card:nth-child(2) {
  background: rgba(255, 255, 255, 0.5);
  border-radius: 8px 18px 10px 16px;
  transform: rotate(1deg);
}

.option-card:nth-child(3) {
  background: rgba(255, 255, 255, 0.56);
  border-radius: 18px 10px 16px 8px;
  transform: rotate(0.5deg);
}

.option-card:nth-child(4) {
  background: rgba(255, 255, 255, 0.46);
  border-radius: 10px 16px 8px 18px;
  transform: rotate(-0.5deg);
}

.option-card strong {
  display: block;
  margin-bottom: 8px;
  color: var(--line);
  font-size: 15px;
  font-weight: 500;
}

.option-card span {
  display: block;
  font-size: 16px;
  line-height: 1.45;
}

.option-card.is-compact-text span {
  font-size: 13px;
  line-height: 1.34;
}

.option-card.is-selected {
  background: #ffffff;
  transform: translate(3px, 4px) rotate(0deg);
  box-shadow:
    inset 0 0 22px 8px rgba(153, 242, 196, 0.72),
    1px 1px 0 var(--line);
}

.quiz-actions,
.result-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.quiz-actions {
  align-self: center;
  margin-top: 0;
  padding-top: 0;
}

.screen-result {
  text-align: center;
  grid-template-rows: 8% 35% 36% 7% 4%;
  row-gap: 1.5%;
  gap: 0;
}

.result-header {
  align-self: center;
  padding-top: 0;
}

.result-summary {
  max-width: 330px;
  margin: 6px auto 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.42;
}

.persona-card {
  display: grid;
  grid-template-rows: 62% auto auto;
  align-content: center;
  justify-items: center;
  align-items: center;
  padding: 0;
}

.result-visual-placeholder {
  width: min(76%, 295px);
  height: auto;
  margin-bottom: 16px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transform: none;
}

.persona-card h2 {
  margin: 0;
  color: var(--grass-deep);
  font-size: 32px;
  font-weight: 500;
  line-height: 1.08;
  text-shadow: none;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
  margin-top: 8px;
}

.tag-row span {
  border: 2px solid var(--line);
  border-radius: 44% 56% 48% 52% / 55% 43% 57% 45%;
  padding: 4px 8px;
  background: var(--white);
  color: var(--line);
  font-size: 12px;
  font-weight: 500;
  box-shadow: 2px 2px 0 rgba(17, 17, 17, 0.74);
}

.club-section {
  align-self: stretch;
  min-height: 0;
}

.club-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-top: 6px;
  height: calc(100% - 24px);
}

.club-card {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  align-content: start;
  gap: 4px;
  min-height: 0;
  overflow: hidden;
  border: 2px solid var(--line);
  border-radius: 12px 18px 10px 16px;
  padding: 9px 7px;
  background: rgba(255, 255, 255, 0.62);
  text-align: left;
  box-shadow: 3px 4px 0 rgba(17, 17, 17, 0.78);
}

.club-card:nth-child(2) {
  background: rgba(255, 255, 255, 0.5);
  border-radius: 18px 10px 16px 8px;
  transform: rotate(1deg);
}

.club-card:nth-child(3) {
  background: rgba(255, 255, 255, 0.56);
  border-radius: 10px 16px 8px 18px;
  transform: rotate(-1deg);
}

.club-card h3 {
  min-height: 30px;
  margin: 0;
  color: var(--line);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.25;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
}

.fit {
  margin: 0;
  color: var(--line);
  font-size: 18px;
  font-weight: 500;
}

.club-keyword {
  display: block;
  min-height: 27px;
  margin: 0;
  color: var(--line);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.22;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
}

.club-reason {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.32;
  overflow: hidden;
  display: block;
}

.result-actions {
  align-self: center;
  margin-top: 8px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 20;
  max-width: min(330px, calc(100vw - 32px));
  transform: translateX(-50%);
  border: 2px solid var(--line);
  border-radius: 12px 18px 10px 16px;
  padding: 11px 14px;
  background: var(--card-a);
  color: var(--line);
  font-size: 13px;
  box-shadow: 3px 4px 0 rgba(17, 17, 17, 0.78);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: none;
  place-items: center;
  padding: 24px;
  background: rgba(17, 17, 17, 0.18);
}

.share-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
  place-items: center;
  padding: 18px;
  background: rgba(17, 17, 17, 0.28);
}

.share-modal.is-open {
  display: grid;
}

.share-modal-panel {
  display: grid;
  justify-items: center;
  gap: 12px;
  width: min(92vw, 360px);
}

.share-card {
  width: min(92vw, 360px);
  aspect-ratio: 3 / 4;
  display: grid;
  grid-template-rows: 0.95fr 1.45fr 2.35fr 1fr;
  row-gap: 12px;
  padding: 14px 18px 12px;
  border: 2px solid var(--line);
  background:
    linear-gradient(0deg, rgba(0, 0, 0, 0.035) 1px, transparent 1px),
    #fbfbf5;
  background-size: 100% 30px;
  box-shadow: 7px 8px 0 rgba(17, 17, 17, 0.78);
  color: var(--ink);
  text-align: center;
}

.share-card-header p,
.share-clubs p,
.share-qr-area p,
.share-author,
.share-author-info p,
.share-qr-text p {
  margin: 0;
}

.share-card-header p,
.share-clubs p {
  font-size: clamp(11px, 3.4vw, 13px);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.share-card-header h2 {
  margin: 6px 0 0;
  font-size: clamp(24px, 7.8vw, 29px);
  font-weight: 500;
  line-height: 1.08;
}

.share-card-visual {
  display: grid;
  place-items: start center;
  min-height: 0;
  padding-top: 2px;
  padding-bottom: 22px;
}

.share-card-visual img {
  display: block;
  width: auto;
  max-width: 58%;
  max-height: 88%;
  height: 88%;
  object-fit: contain;
}

.share-clubs {
  display: grid;
  grid-template-rows: auto 1fr;
  align-content: stretch;
  gap: 8px;
  min-height: 0;
  padding-top: 14px;
}

.share-clubs [data-share-clubs] {
  display: grid;
  align-content: center;
  gap: 6px;
  min-height: 0;
}

.share-club-row {
  position: relative;
  display: grid;
  grid-template-columns: 28px 1fr 42px;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  border: 2px solid var(--line);
  border-radius: 18px 10px 16px 8px;
  padding: 0 7px;
  background: rgba(255, 255, 255, 0.64);
  box-shadow: 2px 2px 0 rgba(17, 17, 17, 0.78);
  text-align: left;
}

.share-club-row::after {
  content: "";
  position: absolute;
  inset: -3px 2px 2px -3px;
  border: 2px solid var(--line);
  border-radius: inherit;
  pointer-events: none;
}

.share-club-row span,
.share-club-row em {
  font-style: normal;
  color: var(--muted);
  font-size: clamp(9px, 2.7vw, 10px);
}

.share-club-row strong {
  color: var(--line);
  font-size: clamp(11px, 3.4vw, 13px);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.share-qr-area,
.share-author {
  display: none;
}

.share-bottom {
  display: grid;
  grid-template-columns: 23% 21% 21% 23%;
  justify-content: center;
  align-items: center;
  gap: 7px;
  min-height: 0;
}

.share-author-photo,
.share-qr-placeholder {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border: 2px solid var(--line);
  border-radius: 10px 16px 8px 18px;
  background: rgba(255, 255, 255, 0.55);
}

.share-author-photo::after,
.share-qr-placeholder::after {
  content: "";
  position: absolute;
  inset: -3px 2px 2px -3px;
  border: 2px solid var(--line);
  border-radius: inherit;
  pointer-events: none;
}

.share-author-photo {
  overflow: hidden;
  background: #ffffff;
}

.share-author-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.share-author-info,
.share-qr-text {
  color: rgba(16, 32, 24, 0.68);
  font-size: clamp(8px, 2.6vw, 10px);
  line-height: 1.35;
  text-align: left;
}

.share-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: min(92vw, 360px);
}

.share-save-button,
.share-close-button {
  min-height: 38px;
  padding: 0 18px;
}

.modal.is-open {
  display: grid;
}

.modal-panel {
  width: min(280px, 100%);
  border: 2px solid var(--line);
  border-radius: 18px 10px 16px 8px;
  padding: 24px 18px 18px;
  background: #ffffff;
  text-align: center;
  box-shadow: 5px 6px 0 rgba(17, 17, 17, 0.82);
  transform: rotate(-1deg);
}

.modal-panel p {
  margin: 0 0 18px;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.4;
}
