/*
 * The Teacher Type H5: a world of its own, sized for a phone held in one hand. Thick ink outlines,
 * flat colour, hard shadows; every type has a character and a colour to stand on. Light only; every
 * colour is set explicitly. Transforms are written the long way (transform: …) for older WeChat
 * web views.
 */

:root {
  --ink: #16171b;
  --ink2: #4a4b53;
  --ink3: #6f7078;
  --paper: #f4f1e6;
  --sheet: #fffdf6;
  --rule: #d9d5c6;
  --mint: #a6d8bd;
  --yolk: #f2bf2f;
  --tomato: #e4512f;
  --pink: #f0a2b5;
  --sky: #8fd0f0;
  --violet: #9a6bff;
  --gutter: max(18px, env(safe-area-inset-left, 0px));
  --gutter-r: max(18px, env(safe-area-inset-right, 0px));
  --max: 480px;
  --num: "Arial Rounded MT Bold", "DIN Alternate", "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100% !important;
  text-size-adjust: 100% !important;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  font-size: 15px;
  line-height: 1.65;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

p, h1, h2, h3, ol, ul, dl, dd, figure, blockquote {
  margin: 0;
}

ol, ul {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  -webkit-appearance: none;
  appearance: none;
}

b, strong, h1, h2, h3 {
  font-weight: 900;
}

small {
  font-size: inherit;
}

.code {
  font-family: var(--num);
  font-weight: 400;
  letter-spacing: 0.02em;
}

.page {
  max-width: var(--max);
  margin: 0 auto;
  padding: 20px var(--gutter-r) 0 var(--gutter);
}

.section {
  margin-top: 46px;
}

.section.first {
  margin-top: 22px;
}

.boot {
  max-width: var(--max);
  margin: 0 auto;
  padding: 48px 20px;
}

.boot-k {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 2px;
  color: var(--ink3);
}

.boot-title {
  margin-top: 8px;
  font-size: 34px;
  font-weight: 900;
  line-height: 1.25;
}

.boot-note {
  margin-top: 12px;
  color: var(--ink3);
}

/* ---------- the pieces everything is made of ---------- */

.fig {
  display: block;
  line-height: 0;
}

.fig svg {
  display: block;
  width: 100%;
  height: auto;
}

.chip {
  display: inline-block;
  padding: 5px 12px 6px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 12.5px;
  font-weight: 900;
  line-height: 1.3;
}

.h1 {
  margin-top: 14px;
  font-size: 46px;
  line-height: 1.12;
  letter-spacing: 0.01em;
}

.h1.smaller {
  font-size: 34px;
}

.h2 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 10px;
  margin-bottom: 14px;
  font-size: 23px;
  line-height: 1.3;
}

.h2 small {
  font-size: 12.5px;
  font-weight: 400;
  color: var(--ink3);
}

.lede {
  margin-top: 12px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink2);
}

.lede.small {
  margin: -4px 0 14px;
  font-size: 14.5px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 8px 18px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--sheet);
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
  box-shadow: 0 4px 0 var(--ink);
  cursor: pointer;
  transition: transform 0.08s, box-shadow 0.08s;
}

.btn:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--ink);
}

.btn.solid {
  background: var(--yolk);
}

.btn.grow {
  flex: 1;
}

.btn.small {
  min-height: 42px;
  padding: 6px 15px;
  font-size: 14px;
}

.btn.big {
  width: 100%;
  min-height: 56px;
  font-size: 17px;
}

.btn:disabled {
  opacity: 0.35;
  box-shadow: none;
  cursor: not-allowed;
}

.link {
  padding: 8px 0;
  border: 0;
  background: none;
  font-size: 14px;
  font-weight: 900;
  color: var(--ink2);
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}

.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  background: rgba(244, 241, 230, 0.94);
  border-top: 3px solid var(--ink);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.dock-in {
  display: flex;
  gap: 10px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 10px var(--gutter-r) calc(12px + env(safe-area-inset-bottom, 0px)) var(--gutter);
}

.dock-gap {
  flex: 1;
}

.dock-space {
  height: calc(96px + env(safe-area-inset-bottom, 0px));
}

.tap {
  cursor: pointer;
  transition: transform 0.1s;
}

.tap:active {
  transform: scale(0.97);
}

/* ---------- the front page ---------- */

.back {
  display: inline-block;
  margin-bottom: 14px;
  font-size: 13.5px;
  font-weight: 900;
  color: var(--ink2);
}

.friend-banner,
.last {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding: 8px 14px 8px 8px;
  border: 3px solid var(--ink);
  border-radius: 20px;
  box-shadow: 0 5px 0 var(--ink);
}

.friend-banner .fig,
.last .fig {
  flex: none;
  width: 64px;
}

.friend-text,
.last-text {
  flex: 1;
  line-height: 1.3;
}

.friend-text small,
.last-text small {
  display: block;
  font-size: 12px;
  opacity: 0.85;
}

