/*
 * Direction u: the components. Band, door, seal, buttons, contents sheet,
 * folds, pull tabs, swipes, concertinas, index cards, leaflets, the reply
 * card, the crumpled sheet, pockets and slips, the hand-over layer.
 * Every state is a class or an attribute; nothing is a style attribute.
 */

/* ---------------------------------------------------------------- Seal -- */
.seal {
  --ring: 1.5px;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  min-height: 3.5rem;
  padding: var(--s-2) var(--s-5) var(--s-2) var(--s-2);
  border-radius: 999px;
  background: var(--seal);
  color: var(--seal-label);
  box-shadow: inset 0 0 0 var(--ring) var(--ink), 0 0 0 0 transparent;
  text-decoration: none;
  line-height: 1.2;
  transition: box-shadow var(--t-lift) var(--ease-paper), transform var(--t-lift) var(--ease-paper);
}
.seal-disc {
  position: relative;
  flex: none;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 0 1.5px var(--seal-label);
  background: var(--seal);
  color: var(--seal-label);
  transition: transform var(--t-press) var(--ease-press);
}
.seal-disc svg { width: 1.05rem; height: 1.3rem; }
.seal-ink {
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 2px solid var(--seal-label);
  opacity: 0;
  transform: scale(.6);
  pointer-events: none;
}
.seal-text { display: grid; gap: 1px; }
.seal-label { font-weight: 700; font-size: 1.0625rem; letter-spacing: -.005em; }
.seal-sub { font-size: var(--text-s); font-weight: 500; }
.seal:hover { --ring: 2.5px; transform: translateY(-2px); }
.seal:active .seal-disc, .seal.is-stamping .seal-disc { transform: scale(.94); }
.seal.is-stamping .seal-ink { animation: u-ink 320ms var(--ease-paper) forwards; }
@keyframes u-ink { 0% { opacity: .9; transform: scale(.6); } 100% { opacity: 0; transform: scale(2.6); } }
.seal-compact { min-height: 3rem; padding-right: var(--s-4); }
.seal-compact .seal-sub { display: none; }
@media (prefers-reduced-motion: reduce) {
  .seal, .seal-disc { transition: none; }
  .seal:hover { transform: none; }
  .seal.is-stamping .seal-ink { animation: none; }
  .seal.is-stamping { background: var(--seal-deep); }
  .seal:active .seal-disc, .seal.is-stamping .seal-disc { transform: none; }
}

