:root {
  -webkit-text-size-adjust: 100%; /* stop iPhone Safari enlarging some lines of text (the marquee) */
  text-size-adjust: 100%;
  --paper: #f6eddc;
  --ink: #1b1b1f;
  --blue: #4a86f5;
  --purple: #5b1a99;
  --periwinkle: #5457d4;
  --pink: #f5aee6;
  --mono: "DM Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --serif: "Instrument Serif", Georgia, serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--mono);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
  touch-action: none;
}

#tp-stage {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  cursor: grab;
}
#tp-stage.panning { cursor: grabbing; }
#tp-stage.over-shape { cursor: pointer; }
#tp-stage.over-clip { cursor: grab; }
#tp-stage.dragging-clip { cursor: grabbing; }

/* mirrors the camera transform so playhtml can anchor cursors to world coordinates */
#tp-world {
  position: fixed;
  left: 0;
  top: 0;
  width: 1px;
  height: 1px;
  transform-origin: 0 0;
  pointer-events: none;
  z-index: 2;
}

/* ---------- about + signup (lives in world space, under the wordmark) ---------- */
#tp-intro-layer {
  position: fixed;
  left: 0;
  top: 0;
  width: 1px;
  height: 1px;
  transform-origin: 0 0;
  z-index: 1;
  pointer-events: none; /* drags over the text still pan the canvas */
}
#tp-intro-layer[hidden] { display: none; }
/* The about text is a Wikipedia infobox: tucked under the end of the wordmark (which overlaps its
   header), sizes in world px. The wordmark's centre is the layer's origin; its baseline is at y 27. */
#tp-wordmark {
  position: absolute;
  left: -320px;
  top: -150px;
  width: 640px;
  height: 260px;
  z-index: 2;
  pointer-events: none;
}
#tp-intro {
  position: absolute;
  left: -15px;
  top: -127px;
  width: 305px;
  z-index: 1;
  box-sizing: border-box;
  padding: 8px 8px 6px;
  background: #f8f9fa;
  border: 1px solid #a2a9b1;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 18px;
  line-height: 1.22;
  color: #202122;
  -webkit-font-smoothing: antialiased;
}
#tp-intro p { margin: 0; }
#tp-intro a { color: #3366cc; text-decoration: none; pointer-events: auto; }
#tp-intro a:hover { text-decoration: underline; }
#tp-intro .ib-head {
  height: 205px;
  display: flex;
  align-items: flex-end;
  background: #eaecf0;
  border: 1px solid #c8ccd1;
  padding: 0 8px 4px;
  box-sizing: border-box;
}
#tp-intro .ib-title { margin: 0; font-size: 20.5px; line-height: 1; font-weight: 700; letter-spacing: -0.005em; }
#tp-intro .ib-body { padding: 14px 1px 16px; }
#tp-intro .ib-body p + p { margin-top: 14px; }
#tp-intro .ib-news {
  background: #f8e7dd; /* Substack's theme colour for this newsletter, so its form blends in */
  border: 1px solid #e2cdc1;
  padding: 14px 14px 12px;
  text-align: left;
}
#tp-intro .ib-logo { display: block; width: 52px; height: 52px; margin: 0 auto 18px; }
#tp-intro .ib-news-text { font-size: 15.5px; line-height: 1.18; font-weight: 700; }
#tp-intro .ib-embed {
  height: 117px;
  margin: 8px -12px -6px;
  overflow: hidden;
  pointer-events: auto;
}
#tp-intro .ib-embed iframe {
  display: block;
  width: 283px;
  height: 600px;
  margin-top: -414px;
  border: 0;
  color-scheme: light;
}
#tp-intro .credit { font-size: 13.5px; line-height: 1.32; padding: 10px 1px 0; }
#tp-intro .credit i { font-style: italic; }
#tp-intro .arrow { font-size: 0.8em; }
/* the about text and hint name whichever nodes are on the canvas */
body:not(.nodes-flowers) [data-nodes="flowers"],
body.nodes-flowers [data-nodes="shapes"] { display: none; }
#tp-intro .mini-flower { height: 1.35em; width: auto; vertical-align: -0.3em; margin: 0 1px; }
#tp-intro .mini { width: 0.78em; height: 0.78em; vertical-align: -0.06em; margin: 0 1px; overflow: visible; }
#tp-intro .mini path { fill: var(--blue); stroke: var(--ink); stroke-width: 1.1; stroke-linejoin: round; }

#tp-zero-count svg { width: 11px; height: 11px; fill: var(--periwinkle); }

/* ---------- the year's views, as a sticker on the card's top edge ---------- */
@keyframes views-in { from { opacity: 0; transform: translateY(6px); } }
@keyframes views-first {
  0% { opacity: 0; transform: scale(0.4) rotate(-8deg); }
  45% { opacity: 1; transform: scale(1.12) rotate(3deg); }
  70% { transform: scale(0.97) rotate(-1.5deg); }
  100% { transform: none; }
}
@keyframes twinkle {
  0%, 100% { transform: scale(1) rotate(0); }
  50% { transform: scale(0.7) rotate(45deg); }
}
.tp-confetti {
  position: absolute;
  z-index: 4;
  width: 12px;
  height: 12px;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  #tp-views.first, #tp-views.zero svg { animation: none; }
}

#tp-sound {
  position: fixed;
  top: 16px;
  right: 18px;
  z-index: 3;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: #fbf6ec;
  color: var(--purple);
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
  transition: transform 0.15s ease;
}
#tp-sound:hover { transform: scale(1.08); }
#tp-sound .off { display: none; }
#tp-sound[aria-pressed="false"] .on { display: none; }
#tp-sound[aria-pressed="false"] .off { display: inline; }
#tp-sound[aria-pressed="false"] { color: #8a7f9c; }
body.reading #tp-sound { display: none; }