.friend-text b,
.last-text b {
  font-size: 19px;
}

.friend-you,
.last-go {
  padding: 5px 11px 6px;
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  background: var(--yolk);
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 900;
}

.last {
  margin: 22px 0 0;
}

.dark {
  color: #fff;
}

.parade {
  margin: 22px calc(var(--gutter-r) * -1) 0 calc(var(--gutter) * -1);
  padding: 6px 0 10px;
  overflow: hidden;
}

.parade-row {
  display: flex;
  width: max-content;
  animation: parade 60s linear infinite;
}

.walker {
  flex: none;
  display: grid;
  justify-items: center;
  width: 112px;
  margin-right: 10px;
  padding: 6px 6px 9px;
  border: 3px solid var(--ink);
  border-radius: 18px;
  box-shadow: 0 5px 0 var(--ink);
}

.walker:nth-child(odd) {
  transform: rotate(-1.5deg);
}

.walker:nth-child(even) {
  transform: rotate(1.2deg) translateY(4px);
}

.walker .fig {
  width: 92px;
}

.walker b {
  font-size: 13.5px;
  line-height: 1.2;
  white-space: nowrap;
}

@keyframes parade {
  to {
    transform: translateX(-50%);
  }
}

.promises {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.promise {
  padding: 4px 11px 5px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--sheet);
  font-size: 12.5px;
  font-weight: 900;
}

/* all sixteen */
.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.tile {
  position: relative;
  display: grid;
  justify-items: center;
  padding: 4px 2px 7px;
  border: 2.5px solid var(--ink);
  border-radius: 14px;
  box-shadow: 0 4px 0 var(--ink);
}

.tile .fig {
  width: 88%;
}

.tile-name {
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
  white-space: nowrap;
}

.tile.current {
  outline: 4px solid var(--tomato);
  outline-offset: 2px;
}

.tile-tag {
  position: absolute;
  top: -8px;
  right: -6px;
  padding: 1px 7px 2px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--tomato);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.4;
  transform: rotate(6deg);
}

.tile-tag.friend {
  background: var(--sheet);
  color: var(--ink);
}

/* the four spectra, in brief */
.dim {
  margin-top: 12px;
  padding: 14px 16px 16px;
  border: 3px solid var(--ink);
  border-radius: 18px;
  background: var(--sheet);
  box-shadow: 0 5px 0 var(--ink);
}

.dim-q {
  font-size: 18px;
  font-weight: 900;
  line-height: 1.35;
}

.dim-q small {
  margin-left: 8px;
  font-size: 12px;
  font-weight: 400;
  color: var(--ink3);
}

.dim-pole {
  margin-top: 9px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink2);
}

.camp {
  display: inline-block;
  margin-right: 8px;
  padding: 1px 8px 2px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--c);
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.5;
}

.camp .code {
  margin-right: 4px;
}

.about p {
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink2);
}

.about p + p {
  margin-top: 10px;
}

/* ---------- the test ---------- */

.page.test {
  padding-top: 16px;
}

.test-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.periods {
  display: flex;
  gap: 6px;
}

.periods i {
  padding: 5px 10px 6px;
  border: 2.5px dashed rgba(22, 23, 27, 0.35);
  border-radius: 999px;
  font-size: 12.5px;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
  color: rgba(22, 23, 27, 0.42);
}

.periods i.done {
  border: 2.5px solid var(--ink);
  background: var(--ink);
  color: #fff;
}

.periods i.now {
  border: 2.5px solid var(--ink);
  background: var(--yolk);
  color: var(--ink);
  box-shadow: 0 3px 0 var(--ink);
}

.num {
  font-size: 16px;
}

.cheer {
  width: fit-content;
  max-width: 100%;
  margin-top: 14px;
  padding: 7px 13px 9px;
  border: 2.5px solid var(--ink);
  border-radius: 12px;
  background: var(--yolk);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.5;
  transform: rotate(-1deg);
  box-shadow: 0 4px 0 var(--ink);
  animation: drop-in 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
}

.q {
  margin-top: 22px;
}