/* ----------------------------------------------------- Paper buttons -- */
/* Not filled: the seal is the only filled button. */
.chit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  min-height: 44px;
  padding: var(--s-2) var(--s-4);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-tag);
  background: var(--sheet-raised);
  color: var(--ink);
  font-weight: 600;
  font-size: var(--text-m);
  text-decoration: none;
  line-height: 1.2;
  transition: transform var(--t-lift) var(--ease-paper), box-shadow var(--t-lift) var(--ease-paper);
  box-shadow: 0 1px 0 var(--hairline);
}
.chit:hover { transform: translateY(-2px); box-shadow: 0 6px 12px -8px var(--shadow-ink); }
.chit:active { transform: scale(.985); transition-duration: var(--t-press); }
.chit[disabled], .chit[aria-disabled="true"] { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.chit svg { width: 18px; height: 18px; }
.text-link { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }

/* ---------------------------------------------------------------- Band -- */
/* A printed paper band in the area's ink, wrapped round a tag. Its ends fold behind. */
.band {
  --band-over: 7px;
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  column-gap: var(--s-3);
  row-gap: 2px;
  margin-inline: calc(-1 * var(--band-over));
  padding: .55rem calc(var(--s-4) + var(--band-over)) .6rem;
  background: var(--area);
  color: var(--band-text);
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  z-index: 1;
}
/* The two ends wrap behind the tag: a darker fold at each edge. */
.band::before, .band::after {
  content: "";
  position: absolute;
  bottom: -5px;
  width: var(--band-over);
  height: 5px;
  background: color-mix(in srgb, var(--area) 62%, black);
  pointer-events: none;
}
.band::before { left: 0; clip-path: polygon(0 0, 100% 0, 100% 100%); }
.band::after { right: 0; clip-path: polygon(0 0, 100% 0, 0 100%); }
.band-name {
  font-family: var(--area-face);
  font-style: var(--area-face-style);
  font-weight: var(--area-face-weight);
  font-size: 1.375rem;
  line-height: 1.05;
  letter-spacing: -.01em;
}
.area-celebrate .band-name, .area-gifttrix .band-name { font-size: 1.6rem; letter-spacing: 0; }
.band-price { display: inline-flex; flex-wrap: wrap; align-items: baseline; column-gap: var(--s-2); font-size: var(--text-m); font-weight: 600; transition: font-weight var(--t-lift); }
.band-price .price { white-space: nowrap; }
.suggested { font-size: var(--text-xs); font-weight: 500; letter-spacing: .02em; white-space: nowrap; }
.band-caps { font-family: var(--face-sans); font-size: var(--text-s); font-weight: 650; letter-spacing: var(--track-caps); text-transform: uppercase; }
/* The dog-ear: the band's far end lifts to show its lighter underside. */
.band-ear {
  position: absolute;
  right: 0;
  top: 0;
  width: 18px;
  height: 18px;
  background: linear-gradient(225deg, var(--ground) 0 50%, color-mix(in srgb, var(--area) 55%, white) 50% 100%);
  transform: scale(0);
  transform-origin: 100% 0;
  transition: transform var(--t-lift) var(--ease-paper);
  pointer-events: none;
}
.band.is-slipping { transition: transform var(--t-slip) var(--ease-press); transform: translateX(115%); }
.quiet-line { font-size: var(--text-s); color: var(--ink-2); margin-top: var(--s-2); }

/* ---------------------------------------------------------------- Door -- */
/* A paper tag wearing its band, its pattern printed along one edge. */
.door {
  position: relative;
  display: grid;
  grid-template-columns: 0.875rem 1fr;
  grid-template-areas: "edge band" "edge line";
  align-content: start;
  min-height: 3rem;
  background: var(--sheet-raised);
  color: var(--ink);
  text-decoration: none;
  border-radius: var(--radius-tag);
  box-shadow: 0 1px 0 var(--hairline), 0 1px 2px var(--shadow-ink-soft);
  transition: transform var(--t-lift) var(--ease-paper);
  -webkit-user-drag: none;
}
.door::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: 0 14px 26px -16px var(--shadow-ink);
  opacity: 0;
  transition: opacity var(--t-lift) var(--ease-paper);
  pointer-events: none;
}
.door-edge {
  grid-area: edge;
  border-radius: var(--radius-tag) 0 0 var(--radius-tag);
  background: var(--area);
  -webkit-mask: var(--pattern) repeat 0 0 / var(--pattern-size, 16px 16px);
  mask: var(--pattern) repeat 0 0 / var(--pattern-size, 16px 16px);
  opacity: .9;
}
.door .band { grid-area: band; margin-left: 0; margin-top: var(--s-3); padding-left: var(--s-3); }
.door .band::before { display: none; }
.door-line { grid-area: line; padding: var(--s-3) var(--s-4) var(--s-4) var(--s-3); font-size: var(--text-m); line-height: 1.45; color: var(--ink-2); }
.door-line strong { color: var(--ink); }
@media (hover: hover) {
  .door:hover { transform: translateY(-3px); }
  .door:hover::after { opacity: 1; }
  .door:hover .band-ear { transform: scale(1); }
  .door:hover .band-price { font-weight: 750; }
}
.door:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
.door:focus-visible .band-ear { transform: scale(1); }
.door:active { transform: scale(.985); transition-duration: var(--t-press); }
.door.is-chosen { transform: none; }
.door.is-dragging { transition: none; }
@media (prefers-reduced-motion: reduce) {
  .door, .door::after, .band-ear { transition: none; }
  .door:hover, .door:active { transform: none; }
  .band.is-slipping { transform: none; transition: none; }
}

/* A compact door: one row, name and price, for lists and neighbours. */
.door-row { grid-template-areas: "edge band"; }
.door-row .band { margin-top: 0; border-radius: 0 var(--radius-tag) var(--radius-tag) 0; margin-right: 0; padding-right: var(--s-4); min-height: 3rem; align-content: center; }
.door-row .band::after { display: none; }