#tp-mini {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 3;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: #fbf6ec;
  cursor: crosshair;
  touch-action: none;
  transition: transform 0.15s ease;
}
#tp-mini[hidden] { display: none; }
#tp-mini:hover { transform: scale(1.02); }
body.reading #tp-mini { display: none; }

#tp-hint {
  position: fixed;
  left: 18px;
  white-space: nowrap;
  top: 18px; /* top-left is the one corner the about text and HUD never use */
  z-index: 3;
  font-size: 12px;
  color: var(--purple);
  opacity: 0.75;
  pointer-events: none;
  transition: opacity 1.2s ease;
}
#tp-hint.gone { opacity: 0; }
body.reading #tp-hint { display: none; }
@media (max-width: 1100px) { #tp-hint { display: none; } }

#tp-loading {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 4;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--purple);
  background: var(--paper);
  transition: opacity 0.3s ease;
}
#tp-loading.done { opacity: 0; pointer-events: none; }

/* ---------- viewer ---------- */
#tp-viewer {
  position: fixed;
  inset: 0;
  z-index: 10;
}
#tp-viewer[hidden] { display: none; }

#tp-card {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(1100px, calc(100vw - 80px));
  height: min(820px, calc(100vh - 120px));
  transform: translate(-50%, -50%);
  background: #fff;
  border: 2px solid #2b2b30;
  border-radius: 36px;
  overflow: hidden;
  animation: card-in 0.22s cubic-bezier(.2, .9, .3, 1.2);
}
@keyframes card-in {
  from { transform: translate(-50%, -48%) scale(0.96); opacity: 0; }
}

#tp-card iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}
#tp-card iframe[hidden] { display: none; }

/* the page's editors, scrolling along the top of the card */
#tp-editors {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 46px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 0 0 20px;
  box-sizing: border-box;
  background: #fff;
  border-bottom: 1px solid #eaecf0;
  font-family: "DM Mono", ui-monospace, monospace;
  font-size: 12.5px;
  color: var(--purple);
  white-space: nowrap;
}
#tp-editors[hidden] { display: none; }
/* the parts that stay put: the page's views, and what the scrolling names are */
#tp-editors .chip {
  flex: none;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f1ecfa;
  color: var(--purple);
  font-size: 11.5px;
  letter-spacing: 0.02em;
}
#tp-editors .chip[hidden], #tp-editors .label[hidden] { display: none; }
/* "written and edited by" reads as the start of the list of names, not as another tag */
#tp-editors .label {
  flex: none;
  padding-left: 12px;
  border-left: 1px solid #e3dcec;
  color: #8a7f99;
  font-style: italic;
}
#tp-editors .label::after { content: " →"; font-style: normal; color: #c2b6d3; }
#tp-editors .chip + .label { margin-left: 4px; }
#tp-views svg, #tp-views-sticker svg { display: none; width: 11px; height: 11px; flex: none; fill: var(--periwinkle); }
#tp-views.zero, #tp-views-sticker.zero { background: var(--pink); }
#tp-views.zero svg, #tp-views-sticker.zero svg { display: block; animation: twinkle 2.4s ease-in-out infinite; }
#tp-views.first, #tp-views-sticker.first { animation: views-first 0.9s 0.15s both cubic-bezier(.2, .9, .3, 1.2); }
/* phones: the view count as a sticker overlapping the card's top edge */
#tp-views-sticker { display: none; }
#tp-editors .scroller {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  padding: 4px 0;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 18px, #000 calc(100% - 70px), transparent);
  mask-image: linear-gradient(to right, transparent, #000 18px, #000 calc(100% - 70px), transparent);
}
#tp-editors .track { display: flex; width: max-content; animation: tp-marquee var(--dur, 40s) linear infinite; }
#tp-editors:hover .track { animation-play-state: paused; }
#tp-editors.still .track { animation: none; }
#tp-editors.still .scroller { -webkit-mask-image: none; mask-image: none; }
#tp-editors.still .run { padding-right: 0; }
#tp-editors .run { flex: none; padding: 0 3em 0 0.6em; }
#tp-editors a { color: var(--periwinkle); text-decoration: none; }
#tp-editors a:hover { text-decoration: underline; }
#tp-editors .lead, #tp-editors .yr { color: #8a7f99; }
#tp-editors .sep { color: #c9bfd6; margin: 0 0.35em; }
@keyframes tp-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  #tp-editors .track { animation: none; }
  #tp-editors .scroller { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
}

/* remove a page's cutting: a small pill on the card's bottom-left edge */
#tp-remove {
  position: absolute;
  left: calc(50% - min(1100px, calc(100vw - 80px)) / 2 + 36px);
  top: calc(50% + min(820px, calc(100vh - 120px)) / 2 - 22px); /* same line as the cutting hint */
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 37px;
  padding: 0 14px 0 10px;
  border: 2px solid var(--periwinkle);
  border-radius: 999px;
  background: #fff;
  color: var(--purple);
  font-family: "DM Mono", ui-monospace, monospace;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, transform 0.15s;
}
#tp-remove[hidden] { display: none; }
#tp-remove svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
#tp-remove:hover { transform: scale(1.04); }

#tp-fade {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 64px;
  background: linear-gradient(to bottom, rgba(255,255,255,0), #fff 85%);
  pointer-events: none;
}