.q.in-next {
  animation: slide-next 0.26s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.q.in-back {
  animation: slide-back 0.26s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes slide-next {
  from {
    opacity: 0;
    transform: translateX(26px);
  }
}

@keyframes slide-back {
  from {
    opacity: 0;
    transform: translateX(-26px);
  }
}

@keyframes drop-in {
  from {
    opacity: 0;
    transform: translateY(-10px) rotate(-5deg);
  }
}

.scene {
  display: inline-block;
  padding: 4px 10px 5px;
  border: 2.5px solid var(--ink);
  border-radius: 9px;
  background: var(--yolk);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.3;
  transform: rotate(-2deg);
}

.first-note {
  margin-top: 12px;
  font-size: 13.5px;
  color: var(--ink3);
}

.prompt {
  margin-top: 12px;
  font-size: 22px;
  line-height: 1.5;
}

.prompt:focus {
  outline: none;
}

/* a scene: two cards, one against the other */
.versus {
  position: relative;
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.opt {
  position: relative;
  display: block;
  width: 100%;
  padding: 15px 14px 16px 52px;
  border: 3px solid var(--ink);
  border-radius: 20px;
  text-align: left;
  font-size: 16.5px;
  font-weight: 900;
  line-height: 1.55;
  box-shadow: 0 6px 0 var(--ink);
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s, opacity 0.2s;
}

.opt.a {
  transform: rotate(-1.2deg);
}

.opt.b {
  transform: rotate(1deg);
}

.opt.mint { background: var(--mint); }
.opt.pink { background: var(--pink); }
.opt.yolk { background: var(--yolk); }
.opt.sky { background: var(--sky); }

.opt > b {
  position: absolute;
  left: 13px;
  top: 14px;
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-size: 15px;
}

.opt.strong,
.opt.soft {
  box-shadow: 0 2px 0 var(--ink);
}

.opt.a.strong, .opt.a.soft {
  transform: rotate(-1.2deg) translateY(4px);
}

.opt.b.strong, .opt.b.soft {
  transform: rotate(1deg) translateY(4px);
}

.vs {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin: -23px 0 0 -23px;
  border: 3px solid var(--paper);
  border-radius: 50%;
  background: var(--ink);
  color: var(--yolk);
  font-size: 15px;
  pointer-events: none;
}

.seal {
  position: absolute;
  right: -5px;
  top: -14px;
  padding: 3px 9px 4px;
  border: 3px solid var(--tomato);
  border-radius: 9px;
  background: rgba(255, 253, 246, 0.9);
  color: var(--tomato);
  font-size: 14px;
  font-style: normal;
  font-weight: 900;
  line-height: 1.2;
  transform: rotate(8deg);
  animation: stamp 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.3) both;
}

.seal:empty {
  display: none;
}

@keyframes stamp {
  from {
    opacity: 0;
    transform: rotate(-6deg) scale(2);
  }
}

.lean {
  margin-top: 26px;
}

.lean-now {
  margin-bottom: 10px;
  text-align: center;
  font-size: 13px;
  color: var(--ink3);
}

.lean-dots {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.lean-dots::before {
  content: "";
  position: absolute;
  left: 20px;
  right: 20px;
  top: 50%;
  height: 4px;
  margin-top: -2px;
  border-radius: 2px;
  background: var(--ink);
}

.ld {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.ld i {
  width: 16px;
  height: 16px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
  transition: transform 0.15s, background-color 0.15s;
}

.ld.on i {
  background: var(--tomato);
  transform: scale(1.8);
}

.ends {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 12.5px;
  font-weight: 900;
  color: var(--ink3);
}

/* a statement: the grey one says it, and you stamp it */
.ask {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  align-items: end;
  gap: 4px;
  margin-top: 8px;
}

.asker {
  width: 96px;
  margin: 0 0 14px -14px;
}

.bubble {
  position: relative;
  margin-bottom: 30px;
  padding: 15px 16px 18px;
  border: 3px solid var(--ink);
  border-radius: 24px 24px 24px 6px;
  background: var(--sheet);
  box-shadow: 0 6px 0 var(--ink);
}

.bubble small {
  display: block;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: var(--violet);
}

.bubble .prompt {
  margin-top: 6px;
  font-size: 19px;
  line-height: 1.55;
}

.seal.big {
  right: -8px;
  top: auto;
  bottom: -20px;
  padding: 4px 12px 6px;
  border-width: 3.5px;
  font-size: 17px;
  transform: rotate(-9deg);
  animation: none;
}

.seal.big.on {
  animation: stamp-big 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.3) both;
}

@keyframes stamp-big {
  from {
    opacity: 0;
    transform: rotate(8deg) scale(2.2);
  }
}

.stamps {
  display: flex;
  justify-content: space-between;
  margin-top: 26px;
}

.stamp {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  padding: 0;
  border: 2.5px solid var(--ink);
  border-radius: 50%;
  background: var(--sheet);
  font-size: 12.5px;
  font-weight: 900;
  line-height: 1.15;
  box-shadow: 0 4px 0 var(--ink);
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s, background-color 0.12s;
}

.stamp.on {
  background: var(--tomato);
  color: #fff;
  box-shadow: 0 1px 0 var(--ink);
  transform: translateY(3px) rotate(-8deg) scale(1.12);
}

/* all done */
.q.done {
  display: grid;
  justify-items: center;
  text-align: center;
}

.q.done .fig {
  width: 170px;
}

.q.done .prompt {
  font-size: 27px;
}

.done-note {
  margin: 8px 0 22px;
  font-size: 14px;
  color: var(--ink3);
}

.q.done .link {
  margin-top: 12px;
}

.wobble svg {
  transform-origin: 50% 90%;
  animation: wobble 1.6s ease-in-out infinite;
}

@keyframes wobble {
  0%, 100% {
    transform: rotate(-4deg);
  }
  50% {
    transform: rotate(4deg);
  }
}

/* ---------- a result: the deck ---------- */

.page.result {
  padding-top: 14px;
}

.from {
  margin-bottom: 14px;
  padding: 10px 14px 12px;
  border: 3px solid var(--ink);
  border-radius: 16px;
  background: var(--yolk);
  font-size: 15px;
  font-weight: 900;
  line-height: 1.5;
  box-shadow: 0 4px 0 var(--ink);
}

.hero + .from {
  margin-top: 16px;
}

.from small {
  display: block;
  font-size: 12px;
  font-weight: 400;
}

.deck-bars {
  display: flex;
  gap: 4px;
  margin-bottom: 10px;
}

.deck-bars i {
  flex: 1;
  height: 5px;
  border-radius: 3px;
  background: rgba(22, 23, 27, 0.18);
  transition: background-color 0.2s;
}

.deck-bars i.on {
  background: var(--ink);
}

.deck {
  display: flex;
  gap: 12px;
  margin: 0 calc(var(--gutter-r) * -1) 0 calc(var(--gutter) * -1);
  padding: 0 var(--gutter-r) 12px var(--gutter);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 var(--gutter);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.deck::-webkit-scrollbar {
  display: none;
}

/* keeps the gutter after the last card, which a scrolling flex row otherwise drops */
.deck::after {
  content: "";
  flex: 0 0 1px;
}

.card {
  position: relative;
  flex: 0 0 calc(100% - 14px);
  display: flex;
  flex-direction: column;
  min-height: 540px;
  padding: 20px 18px 20px;
  border: 3px solid var(--ink);
  border-radius: 28px;
  background: var(--sheet);
  box-shadow: 0 7px 0 var(--ink);
  scroll-snap-align: start;
  overflow: hidden;
}

.deck-hint {
  margin-top: 8px;
  text-align: center;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ink3);
}

.label {
  align-self: flex-start;
  padding: 4px 11px 5px;
  border-radius: 9px;
  background: var(--ink);
  color: var(--yolk);
  font-size: 12.5px;
  font-weight: 900;
  line-height: 1.3;
  transform: rotate(-2deg);
}

.label.plain {
  color: #fff;
  transform: none;
}

.card-h {
  margin-top: 10px;
  font-size: 25px;
  line-height: 1.25;
}

.card-note {
  margin-top: 6px;
  font-size: 12.5px;
  line-height: 1.6;
  opacity: 0.72;
}

.card-foot {
  margin-top: auto;
  padding-top: 14px;
  font-size: 12px;
  line-height: 1.6;
  opacity: 0.75;
}

/* 1. the name */
.c-name {
  align-items: center;
  text-align: center;
}

.card-k {
  font-size: 14px;
  font-weight: 900;
  line-height: 1.4;
}

.burst {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  margin-top: 2px;
}

.burst::before {
  content: "";
  position: absolute;
  width: 250px;
  height: 250px;
  border-radius: 50%;
  background: repeating-conic-gradient(rgba(255, 255, 255, 0.24) 0 12deg, transparent 12deg 24deg);
  animation: turn 40s linear infinite;
}

@keyframes turn {
  to {
    transform: rotate(360deg);
  }
}

.burst .fig {
  position: relative;
  width: 230px;
}

.name {
  margin-top: -6px;
  font-size: 46px;
  line-height: 1.1;
  letter-spacing: 0.02em;
  color: #fff;
  text-shadow: 3px 3px 0 var(--ink), -1.5px -1.5px 0 var(--ink), 1.5px -1.5px 0 var(--ink), -1.5px 1.5px 0 var(--ink), 0 2px 0 var(--ink), 2px 0 0 var(--ink);
}

.sub {
  margin-top: 10px;
  font-size: 13.5px;
  font-weight: 900;
  line-height: 1.4;
}

.sub .code {
  margin-right: 7px;
}

.sub span {
  margin-left: 8px;
  font-weight: 400;
  opacity: 0.85;
}

.camps {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
  margin-top: 12px;
}

.camps span {
  padding: 4px 7px 5px;
  border: 2px solid var(--ink);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.1;
  white-space: nowrap;
}

.camps .code {
  margin-right: 3px;
}

.camps em {
  margin-left: 4px;
  font-family: var(--num);
  font-size: 11px;
  font-style: normal;
  font-weight: 400;
  color: var(--ink3);
}

.nick {
  margin-top: 16px;
  padding: 7px 14px 9px;
  border: 3px solid var(--ink);
  border-radius: 12px;
  background: var(--yolk);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.3;
  transform: rotate(-2deg);
  box-shadow: 0 4px 0 var(--ink);
}

.nick b {
  font-size: 16.5px;
}

/* 2. the roast */
.c-roast {
  background: var(--yolk);
}

.roast {
  margin-top: 18px;
  font-size: 34px;
  font-weight: 900;
  line-height: 1.34;
  letter-spacing: 0.01em;
}

.react {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 10px;
  margin-top: 22px;
}

.react button {
  padding: 10px 17px 11px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--sheet);
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 4px 0 var(--ink);
  cursor: pointer;
}

.react button.ink {
  background: var(--ink);
  color: #fff;
}

.react button.picked {
  transform: translateY(3px) rotate(-3deg);
  box-shadow: 0 1px 0 var(--ink);
}

.peek {
  position: absolute;
  right: -44px;
  bottom: -58px;
  width: 230px;
  transform: rotate(-10deg);
  pointer-events: none;
}

/* 3. the persona */
.say {
  position: relative;
  margin-top: 16px;
  padding: 14px 16px 17px;
  border: 3px solid var(--ink);
  border-radius: 22px 22px 22px 6px;
  background: var(--mint);
  box-shadow: 0 5px 0 var(--ink);
}

.say small,
.bits dt {
  display: block;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.1em;
  opacity: 0.7;
}

.say p {
  margin-top: 4px;
  font-size: 20px;
  font-weight: 900;
  line-height: 1.5;
}

.bits {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.bits dd {
  margin-top: 3px;
  font-size: 15.5px;
  line-height: 1.6;
}

/* 4. three people */
.seen {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.seen > div {
  padding: 13px 16px 16px;
  border: 3px solid var(--ink);
  border-radius: 22px 22px 22px 6px;
  box-shadow: 0 5px 0 var(--ink);
}

.seen small {
  display: block;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.1em;
  opacity: 0.7;
}

.seen p {
  margin-top: 4px;
  font-size: 20px;
  font-weight: 900;
  line-height: 1.45;
}

.stand {
  width: 150px;
  margin: auto auto -6px;
  padding-top: 10px;
}

.seen-students {
  background: var(--mint);
  transform: rotate(-1deg);
}

.seen-colleagues {
  background: var(--pink);
  transform: rotate(0.8deg);
}

.seen > .seen-self {
  border-radius: 22px 22px 6px 22px;
  background: var(--yolk);
  transform: rotate(-0.5deg);
}

/* 5. five readings */
.c-stats {
  background: var(--ink);
}

.c-stats .card-h {
  margin-top: 2px;
}

.stat {
  margin-top: 15px;
}

.stat div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-size: 15.5px;
  font-weight: 900;
  line-height: 1;
}

.stat div b {
  font-size: 25px;
}

.stat i {
  display: block;
  height: 16px;
  margin-top: 7px;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.15);
}

.stat u {
  display: block;
  height: 100%;
  border-radius: 8px;
  transform-origin: left;
  animation: grow 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes grow {
  from {
    transform: scaleX(0);
  }
}

.stat p {
  margin-top: 5px;
  font-size: 12.5px;
  line-height: 1.4;
  opacity: 0.78;
}

/* 6. the partner and the rival */
.c-pairs {
  background: #d9cdfd;
}

.pairc {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-top: 16px;
  padding: 10px 12px 10px 10px;
  border: 3px solid var(--ink);
  border-radius: 20px;
  background: var(--sheet);
  color: var(--ink);
  box-shadow: 0 5px 0 var(--ink);
}

.pairc-fig {
  border: 2.5px solid var(--ink);
  border-radius: 14px;
  padding: 2px 2px 0;
}

.pairc-body small {
  display: block;
  font-size: 12px;
  font-weight: 900;
  color: var(--tomato);
  letter-spacing: 0.06em;
}

.pairc-body b {
  display: block;
  font-size: 20px;
  line-height: 1.3;
}

.pairc-body span {
  display: block;
  margin-top: 3px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink2);
}

/* 7. the four spectra at a glance */
.spec {
  margin-top: 16px;
}

.spec-q {
  font-size: 14.5px;
  font-weight: 900;
  line-height: 1.3;
}

.spec-q small {
  margin-left: 7px;
  font-size: 11.5px;
  font-weight: 400;
  color: var(--ink3);
}

.track {
  position: relative;
  height: 17px;
  margin-top: 8px;
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  background: #fff;
}

.track::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -5px;
  bottom: -5px;
  width: 2.5px;
  margin-left: -1.25px;
  background: var(--ink);
}

.track i {
  position: absolute;
  top: 50%;
  width: 26px;
  height: 26px;
  margin: -13px 0 0 -13px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 2px 0 var(--ink);
}

.track.typical i {
  border-style: dashed;
  box-shadow: none;
}

.poles {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 12.5px;
  line-height: 1.2;
  color: var(--ink3);
}

.poles .code {
  margin-right: 3px;
}

.poles .on {
  font-weight: 900;
  color: var(--ink);
}

.fair {
  margin-top: auto;
  padding: 10px 13px 12px;
  border: 2.5px solid var(--ink);
  border-radius: 14px;
  background: #fff;
  font-size: 13px;
  line-height: 1.6;
}

.c-spectra .spec:last-of-type {
  margin-bottom: 18px;
}

/* 8–11. one spectrum, told seriously */
.ends2 {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.end {
  position: relative;
  padding: 10px 13px 12px;
  border: 2.5px solid var(--ink);
  border-radius: 14px;
  background: var(--sheet);
  font-size: 13.5px;
  line-height: 1.55;
}

.end b {
  display: block;
  margin-bottom: 2px;
  font-size: 15.5px;
  line-height: 1.3;
}

.end b .code {
  margin-right: 5px;
}

.end b small {
  margin-left: 7px;
  font-size: 11.5px;
  font-weight: 400;
  color: var(--ink3);
}

.end.you {
  box-shadow: 0 4px 0 var(--ink);
}

.end em {
  position: absolute;
  right: 10px;
  top: -12px;
  padding: 2px 9px 3px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--tomato);
  color: #fff;
  font-size: 11.5px;
  font-style: normal;
  font-weight: 900;
  line-height: 1.3;
  transform: rotate(3deg);
}

.says {
  margin-top: 14px;
  font-size: 13px;
  line-height: 1.65;
}

.says b,
.try b {
  display: block;
  margin-bottom: 3px;
  font-size: 12px;
  letter-spacing: 0.06em;
}

.try {
  margin: 12px 0 14px;
  padding: 11px 13px 13px;
  border-radius: 14px;
  background: var(--ink);
  color: #fff;
  font-size: 13.5px;
  line-height: 1.65;
}

.try b {
  color: var(--yolk);
}

.keep {
  margin-top: auto;
  text-align: center;
  font-size: 12px;
  font-weight: 900;
}

/* 12. pass it on */
.c-send {
  align-items: center;
  text-align: center;
}

.c-send .card-h {
  font-size: 29px;
}

.c-send .btn {
  margin-top: 12px;
}

.c-send > .fig {
  width: 190px;
  margin: 6px 0;
}

.mini-badge {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 20px 0 10px;
  padding: 8px 12px 8px 8px;
  border: 3px solid var(--ink);
  border-radius: 18px;
  background: var(--sheet);
  color: var(--ink);
  text-align: left;
  transform: rotate(-2deg);
  box-shadow: 0 5px 0 var(--ink);
}

.mini-badge .fig {
  flex: none;
  width: 78px;
}

.mini-badge b {
  display: block;
  font-size: 21px;
  line-height: 1.25;
}

.mini-badge small {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--ink3);
}

