/* The notch demo and the board. Everything is prefixed dm-, and nothing here reaches outside them.
   Stacking: the notch is at 60, carried posts at 41, and neither #notch-demo nor #board should make
   a stacking context, so the flying bird at 40 passes between them. */

.dm-stage, .dm-stage *, .dm-board, .dm-board *, .dm-ghost, .dm-ghost * { box-sizing: border-box; }

.dm-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.dm-emoji {
  flex: none;
  font: 17px/1 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif;
}

/* Handwriting: margin notes only. */
.dm-margin {
  margin: 0;
  font-family: var(--font-hand);
  font-weight: 600;
  color: var(--ink);
  pointer-events: none;
}

/* MARK: - The screen */

/* The section is the screen. The stage only holds the window; the menu bar and the notch are moved up
   into the section by demos.js. No stacking context here: the bird (40) passes under the notch (60). */
#notch-demo.dm-stage-host {
  position: relative;
  z-index: auto;
  width: 100%;
}

.dm-stage {
  --wall-ink: var(--on-sky);
  position: relative;
}

.dm-menubar {
  position: absolute;
  inset: 0 0 auto;
  z-index: 1;
  height: var(--bar, 38px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(16px, 2vw, 36px);
  font: 600 14px/1 -apple-system, BlinkMacSystemFont, "Helvetica Neue", var(--font-sans);
  color: var(--on-sky);
  background: var(--on-sky-bar);
  user-select: none;
  -webkit-user-select: none;
}
.dm-menubar__left, .dm-menubar__right { display: flex; gap: 20px; align-items: center; }
.dm-menubar__left span { font-weight: 500; opacity: .86; }
/* The notch sits in the middle of the bar, and the menus must stop short of it. */
@media (max-width: 1240px) {
  .dm-menubar__left span:nth-of-type(n+3) { display: none; }
}
@media (max-width: 860px) {
  .dm-menubar__left span { display: none; }
  .dm-menubar { padding: 0 14px; font-size: 13px; height: 30px; }
  .dm-menubar__right span { max-width: 56px; white-space: nowrap; overflow: hidden; }
}

/* MARK: - The notch */

.dm-notch {
  /* The app keeps its notch in Evening colours whatever the Mac's appearance, so these are fixed. */
  --n-card: #2d2720;
  --n-ink: #f3ecdd;
  --n-muted: #bfb09a;
  --n-leaf: #6cc08a;
  --n-leaf-tint: #1f3527;
  --n-leaf-ink: #9ad8ae;
  --n-clay: #d39a85;
  --n-sky: #86b2d8;
  position: absolute;
  z-index: 60;
  top: 0;
  left: 50%;
  height: var(--band, 36px);
  pointer-events: none;
}
.dm-notch__shape {
  position: absolute;
  top: 0;
  left: 50%;
  display: block;
  overflow: visible;
  pointer-events: none;
}
.dm-notch__shape path { fill: var(--notch); }

.dm-notch__inner {
  position: absolute;
  top: 0;
  left: 50%;
  width: var(--open-width, 600px);
  height: var(--open-height, 150px);
  margin-left: calc(var(--open-width, 600px) / -2);
  pointer-events: auto;
  color: var(--n-ink);
  font-family: var(--font-sans);
}

.dm-notch__band {
  position: absolute;
  top: 0;
  left: 0;
  height: var(--band, 36px);
  display: flex;
  align-items: center;
  gap: calc(var(--u, 1) * 6px);
  padding-left: calc(var(--u, 1) * 14px);
  white-space: nowrap;
}
.dm-notch__say {
  font: 700 calc(var(--u, 1) * 13.5px)/1 var(--font-sans);
  color: var(--n-muted);
}
.dm-notch[data-phase="added"] .dm-notch__say {
  font: 900 calc(var(--u, 1) * 16px)/1 var(--font-sans);
  letter-spacing: -0.02em;
  color: var(--n-ink);
}
.dm-notch__icon:empty { display: none; }
.dm-notch__icon { display: inline-flex; color: var(--n-muted); }
.dm-notch__icon svg {
  width: calc(var(--u, 1) * 14px);
  height: calc(var(--u, 1) * 14px);
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.dm-notch__icon[data-kind="added"] { color: var(--n-leaf-ink); }

/* Out first and quickly, while the shape is still around it. */
.dm-notch[data-phase="closed"] .dm-notch__band > * {
  opacity: 0;
  transition: opacity 70ms ease-out;
}

.dm-notch__tiles {
  position: absolute;
  top: calc(var(--band, 36px) + var(--u, 1) * 2px);
  left: 0;
  right: 0;
  height: calc(var(--u, 1) * 84px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(var(--u, 1) * 9px);
  padding: 0 calc(var(--u, 1) * 20px);
}
.dm-notch[data-compact] .dm-notch__tiles { padding: 0 calc(var(--u, 1) * 16px); gap: 6px; }

.dm-tile {
  appearance: none;
  border: 0;
  margin: 0;
  flex: none;
  width: calc(var(--u, 1) * 138px);
  height: calc(var(--u, 1) * 62px);
  padding: 0 calc(var(--u, 1) * 10px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: calc(var(--u, 1) * 3px);
  border-radius: calc(var(--u, 1) * 16px);
  background: var(--n-card);
  color: var(--n-ink);
  font: 800 calc(var(--u, 1) * 13px)/1.1 var(--font-sans);
  position: relative;
  /* They come down out of the notch one just after another. */
  opacity: 0;
  transform: translate3d(0, -8px, 0);
  transition: opacity 70ms ease-out;
}
.dm-tile[data-current="true"] { width: calc(var(--u, 1) * 170px); height: calc(var(--u, 1) * 84px); }
.dm-notch[data-compact] .dm-tile { flex: 1 1 0; width: auto; min-width: 0; padding: 0 3px; font-size: 14px; }
.dm-notch[data-compact] .dm-tile__row { gap: 4px; }
.dm-notch[data-compact] .dm-tile[data-current="true"] { flex: 1.25 1 0; }

.dm-notch[data-phase="targets"] .dm-tile,
.dm-notch[data-phase="boards"] .dm-tile {
  opacity: 1;
  transform: none;
  transition:
    opacity 350ms cubic-bezier(.23, 1, .32, 1) calc(var(--order) * 40ms),
    transform 350ms cubic-bezier(.23, 1, .32, 1) calc(var(--order) * 40ms);
}

.dm-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}
.dm-tile[data-current="true"]::after { border: 1.5px dashed var(--n-leaf); }
.dm-tile[data-hot] {
  background: var(--n-leaf-tint);
  color: var(--n-leaf-ink);
  transform: scale(1.03) !important;
  transition: transform 120ms ease-out !important;
}
.dm-tile[data-hot]::after { border: 2px solid var(--n-leaf); }
.dm-tile:focus-visible { outline: 2px solid var(--n-leaf-ink); outline-offset: 2px; }

.dm-tile__row {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  white-space: nowrap;
}
.dm-tile__name { overflow: hidden; text-overflow: ellipsis; }

.dm-tile__tray { display: none; }
.dm-notch[data-phase="targets"] .dm-tile[data-current="true"] .dm-tile__tray { display: block; }
.dm-tile__tray svg {
  display: block;
  width: calc(var(--u, 1) * 16px);
  height: calc(var(--u, 1) * 16px);
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* MARK: The eye */

.dm-eye {
  position: absolute;
  top: 0;
  left: 50%;
  width: 16px;
  height: 16px;
  margin-left: -8px;
  pointer-events: none;
  display: block;
}
.dm-eye__open {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--sticky-paper);
  overflow: hidden;
  display: grid;
  place-items: center;
  transform: scaleY(.08);
  opacity: 0;
  transition: transform 80ms ease-out, opacity 80ms ease-out;
}
/* One bird. Whatever the notch thinks it's doing, its eye only shows while the bird is really in it. */
html.has-bird:not([data-bird-state="notch"]) .dm-eye { visibility: hidden; }

.dm-eye[data-state="open"] .dm-eye__open {
  transform: scaleY(1);
  opacity: 1;
  transition: transform 120ms ease-out, opacity 80ms ease-out;
}
.dm-eye[data-state="open"][data-blink] .dm-eye__open {
  transform: scaleY(.08);
  transition: transform 80ms ease-out;
}
.dm-eye__pupil {
  position: relative;
  display: block;
  width: 52%;
  height: 52%;
  border-radius: 50%;
  background: var(--notch);
  transition: transform 120ms ease-out;
}
.dm-eye__glint {
  position: absolute;
  left: 13.5%;
  top: 9.6%;
  width: 32.7%;
  height: 32.7%;
  border-radius: 50%;
  background: var(--sticky-paper);
}
.dm-eye__pleased {
  position: absolute;
  inset: 0;
  overflow: visible;
  opacity: 0;
  transition: opacity 120ms ease-out;
}
.dm-eye__pleased path {
  fill: none;
  stroke: var(--sticky-paper);
  stroke-width: 2.56;
  stroke-linecap: round;
}
.dm-eye[data-state="pleased"] .dm-eye__pleased { opacity: 1; }

/* Never two eyes: if the bird ever puts its own in this slot, ours steps aside. */
.dm-eye:has(.bird-notch-eye) > :not(.bird-notch-eye) { display: none; }

/* MARK: - The post on your screen */

/* One enormous post lying on the desktop, with the next two under it. Somebody else's page: it keeps
   the web's own type and colours, not Magpie's. In Evening it takes the warm card, never true black. */
.dm-browser {
  --post-type: clamp(20px, 2.3vw, 42px);
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: min(980px, 100%);
  margin-left: auto;
  rotate: 1.6deg;
  color: var(--web-ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  .dm-browser, .dm-ghost {
    --web-page: var(--card);
    --web-ink: var(--ink);
    --web-muted: var(--ink-muted);
    --web-line: var(--edge);
  }
}
.dm-browser__view { position: relative; }
.dm-feed { display: grid; }

.dm-post {
  grid-area: 1 / 1;
  display: grid;
  grid-template-columns: calc(var(--post-type) * 1.9) minmax(0, 1fr);
  gap: calc(var(--post-type) * .55);
  padding: calc(var(--post-type) * .95) calc(var(--post-type) * 1.05) calc(var(--post-type) * .8);
  border-radius: clamp(20px, 2.2vw, 36px);
  background: var(--web-page);
  color: var(--web-ink);
  box-shadow: 0 7px 0 var(--web-line), 0 26px 50px color-mix(in srgb, var(--art-shadow) 22%, transparent);
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  outline-offset: -3px;
  transition: transform 320ms var(--ease-out), opacity 160ms var(--ease-out);
}
.dm-post:focus-visible { outline: 2px solid var(--leaf); }
.dm-post[data-depth="0"] { z-index: 3; }
.dm-post[data-depth="1"] { z-index: 2; transform: translate3d(1.2%, 3.4%, 0) rotate(1.4deg); }
.dm-post[data-depth="2"] { z-index: 1; transform: translate3d(-1%, 6%, 0) rotate(-1.2deg); }
.dm-post[data-depth="gone"] { z-index: 4; opacity: 0; transform: translate3d(0, -8%, 0) rotate(-2deg); pointer-events: none; }
/* Lift the top one and the next is right there underneath. Only the last has nothing under it. */
.dm-post.is-lifted { opacity: 0; transition: none; }
.dm-post[data-last].is-lifted { opacity: 1; }
.dm-post[data-last].is-lifted > * { opacity: .28; }
.dm-post > * { transition: opacity 140ms var(--ease-out); }
.dm-post.is-lifted .dm-split { pointer-events: none; }
.dm-post__avatar, .dm-avatar {
  display: block;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--paper-deep);
}
.dm-post__avatar {
  width: calc(var(--post-type) * 1.9);
  height: calc(var(--post-type) * 1.9);
}
.dm-post__who { font-size: max(15px, calc(var(--post-type) * .56)); line-height: 1.3; color: var(--web-muted); }
.dm-post__who b { color: var(--web-ink); font-weight: 700; }
.dm-post__text {
  margin: calc(var(--post-type) * .3) 0 0;
  font-size: var(--post-type);
  font-weight: 500;
  line-height: 1.24;
  letter-spacing: -.012em;
  color: var(--web-ink);
  text-wrap: pretty;
}
.dm-post__media {
  position: relative;
  flex: 1 1 auto;
  margin-top: calc(var(--post-type) * .6);
  min-height: clamp(130px, 13vw, 240px);
  border-radius: calc(var(--post-type) * .62);
  overflow: hidden;
  border: 1px solid var(--web-line);
  background: var(--paper-deep);
}
.dm-post__media .dm-thumb__art { position: absolute; inset: 0; }
.dm-post__actions {
  display: flex;
  align-items: center;
  gap: calc(var(--post-type) * .85);
  margin-top: calc(var(--post-type) * .7);
  color: var(--web-muted);
}
.dm-act {
  display: inline-flex;
  align-items: center;
  gap: .36em;
  font-size: max(14px, calc(var(--post-type) * .46));
  white-space: nowrap;
}
.dm-act svg {
  width: max(19px, calc(var(--post-type) * .68));
  height: max(19px, calc(var(--post-type) * .68));
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* MARK: Where the post is from */

.dm-post__body { display: flex; flex-direction: column; min-width: 0; }
.dm-post__who { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.dm-post--linkedin { display: flex; flex-direction: column; gap: 0; }
.dm-li__head { display: flex; align-items: flex-start; gap: calc(var(--post-type) * .5); }
.dm-li__who { display: flex; flex-direction: column; min-width: 0; flex: 1; font-size: max(13px, calc(var(--post-type) * .46)); line-height: 1.3; color: var(--web-muted); }
.dm-li__who b { font-size: max(15px, calc(var(--post-type) * .56)); font-weight: 700; color: var(--web-ink); }
.dm-li__headline, .dm-li__when { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dm-li__follow { flex: none; font-size: max(14px, calc(var(--post-type) * .5)); font-weight: 650; color: var(--art-linked-in-mid); }
.dm-post--linkedin .dm-post__text { margin-top: calc(var(--post-type) * .55); }
.dm-li__preview {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  margin: calc(var(--post-type) * .6) calc(var(--post-type) * -1.05) 0;
  border-block: 1px solid var(--web-line);
}
.dm-li__preview .dm-post__media { margin: 0; border: 0; border-radius: 0; }
.dm-li__caption {
  display: flex;
  flex-direction: column;
  gap: .1em;
  padding: calc(var(--post-type) * .4) calc(var(--post-type) * 1.05);
  background: color-mix(in srgb, var(--web-line) 55%, var(--web-page));
  font-size: max(13px, calc(var(--post-type) * .42));
  color: var(--web-muted);
}
.dm-li__caption b { font-size: max(15px, calc(var(--post-type) * .54)); font-weight: 650; color: var(--web-ink); line-height: 1.25; }
.dm-li__counts {
  display: flex;
  justify-content: space-between;
  padding-block: calc(var(--post-type) * .4);
  border-bottom: 1px solid var(--web-line);
  font-size: max(13px, calc(var(--post-type) * .42));
  color: var(--web-muted);
}
.dm-li__counts span { display: inline-flex; align-items: center; gap: .4em; }
.dm-li__dot { width: 1em; height: 1em; border-radius: 50%; background: linear-gradient(var(--art-linked-in-hi), var(--art-linked-in-mid)); }
.dm-post__actions--li { margin-top: calc(var(--post-type) * .4); gap: calc(var(--post-type) * .75); }
.dm-act--worded { font-weight: 600; }

/* You're on one site at a time. Its pile is the only one there. */
.dm-post[data-depth="away"] { visibility: hidden; opacity: 0; pointer-events: none; transition: none; }
.dm-sites {
  position: relative;
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  rotate: -1.6deg;
  font-family: var(--font-sans);
}
.dm-site {
  appearance: none;
  border: 0;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--card) 62%, transparent);
  color: var(--ink);
  font: 800 15px/1 var(--font-sans);
  transition: transform 120ms ease-out, background-color 120ms ease-out;
}
.dm-site[aria-pressed="true"] { background: var(--card); box-shadow: 0 3px 0 var(--edge); }
.dm-site:active { transform: scale(.97); }
.dm-site:focus-visible { outline: 2px solid var(--leaf-ink); outline-offset: 2px; }
@media (prefers-color-scheme: dark) {
  .dm-li__follow { color: var(--art-linked-in-hi); }
}
/* The ones underneath are only edges, until you lift the top one and the next is right there. */
.dm-feed:not(:has(.is-lifted)) .dm-post:is([data-depth="1"], [data-depth="2"]) > * { opacity: 0; }
/* Word for word only where there's room next to Magpie's button. */
@media (max-width: 1279px) {
  .dm-act--worded span { display: none; }
}
@media (max-width: 859px) {
  .dm-act--wide { display: none; }
  .dm-sites { rotate: -1deg; }
}

/* Saved cards on the page, in the app's shape. */
.thing__face { display: block; object-fit: cover; }
.thing__pic { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.thing__thumb { overflow: hidden; }
.thing__play { z-index: 1; }
.thing img { pointer-events: none; }

/* The wall of saves. Real people's real posts, gone quiet. */
.row__face { display: block; object-fit: cover; background: none; filter: saturate(.3) brightness(.56); }
.row__pic { flex: none; width: 74px; height: 50px; border-radius: 8px; object-fit: cover; filter: saturate(.3) brightness(.5); }
.row { min-height: clamp(96px, 7.4vw, 116px); }
.row__text b { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.row__text small { line-height: 1.3; margin-top: 3px; }
.row__text small span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 959px) {
  .row { min-height: 84px; }
  .row__pic { display: none; }
}

/* MARK: Magpie's split button */

.dm-split {
  --ledge: 7px;
  margin-left: auto;
  display: inline-flex;
  gap: 3px;
  padding-bottom: var(--ledge);
  font-family: var(--font-sans);
  /* The post lies at an angle. The button doesn't: buttons never tilt. */
  rotate: -1.6deg;
}
.dm-split button {
  appearance: none;
  border: 0;
  height: clamp(50px, 4.7vw, 84px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--leaf);
  color: var(--on-leaf);
  font: 900 clamp(16px, 1.65vw, 30px)/1 var(--font-sans);
  letter-spacing: -.01em;
  box-shadow: 0 var(--ledge) 0 var(--leaf-deep);
  transition: transform 120ms ease-out, box-shadow 120ms ease-out;
}
.dm-split button:active {
  transform: translate3d(0, var(--ledge), 0);
  box-shadow: 0 0 0 var(--leaf-deep);
  transition: transform 80ms ease-out, box-shadow 80ms ease-out;
}
.dm-split button:focus-visible { outline: 2px solid var(--leaf-ink); outline-offset: 2px; }
.dm-split__send {
  white-space: nowrap;
  gap: .4em;
  padding: 0 .85em 0 .8em;
  border-radius: 999px 10px 10px 999px;
}
.dm-split__more {
  width: clamp(44px, 3.8vw, 68px);
  border-radius: 10px 999px 999px 10px;
}
.dm-split svg {
  width: 1.2em;
  height: 1.2em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
@media (hover: hover) and (pointer: fine) {
  .dm-split button:hover { background: var(--leaf-hover); }
}
@media (max-width: 859px) {
  .dm-browser { --post-type: clamp(19px, 4.8vw, 34px); max-width: 100%; rotate: 1deg; }
  .dm-split { rotate: -1deg; }
  .dm-split button { height: 54px; font-size: 17px; }
  .dm-split__more { width: 46px; }
}
@media (max-width: 430px) {
  .dm-post { grid-template-columns: 40px minmax(0, 1fr); padding: 16px 14px 14px; gap: 10px; }
  .dm-post__avatar { width: 40px; height: 40px; }
  .dm-post--linkedin { padding-inline: 14px; }
  .dm-li__preview { margin-inline: -14px; }
  .dm-li__caption { padding-inline: 14px; }
  .dm-post__actions { gap: 12px; }
  .dm-act--mark, .dm-act span, .dm-act:nth-child(n + 3) { display: none; }
  .dm-split__send span { white-space: nowrap; }
  .dm-split__send { font-size: 16px; }
}

.dm-menu {
  position: absolute;
  z-index: 45;
  width: 240px;
  padding: 8px;
  border-radius: var(--radius-lg);
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--shadow-float);
  font-family: var(--font-sans);
  transform-origin: 90% 0;
}
.dm-menu[hidden] { display: none; }
.dm-menu__label {
  padding: 4px 12px 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .06em;
  color: var(--ink-muted);
}
.dm-menu__item {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: var(--radius-md);
  font: 800 15px/1.2 var(--font-sans);
  text-align: left;
}
.dm-menu__hint { margin-left: auto; font-size: 13px; font-weight: 600; color: var(--ink-muted); }
.dm-menu__item:focus-visible { background: var(--leaf-tint); color: var(--leaf-ink); outline: none; }
@media (hover: hover) and (pointer: fine) {
  .dm-menu__item:hover { background: var(--leaf-tint); color: var(--leaf-ink); }
}

/* A post on its way. The one exception to the stack: it stays above the notch, because you never
   lose sight of what you're carrying. */
.dm-ghost {
  --post-type: clamp(20px, 2.3vw, 42px);
  position: fixed;
  z-index: 61;
  margin: 0;
  pointer-events: none;
  border: 0;
  box-shadow: 0 7px 0 var(--web-line), 0 26px 50px color-mix(in srgb, var(--art-shadow) 28%, transparent);
  will-change: transform;
  transition: none;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}
@media (max-width: 859px) { .dm-ghost { --post-type: clamp(19px, 4.8vw, 34px); } }

.dm-margin--drag {
  position: absolute;
  z-index: 3;
  right: 8px;
  bottom: calc(100% + 6px);
  rotate: -3deg;
  font-size: clamp(25px, 2.4vw, 40px);
  white-space: nowrap;
  line-height: 1;
  color: var(--wall-ink);
  display: flex;
  align-items: flex-start;
  gap: 2px;
  flex-direction: row-reverse;
  transition: opacity 140ms ease-out;
}
.dm-margin--drag svg {
  width: 44px;
  height: 38px;
  flex: none;
  transform: scaleX(-1);
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.dm-margin--drag.is-gone,
.dm-margin--drag.is-away { opacity: 0; }
@media (max-width: 900px) { .dm-margin--drag { display: none; } }

/* MARK: - The board */

.dm-board-host { position: relative; width: 100%; }

.dm-board {
  position: relative;
  background: var(--card);
  border-radius: var(--radius-xl);
  box-shadow: 0 6px 0 var(--edge), 0 34px 70px rgba(61, 50, 38, .14);
  font-family: var(--font-sans);
  color: var(--ink);
}
.dm-board__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
}
.dm-board__hint {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-muted);
  white-space: nowrap;
}
@media (max-width: 620px) { .dm-board__hint { display: none; } }

.dm-tabs { display: flex; gap: 6px; }
.dm-tab {
  appearance: none;
  border: 0;
  height: 40px;
  padding: 0 16px 0 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  background: var(--paper-deep);
  color: var(--ink);
  font: 800 15px/1 var(--font-sans);
  box-shadow: 0 3px 0 var(--edge);
  transition: transform 120ms ease-out;
}
.dm-tab:active { transform: translate3d(0, 3px, 0); box-shadow: none; transition: transform 80ms ease-out; }
.dm-tab[aria-selected="true"] {
  background: var(--leaf-tint);
  color: var(--leaf-ink);
  box-shadow: 0 3px 0 color-mix(in srgb, var(--leaf) 45%, var(--leaf-tint));
}
.dm-tab:focus-visible { outline: 2px solid var(--leaf); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) {
  .dm-tab:not([aria-selected="true"]):hover { background: var(--hover); }
}
@media (max-width: 430px) {
  .dm-tab { padding: 0 12px 0 10px; font-size: 14px; }
}
@media (pointer: coarse) {
  .dm-tab { height: 44px; }
  .dm-split__more { min-width: 44px; }
}

.dm-canvases {
  position: relative;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--edge) transparent;
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  touch-action: pan-x pan-y;
  /* Above its own pieces of paper only: cards stack inside here. */
  isolation: isolate;
}
.dm-canvas {
  position: relative;
  background-color: var(--b-paper);
  background-image: radial-gradient(circle, var(--b-dots) 1.5px, transparent 1.9px);
  background-size: 24px 24px;
  background-position: 12px 12px;
  overflow: hidden;
}
.dm-canvas[hidden] { display: none; }

.dm-item {
  position: absolute;
  top: 0;
  left: 0;
  user-select: none;
  -webkit-user-select: none;
  outline: none;
  transform-origin: 50% 50%;
}
/* A thing on its way out of your pocket. Above everything but the bird. */
.dm-pour {
  position: absolute;
  z-index: 39;
  pointer-events: none;
  will-change: transform;
}

.dm-item:focus-visible { outline: 2px solid var(--leaf); outline-offset: 3px; border-radius: var(--radius-lg); }

/* A longer, softer shadow while it's in your hand, faded in rather than repainted. */
.dm-item::after {
  content: "";
  position: absolute;
  inset: 4px;
  z-index: -1;
  border-radius: var(--radius-lg);
  box-shadow: 0 26px 44px rgba(61, 50, 38, .3);
  opacity: 0;
  transition: opacity 180ms ease-out;
  pointer-events: none;
}
.dm-item.is-held::after { opacity: 1; transition-duration: 100ms; }
.dm-item--trinket::after { border-radius: 50%; }

.dm-card {
  width: 268px;
  padding: 16px;
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lift);
  color: var(--ink);
}
.dm-card__who { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.dm-card .dm-avatar { width: 28px; height: 28px; flex: none; }
.dm-card__name { font-size: 15px; font-weight: 800; line-height: 1.25; }
.dm-card__source { font-size: 13px; font-weight: 600; line-height: 1.3; color: var(--ink-muted); }
.dm-card__who > div { min-width: 0; }
/* One line each, like the app's card. */
.dm-card__who .dm-card__name, .dm-card__who .dm-card__source { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dm-card__text { margin: 0; font-size: 14px; line-height: 1.45; text-wrap: pretty; }
.dm-card__text + .dm-thumb { margin-top: 12px; }
.dm-card--link .dm-thumb { margin-bottom: 12px; }
.dm-card--link .dm-card__name + .dm-card__source { margin-top: 4px; }

.dm-thumb {
  position: relative;
  height: 118px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--paper-deep);
}
.dm-thumb__art { display: block; width: 100%; height: 100%; object-fit: cover; }
.dm-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  border-radius: 50%;
  background: var(--card);
  box-shadow: 0 2px 0 var(--edge);
  display: grid;
  place-items: center;
}
.dm-play svg { width: 20px; height: 20px; fill: var(--ink); margin-left: 2px; }

.dm-sticky {
  --s: var(--sticky-butter);
  --e: var(--sticky-butter-edge);
  width: 176px;
  min-height: 156px;
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--s);
  box-shadow: 0 3px 0 var(--e), 0 10px 22px rgba(61, 50, 38, .1);
  color: var(--sticky-ink);
  display: flex;
  flex-direction: column;
}
.dm-sticky p { margin: 0; font-size: 16px; font-weight: 700; line-height: 1.32; text-wrap: pretty; }
.dm-sticky[data-color="peach"] { --s: var(--sticky-peach); --e: var(--sticky-peach-edge); }
.dm-sticky[data-color="mint"] { --s: var(--sticky-mint); --e: var(--sticky-mint-edge); }
.dm-sticky[data-color="sky"] { --s: var(--sticky-sky); --e: var(--sticky-sky-edge); }

.dm-sticky--list { width: 232px; min-height: 0; padding: 16px 12px 14px 16px; }
.dm-sticky__title { font-size: 16px; font-weight: 800; line-height: 1.3; margin-bottom: 8px; }
.dm-sticky__rows { display: flex; flex-direction: column; gap: 2px; margin-left: -6px; }

.dm-tick {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--sticky-ink);
  padding: 5px 6px;
  margin: 0;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  border-radius: 8px;
  font: 600 14px/1.35 var(--font-sans);
  text-align: left;
}
.dm-tick:focus-visible { outline: 2px solid var(--sticky-leaf-ink); outline-offset: 0; }
.dm-tick__box {
  flex: none;
  position: relative;
  width: 19px;
  height: 19px;
  border-radius: 5px;
  background: var(--sticky-paper);
  box-shadow: inset 0 0 0 1.5px var(--sticky-ink-muted), 0 2px 0 var(--e);
  transition: transform 140ms var(--ease-settle), box-shadow 80ms ease-out;
}
/* The small press. Down quickly, back up with a little spring. */
.dm-tick:active .dm-tick__box {
  transform: translate3d(0, 2px, 0) scale(.92);
  box-shadow: inset 0 0 0 1.5px var(--sticky-leaf-ink);
  transition: transform 80ms ease-out, box-shadow 80ms ease-out;
}
.dm-tick[aria-checked="true"] .dm-tick__box {
  box-shadow: inset 0 0 0 1.5px var(--sticky-leaf-ink), 0 2px 0 var(--e);
}
.dm-tick__mark {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.dm-tick__mark path {
  fill: none;
  stroke: var(--sticky-leaf-ink);
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 70ms ease-out;
}
.dm-tick[aria-checked="true"] .dm-tick__mark path {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 170ms cubic-bezier(.23, 1, .32, 1) 30ms;
}
.dm-tick__words {
  position: relative;
  transition: color 120ms ease-out;
}
.dm-tick[aria-checked="true"] .dm-tick__words { color: var(--sticky-ink-muted); }
.dm-tick__words::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: .68em;
  height: 1.5px;
  background: var(--sticky-ink-muted);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 90ms ease-out;
}
.dm-tick[aria-checked="true"] .dm-tick__words::after {
  transform: scaleX(1);
  transition: transform 200ms cubic-bezier(.23, 1, .32, 1) 40ms;
}
@media (hover: hover) and (pointer: fine) {
  .dm-tick:not([aria-checked="true"]):hover .dm-tick__box { box-shadow: inset 0 0 0 1.5px var(--sticky-leaf-ink), 0 2px 0 var(--e); }
  .dm-tick:not([aria-checked="true"]):hover .dm-tick__mark path { stroke-dashoffset: 0; opacity: .35; transition: none; }
}
@media (pointer: coarse) {
  /* A full finger's height for each, and they stack without gaps, so a tap can't land between. */
  .dm-tick { padding: 13px 6px; }
  .dm-sticky__rows { gap: 0; }
}

