/* OST Merch Vote · "notebook shop"
   Everything is scribbled with a black felt-tip (Schoolbell) on a crumpled sheet of paper,
   black pen only, like a page out of a kid's diary. Only the shirt pictures have colour.
   Shop layout: announcement strip, header with nav and heart bag, product tiles,
   sort menu, podium, and stick people hopping along the bottom. Highlights are scribbled
   underlines and pencil hatching. One deliberate light look (paper), so no dark theme. */
:root {
  --paper: #fbfbf9;
  --paper-2: #ffffff;
  --ink: #18181b;
  --ink-2: #333333;
  --pencil: #5a5a5a;
  --hl: #e9e9e6;
  --hl-pink: transparent;
  --red: #18181b;
  --red-dark: #000000;
  --blue-pen: #18181b;
  --tint-0: rgba(255, 255, 255, .72);
  --tint-1: rgba(255, 255, 255, .72);
  --tint-2: rgba(255, 255, 255, .72);
  --tint-3: rgba(255, 255, 255, .72);
  --tint-4: rgba(255, 255, 255, .72);
  --gold: #ffffff;
  --silver: #ffffff;
  --bronze: #ffffff;
  --tape: transparent;
  --tape-2: transparent;
  --white: #ffffff;
  --backdrop: rgba(24, 24, 27, .45);
  --f-hand: 'Schoolbell', 'Chalkboard SE', 'Comic Sans MS', 'Segoe Print', cursive;
  --wobble: 255px 15px 225px 15px / 15px 225px 15px 255px;
  --wobble-soft: 18px 7px 16px 9px / 9px 16px 7px 18px;
  --shadow: none;
  --gutter: 20px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  font: 400 19px/1.35 var(--f-hand);
  background-color: #f5f5f2;
  -webkit-text-stroke: .02em currentColor;  /* a slightly thicker felt-tip line */
  font-synthesis: none;                       /* Schoolbell has one weight: no fake bold */
  -webkit-font-smoothing: antialiased;
}
/* "bold" text is the same pen, pressed a little harder */
h1, h2, h3, strong, b, .btn, .heart, .chip, .tabs [role="tab"], .card-title, .card-price, .sort,
.field > span, .badge, .pod-num, .pod-medal, .announce p, .toast, .lang button, .count, .link,
.spec-link, .drop-studio, .brand-text strong, .bag-count, .form-error, .spec-current {
  -webkit-text-stroke-width: .035em;
}
.hero h1, .top-head h2 { -webkit-text-stroke-width: .025em; }
/* the crumpled sheet stays put while the page scrolls over it */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: #f5f5f2 url("../img/paper.svg") center / cover no-repeat;
}
main { flex: 1 0 auto; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px dashed var(--blue-pen); outline-offset: 3px; }
::selection { background: var(--hl); }
h1, h2, h3 { text-wrap: balance; font-weight: 700; }

.wrap {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}

/* hand-drawn squiggle used as a line */
.top::after, .foot::before {
  content: ""; position: absolute; left: 0; right: 0; height: 8px; pointer-events: none;
  background: repeat-x center / 40px 8px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='8' viewBox='0 0 40 8'%3E%3Cpath d='M0 4 Q5 0.5 10 4 T20 4 T30 4 T40 4' fill='none' stroke='%2318181b' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 2px 20px 4px; border: 2.5px solid var(--ink); border-radius: var(--wobble);
  background: var(--paper-2); color: var(--ink); font-weight: 700; font-size: 20px; line-height: 1;
  white-space: nowrap; text-decoration: none; box-shadow: none;
  transition: transform .12s, box-shadow .12s, background .12s;
}
.btn:hover { transform: translate(-1px, -1px) rotate(-1deg); box-shadow: none; }
.btn:active { transform: translate(2px, 2px); box-shadow: none; }
.btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.btn.primary { background: var(--hl); }
.btn.ghost { border-color: transparent; box-shadow: none; background: transparent; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.btn.ghost:hover { transform: none; text-decoration-style: wavy; }
.btn.danger-solid { background: var(--red); color: var(--white); }
.btn.sm { min-height: 38px; padding: 1px 14px 3px; font-size: 17px; }
.btn:disabled { opacity: .65; cursor: progress; transform: none; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 50%; border: 2.5px solid var(--ink); background: var(--paper-2);
  color: var(--ink); display: inline-grid; place-items: center; padding: 0;
}
.icon-btn:hover { background: var(--hl); }
.icon-btn svg, .lb-nav svg, .ann-nav svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.link {
  border: 0; background: none; padding: 0; color: var(--ink); font-weight: 700;
  text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px;
}
.link:hover { text-decoration-style: wavy; text-decoration-color: var(--red); }
.link.strong { color: var(--ink); background: linear-gradient(transparent 55%, var(--hl) 55%, var(--hl) 90%, transparent 90%); }

/* ---------- demo notice ---------- */
.demo-bar { background: var(--tint-4); border-bottom: 2px dashed var(--ink); }
.demo-in { display: flex; align-items: center; justify-content: space-between; gap: 8px 20px; flex-wrap: wrap; padding-block: 8px; }
.demo-in p { margin: 0; font-size: 17px; max-width: 80ch; }

/* ---------- announcement strip ---------- */
.announce {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center;
  background: var(--hl); border-bottom: 2.5px solid var(--ink); min-height: 46px;
  padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px);
}
.announce p { margin: 0; text-align: center; font-weight: 700; font-size: 20px; padding: 4px 4px 6px; }
.announce p.flip { animation: ann-in .35s ease-out; }
@keyframes ann-in { from { opacity: 0; transform: translateY(6px) rotate(-1deg); } }
.ann-nav { border: 0; background: transparent; height: 44px; display: grid; place-items: center; color: var(--ink); }
.ann-nav:hover svg { transform: scale(1.25); }

/* ---------- header ---------- */
.top {
  position: sticky; top: 0; z-index: 30; background: rgba(248, 248, 245, .82);
  -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
  padding-top: env(safe-area-inset-top, 0px);
}
.top::after { bottom: -4px; }
.top-in { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 10px 18px; min-height: 84px; padding-block: 6px; }
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; min-width: 0; max-width: 100%; justify-self: start; }
.brand-mark { width: 56px; height: 56px; flex: none; transform: rotate(-8deg); transition: transform .25s; }
.brand:hover .brand-mark { transform: rotate(6deg) scale(1.06); }
.brand-mark svg { width: 100%; height: 100%; overflow: visible; }
.brand-text { display: flex; flex-direction: column; min-width: 0; line-height: .95; }
.brand-text strong { font-size: 33px; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 2px; }
.brand-text small { font-size: 15px; color: var(--pencil); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.tabs { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 26px; }
.tabs [role="tab"] {
  display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; padding: 4px 6px 6px;
  font-size: 26px; font-weight: 700; color: var(--ink); position: relative;
 white-space: nowrap;
}
.tabs [role="tab"] span:first-child { padding: 0 4px; }
.tabs [role="tab"]:hover span:first-child { text-decoration: underline wavy var(--red) 2px; text-underline-offset: 6px; }
.tabs [role="tab"][aria-selected="true"] span:first-child {
  background: linear-gradient(transparent 52%, var(--hl) 52%, var(--hl) 92%, transparent 92%);
  text-decoration: none; display: inline-block; transform: rotate(-1.5deg);
}
.count:not(:empty) {
  font-size: 15px; font-weight: 700; min-width: 28px; height: 28px; padding: 0 6px; border-radius: 50%;
  border: 2px solid var(--ink); display: inline-grid; place-items: center; line-height: 1; transform: rotate(6deg);
}

.top-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; justify-self: end; }
.lang { display: inline-flex; gap: 2px; }
.lang button {
  border: 2.5px solid transparent; background: transparent; border-radius: 50%; min-width: 44px; height: 40px; padding: 0 6px;
  font-size: 18px; font-weight: 700; color: var(--pencil);
}
.lang button[aria-pressed="true"] { color: var(--ink); border-color: var(--red); border-radius: var(--wobble); transform: rotate(-4deg); }
.bag {
  position: relative; width: 50px; height: 50px; border: 0; background: transparent; padding: 0;
  display: grid; place-items: center; color: var(--ink);
}
.bag svg { width: 38px; height: 38px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; transition: transform .15s; }
.bag:hover svg { transform: rotate(-6deg) scale(1.06); }
.bag .bag-heart { fill: none; stroke: var(--red); }
.bag.has .bag-heart { fill: var(--red); }
.bag[aria-pressed="true"] svg { fill: var(--hl); }
.bag-count {
  position: absolute; top: 0; right: -2px; min-width: 24px; height: 24px; padding: 0 5px; border-radius: 50%;
  background: var(--red); color: var(--white); font-size: 15px; font-weight: 700; line-height: 24px; text-align: center;
  border: 2px solid var(--paper);
}