/* ---------------------------------------------------- Pattern strip -- */
.pattern-strip {
  display: block;
  height: 14px;
  background: var(--area);
  -webkit-mask: var(--pattern) repeat 0 0 / var(--pattern-size, 16px 16px);
  mask: var(--pattern) repeat 0 0 / var(--pattern-size, 16px 16px);
  opacity: .85;
}

/* ------------------------------------------------- The hand-over layer -- */
.u-handoff {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  pointer-events: none;
  transform-origin: 0 0;
  background: var(--area-tint);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.u-handoff::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2.5rem;
  background: var(--area);
  -webkit-mask: var(--pattern) repeat 0 0 / var(--pattern-size, 16px 16px);
  mask: var(--pattern) repeat 0 0 / var(--pattern-size, 16px 16px);
  opacity: .8;
}
.u-handoff-name { font-family: var(--area-face); font-style: var(--area-face-style); font-weight: var(--area-face-weight); font-size: clamp(2.5rem, 8vw, 6rem); color: var(--area); letter-spacing: -.02em; }
.u-handoff[hidden] { display: none; }

/* ------------------------------------------------- Contents tab, sheet -- */
.u-tab {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 3.75rem;
  min-height: 3.5rem;
  padding: var(--s-2) var(--s-3);
  border: 1.5px solid var(--ink);
  border-radius: 10px 10px 6px 6px;
  background: var(--sheet-raised);
  color: var(--ink);
  font-size: var(--text-xs);
  font-weight: 650;
  letter-spacing: .06em;
  text-transform: uppercase;
  box-shadow: 0 6px 18px -8px var(--shadow-ink);
  transition: transform var(--t-lift) var(--ease-paper);
}
.u-tab svg { width: 22px; height: 22px; }
.u-tab:hover { transform: translateY(-3px); }
html:not(.lt-js) .u-tab { display: none; }

dialog.u-sheet {
  position: fixed;
  inset: auto 0 0 0;
  margin: 0 auto;
  width: min(100%, 62rem);
  max-height: min(88dvh, 52rem);
  padding: 0;
  border: 0;
  border-radius: 14px 14px 0 0;
  background: var(--sheet);
  color: var(--ink);
  box-shadow: 0 -18px 40px -20px var(--shadow-ink);
  overflow: auto;
  overscroll-behavior: contain;
}
dialog.u-sheet::backdrop { background: rgb(21 26 37 / .42); }
dialog.u-sheet[open] { animation: u-rise 320ms var(--ease-paper) both; }
dialog.u-sheet.is-closing { animation: u-fall 220ms var(--ease-press) both; }
@keyframes u-rise { from { transform: translateY(100%); } }
@keyframes u-fall { to { transform: translateY(100%); } }
@media (prefers-reduced-motion: reduce) {
  dialog.u-sheet[open], dialog.u-sheet.is-closing { animation: none; }
}
.u-sheet-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); padding: var(--s-4) var(--s-5); background: var(--sheet); border-bottom: 1px solid var(--hairline); }
.u-sheet-head h2 { font-size: var(--text-l); }
.u-sheet-close { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; border: 1.5px solid var(--ink); background: var(--sheet-raised); color: var(--ink); padding: 0; }
.u-sheet-close svg { width: 18px; height: 18px; }
.u-sheet-body { padding: var(--s-5); display: grid; gap: var(--s-6); grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.u-sheet-body h3 { font-family: var(--face-sans); font-size: var(--text-s); font-weight: 650; letter-spacing: var(--track-caps); text-transform: uppercase; color: var(--ink-2); margin-bottom: var(--s-3); }
.u-sheet-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }
.u-sheet-list a:not(.door) { display: flex; align-items: center; min-height: 44px; padding: 0 var(--s-3); border-radius: var(--radius-tag); text-decoration: none; font-weight: 600; background: var(--sheet-raised); box-shadow: 0 1px 0 var(--hairline); }
.u-sheet-list a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--ink), 0 1px 0 var(--hairline); }
.u-sheet-foot { padding: 0 var(--s-5) var(--s-6); }

/* ---------------------------------------------------------------- Fold -- */
/* A region that unfolds from its crease. With no script, it is open. */
.unfolds { transform-origin: 50% 0; backface-visibility: hidden; }
.lt-js [data-fold-root].is-folded [data-fold-hide] { display: none; }
.crease { height: 0; border-top: 1px dashed var(--crease); }