.mini-badge i {
  position: absolute;
  right: 10px;
  top: 50%;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin-top: -29px;
  border: 3px solid var(--tomato);
  border-radius: 50%;
  color: var(--tomato);
  font-size: 11.5px;
  font-style: normal;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
  transform: rotate(-14deg);
}

.c-send.dark .card-foot {
  opacity: 0.9;
}

/* ---------- below the deck: the full file ---------- */

.relation {
  padding: 14px 16px 16px;
  border: 3px solid var(--ink);
  border-radius: 18px;
  background: var(--yolk);
  box-shadow: 0 5px 0 var(--ink);
}

.relation b {
  display: block;
  font-size: 23px;
  line-height: 1.3;
}

.relation small {
  display: block;
  font-size: 12px;
}

.relation p {
  margin-top: 6px;
  font-size: 14.5px;
  line-height: 1.6;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin: 16px 0 4px;
  font-size: 12.5px;
  font-weight: 900;
}

.legend i {
  display: inline-block;
  width: 13px;
  height: 13px;
  margin-right: 5px;
  border: 2.5px solid var(--ink);
  border-radius: 50%;
  background: var(--sheet);
  vertical-align: -2px;
}

.legend i.mine {
  background: var(--tomato);
}

.cmp {
  margin-top: 16px;
}