/* ---------- hero ---------- */
.hero { position: relative; padding-top: clamp(28px, 5vw, 56px); padding-bottom: 18px; }
.hero h1 { font-size: clamp(2.6rem, 1.45rem + 4vw, 4.8rem); line-height: .95; margin: 0; max-width: 15.5ch; letter-spacing: -.01em; }
.marker {
  background: linear-gradient(transparent 50%, var(--hl-pink) 50%, var(--hl-pink) 88%, transparent 88%);
  padding: 0 .06em; -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.subtext { font-size: 20px; color: var(--pencil); margin: 12px 0 0; }
.subtext::before { content: "↳ "; color: var(--red); }
.lede { font-size: clamp(19px, 17px + .45vw, 23px); color: var(--ink-2); max-width: 38ch; margin: 14px 0 0; }
/* round sticker: a coin that flips between its word and an "i", and opens the info cloud */
.sticker {
  position: absolute; right: max(var(--gutter), env(safe-area-inset-right, 0px)); top: clamp(30px, 5vw, 60px);
  width: 150px; height: 150px; padding: 0; border: 0; border-radius: 50%; background: none;
  color: var(--red); cursor: pointer; perspective: 700px;
  transform: rotate(-14deg); animation: sticker-hop 2.8s ease-in-out infinite;
}
.sticker:hover { animation-play-state: paused; }
.sticker-coin {
  position: relative; display: grid; place-items: center; width: 100%; height: 100%; text-align: center;
  background: rgba(255, 255, 255, .35); border: 3.5px solid var(--red); border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(255, 255, 255, .35), 0 0 0 7.5px var(--red);
  transform-style: preserve-3d; transition: transform .75s cubic-bezier(.35, 1.45, .5, 1), background .15s;
}
.sticker.flip .sticker-coin { transform: rotateY(180deg); }
.sticker:hover .sticker-coin { background: var(--hatch), rgba(255, 255, 255, .6); }
.sticker:focus-visible { outline: 3px dashed var(--ink); outline-offset: 12px; }
.sticker-face { grid-area: 1 / 1; font-weight: 700; line-height: .9; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.sticker-word { font-size: 33px; padding: 0 14px; transform: rotateY(0deg); }   /* the transform keeps Safari from showing both sides */
.sticker-i { font-size: 112px; line-height: 1; padding-bottom: 12px; transform: rotateY(180deg); -webkit-text-stroke-width: .045em; }
/* sways a little, then hops twice, so it is clear you can press it */
@keyframes sticker-hop {
  0%, 100% { transform: rotate(-14deg); }
  20% { transform: rotate(-8deg) scale(1.03); }
  40% { transform: rotate(-14deg); }
  52% { transform: translateY(-14px) rotate(-5deg) scale(1.08); }
  62% { transform: translateY(0) rotate(-18deg) scale(.97); }
  72% { transform: translateY(-7px) rotate(-9deg) scale(1.04); }
  82% { transform: translateY(0) rotate(-15deg); }
}
/* "druck druff": a scribbled arrow pointing at the sticker (sits below-left of it, nudging towards it) */
.poke {
  --nx: 5px; --ny: -4px;
  position: absolute; z-index: 1; pointer-events: none; color: var(--ink);
  right: calc(max(var(--gutter), env(safe-area-inset-right, 0px)) + 157px); top: calc(clamp(30px, 5vw, 60px) + 155px);
  transform: rotate(-4deg);
}
.poke-in { display: flex; align-items: flex-end; animation: poke-nudge 1.4s ease-in-out infinite; }
.poke-text { font-size: 25px; font-weight: 700; line-height: 1; white-space: nowrap; margin-bottom: -6px; -webkit-text-stroke-width: .04em; }
.poke-arrow { flex: none; overflow: visible; }
.poke-arrow path { fill: none; stroke: var(--ink); stroke-width: 2.6px; stroke-linecap: round; stroke-linejoin: round; }
.poke-side { width: 64px; height: 48px; margin-left: 4px; }
.poke-up { display: none; width: 30px; height: 36px; }
@keyframes poke-nudge { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(var(--nx), var(--ny)); } }

/* ---------- toolbar (count, my hearts, sort) ---------- */
.view { padding-top: 22px; padding-bottom: 28px; scroll-margin-top: 110px; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; margin-bottom: 26px; }
.toolbar-left { display: flex; align-items: center; gap: 10px 16px; flex-wrap: wrap; }
.count-line { font-size: 21px; color: var(--pencil); }
.chip {
  display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 1px 14px 3px;
  border: 2.5px solid var(--ink); border-radius: var(--wobble); background: var(--paper-2);
  font-size: 18px; font-weight: 700;
}
.chip svg { width: 19px; height: 19px; fill: none; stroke: var(--red); stroke-width: 2.4; stroke-linejoin: round; }
.chip:hover { background: var(--tint-1); }
.chip[aria-pressed="true"] { background: var(--red); color: var(--white); }
.chip[aria-pressed="true"] svg { fill: var(--white); stroke: var(--white); }
.sort { display: inline-flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 700; }
.sort select {
  -webkit-appearance: none; appearance: none; min-height: 42px; padding: 1px 38px 3px 14px;
  border: 2.5px solid var(--ink); border-radius: var(--wobble); background-color: var(--paper-2);
  font-size: 18px; font-weight: 400; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6' fill='none' stroke='%2318181b' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 20px;
}

/* ---------- product tiles ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 34px 26px; padding-top: 8px; }
.card {
  position: relative; display: flex; flex-direction: column; min-width: 0;
  background: var(--tint-0); border: 2.5px solid transparent; border-radius: var(--wobble-soft);
  box-shadow: var(--shadow); transition: transform .18s ease, box-shadow .18s ease;
}
.card.tint-1 { background: var(--tint-1); }
.card.tint-2 { background: var(--tint-2); }
.card.tint-3 { background: var(--tint-3); }
.card.tint-4 { background: var(--tint-4); }
.card:nth-child(3n + 1) { transform: rotate(-.6deg); }
.card:nth-child(3n + 2) { transform: rotate(.5deg); }
.card:nth-child(3n) { transform: rotate(-.2deg); }
.card:hover { transform: rotate(0) translate(-2px, -3px); box-shadow: none; }
/* quick double pen outline instead of a plain border */
.card::after, .card::before {
  content: ""; position: absolute; pointer-events: none; border-radius: var(--wobble-soft); filter: url(#rough);
}
.card::after { inset: -2px; border: 2.4px solid var(--ink); }
.card::before { inset: 2px -4px -4px 2px; border: 1.3px solid var(--ink); opacity: .6; transform: rotate(.7deg); }
.card:nth-child(even)::before { inset: -4px 2px 3px -4px; transform: rotate(-.6deg); }

.tile {
  position: relative; display: block; width: 100%; max-width: 100%; aspect-ratio: 4 / 3.2;
  border: 0; padding: 0; margin: 0; background: transparent; cursor: zoom-in; border-radius: inherit;
}
/* the picture sits on the tile like a photo with a white frame */
.tile img {
  position: absolute; inset: 0; margin: auto; display: block;
  width: auto; height: auto; max-width: calc(100% - 30px); max-height: calc(100% - 30px);
  padding: 5px; background: var(--white); border-radius: 3px;
  box-shadow: 0 0 0 2px var(--ink);
  transform: rotate(-1deg); transition: transform .3s cubic-bezier(.2, .8, .2, 1);
}
.card:nth-child(even) .tile img { transform: rotate(1.2deg); }
.tile:hover img, .card:nth-child(even) .tile:hover img { transform: rotate(0) scale(1.03); }
.tile.broken img { visibility: hidden; }
.tile.broken::after {
  content: ""; position: absolute; inset: 0; margin: auto; width: 56px; height: 56px; opacity: .5;
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M30 28 L42 20 Q50 30 58 20 L70 28 L82 44 L72 52 L68 46 L68 80 L32 80 L32 46 L28 52 L18 44 Z' fill='none' stroke='%2318181b' stroke-width='4' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.badges { position: absolute; left: 8px; bottom: 6px; display: flex; gap: 6px; pointer-events: none; }
.badge { font-size: 16px; font-weight: 700; line-height: 1; padding: 6px 10px 8px; border: 2px solid var(--ink); }
.badge-new { background: var(--red); color: var(--white); border-radius: 50%; transform: rotate(-10deg); }
.badge-example { background: var(--paper-2); color: var(--ink); border-radius: var(--wobble); transform: rotate(4deg); }
.tools { position: absolute; top: 10px; right: 10px; display: flex; gap: 6px; z-index: 3; }
.tool {
  width: 38px; height: 38px; border-radius: 10px 6px 11px 7px; border: 2px solid var(--ink);
  background: var(--paper-2); color: var(--ink); display: grid; place-items: center; padding: 0;
  box-shadow: none;
}
.tool:hover { background: var(--hl); }
.tool-danger { color: var(--red-dark); }
.tool svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

.card-body { display: flex; flex-direction: column; gap: 12px; padding: 4px 16px 16px; flex: 1; }
.card-text { min-width: 0; }
.no { font-size: 15px; color: var(--pencil); }
.card-title { font-size: 23px; line-height: 1; margin: 2px 0 0; text-transform: uppercase; overflow-wrap: break-word; }
.card-note { font-size: 18px; color: var(--pencil); margin: 4px 0 0; overflow-wrap: anywhere; }
.card-price { font-size: 19px; margin: 4px 0 0; font-weight: 700; }
.spec-link {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 18px; font-weight: 700;
  color: var(--ink); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px;
}
.spec-link:hover { text-decoration-style: wavy; text-decoration-color: var(--red); }
.spec-link svg, .spec-name svg, .spec-current svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* heart button, the "add to cart" of this shop */
.heart {
  position: relative; margin-top: auto; width: 100%; min-height: 48px; padding: 2px 10px 5px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-align: center;
  border: 2.5px solid var(--ink); border-radius: var(--wobble); background: var(--paper-2); color: var(--ink);
  font-weight: 700; font-size: 21px; line-height: 1; box-shadow: none;
  transition: background .12s, color .12s, transform .12s, box-shadow .12s;
}
.heart:hover { background: var(--hl); transform: translate(-1px, -1px); box-shadow: none; }
.heart:active { transform: translate(2px, 2px); box-shadow: none; }
.heart-icon { width: 24px; height: 24px; flex: none; fill: none; stroke: var(--red); stroke-width: 2.3; stroke-linejoin: round; }
.heart[aria-pressed="true"] { background: var(--red); color: var(--white); }
.heart[aria-pressed="true"]:hover { background: var(--red-dark); }
.heart[aria-pressed="true"] .heart-icon { fill: var(--white); stroke: var(--white); }
.heart.busy { cursor: progress; }
.heart.pop .heart-icon { animation: heart-pop .55s cubic-bezier(.3, 1.6, .5, 1); }
.heart.pop::after {
  content: ""; position: absolute; inset: -4px; border-radius: inherit; border: 2.5px dashed var(--red);
  animation: heart-ring .6s ease-out forwards; pointer-events: none;
}
@keyframes heart-pop { 0% { transform: scale(1); } 35% { transform: scale(1.6) rotate(-12deg); } 65% { transform: scale(.85) rotate(6deg); } 100% { transform: scale(1); } }
@keyframes heart-ring { from { opacity: 1; transform: scale(1); } to { opacity: 0; transform: scale(1.1, 1.6) rotate(-3deg); } }
.heart-lg { width: auto; padding: 2px 26px 5px; min-height: 52px; font-size: 22px; }

/* empty, loading and error states */
.state {
  display: grid; justify-items: center; gap: 8px; text-align: center;
  padding: 48px 20px; border: 2.5px dashed var(--ink); border-radius: var(--wobble-soft); background: var(--paper-2);
}
.state h3 { font-size: 29px; margin: 4px 0 0; }
.state p { margin: 0; color: var(--pencil); max-width: 34ch; font-size: 21px; }
.state .btn { margin-top: 10px; }
.state-art { width: 70px; height: 70px; border-radius: 50%; border: 2.5px solid var(--ink); background: var(--hl); display: grid; place-items: center; transform: rotate(-8deg); }
.state-art svg { width: 34px; height: 34px; fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linejoin: round; }
.state-topEmpty .state-art svg, .state-mineEmpty .state-art svg { stroke: var(--red); }
.spinner {
  width: 34px; height: 34px; border-radius: 50%; border: 3px dashed var(--ink); border-top-color: transparent;
  animation: spin 1s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- top 3 podium ---------- */
.top-head h2 { font-size: clamp(2.05rem, 1.55rem + 1.7vw, 2.9rem); line-height: 1; margin: 0; }
.top-head p { color: var(--pencil); margin: 8px 0 0; max-width: 46ch; font-size: 21px; }
.podium {
  list-style: none; margin: 40px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; align-items: end;
}
.pod { display: flex; flex-direction: column; min-width: 0; }
.pod-1 { order: 2; }
.pod-2 { order: 1; }
.pod-3 { order: 3; }
.pod-card {
  position: relative; background: var(--tint-0); border: 2.5px solid var(--ink); border-bottom: 0;
  border-radius: 18px 8px 0 0; min-width: 0;
}
.pod-1 .pod-card { background: var(--tint-2); }
.pod-2 .pod-card { background: var(--tint-0); }
.pod-3 .pod-card { background: var(--tint-1); }
.pod-1 .pod-card::before {
  content: "★"; position: absolute; top: -26px; left: 50%; transform: translateX(-50%) rotate(-8deg);
  font-size: 34px; color: var(--gold); -webkit-text-stroke: 2px var(--ink); line-height: 1;
}
.pod-text { padding: 2px 14px 14px; }
.pod-text .card-title { margin-top: 0; font-size: 22px; }
.pod-free .pod-card { background: transparent; border-style: dashed; aspect-ratio: 4 / 3.8; display: grid; place-items: center; }
.pod-open { margin: 0; color: var(--pencil); font-size: 22px; transform: rotate(-4deg); }
.pod-step {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--ink); border: 2.5px solid var(--ink); border-radius: 0 0 10px 16px;
}
.pod-1 .pod-step { height: 160px; background: repeating-linear-gradient(-45deg, rgba(24, 24, 27, .13) 0 2px, transparent 2px 9px), var(--gold); }
.pod-2 .pod-step { height: 118px; background: repeating-linear-gradient(-45deg, rgba(24, 24, 27, .13) 0 2px, transparent 2px 9px), var(--silver); }
.pod-3 .pod-step { height: 88px; background: repeating-linear-gradient(-45deg, rgba(24, 24, 27, .13) 0 2px, transparent 2px 9px), var(--bronze); }
.pod-num { font-size: 65px; font-weight: 700; line-height: .85; }
.pod-3 .pod-num { font-size: 50px; }
.pod-medal { font-size: 21px; font-weight: 700; }
.top-updated { text-align: center; font-size: 18px; color: var(--pencil); margin: 24px 0 0; }

@media (max-width: 760px) {
  .podium { grid-template-columns: 1fr; gap: 18px; }
  .pod { order: 0; display: grid; grid-template-columns: 86px minmax(0, 1fr); }
  .pod-step { order: -1; height: auto !important; border-radius: 16px 0 0 10px; }
  .pod-card { border: 2.5px solid var(--ink); border-left: 0; border-radius: 0 16px 10px 0; display: grid; grid-template-columns: minmax(0, 44%) minmax(0, 1fr); align-items: center; }
  .pod-free .pod-card { border: 2.5px dashed var(--ink); border-left: 0; aspect-ratio: auto; min-height: 100px; grid-template-columns: 1fr; }
  .pod-text { padding: 10px 12px; }
  .pod-text .card-title { font-size: 19px; }
  .pod-num, .pod-3 .pod-num { font-size: 45px; }
  .pod-medal { font-size: 17px; }
  .pod-1 .pod-card::before { top: -18px; left: auto; right: 12px; transform: rotate(10deg); font-size: 28px; }
}

/* ---------- footer ---------- */
.foot { position: relative; margin-top: 56px; }
.foot::before { top: -4px; }
.foot-in {
  display: flex; align-items: center; justify-content: space-between; gap: 6px 24px; flex-wrap: wrap;
  padding-block: 22px calc(22px + env(safe-area-inset-bottom, 0px)); font-size: 18px; color: var(--pencil);
}
.foot-in p { margin: 0; }
.foot-name { font-weight: 700; color: var(--ink); }
/* "Datenschutz": a full-width line under the footer that opens on click */
.foot-privacy { flex-basis: 100%; }
.foot-privacy summary { display: inline-block; cursor: pointer; list-style: none; font-size: 17px; }
.foot-privacy summary::-webkit-details-marker { display: none; }
.foot-privacy summary::after { content: ' +'; }
.foot-privacy[open] summary::after { content: ' –'; }
.foot-privacy p { max-width: 68ch; margin-top: 6px; font-size: 16px; line-height: 1.45; }

/* ---------- dialogs ---------- */
.dlg {
  border: 3px solid var(--ink); padding: 0; border-radius: 22px 10px 20px 12px / 12px 20px 10px 22px;
  background: var(--paper-2); color: var(--ink); box-shadow: none;
  width: min(580px, calc(100vw - 28px)); max-height: calc(100dvh - 28px); overflow: auto;
}
.dlg::backdrop { background: var(--backdrop); }
.dlg[open] { animation: dlg-in .25s cubic-bezier(.2, .8, .2, 1); }
@keyframes dlg-in { from { opacity: 0; transform: translateY(14px) rotate(-1.5deg); } }
/* a click next to the new-design or contact form: it stays open and wiggles a little */
.dlg[open].wiggle { animation: dlg-wiggle .45s ease; }
@keyframes dlg-wiggle {
  20% { transform: translateX(-8px) rotate(-1deg); }
  40% { transform: translateX(7px) rotate(.8deg); }
  60% { transform: translateX(-4px) rotate(-.4deg); }
  80% { transform: translateX(2px); }
}
.dlg-narrow { width: min(450px, calc(100vw - 28px)); }
.dlg-form form, .dlg-form > .dlg-head, .dlg-form > .dlg-text, .dlg-form > .form-error, .dlg-form > .dlg-foot { padding-left: 24px; padding-right: 24px; }
.dlg-form form { padding-top: 18px; padding-bottom: 24px; }
#del-dlg { padding-block: 20px 24px; }
.dlg-form form .dlg-head, .dlg-form form .dlg-text, .dlg-form form .form-error, .dlg-form form .dlg-foot { padding-left: 0; padding-right: 0; }
.dlg-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.dlg-head h2 { font-size: 33px; line-height: 1; margin: 0; }
.dlg-text { color: var(--ink-2); margin: 0 0 4px; font-size: 20px; }
.dlg-foot { display: flex; justify-content: flex-end; align-items: center; gap: 12px; margin-top: 20px; flex-wrap: wrap; }
.form-error { color: var(--red-dark); font-size: 19px; font-weight: 700; margin: 12px 0 0; min-height: 1.3em; }
.form-error:empty { min-height: 0; margin: 0; }

.field { display: grid; gap: 4px; margin-top: 16px; }
.field > span { font-size: 21px; font-weight: 700; }
.field em { font-style: normal; font-weight: 400; color: var(--pencil); }
.field input {
  height: 50px; border: 2.5px solid var(--ink); border-radius: var(--wobble); padding: 0 16px 2px;
  background: var(--white); color: var(--ink); font-size: 22px; width: 100%; min-width: 0;
}
.field input::placeholder { color: var(--pencil); opacity: .75; }
.field input:focus { outline: none; box-shadow: 0 0 0 4px var(--hl); }

.drop {
  position: relative; display: grid; place-items: center; min-height: 220px; text-align: center;
  border: 2.5px dashed var(--ink); border-radius: var(--wobble-soft); background: var(--tint-2); padding: 20px;
  transition: background .15s;
}
.drop.over { background: var(--hl); }
.drop.has-image { padding: 10px; border-style: solid; background: var(--tint-0); overflow: hidden; }
.drop-empty { display: grid; justify-items: center; gap: 4px; }
.drop-empty svg { width: 40px; height: 40px; fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.drop-empty p { margin: 2px 0 0; font-size: 22px; }
.drop-empty small { color: var(--pencil); font-size: 17px; max-width: 34ch; }
#drop-preview { display: block; width: 100%; height: 300px; object-fit: contain; cursor: pointer; }
.drop-change { position: absolute; right: 12px; bottom: 12px; }
.drop-views { position: absolute; left: 10px; bottom: 10px; font-size: 15px; line-height: 1; padding: 5px 9px 7px; border: 2px solid var(--ink); border-radius: var(--wobble); background: var(--white); transform: rotate(2deg); }
.drop-studio { position: absolute; top: 10px; left: 10px; font-size: 16px; font-weight: 700; line-height: 1; padding: 6px 10px 8px; border: 2px solid var(--ink); border-radius: var(--wobble); background: var(--hl); transform: rotate(-3deg); }
.drop-spinner { display: none; position: absolute; inset: 0; margin: auto; }
.drop.working > :not(.drop-spinner) { opacity: .25; pointer-events: none; }
.drop.working .drop-spinner { display: block; }
.spec-row { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; min-height: 40px; }
.spec-name { display: inline-flex; align-items: center; gap: 7px; font-size: 19px; min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
.spec-current { display: inline-flex; align-items: center; gap: 7px; color: var(--ink); font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }

/* large view: the whole garment on the left, everything else in a panel on the right */
.dlg-lightbox {
  width: min(1400px, calc(100vw - 28px)); height: min(880px, calc(100dvh - 28px));
  max-height: none; overflow: hidden;
}
.lb-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; height: 100%; }
.lb-stage {
  position: relative; min-width: 0; min-height: 0; padding: 26px 74px 66px;
  background: var(--tint-0); border-right: 2.5px solid var(--ink); overflow: hidden;
}
.lb-flat { position: relative; width: 100%; height: 100%; }
/* positioned so the whole picture always fits, whatever its size */
#lb-img {
  position: absolute; inset: 0; margin: auto; display: block;
  max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain;
  background: var(--white); padding: 6px; box-shadow: 0 0 0 2px var(--ink);
}
/* the cut-out shirt floats on the page, no photo frame */
.lb-flat.cutout #lb-img { background: transparent; padding: 0; box-shadow: none; width: 100%; height: 100%; }
/* the magnifying glass (front and back view, mouse over the shirt): the glass shows the picture
   1.8x bigger, the frame is drawn like the rest of the site; the mouse pointer hides behind it */
.lb-flat.loupe-on { cursor: none; }
.lb-loupe { position: absolute; left: 0; top: 0; z-index: 3; width: 168px; height: 168px; pointer-events: none; will-change: transform; }
.lb-loupe[hidden] { display: none; }
.loupe-pop { position: absolute; inset: 0; transform-origin: 50% 50%; animation: loupe-in .2s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes loupe-in { from { transform: scale(.4) rotate(-12deg); opacity: 0; } }
.loupe-glass { position: absolute; inset: 3px; border-radius: 50%; background-color: var(--white); background-repeat: no-repeat; }
.loupe-frame { position: absolute; left: 0; top: 0; overflow: visible; }
.loupe-frame path, .loupe-frame rect, .loupe-frame circle { stroke: var(--ink); stroke-linecap: round; stroke-linejoin: round; filter: url(#rough); }
.loupe-ring { fill: none; stroke-width: 5px; }
.loupe-ring2 { fill: none; stroke-width: 1.6px; opacity: .55; }
.loupe-neck { fill: var(--white); stroke-width: 3.5px; }
.loupe-grip { fill: var(--white); stroke-width: 4px; }
.loupe-hatch { fill: none; stroke-width: 2px; opacity: .7; }
.loupe-frame .loupe-glare { fill: none; stroke: var(--white); stroke-width: 6px; opacity: .9; filter: none; }
.lb-3d { position: absolute; inset: 26px 74px 66px; display: grid; place-items: center; perspective: 1400px; }
.item-bob { position: relative; width: min(100%, 640px); height: 88%; transform-style: preserve-3d; animation: item-bob 2.8s ease-in-out infinite; }
.item-spin { position: absolute; inset: 0; transform-style: preserve-3d; animation: item-spin 7s linear infinite; --edge: #8e8e8e; }
.item-face { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; }
.item-front, .item-back { -webkit-backface-visibility: hidden; backface-visibility: hidden; }
/* the sides: plain silhouettes in one colour */
.item-edge {
  background: var(--edge);
  -webkit-mask-size: contain; mask-size: contain;
  -webkit-mask-position: center; mask-position: center;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
}
/* a band standing crosswise in the middle: what you see when the shirt is exactly side-on */
.item-side { position: absolute; left: 50%; background: var(--edge); transform: rotateY(90deg); }
.item-shadow {
  position: absolute; left: 50%; bottom: 0; width: 46%; height: 16px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(24, 24, 27, .22), transparent);
  transform: translateX(-50%); animation: item-shade 2.8s ease-in-out infinite;
}
@keyframes item-spin { from { transform: rotateY(0deg); } to { transform: rotateY(360deg); } }
@keyframes item-bob { 0%, 100% { transform: translateY(-3%); } 50% { transform: translateY(3%); } }
@keyframes item-shade { 0%, 100% { transform: translateX(-50%) scale(.78); opacity: .55; } 50% { transform: translateX(-50%) scale(1); opacity: 1; } }
.lb-views { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); display: flex; gap: 8px; z-index: 2; }
.lb-pill {
  border: 2px solid var(--ink); border-radius: var(--wobble); background: var(--white); color: var(--ink);
  font-size: 18px; line-height: 1; padding: 5px 14px 7px; min-width: 64px; white-space: nowrap;
}
.lb-pill:hover { background: var(--hatch), var(--white); }
.lb-pill[aria-pressed="true"] { background: var(--ink); color: var(--white); }
.lb-nav {
  position: absolute; z-index: 3; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%;
  border: 2.5px solid var(--ink); background: var(--paper-2); color: var(--ink);
  display: grid; place-items: center; padding: 0; box-shadow: none;
}
.lb-nav:hover { background: var(--hatch), var(--white); }
.lb-prev { left: 14px; }
.lb-next { right: 14px; }
.lb-close { position: absolute; z-index: 4; top: 14px; right: 14px; box-shadow: none; background: var(--white); }
.lb-side { display: flex; flex-direction: column; gap: 22px; min-width: 0; min-height: 0; padding: 72px 24px 22px; overflow-y: auto; }
.lb-text { min-width: 0; }
.lb-text h2 { font-size: 33px; line-height: 1; margin: 4px 0 0; text-transform: uppercase; overflow-wrap: break-word; }
.lb-actions { display: flex; flex-direction: column; align-items: stretch; gap: 12px; }
.lb-actions > div, .lb-actions .btn, .lb-actions .heart-lg { width: 100%; }
.lb-step { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 17px; }
.lb-step > * { white-space: nowrap; }
.lb-step span { color: var(--pencil); }

/* small screens: garment on top, panel below */
@media (max-width: 820px) {
  .dlg-lightbox { height: calc(100dvh - 24px); width: calc(100vw - 24px); }
  .lb-layout { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; }
  .lb-stage { padding: 16px 50px 58px; border-right: 0; border-bottom: 2.5px solid var(--ink); }
  .lb-3d { inset: 16px 50px 58px; }
  .lb-side { padding: 16px; gap: 14px; max-height: 46dvh; }
  .lb-text h2 { font-size: 27px; }
  .lb-nav { width: 42px; height: 42px; }
  .lb-prev { left: 6px; }
  .lb-next { right: 6px; }
  .lb-pill { font-size: 15px; min-width: 50px; padding: 4px 9px 6px; }
  .lb-step { font-size: 15px; }
}

/* toast: a sticky note (popover, so it also shows above open dialogs) */
.toast {
  position: fixed; inset: auto auto calc(22px + env(safe-area-inset-bottom, 0px)) 50%; margin: 0;
  transform: translateX(-50%) rotate(-2deg); z-index: 100;
  background: var(--hl); color: var(--ink); padding: 10px 20px 12px; border: 2.5px solid var(--ink); border-radius: 4px;
  font-weight: 700; font-size: 20px; box-shadow: none;
  max-width: calc(100vw - 32px); width: max-content; text-align: center; overflow: visible;
  opacity: 0; pointer-events: none;
}
.toast.show { opacity: 1; animation: toast-in .3s cubic-bezier(.2, .8, .2, 1); }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 16px) rotate(4deg); } }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- smaller screens ---------- */
@media (max-width: 980px) {
  .sticker { width: 120px; height: 120px; }
  .sticker-word { font-size: 26px; }
  .sticker-i { font-size: 90px; }
  .poke { right: calc(max(var(--gutter), env(safe-area-inset-right, 0px)) + 128px); top: calc(clamp(30px, 5vw, 60px) + 127px); }
}
@media (max-width: 820px) {
  .top-in { grid-template-columns: minmax(0, 1fr) auto; min-height: 0; padding-block: 8px 10px; }
  .tabs { grid-column: 1 / -1; order: 3; }
  /* phones: a smaller sticker in the corner, so the info is reachable there too */
  .sticker { width: 84px; height: 84px; top: 14px; }
  .sticker-coin { border-width: 2.5px; box-shadow: 0 0 0 3.5px rgba(255, 255, 255, .35), 0 0 0 5.5px var(--red); }
  .sticker-word { font-size: 17px; padding: 0 8px; }
  .sticker-i { font-size: 64px; padding-bottom: 7px; }
  .hero h1 { padding-right: 78px; }
  /* phones: the arrow points straight up from under the sticker */
  .poke { --nx: 0px; right: calc(max(var(--gutter), env(safe-area-inset-right, 0px)) - 3px); top: 115px; width: 90px; }
  .poke-in { flex-direction: column-reverse; align-items: center; }
  .poke-text { font-size: 17px; margin: 0; }
  .poke-side { display: none; }
  .poke-up { display: block; width: 22px; height: 26px; }
}
@media (max-width: 560px) {
  :root { --gutter: 14px; }
  body { font-size: 18px; }
  .announce p { font-size: 15px; }
  .brand-mark { width: 40px; height: 40px; }
  .brand { gap: 6px; }
  .brand-text strong { font-size: 25px; }
  .brand-text small { display: none; }
  .top-actions { gap: 6px; }
  .lang button { min-width: 34px; padding: 0 4px; font-size: 16px; }
  .bag { width: 44px; }
  #btn-new { width: 42px; min-height: 42px; padding: 0; }
  #btn-new span { display: none; }
  .tabs [role="tab"] { font-size: 23px; }
  .hero h1 { font-size: 2.65rem; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 14px; }
  .card-body { padding: 2px 8px 10px; gap: 10px; }
  .card-title { font-size: 17px; }
  .card-note, .card-price, .spec-link { font-size: 16px; }
  .heart { font-size: 15px; min-height: 44px; padding: 2px 3px 4px; gap: 4px; }
  .heart-icon { width: 18px; height: 18px; }
  .tile img { max-width: calc(100% - 18px); max-height: calc(100% - 18px); padding: 3px; }
  .badge { font-size: 14px; padding: 4px 7px 6px; }
  .tools { top: 6px; right: 6px; }
  .tool { width: 34px; height: 34px; }
  .sort { font-size: 18px; }
  #drop-preview { height: 220px; }
}
@media (max-width: 360px) {
  .grid { grid-template-columns: 1fr; }
  .tabs { gap: 4px 14px; }
  .tabs [role="tab"] { font-size: 20px; margin-right: 0; }
  .brand-text strong { font-size: 22px; }
  .brand-mark { width: 34px; height: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .card:hover, .btn:hover, .heart:hover { transform: none; }
  .dlg[open].wiggle { outline: 4px solid var(--ink); outline-offset: 3px; }   /* no motion: a short frame instead */
}

/* ---------- diary look: black pen only, drawn quickly ---------- */
:root {
  --hatch: repeating-linear-gradient(-45deg, rgba(24, 24, 27, .2) 0 1.4px, transparent 1.4px 7px);
  --scribble: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 12' preserveAspectRatio='none'%3E%3Cpath d='M2 6C20 2 40 10 60 5S90 3 98 7M7 9.5C30 6.5 56 11.5 93 8' fill='none' stroke='%2318181b' stroke-width='2' stroke-linecap='round' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E");
}
::selection { background: #d9d9d6; }
.announce { background: rgba(255, 255, 255, .55); }
.btn.primary { background: var(--hatch), var(--white); }
.icon-btn:hover, .tool:hover, .lb-nav:hover, .chip:hover, .heart:hover, .drop.over { background: var(--hatch), var(--white); }
.heart[aria-pressed="true"]:hover { background: var(--ink); }
.tabs [role="tab"][aria-selected="true"] span:first-child { background: var(--scribble) left bottom / 100% 11px no-repeat; padding-bottom: 4px; }
.marker { background: var(--scribble) left 100% / 100% .22em no-repeat; padding: 0 .04em .06em; }
.link.strong { background: none; }
.state-art, .toast, .drop-studio { background: var(--white); }
.pod-1 .pod-card::before { color: var(--white); }
.pod-1 .pod-step { background: repeating-linear-gradient(45deg, rgba(24, 24, 27, .3) 0 1.4px, transparent 1.4px 6px), repeating-linear-gradient(-45deg, rgba(24, 24, 27, .3) 0 1.4px, transparent 1.4px 6px), var(--white); }
.pod-2 .pod-step { background: repeating-linear-gradient(-45deg, rgba(24, 24, 27, .28) 0 1.4px, transparent 1.4px 7px), var(--white); }
.pod-3 .pod-step { background: radial-gradient(rgba(24, 24, 27, .4) 1.2px, transparent 1.7px) 0 0 / 8px 8px, var(--white); }
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- the stick people hopping along the bottom ---------- */
body { --crew-room: 104px; padding-bottom: var(--crew-room); }   /* room below the footer; the easter-egg spots sit at its very bottom */
.crew {
  /* tall enough for the tallest kid at the top of a jump */
  position: fixed; left: 0; right: 0; bottom: 0; height: 190px; z-index: 20;
  pointer-events: none; overflow: hidden;
}
.mate { position: absolute; left: 0; bottom: calc(8px + env(safe-area-inset-bottom, 0px)); will-change: transform; }
.mate-body { display: block; transform-origin: 50% 100%; }
.mate svg { display: block; overflow: visible; }
.mate svg path { fill: none; stroke: var(--ink); stroke-width: 2.2px; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.mate svg .fill { fill: var(--ink); stroke: none; }
.mate svg text { font-family: var(--f-hand); fill: var(--ink); stroke: none; }
.mate.rest, .mate.rest .mate-body { transition: transform .3s cubic-bezier(.3, 1.6, .5, 1); }
@media (max-width: 560px) {
  body { --crew-room: 70px; }
  .crew { height: 150px; }
}

/* ---------- "Designed by" along the bottom of the picture, opposite "Neu" ---------- */
.tile-foot {
  position: absolute; left: 8px; right: 8px; bottom: 6px; z-index: 1;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 6px; pointer-events: none;
}
.tile-foot .badges { position: static; flex: none; }
.badge-wait { background: var(--white); color: var(--ink); border-style: dashed; border-radius: var(--wobble); transform: rotate(-3deg); }
.credit {
  margin-left: auto; min-width: 0; max-width: 72%;
  display: inline-flex; flex-direction: column; align-items: flex-end; text-align: right; line-height: 1.05;
  padding: 3px 9px 5px; background: var(--white); border: 2px solid var(--ink); border-radius: var(--wobble);
  transform: rotate(-2deg);
}
.credit-by { font-size: 12px; color: var(--pencil); white-space: nowrap; }
.credit-name { font-size: 16px; font-weight: 700; overflow-wrap: anywhere; -webkit-text-stroke-width: .035em; }
.credit .admin-tag { font-size: 15px; }
/* in the close-up and on the podium: a plain line */
.credit.credit-line {
  flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 2px 7px; max-width: 100%; margin: 8px 0 0;
  padding: 0; background: none; border: 0; border-radius: 0; transform: none; text-align: left;
}
.credit-line .credit-by { font-size: 17px; }
.credit-line .credit-name { font-size: 20px; }
.credit-line .admin-tag { font-size: 19px; }
.lb-credit { margin: 6px 0 0; }

/* the designer's alias: a crown tipped onto the corner of the first letter */
.admin-tag {
  position: relative; display: inline-block; margin: .55em 2px 0 .4em;
  font-weight: 700; line-height: 1.1; white-space: nowrap; color: var(--ink); -webkit-text-stroke-width: .035em;
}
.admin-tag .crown {
  position: absolute; left: -.5em; top: -.78em; width: 1.05em; height: 1.05em; transform: rotate(-24deg);
  fill: var(--ink); stroke: var(--ink); stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; overflow: visible;
}
.admin-name { position: relative; }
.foot-by { display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: 0 2px; color: var(--ink); }
.foot-by .admin-tag { font-size: 20px; }

/* ---------- designer: submissions waiting for approval ---------- */
.review {
  margin: 0 0 34px; padding: 18px 20px 20px; background: var(--tint-0);
  border: 2.5px dashed var(--ink); border-radius: var(--wobble-soft);
}
.review-head h2 { font-size: 31px; line-height: 1; margin: 0; display: flex; align-items: center; gap: 10px; }
.review-head p { margin: 6px 0 0; color: var(--pencil); font-size: 18px; }
.wait-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 430px), 1fr)); gap: 18px; margin-top: 16px; }
.wait-card {
  display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 12px; align-items: start; min-width: 0;
  padding: 10px; background: var(--white); border: 2px solid var(--ink); border-radius: var(--wobble-soft);
}
.wait-tile { aspect-ratio: 1; }
.wait-tile img { max-width: calc(100% - 12px); max-height: calc(100% - 12px); padding: 3px; }
.wait-body { min-width: 0; }
.wait-body .card-title { font-size: 20px; margin-top: 2px; }
.wait-body .card-note { font-size: 16px; }
.wait-body .spec-link { font-size: 16px; }
.wait-meta { margin: 6px 0 0; font-size: 16px; color: var(--pencil); overflow-wrap: anywhere; }
.wait-meta strong { color: var(--ink); }
.wait-state, .lb-wait {
  display: inline-block; margin: 10px 0 0; font-size: 17px; font-weight: 700; padding: 3px 10px 5px;
  border: 2px dashed var(--ink); border-radius: var(--wobble); transform: rotate(-2deg); -webkit-text-stroke-width: .035em;
}
.wait-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; padding-top: 10px; border-top: 2px dashed var(--ink); }
.wait-actions .btn { flex: 1 1 auto; justify-content: center; }
.wait-actions .btn { gap: 5px; padding-inline: 10px 12px; }
.wait-actions .btn svg { width: 17px; height: 17px; }