.round {
  position: absolute;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--pink);
  border: 4px solid var(--periwinkle);
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
  font-size: 38px;
  line-height: 1;
  transition: transform 0.15s ease, background 0.15s ease;
  z-index: 2;
}
.round:hover { transform: scale(1.06); }
.round:active { transform: scale(0.96); }
.round span { display: block; transform: translateY(1px); }
/* the close button is a periwinkle wax seal pressed with a cross, not a pink disc */
.round.seal { background: none; border: none; border-radius: 0; filter: drop-shadow(0 2px 1.5px rgba(40, 30, 90, 0.28)); }
.round.seal:hover { transform: rotate(-6deg) scale(1.05); }
.round.seal:active { transform: rotate(-6deg) scale(0.94); }
.tp-seal { display: block; width: 100%; height: 100%; overflow: visible; }
.tp-seal .wax { fill: var(--periwinkle); }
.tp-seal .rim { fill: #4a4dc4; }
.tp-seal .ring { fill: none; stroke: #3a3da3; stroke-width: 1.6; }
.tp-seal .cross { fill: none; stroke: #c9caf5; stroke-width: 2.6; stroke-linecap: round; }
.tp-seal .shine { fill: none; stroke: rgba(255, 255, 255, 0.35); stroke-width: 2; stroke-linecap: round; }

#tp-close {
  /* sits on the card's top-right corner */
  left: calc(50% + min(1100px, calc(100vw - 80px)) / 2 - 44px);
  top: calc(50% - min(820px, calc(100vh - 120px)) / 2 - 36px);
}
/* the cut button is a pill: the secateurs and the words "take a cutting", centred on the card's bottom edge */
#tp-scissors {
  left: 0;
  right: 0;
  margin: 0 auto;
  width: max-content;
  height: 64px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 22px 0 12px;
  top: calc(50% + min(820px, calc(100vh - 120px)) / 2 - 32px);
}
#tp-scissors .ico { transition: transform 0.25s ease; transform: none; }
#tp-scissors .lbl { font-family: "DM Mono", ui-monospace, monospace; font-size: 15px; color: var(--purple); white-space: nowrap; }
/* a pill of periwinkle sealing wax, like the close seal */
#tp-scissors.wax {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 60' preserveAspectRatio='none'%3E%3Cpath d='M30.0 0.1C32.4 0.0 34.8 0.2 37.2 0.2C39.6 0.2 42.0 0.2 44.3 0.3C46.7 0.4 49.1 0.6 51.5 0.8C53.9 1.1 56.3 1.5 58.7 1.9C61.1 2.2 63.5 2.6 65.9 2.8C68.3 3.0 70.6 3.1 73.0 3.1C75.4 3.1 77.8 2.8 80.2 2.7C82.6 2.5 85.0 2.3 87.4 2.2C89.8 2.1 92.2 2.2 94.6 2.2C96.9 2.2 99.3 2.3 101.7 2.3C104.1 2.3 106.5 2.3 108.9 2.2C111.3 2.2 113.7 2.0 116.1 2.0C118.5 1.9 120.9 1.9 123.2 2.0C125.6 2.0 128.0 2.2 130.4 2.2C132.8 2.3 135.2 2.4 137.6 2.2C140.0 2.1 142.4 1.8 144.8 1.5C147.2 1.2 149.5 0.7 151.9 0.4C154.3 0.1 156.7 -0.2 159.1 -0.3C161.5 -0.4 163.9 -0.4 166.3 -0.3C168.7 -0.2 171.2 -0.2 173.6 0.3C176.0 0.7 178.6 1.4 180.8 2.4C183.1 3.3 185.3 4.6 187.2 6.1C189.1 7.6 190.9 9.5 192.2 11.5C193.6 13.5 194.6 15.7 195.5 17.9C196.3 20.1 196.8 22.4 197.3 24.7C197.7 27.0 198.0 29.4 198.0 31.7C197.9 34.0 197.8 36.5 197.1 38.8C196.5 41.0 195.4 43.3 194.1 45.2C192.8 47.2 190.9 48.9 189.1 50.3C187.3 51.8 185.2 52.9 183.1 53.9C181.1 54.8 178.9 55.6 176.7 56.2C174.5 56.7 172.3 57.0 170.0 57.1C167.7 57.3 165.2 57.2 162.8 57.2C160.4 57.2 158.0 57.2 155.7 57.3C153.3 57.4 150.9 57.6 148.5 57.8C146.1 58.1 143.7 58.5 141.3 58.9C138.9 59.2 136.5 59.6 134.1 59.8C131.7 60.0 129.4 60.1 127.0 60.1C124.6 60.1 122.2 59.8 119.8 59.7C117.4 59.5 115.0 59.3 112.6 59.2C110.2 59.1 107.8 59.2 105.4 59.2C103.1 59.2 100.7 59.3 98.3 59.3C95.9 59.3 93.5 59.3 91.1 59.2C88.7 59.2 86.3 59.0 83.9 59.0C81.5 58.9 79.1 58.9 76.8 59.0C74.4 59.0 72.0 59.2 69.6 59.2C67.2 59.3 64.8 59.4 62.4 59.2C60.0 59.1 57.6 58.8 55.2 58.5C52.8 58.2 50.5 57.7 48.1 57.4C45.7 57.1 43.3 56.8 40.9 56.7C38.5 56.6 36.1 56.7 33.7 56.7C31.4 56.7 29.0 57.1 26.7 56.9C24.4 56.6 22.2 56.2 20.0 55.4C17.9 54.7 15.8 53.6 13.9 52.3C11.9 51.1 10.1 49.6 8.4 48.0C6.8 46.3 5.1 44.4 4.0 42.3C2.8 40.3 1.8 37.9 1.3 35.5C0.8 33.2 0.8 30.6 1.1 28.2C1.3 25.9 2.1 23.5 2.9 21.2C3.7 19.0 4.7 16.8 5.9 14.8C7.1 12.7 8.4 10.6 10.1 8.8C11.7 7.0 13.6 5.2 15.6 3.9C17.7 2.6 20.1 1.6 22.5 1.0C24.9 0.3 27.6 0.3 30.0 0.1Z' fill='%235457d4'/%3E%3Cpath d='M30.0 5.0C32.3 5.0 34.6 5.1 36.8 5.2C39.1 5.3 41.4 5.4 43.7 5.4C45.9 5.5 48.2 5.7 50.5 5.7C52.8 5.8 55.0 5.8 57.3 5.8C59.6 5.8 61.9 5.6 64.1 5.5C66.4 5.4 68.7 5.2 71.0 5.2C73.3 5.1 75.5 5.1 77.8 5.2C80.1 5.3 82.4 5.5 84.6 5.6C86.9 5.7 89.2 5.8 91.5 5.9C93.7 5.9 96.0 5.8 98.3 5.8C100.6 5.7 102.8 5.5 105.1 5.4C107.4 5.3 109.7 5.2 112.0 5.1C114.2 5.0 116.5 4.9 118.8 4.8C121.1 4.7 123.3 4.6 125.6 4.5C127.9 4.4 130.2 4.1 132.4 4.0C134.7 3.9 137.0 3.7 139.3 3.7C141.5 3.7 143.8 3.8 146.1 3.9C148.4 4.0 150.7 4.3 152.9 4.4C155.2 4.6 157.5 4.8 159.8 4.9C162.0 5.0 164.3 4.9 166.6 4.9C168.9 5.0 171.2 4.7 173.4 5.1C175.7 5.4 178.0 6.0 180.0 7.0C182.1 7.9 184.0 9.2 185.7 10.7C187.4 12.1 189.0 13.8 190.3 15.7C191.6 17.5 192.7 19.6 193.4 21.7C194.2 23.8 194.6 26.1 194.7 28.3C194.8 30.5 194.4 32.8 193.8 35.0C193.2 37.1 192.2 39.1 191.1 41.0C190.1 42.8 188.7 44.6 187.3 46.2C185.9 47.8 184.3 49.3 182.5 50.6C180.7 51.8 178.7 53.0 176.6 53.7C174.6 54.5 172.2 54.8 170.0 55.0C167.8 55.3 165.4 55.1 163.2 55.2C160.9 55.3 158.6 55.4 156.3 55.4C154.1 55.5 151.8 55.7 149.5 55.7C147.2 55.8 145.0 55.8 142.7 55.8C140.4 55.8 138.1 55.6 135.9 55.5C133.6 55.4 131.3 55.2 129.0 55.2C126.7 55.1 124.5 55.1 122.2 55.2C119.9 55.3 117.6 55.5 115.4 55.6C113.1 55.7 110.8 55.8 108.5 55.9C106.3 55.9 104.0 55.8 101.7 55.8C99.4 55.7 97.2 55.5 94.9 55.4C92.6 55.3 90.3 55.2 88.0 55.1C85.8 55.0 83.5 54.9 81.2 54.8C78.9 54.7 76.7 54.6 74.4 54.5C72.1 54.4 69.8 54.1 67.6 54.0C65.3 53.9 63.0 53.7 60.7 53.7C58.5 53.7 56.2 53.8 53.9 53.9C51.6 54.0 49.3 54.3 47.1 54.4C44.8 54.6 42.5 54.8 40.2 54.9C38.0 55.0 35.7 55.0 33.4 54.9C31.1 54.9 28.8 55.0 26.6 54.6C24.4 54.2 22.2 53.7 20.1 52.8C18.0 52.0 16.0 50.8 14.2 49.4C12.4 48.1 10.7 46.4 9.4 44.5C8.1 42.7 7.1 40.5 6.3 38.4C5.5 36.3 5.1 34.0 4.8 31.7C4.6 29.4 4.5 27.1 4.9 24.8C5.2 22.5 5.8 20.1 6.7 17.9C7.7 15.8 9.1 13.7 10.8 12.0C12.4 10.3 14.5 8.9 16.5 7.8C18.6 6.8 20.9 6.1 23.2 5.6C25.4 5.1 27.7 5.1 30.0 5.0Z' fill='%234a4dc4'/%3E%3Cpath d='M30.0 8.2C32.2 8.0 34.3 8.3 36.5 8.4C38.6 8.4 40.8 8.5 43.0 8.5C45.1 8.5 47.3 8.4 49.5 8.4C51.6 8.4 53.8 8.3 55.9 8.3C58.1 8.3 60.3 8.3 62.4 8.3C64.6 8.3 66.8 8.4 68.9 8.4C71.1 8.5 73.2 8.5 75.4 8.6C77.6 8.6 79.7 8.6 81.9 8.6C84.0 8.7 86.2 8.7 88.4 8.7C90.5 8.8 92.7 8.8 94.9 8.9C97.0 9.0 99.2 9.0 101.3 9.1C103.5 9.1 105.7 9.1 107.8 9.0C110.0 9.0 112.2 8.9 114.3 8.8C116.5 8.7 118.6 8.6 120.8 8.5C123.0 8.5 125.1 8.4 127.3 8.4C129.4 8.4 131.6 8.4 133.8 8.4C135.9 8.4 138.1 8.4 140.3 8.4C142.4 8.4 144.6 8.4 146.7 8.3C148.9 8.3 151.1 8.3 153.2 8.3C155.4 8.3 157.6 8.3 159.7 8.3C161.9 8.4 164.0 8.4 166.2 8.4C168.4 8.4 170.6 8.2 172.7 8.5C174.8 8.8 177.1 9.2 179.1 10.1C181.0 10.9 183.0 12.1 184.6 13.6C186.3 15.0 187.7 16.9 188.8 18.7C189.8 20.6 190.6 22.8 191.0 24.9C191.5 27.0 191.6 29.2 191.4 31.3C191.2 33.5 190.7 35.6 189.9 37.6C189.1 39.6 188.0 41.5 186.7 43.1C185.4 44.7 183.7 46.2 182.0 47.4C180.2 48.5 178.2 49.5 176.3 50.1C174.3 50.7 172.1 50.9 170.0 51.2C167.9 51.4 165.7 51.3 163.5 51.4C161.4 51.4 159.2 51.5 157.0 51.5C154.9 51.5 152.7 51.4 150.5 51.4C148.4 51.4 146.2 51.3 144.1 51.3C141.9 51.3 139.7 51.3 137.6 51.3C135.4 51.3 133.2 51.4 131.1 51.4C128.9 51.5 126.8 51.5 124.6 51.6C122.4 51.6 120.3 51.6 118.1 51.6C116.0 51.7 113.8 51.7 111.6 51.7C109.5 51.8 107.3 51.8 105.1 51.9C103.0 52.0 100.8 52.0 98.7 52.1C96.5 52.1 94.3 52.1 92.2 52.0C90.0 52.0 87.8 51.9 85.7 51.8C83.5 51.7 81.4 51.6 79.2 51.5C77.0 51.5 74.9 51.4 72.7 51.4C70.6 51.4 68.4 51.4 66.2 51.4C64.1 51.4 61.9 51.4 59.7 51.4C57.6 51.4 55.4 51.4 53.3 51.3C51.1 51.3 48.9 51.3 46.8 51.3C44.6 51.3 42.4 51.3 40.3 51.3C38.1 51.4 36.0 51.4 33.8 51.4C31.6 51.4 29.4 51.5 27.3 51.1C25.3 50.8 23.2 50.1 21.3 49.2C19.4 48.3 17.6 47.1 16.0 45.7C14.5 44.3 13.0 42.6 11.9 40.9C10.8 39.1 9.8 37.1 9.2 35.1C8.7 33.0 8.4 30.8 8.5 28.7C8.5 26.5 9.0 24.3 9.7 22.3C10.5 20.3 11.6 18.3 12.9 16.5C14.2 14.8 15.8 13.2 17.6 12.0C19.3 10.7 21.4 9.7 23.5 9.0C25.5 8.4 27.8 8.3 30.0 8.2Z' fill='none' stroke='%233a3da3' stroke-width='1.4' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  border: none;
  filter: drop-shadow(0 2px 1.5px rgba(40, 30, 90, 0.28));
}
#tp-scissors.wax .lbl { color: #e6e7fb; }
#tp-scissors.wax[aria-pressed="true"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 60' preserveAspectRatio='none'%3E%3Cpath d='M30.0 0.1C32.4 0.0 34.8 0.2 37.2 0.2C39.6 0.2 42.0 0.2 44.3 0.3C46.7 0.4 49.1 0.6 51.5 0.8C53.9 1.1 56.3 1.5 58.7 1.9C61.1 2.2 63.5 2.6 65.9 2.8C68.3 3.0 70.6 3.1 73.0 3.1C75.4 3.1 77.8 2.8 80.2 2.7C82.6 2.5 85.0 2.3 87.4 2.2C89.8 2.1 92.2 2.2 94.6 2.2C96.9 2.2 99.3 2.3 101.7 2.3C104.1 2.3 106.5 2.3 108.9 2.2C111.3 2.2 113.7 2.0 116.1 2.0C118.5 1.9 120.9 1.9 123.2 2.0C125.6 2.0 128.0 2.2 130.4 2.2C132.8 2.3 135.2 2.4 137.6 2.2C140.0 2.1 142.4 1.8 144.8 1.5C147.2 1.2 149.5 0.7 151.9 0.4C154.3 0.1 156.7 -0.2 159.1 -0.3C161.5 -0.4 163.9 -0.4 166.3 -0.3C168.7 -0.2 171.2 -0.2 173.6 0.3C176.0 0.7 178.6 1.4 180.8 2.4C183.1 3.3 185.3 4.6 187.2 6.1C189.1 7.6 190.9 9.5 192.2 11.5C193.6 13.5 194.6 15.7 195.5 17.9C196.3 20.1 196.8 22.4 197.3 24.7C197.7 27.0 198.0 29.4 198.0 31.7C197.9 34.0 197.8 36.5 197.1 38.8C196.5 41.0 195.4 43.3 194.1 45.2C192.8 47.2 190.9 48.9 189.1 50.3C187.3 51.8 185.2 52.9 183.1 53.9C181.1 54.8 178.9 55.6 176.7 56.2C174.5 56.7 172.3 57.0 170.0 57.1C167.7 57.3 165.2 57.2 162.8 57.2C160.4 57.2 158.0 57.2 155.7 57.3C153.3 57.4 150.9 57.6 148.5 57.8C146.1 58.1 143.7 58.5 141.3 58.9C138.9 59.2 136.5 59.6 134.1 59.8C131.7 60.0 129.4 60.1 127.0 60.1C124.6 60.1 122.2 59.8 119.8 59.7C117.4 59.5 115.0 59.3 112.6 59.2C110.2 59.1 107.8 59.2 105.4 59.2C103.1 59.2 100.7 59.3 98.3 59.3C95.9 59.3 93.5 59.3 91.1 59.2C88.7 59.2 86.3 59.0 83.9 59.0C81.5 58.9 79.1 58.9 76.8 59.0C74.4 59.0 72.0 59.2 69.6 59.2C67.2 59.3 64.8 59.4 62.4 59.2C60.0 59.1 57.6 58.8 55.2 58.5C52.8 58.2 50.5 57.7 48.1 57.4C45.7 57.1 43.3 56.8 40.9 56.7C38.5 56.6 36.1 56.7 33.7 56.7C31.4 56.7 29.0 57.1 26.7 56.9C24.4 56.6 22.2 56.2 20.0 55.4C17.9 54.7 15.8 53.6 13.9 52.3C11.9 51.1 10.1 49.6 8.4 48.0C6.8 46.3 5.1 44.4 4.0 42.3C2.8 40.3 1.8 37.9 1.3 35.5C0.8 33.2 0.8 30.6 1.1 28.2C1.3 25.9 2.1 23.5 2.9 21.2C3.7 19.0 4.7 16.8 5.9 14.8C7.1 12.7 8.4 10.6 10.1 8.8C11.7 7.0 13.6 5.2 15.6 3.9C17.7 2.6 20.1 1.6 22.5 1.0C24.9 0.3 27.6 0.3 30.0 0.1Z' fill='%233f42b8'/%3E%3Cpath d='M30.0 5.0C32.3 5.0 34.6 5.1 36.8 5.2C39.1 5.3 41.4 5.4 43.7 5.4C45.9 5.5 48.2 5.7 50.5 5.7C52.8 5.8 55.0 5.8 57.3 5.8C59.6 5.8 61.9 5.6 64.1 5.5C66.4 5.4 68.7 5.2 71.0 5.2C73.3 5.1 75.5 5.1 77.8 5.2C80.1 5.3 82.4 5.5 84.6 5.6C86.9 5.7 89.2 5.8 91.5 5.9C93.7 5.9 96.0 5.8 98.3 5.8C100.6 5.7 102.8 5.5 105.1 5.4C107.4 5.3 109.7 5.2 112.0 5.1C114.2 5.0 116.5 4.9 118.8 4.8C121.1 4.7 123.3 4.6 125.6 4.5C127.9 4.4 130.2 4.1 132.4 4.0C134.7 3.9 137.0 3.7 139.3 3.7C141.5 3.7 143.8 3.8 146.1 3.9C148.4 4.0 150.7 4.3 152.9 4.4C155.2 4.6 157.5 4.8 159.8 4.9C162.0 5.0 164.3 4.9 166.6 4.9C168.9 5.0 171.2 4.7 173.4 5.1C175.7 5.4 178.0 6.0 180.0 7.0C182.1 7.9 184.0 9.2 185.7 10.7C187.4 12.1 189.0 13.8 190.3 15.7C191.6 17.5 192.7 19.6 193.4 21.7C194.2 23.8 194.6 26.1 194.7 28.3C194.8 30.5 194.4 32.8 193.8 35.0C193.2 37.1 192.2 39.1 191.1 41.0C190.1 42.8 188.7 44.6 187.3 46.2C185.9 47.8 184.3 49.3 182.5 50.6C180.7 51.8 178.7 53.0 176.6 53.7C174.6 54.5 172.2 54.8 170.0 55.0C167.8 55.3 165.4 55.1 163.2 55.2C160.9 55.3 158.6 55.4 156.3 55.4C154.1 55.5 151.8 55.7 149.5 55.7C147.2 55.8 145.0 55.8 142.7 55.8C140.4 55.8 138.1 55.6 135.9 55.5C133.6 55.4 131.3 55.2 129.0 55.2C126.7 55.1 124.5 55.1 122.2 55.2C119.9 55.3 117.6 55.5 115.4 55.6C113.1 55.7 110.8 55.8 108.5 55.9C106.3 55.9 104.0 55.8 101.7 55.8C99.4 55.7 97.2 55.5 94.9 55.4C92.6 55.3 90.3 55.2 88.0 55.1C85.8 55.0 83.5 54.9 81.2 54.8C78.9 54.7 76.7 54.6 74.4 54.5C72.1 54.4 69.8 54.1 67.6 54.0C65.3 53.9 63.0 53.7 60.7 53.7C58.5 53.7 56.2 53.8 53.9 53.9C51.6 54.0 49.3 54.3 47.1 54.4C44.8 54.6 42.5 54.8 40.2 54.9C38.0 55.0 35.7 55.0 33.4 54.9C31.1 54.9 28.8 55.0 26.6 54.6C24.4 54.2 22.2 53.7 20.1 52.8C18.0 52.0 16.0 50.8 14.2 49.4C12.4 48.1 10.7 46.4 9.4 44.5C8.1 42.7 7.1 40.5 6.3 38.4C5.5 36.3 5.1 34.0 4.8 31.7C4.6 29.4 4.5 27.1 4.9 24.8C5.2 22.5 5.8 20.1 6.7 17.9C7.7 15.8 9.1 13.7 10.8 12.0C12.4 10.3 14.5 8.9 16.5 7.8C18.6 6.8 20.9 6.1 23.2 5.6C25.4 5.1 27.7 5.1 30.0 5.0Z' fill='%23383ba8'/%3E%3Cpath d='M30.0 8.2C32.2 8.0 34.3 8.3 36.5 8.4C38.6 8.4 40.8 8.5 43.0 8.5C45.1 8.5 47.3 8.4 49.5 8.4C51.6 8.4 53.8 8.3 55.9 8.3C58.1 8.3 60.3 8.3 62.4 8.3C64.6 8.3 66.8 8.4 68.9 8.4C71.1 8.5 73.2 8.5 75.4 8.6C77.6 8.6 79.7 8.6 81.9 8.6C84.0 8.7 86.2 8.7 88.4 8.7C90.5 8.8 92.7 8.8 94.9 8.9C97.0 9.0 99.2 9.0 101.3 9.1C103.5 9.1 105.7 9.1 107.8 9.0C110.0 9.0 112.2 8.9 114.3 8.8C116.5 8.7 118.6 8.6 120.8 8.5C123.0 8.5 125.1 8.4 127.3 8.4C129.4 8.4 131.6 8.4 133.8 8.4C135.9 8.4 138.1 8.4 140.3 8.4C142.4 8.4 144.6 8.4 146.7 8.3C148.9 8.3 151.1 8.3 153.2 8.3C155.4 8.3 157.6 8.3 159.7 8.3C161.9 8.4 164.0 8.4 166.2 8.4C168.4 8.4 170.6 8.2 172.7 8.5C174.8 8.8 177.1 9.2 179.1 10.1C181.0 10.9 183.0 12.1 184.6 13.6C186.3 15.0 187.7 16.9 188.8 18.7C189.8 20.6 190.6 22.8 191.0 24.9C191.5 27.0 191.6 29.2 191.4 31.3C191.2 33.5 190.7 35.6 189.9 37.6C189.1 39.6 188.0 41.5 186.7 43.1C185.4 44.7 183.7 46.2 182.0 47.4C180.2 48.5 178.2 49.5 176.3 50.1C174.3 50.7 172.1 50.9 170.0 51.2C167.9 51.4 165.7 51.3 163.5 51.4C161.4 51.4 159.2 51.5 157.0 51.5C154.9 51.5 152.7 51.4 150.5 51.4C148.4 51.4 146.2 51.3 144.1 51.3C141.9 51.3 139.7 51.3 137.6 51.3C135.4 51.3 133.2 51.4 131.1 51.4C128.9 51.5 126.8 51.5 124.6 51.6C122.4 51.6 120.3 51.6 118.1 51.6C116.0 51.7 113.8 51.7 111.6 51.7C109.5 51.8 107.3 51.8 105.1 51.9C103.0 52.0 100.8 52.0 98.7 52.1C96.5 52.1 94.3 52.1 92.2 52.0C90.0 52.0 87.8 51.9 85.7 51.8C83.5 51.7 81.4 51.6 79.2 51.5C77.0 51.5 74.9 51.4 72.7 51.4C70.6 51.4 68.4 51.4 66.2 51.4C64.1 51.4 61.9 51.4 59.7 51.4C57.6 51.4 55.4 51.4 53.3 51.3C51.1 51.3 48.9 51.3 46.8 51.3C44.6 51.3 42.4 51.3 40.3 51.3C38.1 51.4 36.0 51.4 33.8 51.4C31.6 51.4 29.4 51.5 27.3 51.1C25.3 50.8 23.2 50.1 21.3 49.2C19.4 48.3 17.6 47.1 16.0 45.7C14.5 44.3 13.0 42.6 11.9 40.9C10.8 39.1 9.8 37.1 9.2 35.1C8.7 33.0 8.4 30.8 8.5 28.7C8.5 26.5 9.0 24.3 9.7 22.3C10.5 20.3 11.6 18.3 12.9 16.5C14.2 14.8 15.8 13.2 17.6 12.0C19.3 10.7 21.4 9.7 23.5 9.0C25.5 8.4 27.8 8.3 30.0 8.2Z' fill='none' stroke='%232c2f8c' stroke-width='1.4' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E"); }
#tp-scissors.wax:hover { transform: rotate(-1.5deg) scale(1.03); }
#tp-scissors.wax:active { transform: rotate(-1.5deg) scale(0.96); }
#tp-scissors[aria-pressed="true"] { background: var(--periwinkle); }
#tp-scissors[aria-pressed="true"] .ico { transform: rotate(-90deg); }
#tp-scissors[aria-pressed="true"] .lbl { color: #fff; }
#tp-scissors .tp-secateurs-icon { width: 46px; }