.dm-chip {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--sticky-paper) 60%, transparent);
  color: var(--sticky-leaf-ink);
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  transform: translate3d(0, 2px, 0);
  transition: opacity 80ms ease-out, transform 80ms ease-out;
  height: 25px;
}
.dm-chip svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.is-done > .dm-chip {
  opacity: 1;
  transform: none;
  transition: opacity 180ms ease-out 120ms, transform 240ms var(--ease-settle) 120ms;
}

.dm-region {
  position: absolute;
  top: 0;
  left: 0;
  border-radius: var(--radius-lg);
  background: var(--region-mint);
  border: 1.5px solid var(--sticky-mint-edge);
  transform-origin: 50% 0;
  --tab: var(--sticky-mint);
  --tab-edge: var(--sticky-mint-edge);
}
.dm-region--found { transition: height 240ms var(--ease-out); }
.dm-region[data-color="butter"] { background: var(--region-butter); border-color: var(--sticky-butter-edge); --tab: var(--sticky-butter); --tab-edge: var(--sticky-butter-edge); }
.dm-region[data-color="peach"] { background: var(--region-peach); border-color: var(--sticky-peach-edge); --tab: var(--sticky-peach); --tab-edge: var(--sticky-peach-edge); }
.dm-region[data-color="sky"] { background: var(--region-sky); border-color: var(--sticky-sky-edge); --tab: var(--sticky-sky); --tab-edge: var(--sticky-sky-edge); }
/* The name stands on the top edge as an index tab, as in the app (Mac/Regions.swift). */
.dm-region > span {
  position: absolute;
  bottom: calc(100% + 1px);
  left: 14px;
  display: flex;
  align-items: center;
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--tab-edge);
  border-bottom: 0;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  background: var(--tab);
  color: var(--sticky-ink);
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