/* ---------- the design page ---------- */
.design-cta { display: flex; flex-wrap: wrap; gap: 14px 18px; margin-top: 24px; }
.btn.lg { min-height: 58px; padding: 4px 26px 7px; font-size: 24px; text-decoration: none; color: var(--ink); }
.btn.lg svg { width: 24px; height: 24px; }
.design-hint { margin: 12px 0 0; color: var(--pencil); font-size: 18px; }
.steps { list-style: none; margin: 34px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 24px; }
.step { position: relative; padding: 16px 18px 18px; background: var(--tint-0); border-radius: var(--wobble-soft); }
.step::after {
  content: ""; position: absolute; inset: -2px; pointer-events: none;
  border: 2.4px solid var(--ink); border-radius: var(--wobble-soft); filter: url(#rough);
}
.step:nth-child(odd) { transform: rotate(-.6deg); }
.step:nth-child(even) { transform: rotate(.5deg); }
.step-no {
  display: inline-grid; place-items: center; width: 44px; height: 44px; padding-bottom: 3px; background: var(--white);
  border: 2.5px solid var(--ink); border-radius: 50%; font-size: 26px; font-weight: 700; transform: rotate(-8deg);
  -webkit-text-stroke-width: .035em;
}
.step h3 { font-size: 25px; line-height: 1; margin: 10px 0 0; }
.step p { margin: 8px 0 0; font-size: 18px; color: var(--ink-2); }
.formats { margin-top: 38px; }
.formats h3, .my-subs h3 { font-size: 29px; line-height: 1; margin: 0; }
.fmt-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 14px; max-width: 780px; }
.fmt { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; align-items: start; }
.fmt-mark {
  width: 36px; height: 36px; display: grid; place-items: center; background: var(--white);
  border: 2.4px solid var(--ink); border-radius: 50%; transform: rotate(-6deg);
}
.fmt-mark svg { width: 20px; height: 20px; fill: none; stroke: var(--ink); stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; }
.fmt-no .fmt-mark { border-style: dashed; }
.fmt-text strong { display: block; font-size: 21px; line-height: 1.1; }
.fmt-text span { display: block; margin-top: 2px; font-size: 18px; color: var(--pencil); }
.my-subs { margin-top: 40px; scroll-margin: 120px; }