/* ---------- cut mode ---------- */
#tp-viewer.cutting #tp-fade { display: none; }

#tp-lasso {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: crosshair;
  touch-action: none;
}
#tp-lasso[hidden] { display: none; }
#tp-lasso .shade { fill: rgba(27, 27, 31, 0.28); fill-rule: evenodd; transition: fill 0.2s; }
#tp-lasso .shade.busy { fill: rgba(27, 27, 31, 0.45); }
#tp-lasso .preview { fill: rgba(245, 174, 230, 0.11); stroke: none; }
#tp-lasso .ghost {
  fill: none;
  stroke: var(--periwinkle);
  stroke-width: 1.5;
  stroke-dasharray: 2 6;
  stroke-linecap: round;
  opacity: 0.55;
}
#tp-lasso .ghost.near { opacity: 1; stroke-width: 2.5; }
#tp-lasso .start { fill: #fff; stroke: var(--periwinkle); stroke-width: 2; transition: r 0.15s; }
#tp-lasso .start.near { fill: var(--pink); stroke-width: 3; }
#tp-lasso .line {
  fill: none;
  stroke: var(--periwinkle);
  stroke-width: 2.5;
  stroke-linejoin: round;
  stroke-linecap: round;
  stroke-dasharray: 7 6;
  animation: ants 0.6s linear infinite;
}
#tp-lasso .line.closed { fill: rgba(84, 87, 212, 0.06); }
#tp-lasso .pt { fill: #fff; stroke: var(--periwinkle); stroke-width: 2; }
#tp-lasso .pt.first { fill: var(--pink); }
@keyframes ants { to { stroke-dashoffset: -13; } }