.cmp-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 14.5px;
}

.cmp-top span {
  font-size: 12.5px;
  font-weight: 900;
}

.cmp-top .same {
  color: var(--ink3);
}

.cmp-top .diff {
  color: var(--tomato);
}

.bar {
  position: relative;
  height: 15px;
  margin-top: 9px;
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  background: #fff;
}

.bar-mid {
  position: absolute;
  left: 50%;
  top: -5px;
  bottom: -5px;
  width: 2.5px;
  margin-left: -1.25px;
  background: var(--ink);
}

.bar-dot {
  position: absolute;
  top: 50%;
  width: 22px;
  height: 22px;
  margin: -11px 0 0 -11px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: var(--sheet);
}

.bar-dot.mine {
  background: var(--tomato);
}

.bar-ends {
  display: flex;
  justify-content: space-between;
  margin-top: 7px;
  font-size: 12px;
  color: var(--ink3);
}

.persona {
  display: grid;
  gap: 12px;
}

.persona > div {
  padding: 13px 15px 15px;
  border: 3px solid var(--ink);
  border-radius: 16px;
  background: var(--sheet);
  box-shadow: 0 4px 0 var(--ink);
}

.persona dt {
  display: inline-block;
  padding: 2px 9px 3px;
  border-radius: 7px;
  background: var(--mint);
  font-size: 12.5px;
  font-weight: 900;
  line-height: 1.4;
  transform: rotate(-1.5deg);
}