/* ---------- the submission form ---------- */
.up-intro { margin: -4px 0 12px; font-size: 18px; }
.up-intro .link { font-size: inherit; }
.field-hint { font-size: 16px; color: var(--pencil); }

/* ---------- comments: + / − and a score out of 100 ---------- */
.cm { border-top: 2px dashed var(--ink); padding-top: 16px; }
.cm h3 { font-size: 25px; line-height: 1; margin: 0; display: flex; align-items: center; gap: 8px; }
.cm-form { display: grid; gap: 8px; margin-top: 12px; }
.cm-field { display: grid; grid-template-columns: 26px minmax(0, 1fr); align-items: start; gap: 6px; }
.cm-sign { font-size: 26px; font-weight: 700; line-height: 1; text-align: center; -webkit-text-stroke-width: .045em; }
.cm-field .cm-sign { padding-top: 7px; }
.cm-form textarea, .cm-row input {
  width: 100%; min-width: 0; min-height: 44px; padding: 6px 10px 8px; font-size: 18px; line-height: 1.25;
  color: var(--ink); background: var(--white); border: 2px solid var(--ink); border-radius: 10px 6px 11px 7px;
}
.cm-form textarea { resize: vertical; max-height: 240px; }
.cm-form textarea::placeholder, .cm-row input::placeholder { color: var(--pencil); opacity: .75; }
.cm-form textarea:focus, .cm-row input:focus { outline: none; box-shadow: 0 0 0 4px var(--hl); }
.cm-score { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; font-size: 18px; font-weight: 700; }
.cm-score-val { min-width: 4.3em; text-align: right; }
.cm-score output { font-size: 23px; }
#cm-score { -webkit-appearance: none; appearance: none; width: 100%; height: 30px; margin: 0; background: transparent; cursor: pointer; }
#cm-score:focus { outline: none; }
#cm-score:focus-visible { outline: 3px dashed var(--blue-pen); outline-offset: 2px; }
#cm-score::-webkit-slider-runnable-track { height: 6px; background: var(--white); border: 2px solid var(--ink); border-radius: 6px; }
#cm-score::-moz-range-track { height: 6px; background: var(--white); border: 2px solid var(--ink); border-radius: 6px; }
#cm-score::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 24px; height: 24px; margin-top: -11px;
  background: var(--hatch), var(--white); border: 2.5px solid var(--ink); border-radius: 52% 44% 50% 42%;
}
#cm-score::-moz-range-thumb { width: 19px; height: 19px; background: var(--white); border: 2.5px solid var(--ink); border-radius: 50%; }
.cm-row { display: flex; align-items: center; gap: 8px; }
.cm-row input { flex: 1; }
.cm-as { flex: 1; min-width: 0; font-size: 17px; color: var(--pencil); }
.cm-as .admin-tag { font-size: 18px; }
.cm-row .btn { flex: none; }
.cm-list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 12px; }
.cm-list:empty { display: none; }
.cm-item { padding: 9px 12px 11px; background: var(--white); border: 2px solid var(--ink); border-radius: var(--wobble-soft); }
.cm-item:nth-child(odd) { transform: rotate(-.4deg); }
.cm-item:nth-child(even) { transform: rotate(.3deg); }
.cm-head { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; }
.cm-head .admin-tag { font-size: 18px; }
.cm-who { font-size: 19px; overflow-wrap: anywhere; min-width: 0; }
.cm-mark {
  font-size: 16px; font-weight: 700; line-height: 1; padding: 4px 8px 6px; white-space: nowrap;
  border: 2px solid var(--ink); border-radius: 50%; transform: rotate(-4deg); -webkit-text-stroke-width: .035em;
}
.cm-time { font-size: 15px; color: var(--pencil); }
.cm-del { margin-left: auto; font-size: 15px; }
.cm-line { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 6px; margin: 6px 0 0; font-size: 18px; }
.cm-line .cm-sign { font-size: 22px; }
.cm-txt { overflow-wrap: anywhere; white-space: pre-wrap; }
.cm-state { margin: 12px 0 0; color: var(--pencil); font-size: 17px; }
.cm-state:empty { display: none; }