/* when a real mouse is over the page, the drawn scissors are the cursor */
body.direct-cut #tp-lasso { cursor: none; }

#tp-shears {
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: none;
  z-index: 4;
  will-change: transform;
}
#tp-shears[hidden] { display: none; }
#tp-shears svg { display: block; } /* no inline baseline gap, or the hotspot drifts */
/* the secateurs, as the cutting cursor and on the phone's cut button */
#tp-shears .steel, .tp-secateurs-icon .steel { fill: #e3e6e9; stroke: #33373c; stroke-width: 1.2; stroke-linejoin: round; }
#tp-shears .jaw, .tp-secateurs-icon .jaw { fill: #9ea4aa; stroke: #33373c; stroke-width: 1.2; stroke-linejoin: round; }
#tp-shears .bevel, .tp-secateurs-icon .bevel { fill: none; stroke: #8d949a; stroke-width: 0.8; stroke-linecap: round; }
#tp-shears .grip, .tp-secateurs-icon .grip { fill: #b3282d; stroke: #5e1517; stroke-width: 1.2; stroke-linejoin: round; }
#tp-shears .grip-line, .tp-secateurs-icon .grip-line { fill: none; stroke: #7c1a1e; stroke-width: 0.9; stroke-linecap: round; }
#tp-shears .spring, .tp-secateurs-icon .spring { fill: none; stroke: #33373c; stroke-width: 1.1; stroke-linejoin: round; stroke-linecap: round; }
#tp-shears .pivot, .tp-secateurs-icon .pivot { fill: #33373c; }
#tp-shears .pivot-dot, .tp-secateurs-icon .pivot-dot { fill: #c9ced3; }
.tp-secateurs-icon { display: block; width: 58px; height: auto; }