.persona > div:nth-child(4n + 2) dt { background: var(--yolk); }
.persona > div:nth-child(4n + 3) dt { background: var(--pink); }
.persona > div:nth-child(4n + 4) dt { background: var(--sky); }

.persona dd {
  margin-top: 7px;
  font-size: 16px;
  line-height: 1.7;
}

.near {
  margin-top: 18px;
}

.near p {
  font-size: 13.5px;
  color: var(--ink2);
}

.near a {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 4px 14px 4px 6px;
  border: 2.5px solid var(--ink);
  border-radius: 16px;
  background: var(--sheet);
}

.near .fig {
  width: 52px;
}

.near b {
  flex: 1;
  font-size: 16px;
}

.near small {
  font-size: 12px;
  color: var(--ink3);
}

.strength {
  padding: 13px 0 14px;
  border-top: 2.5px solid var(--ink);
}

.strength:last-child {
  border-bottom: 2.5px solid var(--ink);
}

.strength b {
  font-size: 16.5px;
}

.strength p {
  margin-top: 3px;
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--ink2);
}

.friend-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 4px 14px 4px 6px;
  border: 3px solid var(--ink);
  border-radius: 18px;
  background: var(--sheet);
  box-shadow: 0 4px 0 var(--ink);
}

.friend-row .fig {
  flex: none;
  width: 58px;
}