/* ---------- three tabs need the header's full width earlier ---------- */
@media (max-width: 1120px) {
  .top-in { grid-template-columns: minmax(0, 1fr) auto; min-height: 0; padding-block: 8px 10px; }
  .tabs { grid-column: 1 / -1; order: 3; }
}
@media (max-width: 560px) {
  .tabs { gap: 4px 10px; flex-wrap: nowrap; }
  .tabs [role="tab"] { font-size: 18px; padding: 4px 2px 6px; gap: 5px; }
  .tabs .count:not(:empty) { min-width: 24px; height: 24px; font-size: 13px; }
  .credit { max-width: 66%; padding: 2px 6px 4px; }
  .credit-by { font-size: 11px; }
  .credit-name { font-size: 14px; }
  .credit .admin-tag { font-size: 13px; }
  .tile-foot { left: 5px; right: 5px; bottom: 4px; gap: 4px; }
  .review { padding: 14px 12px 14px; }
  .review-head h2 { font-size: 26px; }
  .wait-card { grid-template-columns: 96px minmax(0, 1fr); gap: 10px; padding: 8px; }
  .design-cta .btn { flex: 1 1 100%; }
  .btn.lg { font-size: 21px; min-height: 54px; }
  .steps { gap: 18px; margin-top: 26px; }
  .step h3 { font-size: 23px; }
  .step p, .fmt-text span { font-size: 17px; }
  .fmt-text strong { font-size: 19px; }
  .cm-score { grid-template-columns: minmax(0, 1fr) auto; }
  .cm-score label { grid-column: 1 / -1; }
}
@media (max-width: 360px) {
  .tabs { gap: 2px 6px; }
  .tabs [role="tab"] { font-size: 16px; padding-inline: 1px; }
  .tabs [role="tab"] span:first-child { padding: 0 2px; }
}