.tp-lifted {
  position: fixed;
  z-index: 30;
  pointer-events: none;
  transform-origin: 50% 60%;
}

#tp-cut-status {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.86);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--purple);
  text-align: center;
  padding: 24px;
}
#tp-cut-status[hidden] { display: none; }

#tp-cutbar {
  position: absolute;
  left: 50%;
  top: calc(50% + min(820px, calc(100vh - 120px)) / 2 - 104px);
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 6px 6px 16px;
  background: #fff;
  border: 2px solid var(--periwinkle);
  border-radius: 999px;
  font-size: 12px;
  color: var(--purple);
  white-space: nowrap;
  z-index: 3;
}
#tp-cutbar[hidden] { display: none; }

/* desktop: no scissors button; the hint sits where the button was */
body.direct-cut #tp-scissors { display: none; }
body.direct-cut #tp-cutbar {
  top: calc(50% + min(820px, calc(100vh - 120px)) / 2 - 22px);
  padding: 9px 18px;
  font-size: 13px;
  animation: hint-in 0.5s 0.15s both cubic-bezier(.2, .9, .3, 1.3);
}
#tp-undo[hidden] { display: none; }
#tp-cutbar:not(:has(#tp-undo:not([hidden]))) { padding: 8px 16px; }
@keyframes hint-in { from { opacity: 0; transform: translate(-50%, 8px); } }
#tp-cut-hint { margin-right: 4px; }