.friend-body {
  flex: 1;
  line-height: 1.35;
}

.friend-body b {
  display: block;
  font-size: 17px;
}

.friend-body small {
  font-size: 12.5px;
  color: var(--ink2);
}

.friend-go {
  font-size: 13.5px;
  font-weight: 900;
}

.invite {
  padding: 14px 16px 16px;
  border: 3px dashed var(--ink);
  border-radius: 18px;
}

.invite p {
  margin-bottom: 12px;
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--ink2);
}

.sch-intro,
.sch-outro {
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink2);
}

.sch-outro {
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--ink3);
}

.fold {
  margin-top: 12px;
  border: 3px solid var(--ink);
  border-radius: 16px;
  background: var(--sheet);
}

.fold summary {
  padding: 13px 16px;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
}

.fold-body {
  padding: 0 16px 16px;
}

.duo {
  margin-top: 12px;
}

.duo small,
.reflect small {
  display: block;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: var(--ink3);
}

.duo b {
  font-size: 17px;
}

.duo p,
.reading-p,
.sch-row p {
  margin-top: 4px;
  font-size: 14.5px;
  line-height: 1.85;
  color: var(--ink2);
}

.reading-p {
  margin-top: 12px;
}

.reflect {
  margin-top: 16px;
  padding: 12px 14px 14px;
  border-radius: 12px;
  background: var(--yolk);
}

.reflect p {
  margin-top: 3px;
  font-size: 15.5px;
  font-weight: 900;
  line-height: 1.65;
}

.quote {
  margin-top: 16px;
  font-size: 14.5px;
  line-height: 1.8;
}

.quote small {
  display: block;
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--ink3);
}

.sch-row {
  margin-top: 12px;
}

.sch-row b {
  font-size: 14.5px;
}

.sch-row i {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 7px;
  border: 2px solid var(--ink);
  border-radius: 4px;
}

.sources {
  padding-left: 18px;
  list-style: decimal;
  font-size: 12px;
  line-height: 1.7;
  color: var(--ink2);
}

.sources li + li {
  margin-top: 6px;
}

/* who made it: the author, and the author's other project */
.about-card {
  margin-top: 14px;
  padding: 15px 18px 18px;
  border: 3px solid var(--ink);
  border-radius: 20px;
  background: var(--sheet);
  box-shadow: 4px 4px 0 var(--ink);
}

.about-card.kb {
  background: var(--mint);
}

.about-card small {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink3);
}

.about-card b {
  display: block;
  margin-top: 1px;
  font-size: 20px;
  font-weight: 900;
  line-height: 1.3;
}

.about-card p {
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink2);
}

.about-site {
  display: inline-block;
  margin-top: 11px;
  padding: 4px 13px 5px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-family: var(--num);
  font-size: 13.5px;
  line-height: 1.3;
  letter-spacing: 0.3px;
}

.closing {
  margin-top: 34px;
  text-align: center;
}

/* ---------- overlays: the reveal, the share guide, the badge sheet, the toast ---------- */

.reveal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px;
  background: var(--paper);
  text-align: center;
  transition: background-color 0.35s, opacity 0.3s;
}

.reveal.out {
  opacity: 0;
}