/* The pull tab on a fold's lower edge. */
.pull {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  width: 100%;
  min-height: 48px;
  margin: 0;
  padding: var(--s-2) var(--s-4);
  border: 0;
  border-top: 1px dashed var(--crease);
  background: transparent;
  color: var(--ink-2);
  font-size: var(--text-s);
  font-weight: 600;
  touch-action: none;
}
.pull-grip { width: 2.25rem; height: 5px; border-radius: 3px; background: var(--crease); }

/* --------------------------------------------------- Swipe with buttons -- */
.swipe { position: relative; }
.swipe-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  gap: var(--s-4);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}
.swipe-track::-webkit-scrollbar { display: none; }
.swipe-track > * { scroll-snap-align: start; }
.swipe-controls { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); margin-top: var(--s-3); }
.swipe-count { font-size: var(--text-s); font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }
html:not(.lt-js) .swipe-controls { display: none; }
html:not(.lt-js) .swipe-track { grid-auto-flow: row; overflow: visible; }

/* ---------------------------------------------------------- Concertina -- */
.concertina { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); perspective: 1600px; }
.pleat { position: relative; padding: var(--s-5); background: var(--sheet-raised); transition: transform var(--t-fold) var(--ease-paper); transform-origin: 0 50%; }
.pleat:nth-child(odd) { background: linear-gradient(90deg, var(--sheet-raised) 70%, var(--sheet-shade)); }
.pleat:nth-child(even) { background: linear-gradient(90deg, var(--sheet-shade), var(--sheet-raised) 30%); }
.lt-js .concertina.is-set .pleat:nth-child(odd) { transform: rotateY(6deg); }
.lt-js .concertina.is-set .pleat:nth-child(even) { transform: rotateY(-6deg); }
.lt-js .concertina.is-open .pleat { transform: none; }
.concertina.is-open .pleat:nth-child(2) { transition-delay: 90ms; }
.concertina.is-open .pleat:nth-child(3) { transition-delay: 180ms; }
.concertina.is-open .pleat:nth-child(4) { transition-delay: 270ms; }
.concertina.is-open .pleat:nth-child(5) { transition-delay: 360ms; }
.concertina.is-open .pleat:nth-child(6) { transition-delay: 450ms; }
@media (prefers-reduced-motion: reduce) {
  .lt-js .concertina.is-set .pleat { transform: none; }
  .pleat { transition: none; }
}