.pill {
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  text-transform: lowercase;
  border: 2px solid var(--periwinkle);
  background: #fff;
  color: var(--periwinkle);
  border-radius: 999px;
  padding: 6px 14px;
  cursor: pointer;
}
.pill:hover { background: #f1f1ff; }
.pill.primary { background: var(--pink); color: var(--purple); }
.pill:disabled { opacity: 0.4; cursor: default; }

/* ---------- toast ---------- */
#tp-toast {
  position: fixed;
  left: 50%;
  top: 22px;
  transform: translateX(-50%);
  z-index: 20;
  background: var(--purple);
  color: #fff;
  font-size: 12px;
  letter-spacing: 0.04em;
  padding: 9px 16px;
  border-radius: 999px;
  pointer-events: none;
  animation: toast-in 0.2s ease;
}
#tp-toast[hidden] { display: none; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, -6px); } }

@media (max-width: 640px) {
  #tp-card {
    width: calc(100vw - 24px);
    height: calc(100vh - 150px);
    border-radius: 26px;
  }
  .round { width: 62px; height: 62px; font-size: 28px; }
  .tp-secateurs-icon { width: 44px; }
  #tp-remove {
    left: 24px;
    top: calc(50% + (100vh - 150px) / 2 - 20px);
    height: 40px;
    padding: 0 11px;
  }
  #tp-remove span { display: none; } /* just the bin on a phone */
  /* on a phone the view count moves out to a sticker on the card's top edge, and the names get the
     whole band (sitting low in it, below the sticker) */
  #tp-editors #tp-views { display: none; }
  #tp-editors { height: 54px; align-items: center; padding: 16px 0 0 14px; font-size: 11.5px; line-height: 1.4; }
  #tp-editors .label { padding-left: 0; border-left: 0; margin-left: 0; }
  #tp-views-sticker {
    position: absolute;
    left: 30px;
    top: calc(50% - (100vh - 150px) / 2 - 16px);
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 7px;
    max-width: calc(100vw - 130px);
    padding: 7px 14px 7px 12px;
    background: #fff;
    border: 2px solid var(--periwinkle);
    border-radius: 18px;
    font-family: "DM Mono", ui-monospace, monospace;
    font-size: 11px;
    line-height: 1.3;
    color: var(--purple);
    animation: views-in 0.4s 0.1s both cubic-bezier(.2, .9, .3, 1.3);
  }
  #tp-views-sticker[hidden] { display: none; }
  #tp-views-sticker svg { width: 14px; height: 14px; }
  #tp-close {
    left: calc(100vw - 12px - 50px);
    top: calc(50% - (100vh - 150px) / 2 - 26px);
  }
  #tp-scissors {
    height: 52px;
    padding: 0 18px 0 8px;
    gap: 6px;
    top: calc(50% + (100vh - 150px) / 2 - 26px);
  }
  #tp-scissors .lbl { font-size: 13px; }
  #tp-scissors .tp-secateurs-icon { width: 38px; }
  #tp-cutbar {
    top: calc(50% + (100vh - 150px) / 2 - 90px);
    font-size: 11px;
  }
  body.direct-cut #tp-cutbar { top: calc(50% + (100vh - 150px) / 2 - 22px); }
  #tp-cut-hint { margin-right: 0; }
  #tp-hint { display: none; }
  #tp-mini { right: 12px; bottom: 12px; border-radius: 10px; }
}