.dm-margin--gentle {
  position: absolute;
  top: 0;
  left: 0;
  width: 256px;
  font-size: 27px;
  line-height: 1.05;
  color: var(--ink-muted);
  z-index: 1;
}

/* MARK: The reveal */

/* The biggest thing on the page, for about three seconds. Plain ink on a veil of the page's own
   paper. The bird can stand on it. When it lifts, what you found is there in clear view. */
.dm-reveal {
  position: fixed;
  inset: 0;
  z-index: 39;
  display: grid;
  place-items: center;
  pointer-events: none;
}
.dm-reveal__veil {
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
}
.dm-reveal__line, .dm-found-note {
  position: relative;
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 900;
  letter-spacing: -.045em;
  line-height: .96;
  color: var(--magpie);
}
@media (prefers-color-scheme: dark) {
  .dm-reveal__line, .dm-found-note { color: var(--ink); }
}
.dm-reveal__line {
  font-size: clamp(44px, min(13.4vw, 25svh), 320px);
}
.dm-reveal__line span, .dm-found-note span { position: relative; display: block; white-space: nowrap; }
.dm-found-note {
  position: absolute;
  top: 0;
  left: 0;
  font-size: 34px;
  pointer-events: none;
}

.dm-found .dm-card { width: 200px; padding: 12px; }
.dm-found .dm-card__who { margin-bottom: 8px; }
.dm-found .dm-card__text { font-size: 13px; line-height: 1.4; }
.dm-found .dm-thumb { height: 84px; }
.dm-found .dm-card--link .dm-thumb { margin-bottom: 8px; }
.dm-found .dm-card .dm-card__name { font-size: 14px; }
.dm-found .dm-play { width: 34px; height: 34px; margin: -17px 0 0 -17px; }
.dm-found .dm-play svg { width: 15px; height: 15px; }
.dm-found .dm-sticky { width: 148px; min-height: 124px; padding: 12px; }
.dm-found .dm-sticky p { font-size: 14px; }