/* ---------------------------------------------------------- Index cards -- */
.cards { display: grid; gap: var(--s-3); }
.card-q { background: var(--sheet-raised); border-radius: var(--radius-tag); box-shadow: 0 1px 0 var(--hairline), 0 1px 2px var(--shadow-ink-soft); transition: transform var(--t-lift) var(--ease-paper); }
.card-q > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); min-height: 3rem; padding: var(--s-3) var(--s-4); font-weight: 650; cursor: pointer; border-radius: inherit; }
.card-q > summary::-webkit-details-marker { display: none; }
.card-q > summary::after { content: ""; flex: none; width: 14px; height: 14px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translate(-3px, -3px); transition: transform var(--t-lift) var(--ease-paper); }
.card-q[open] > summary::after { transform: rotate(-135deg) translate(-3px, -3px); }
.card-q:hover { transform: translateY(-2px); }
.card-q[open] { transform: translateY(-6px); }
.card-q .card-a { padding: 0 var(--s-4) var(--s-4); color: var(--ink-2); max-width: var(--measure); }
.card-q[open] .card-a { animation: u-answer 240ms var(--ease-paper) both; }
@keyframes u-answer { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { .card-q, .card-q[open] { transform: none; transition: none; } .card-q[open] .card-a { animation: none; } }

/* ---------------------------------------------------------- Leaflet -- */
.leaflet { background: var(--sheet); border-radius: var(--radius-paper); box-shadow: 0 1px 0 var(--hairline), 0 18px 40px -30px var(--shadow-ink); overflow: hidden; }
.leaflet > .band { margin: 0; padding: var(--s-5) var(--s-6); display: grid; gap: var(--s-2); }
.leaflet > .band::before, .leaflet > .band::after { display: none; }
.leaflet-body { padding: var(--s-6); display: grid; gap: var(--s-5); max-width: calc(var(--measure) + 6rem); }
.leaflet-body h2 { font-size: var(--text-xl); margin-top: var(--s-4); }
.leaflet-body h3 { font-size: var(--text-l); }
.leaflet-body p, .leaflet-body li { max-width: var(--measure); }
.leaflet-body ul, .leaflet-body ol { padding-left: 1.2em; display: grid; gap: var(--s-2); }

/* ---------------------------------------------------------- Reply card -- */
.reply-card { position: relative; background: var(--sheet-raised); border-radius: var(--radius-paper); box-shadow: 0 1px 0 var(--hairline), 0 24px 50px -36px var(--shadow-ink); padding: var(--s-6); display: grid; gap: var(--s-5); overflow: hidden; }
.reply-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; counter-reset: step; }
.reply-steps li { counter-increment: step; display: grid; grid-template-columns: 2.5rem 1fr; gap: var(--s-3); padding: var(--s-4) 0; border-top: 1px dashed var(--crease); }
.reply-steps li::before { content: counter(step); font-family: var(--face-display); font-weight: 800; font-size: 1.5rem; line-height: 1; }
.reply-steps b { display: block; }
.reply-stamp { position: absolute; right: var(--s-5); top: var(--s-5); width: 5.5rem; height: 5.5rem; border-radius: 50%; display: grid; place-items: center; color: var(--seal); border: 3px solid var(--seal); opacity: 0; transform: scale(1.4) rotate(-14deg); pointer-events: none; }
.reply-stamp svg { width: 2.2rem; height: 2.6rem; }
.reply-card.is-stamped .reply-stamp { opacity: .9; transform: scale(1) rotate(-14deg); transition: opacity 320ms var(--ease-paper), transform 320ms var(--ease-paper); }
.reply-sent { display: none; padding: var(--s-4); border: 1.5px solid var(--ink); border-radius: var(--radius-tag); }
.reply-card.is-stamped .reply-sent { display: block; }
@media (prefers-reduced-motion: reduce) { .reply-card.is-stamped .reply-stamp { transition: none; transform: rotate(-14deg); } }

/* ---------------------------------------------------- Crumpled sheet -- */
.crumple { width: min(22rem, 80vw); margin-inline: auto; }
.crumple .frame-1, .crumple .frame-2, .crumple .frame-3 { opacity: 0; }
.crumple .frame-4 { opacity: 1; }
.lt-js .crumple.is-playing .frame-1 { animation: u-f1 900ms steps(1, end) both; }
.lt-js .crumple.is-playing .frame-2 { animation: u-f2 900ms steps(1, end) both; }
.lt-js .crumple.is-playing .frame-3 { animation: u-f3 900ms steps(1, end) both; }
.lt-js .crumple.is-playing .frame-4 { animation: u-f4 900ms steps(1, end) both; }
@keyframes u-f1 { 0% { opacity: 1; } 25%, 100% { opacity: 0; } }
@keyframes u-f2 { 0% { opacity: 0; } 25% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes u-f3 { 0%, 25% { opacity: 0; } 50% { opacity: 1; } 75%, 100% { opacity: 0; } }
@keyframes u-f4 { 0%, 50% { opacity: 0; } 75%, 100% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .lt-js .crumple.is-playing [class^="frame-"] { animation: none; } }

/* ------------------------------------------------------ Pocket, slips -- */
.pocket { position: relative; padding-top: var(--s-5); }
.pocket-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-3); margin-bottom: var(--s-3); }
.pocket-head p { font-size: var(--text-s); color: var(--ink-2); }
.pocket-slips { list-style: none; margin: 0; padding: 0 var(--s-2); display: flex; flex-wrap: wrap; gap: var(--s-2); position: relative; z-index: 0; }
.slip-tab {
  min-height: 44px;
  padding: var(--s-2) var(--s-3) var(--s-4);
  border: 1px solid var(--hairline);
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
  background: var(--sheet-raised);
  color: var(--ink);
  font-size: var(--text-m);
  font-weight: 600;
  line-height: 1.15;
  text-align: left;
  transition: transform 320ms var(--ease-paper);
  margin-bottom: -10px;
}
.slip-tab:hover { transform: translateY(-3px); }
.slip-tab[aria-expanded="true"] { transform: translateY(-10px); background: var(--sheet); box-shadow: 0 -6px 14px -10px var(--shadow-ink); }
.pocket-lip {
  position: relative;
  z-index: 1;
  border-radius: 4px 4px var(--radius-tag) var(--radius-tag);
  background: var(--sheet-shade);
  box-shadow: 0 -1px 0 var(--hairline), inset 0 10px 14px -12px var(--shadow-ink);
  padding: var(--s-4);
  min-height: 1.5rem;
}
.pocket-lip::before { content: ""; position: absolute; left: 12%; right: 12%; top: 0; height: 9px; border-radius: 0 0 50% 50%; background: var(--ground); opacity: .7; }
.slip-body { display: grid; gap: var(--s-2); font-size: var(--text-m); }
.slip-body[hidden] { display: none; }
.slip-body .app-name { font-family: var(--face-display); font-weight: 760; font-size: var(--text-l); }
.slip-body .app-price { font-weight: 600; }
.slip-body a { font-weight: 600; }
.slip-links { display: flex; flex-wrap: wrap; gap: 0 var(--s-4); }
.slip-links a { display: inline-flex; align-items: center; min-height: 44px; }
@media (prefers-reduced-motion: reduce) { .slip-tab { transition: none; } .slip-tab[aria-expanded="true"] { transform: none; } }