/* ---------- info cloud (opens from the round sticker) ----------
   A cloud like in primary school: the bumpy outline is drawn by app.js around the text box,
   with a few small clouds drifting around it. */
.cloud-dlg {
  --bump: 46px;                                   /* room for the bumps around the text */
  border: 0; padding: calc(var(--bump) + 8px); margin: auto; background: transparent; color: var(--ink);
  width: min(680px, 100vw); max-width: 100vw; max-height: 100dvh; overflow: visible;
}
.cloud-dlg::backdrop { background: var(--backdrop); }
.cloud { position: relative; padding: 46px 54px 38px; }
.cloud-line {
  position: absolute; z-index: 0; left: calc(-1 * var(--bump)); top: calc(-1 * var(--bump));
  width: calc(100% + 2 * var(--bump)); height: calc(100% + 2 * var(--bump)); overflow: visible; pointer-events: none;
}
.cloud-line path, .puff path { stroke: var(--ink); stroke-linejoin: round; stroke-linecap: round; filter: url(#rough); }
.cloud-line .cl-1 { fill: var(--white); stroke-width: 3px; pointer-events: visiblePainted; }
.cloud-line .cl-2 { fill: none; stroke-width: 1.4px; opacity: .55; transform: translate(4px, 5px) rotate(.4deg); }
.cloud-body {
  position: relative; z-index: 1; overflow: auto; overscroll-behavior: contain;
  max-height: calc(100dvh - 2 * (var(--bump) + 8px) - 44px);
}
.cloud-body h2 { font-size: 36px; line-height: 1; margin: 0 48px 14px 0; }
.cloud-text p { margin: 0 0 11px; font-size: 20px; line-height: 1.38; color: var(--ink-2); }
.cloud-ok { display: flex; width: fit-content; margin: 16px 0 2px auto; }
.cloud-x { position: absolute; z-index: 2; top: 22px; right: 26px; border-color: transparent; background: transparent; }

/* the small clouds: pop in, then drift around slowly, each in its own rhythm */
.puff { position: absolute; z-index: 0; display: block; pointer-events: none; }
.puff svg { display: block; overflow: visible; animation: drift-a 7s ease-in-out infinite; }
.puff path { fill: var(--white); stroke-width: 2.4px; }
.puff-1 { left: -14px; top: -6px; }
.puff-2 { right: 6px; top: -30px; }
.puff-3 { right: -34px; top: -62px; }
.puff-4 { right: -22px; bottom: -4px; }
.puff-2 svg { animation-name: drift-b; animation-duration: 6s; animation-delay: -2s; }
.puff-3 svg { animation-name: drift-a; animation-duration: 5s; animation-delay: -1s; animation-direction: reverse; }
.puff-4 svg { animation-name: drift-b; animation-duration: 9s; animation-delay: -4s; }
@keyframes drift-a {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(9px, -7px) rotate(3deg); }
  66% { transform: translate(-6px, 5px) rotate(-2deg); }
}
@keyframes drift-b {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  40% { transform: translate(-10px, 6px) rotate(-3deg); }
  75% { transform: translate(5px, -8px) rotate(2deg); }
}
.cloud-dlg[open] .cloud { animation: cloud-in .5s cubic-bezier(.3, 1.5, .5, 1) both; transform-origin: 88% 0; }
.cloud-dlg[open] .puff { animation: puff-in .4s cubic-bezier(.3, 1.6, .5, 1) both; }
.cloud-dlg[open] .puff-1 { animation-delay: .18s; }
.cloud-dlg[open] .puff-2 { animation-delay: .1s; }
.cloud-dlg[open] .puff-3 { animation-delay: .02s; }
.cloud-dlg[open] .puff-4 { animation-delay: .26s; }
@keyframes cloud-in { from { opacity: 0; transform: scale(.35) rotate(5deg); } }
/* easter eggs: invisible spots in the very bottom corners of the page (no pointer cursor, nothing to see) */
.egg {
  position: absolute; bottom: calc(-1 * var(--crew-room, 0px)); z-index: 21; width: 64px; height: 64px; padding: 0; margin: 0;
  border: 0; background: transparent; cursor: default; -webkit-tap-highlight-color: transparent;
}
.egg:focus { outline: none; }
.egg-left { left: 0; }
.egg-right { right: 0; }
/* their cloud: one line, a bit narrower, popping out of the corner that was clicked */
.cloud-dlg.egg-cloud { width: min(660px, 100vw); }
.cloud-dlg.egg-cloud .cloud-body h2 { font-size: 33px; margin-bottom: 4px; line-height: 1.12; white-space: pre-line; }
.cloud-dlg.egg-from-left[open] .cloud { transform-origin: 0 100%; }
.cloud-dlg.egg-from-right[open] .cloud { transform-origin: 100% 100%; }
@keyframes puff-in { from { opacity: 0; transform: scale(.2); } }

@media (max-width: 560px) {
  .cloud-dlg { --bump: 32px; padding: calc(var(--bump) + 6px) calc(var(--bump) + 2px); }
  .cloud { padding: 28px 24px 22px 26px; }
  .cloud-body h2 { font-size: 29px; margin-right: 40px; }
  .cloud-text p { font-size: 18px; margin-bottom: 9px; }
  .cloud-x { top: 12px; right: 12px; }
  .puff-1 { left: -18px; top: -14px; }
  .puff-3 { right: -14px; top: -52px; }
  .puff-4 { right: -14px; bottom: -14px; }
}

/* ---------- sort "Alles ufem Chopf": the whole design grid turned on its head ---------- */
.grid { transition: transform .8s cubic-bezier(.45, -.25, .3, 1.3); }
.grid.upside { transform: rotate(180deg); }

/* ---------- contact form (footer → «Kontakt») ---------- */
.foot-dot { margin: 0 4px; }
.field textarea {
  min-height: 140px; max-height: 50dvh; resize: vertical; width: 100%; min-width: 0;
  border: 2.5px solid var(--ink); border-radius: var(--wobble-soft); padding: 10px 16px 12px;
  background: var(--white); color: var(--ink); font-size: 20px; line-height: 1.35;
}
.field textarea:focus { outline: none; box-shadow: 0 0 0 4px var(--hl); }

/* ---------- designer only: hearts per design on each card ---------- */
.admin-hearts {
  display: inline-flex; align-items: center; gap: 6px; width: fit-content; margin: 2px 0 0;
  padding: 1px 10px 3px; border: 2px dashed var(--ink); border-radius: var(--wobble);
  font-size: 17px; font-weight: 700; line-height: 1.2; -webkit-text-stroke-width: .035em; transform: rotate(-1.5deg);
}
.admin-hearts[hidden] { display: none; }
.admin-hearts svg { width: 16px; height: 16px; flex: none; fill: var(--ink); stroke: none; }

/* ---------- upload form: put a logo on a white T-shirt ---------- */
.tee-field { display: flex; align-items: flex-start; gap: 10px; margin-top: 12px; cursor: pointer; }
.tee-field[hidden] { display: none; }
.tee-field input { flex: none; width: 22px; height: 22px; margin: 3px 0 0; accent-color: var(--ink); cursor: pointer; }
.tee-field span { display: grid; gap: 2px; }
.tee-field strong { font-size: 20px; line-height: 1.2; }
.tee-field small { font-size: 16px; line-height: 1.3; color: var(--pencil); }

/* moving the logo on the shirt: drag it on the preview, size slider underneath */
.drop.tee-move #drop-preview { cursor: grab; touch-action: none; }
.drop.tee-dragging #drop-preview { cursor: grabbing; }
.tee-logo { position: absolute; z-index: 2; pointer-events: none; }
.tee-logo[hidden] { display: none; }
.tee-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; margin-top: 8px; font-size: 17px; }
.tee-tools[hidden] { display: none; }
.tee-tools p { flex-basis: 100%; margin: 0; font-size: 16px; color: var(--pencil); }
.tee-size { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
.tee-size input { width: 170px; max-width: 50vw; accent-color: var(--ink); }
/* small screens: the label goes to the top right, so it does not cover the "other picture" button */
@media (max-width: 560px) {
  .drop-views { top: 10px; right: 10px; bottom: auto; left: auto; }
}