.reveal-line {
  min-height: 2.9em;
  max-width: 12em;
  font-size: 19px;
  font-weight: 900;
  line-height: 1.45;
}

.reveal-line.in {
  animation: rise 0.35s both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

.reveal-fig {
  position: relative;
  display: grid;
  place-items: center;
  width: 250px;
  height: 250px;
}

.reveal.lit .reveal-fig::before {
  content: "";
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: repeating-conic-gradient(rgba(255, 255, 255, 0.26) 0 12deg, transparent 12deg 24deg);
  animation: turn 30s linear infinite;
}

.reveal-fig .fig {
  position: relative;
  width: 240px;
}

.reveal-fig .spin svg {
  animation: spin 1.5s cubic-bezier(0.5, 0, 0.9, 0.5) both;
}

@keyframes spin {
  to {
    transform: rotate(1080deg) scale(0.4);
  }
}

.reveal-fig .pop svg {
  animation: pop 0.55s cubic-bezier(0.2, 0.9, 0.3, 1.4) both;
}

@keyframes pop {
  from {
    opacity: 0;
    transform: scale(0.3) rotate(-20deg);
  }
}

.reveal-name h2 {
  font-size: 50px;
  line-height: 1.1;
  color: #fff;
  text-shadow: 3px 3px 0 var(--ink), -1.5px -1.5px 0 var(--ink), 1.5px -1.5px 0 var(--ink), -1.5px 1.5px 0 var(--ink), 0 2px 0 var(--ink), 2px 0 0 var(--ink);
  animation: pop 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.4) 0.15s both;
}

.reveal-name p {
  display: inline-block;
  margin-top: 14px;
  padding: 7px 14px 9px;
  border: 3px solid var(--ink);
  border-radius: 12px;
  background: var(--yolk);
  color: var(--ink);
  font-size: 14.5px;
  transform: rotate(-2deg);
  box-shadow: 0 4px 0 var(--ink);
  animation: rise 0.4s 0.5s both;
}

.reveal-name b {
  font-size: 17px;
}

.reveal-skip {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(26px + env(safe-area-inset-bottom, 0px));
  font-size: 13px;
  font-weight: 900;
  opacity: 0.6;
}

.guide {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(22, 23, 27, 0.86);
  color: #fff;
}

.guide-arrow {
  position: absolute;
  top: calc(8px + env(safe-area-inset-top, 0px));
  right: 18px;
  width: 70px;
  height: 90px;
}

.guide-body {
  position: absolute;
  top: calc(104px + env(safe-area-inset-top, 0px));
  right: 22px;
  left: 22px;
  text-align: right;
}

.guide-body b {
  display: block;
  font-size: 21px;
  line-height: 1.5;
}

.guide-body p {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.7;
  opacity: 0.85;
}

.guide-body .btn {
  margin-top: 22px;
}

.sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: rgba(22, 23, 27, 0.6);
}

.sheet {
  width: 100%;
  max-width: var(--max);
  max-height: 100%;
  margin: 0 auto;
  overflow-y: auto;
  padding: 14px var(--gutter-r) calc(16px + env(safe-area-inset-bottom, 0px)) var(--gutter);
  border: 3px solid var(--ink);
  border-bottom: 0;
  border-radius: 24px 24px 0 0;
  background: var(--paper);
  animation: sheet-in 0.28s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes sheet-in {
  from {
    transform: translateY(100%);
  }
}

.sheet-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sheet-head b {
  font-size: 17px;
}

.sheet-head button {
  padding: 4px 0 4px 12px;
  border: 0;
  background: none;
  font-size: 14px;
  font-weight: 900;
  color: var(--ink3);
  cursor: pointer;
}

.sheet-frame {
  position: relative;
  width: min(270px, 66vw);
  aspect-ratio: 3 / 4;
  max-width: 100%;
  margin: 12px auto 16px;
  overflow: hidden;
  border: 3px solid var(--ink);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 5px 0 var(--ink);
}

.sheet-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  -webkit-touch-callout: default;
}

.sheet-veil {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
  font-size: 13.5px;
  font-weight: 900;
  color: var(--ink2);
  background: var(--paper);
}

.sheet-actions {
  display: flex;
  gap: 10px;
}

.sheet-note {
  margin-top: 10px;
  text-align: center;
  font-size: 12.5px;
  color: var(--ink3);
}

.sheet-note.strong {
  font-size: 14.5px;
  font-weight: 900;
  color: var(--ink);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(116px + env(safe-area-inset-bottom, 0px));
  z-index: 70;
  max-width: 80vw;
  padding: 9px 17px 10px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 13.5px;
  font-weight: 900;
  transform: translateX(-50%);
}

@media (max-width: 350px) {
  .h1 { font-size: 40px; }
  .name { font-size: 40px; }
  .roast { font-size: 30px; }
  .stamp { width: 50px; height: 50px; font-size: 11.5px; }
  .burst .fig { width: 200px; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .parade-row {
    animation: none;
  }
}