/* ------------------------------------------------------ Paper chits as inputs -- */
.chits { display: flex; flex-wrap: wrap; gap: var(--s-2); border: 0; padding: 0; margin: 0; }
.chits legend { font-weight: 650; margin-bottom: var(--s-3); padding: 0; }
.chit-input { position: relative; }
.chit-input input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.chit-input span {
  display: inline-flex; align-items: center; gap: var(--s-2);
  min-height: 44px; padding: var(--s-2) var(--s-4);
  border: 1.5px solid var(--hairline);
  border-radius: var(--radius-tag);
  background: var(--sheet-raised);
  font-weight: 600; font-size: var(--text-m); line-height: 1.2;
  transition: transform var(--t-lift) var(--ease-paper), border-color var(--t-lift);
}
.chit-input span::before { content: ""; flex: none; width: 14px; height: 14px; border-radius: 3px; border: 1.5px solid currentColor; }
.chit-input:hover span { transform: translateY(-2px); }
.chit-input input:checked + span { border-color: var(--ink); transform: translateY(1px); box-shadow: inset 0 2px 0 var(--sheet-shade); }
.chit-input input:checked + span::before { background: var(--ink); box-shadow: inset 0 0 0 2px var(--sheet-raised); }
.chit-input input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 3px; }

/* ------------------------------------------------------ Try-outs -- */
.example-label { display: inline-flex; align-items: center; gap: var(--s-2); font-size: var(--text-xs); font-weight: 650; letter-spacing: var(--track-caps); text-transform: uppercase; color: var(--ink-2); }
.example-label::before { content: ""; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid currentColor; }
.status { min-height: 1.5em; font-size: var(--text-m); font-weight: 600; }

/* ------------------------------------------------------ Picture print -- */
/* A photograph slipped into paper corners. */
.print { position: relative; padding: var(--s-2); background: var(--sheet-raised); box-shadow: 0 1px 0 var(--hairline), 0 10px 22px -16px var(--shadow-ink); border-radius: 2px; }
.print img { width: 100%; height: auto; border-radius: 1px; }
.print::before, .print::after { content: ""; position: absolute; width: 22px; height: 22px; background: var(--ink); opacity: .82; z-index: 1; }
.print::before { left: 2px; top: 2px; clip-path: polygon(0 0, 100% 0, 0 100%); }
.print::after { right: 2px; bottom: 2px; clip-path: polygon(100% 0, 100% 100%, 0 100%); }

/* ------------------------------------------------------ Leaflet titles -- */
.leaflet-title { font-size: var(--text-2xl); color: inherit; }
.leaflet .band-line { font-size: clamp(1.0625rem, 1rem + .35vw, 1.3rem); max-width: 50ch; line-height: 1.4; }