/* The board writes this line itself, as part of the reveal, and only if you collected something.
   The page's copy is for when the demos couldn't start. */
.demos-ready [data-board-note] { display: none; }

.dm-trinket { width: 84px; height: 84px; filter: drop-shadow(0 6px 6px rgba(61, 50, 38, .2)); }
.dm-trinket img, .dm-trinket svg { display: block; width: 100%; height: 100%; pointer-events: none; -webkit-user-drag: none; }
.dm-item--trinket:focus-visible { border-radius: 50%; }

/* Reduced motion: things change, but nothing travels. */
@media (prefers-reduced-motion: reduce) {
  .dm-post, .dm-tile, .dm-tick__box, .dm-tick__mark path, .dm-tick__words::after { transition-duration: 0ms !important; transition-delay: 0ms !important; }
  .dm-notch[data-phase="targets"] .dm-tile, .dm-notch[data-phase="boards"] .dm-tile { transform: none; }
}

/* MARK: - The board on a phone

   A 1180-wide canvas seen through a phone is mostly empty paper. So here it stops being a canvas: the
   same pieces at their real, readable size, scattered down the screen and scrolled with the page.
   What you found comes first. */
@media (max-width: 719px) {
  .dm-canvases { overflow: visible; touch-action: auto; }
  .dm-canvas {
    width: auto !important;
    height: auto !important;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 14px 8px;
    padding: 16px 14px 26px;
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  }
  .dm-item {
    position: relative !important;
    inset: auto !important;
    transform: none !important;
    max-width: 100%;
    rotate: -1.3deg;
  }
  .dm-item:nth-child(even) { rotate: 1.2deg; margin-left: auto; }
  .dm-item:has(.dm-found) { order: -1; }
  /* Stickies are as tall as their words here, and small enough to share a row. */
  .dm-canvas .dm-sticky:not(.dm-sticky--list) { width: min(158px, 44vw); height: auto; min-height: 104px; padding: 14px; }
  .dm-item--trinket { order: 1; }

  .dm-region { display: none; }
  .dm-region--found {
    display: block;
    position: relative !important;
    inset: auto !important;
    transform: none !important;
    order: -3;
    flex: 0 0 100%;
    width: auto !important;
    height: auto !important;
    background: none;
    border: 0;
    box-shadow: none;
  }
  .dm-region--found[data-color] { background: none; border: 0; }
  .dm-region--found > span {
    position: static;
    display: inline-flex;
    border-bottom: 1px solid var(--tab-edge);
    border-radius: var(--radius-sm);
  }
  .dm-found-note {
    position: static !important;
    transform: none !important;
    order: -2;
    flex: 0 0 100%;
  }
  .dm-margin {
    position: static !important;
    transform: none !important;
    flex: 0 0 100%;
    width: auto;
    white-space: normal;
  }
}
@media (max-width: 359px) {
  .dm-tab .dm-emoji { display: none; }
  .dm-tab { padding: 0 12px; }
}

