/* Skjærematta: Christian Halvorsens arbeidsbord sett rett ovenfra. */

:root {
  --mat: #1f6b55;
  --mat-deep: #174f3f;
  --print: 216 238 222;
  --desk: #cdbb97;
  --paper: #fbfaf5;
  --card: #f7f1df;
  --kraft: #c9a36f;
  --ink: #23231f;
  --pen: #1f3566;
  --red: #c4472f;
  --tape: rgba(236, 223, 182, .93);
  --hand: 'Covered By Your Grace', 'Bradley Hand', 'Segoe Print', cursive;
  --sans: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --type: 'Courier Prime', 'Courier New', Courier, monospace;
  --edge: 18px;
  --gap: 6px;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--desk) repeating-linear-gradient(91deg, rgba(110, 82, 44, .09) 0 2px, transparent 2px 9px);
  color: var(--ink);
  font-family: var(--sans);
  overflow-x: clip;
}

img, svg { max-width: 100%; }

.defs { position: absolute; }

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

a { color: var(--pen); text-decoration-thickness: .07em; text-underline-offset: .2em; }
a:hover { text-decoration-thickness: .14em; }

:focus-visible { outline: 3px solid #ffe07a; outline-offset: 3px; border-radius: 2px; }

/* ---------- Matta ---------- */

.mat {
  position: relative;
  margin: var(--gap);
  padding: var(--edge);
  border-radius: 14px;
  overflow: clip;
  background-color: var(--mat);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .5 -.14'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    radial-gradient(closest-side, rgba(255, 255, 255, .06), transparent),
    radial-gradient(closest-side, rgba(0, 20, 12, .13), transparent),
    radial-gradient(closest-side, rgba(255, 255, 255, .045), transparent);
  background-size: 240px 240px, 1300px 1100px, 1500px 1340px, 900px 1700px;
  background-position: 0 0, -200px -150px, 420px 380px, 60% 900px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .16),
    inset 0 0 0 1px rgba(0, 0, 0, .18),
    inset 0 0 90px rgba(4, 30, 22, .28),
    0 1px 2px rgba(60, 40, 10, .5),
    0 8px 22px rgba(60, 40, 10, .35);
}

.field { position: relative; container-type: inline-size; }

.sheet {
  --n: 11;
  --cm: calc(100cqw / var(--n));
  position: relative;
  width: calc(var(--n) * var(--cm));
  margin-inline: auto;
}

@supports (width: round(down, 10px, 1px)) {
  .sheet { --cm: min(46px, round(down, calc(100cqw / var(--n)), 1px)); }
}

.cm-probe { position: absolute; width: var(--cm); height: 0; visibility: hidden; }

.grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  --l1: rgb(var(--print) / .16);
  --l5: rgb(var(--print) / .4);
  background:
    linear-gradient(to right, var(--l5) 1.5px, transparent 1.5px) 0 0 / calc(5 * var(--cm)) 100%,
    linear-gradient(to bottom, var(--l5) 1.5px, transparent 1.5px) 0 0 / 100% calc(5 * var(--cm)),
    linear-gradient(to right, var(--l1) 1px, transparent 1px) 0 0 / var(--cm) 100%,
    linear-gradient(to bottom, var(--l1) 1px, transparent 1px) 0 0 / 100% var(--cm);
  box-shadow: 0 0 0 1.5px rgb(var(--print) / .5);
}

.nums {
  position: absolute;
  pointer-events: none;
  font: 600 9px/1 var(--sans);
  color: rgb(var(--print) / .7);
}
.nums span { position: absolute; translate: -50% -50%; }
.nums--top { left: 0; top: calc(var(--edge) * -1); width: 100%; height: var(--edge); }
.nums--top span { left: calc(var(--k) * var(--cm)); top: 50%; }
.nums--left { top: 0; left: calc(var(--edge) * -1); width: var(--edge); height: 100%; }
.nums--left span { top: calc(var(--k) * var(--cm)); left: 50%; }

.angles {
  position: absolute;
  left: 0;
  top: 0;
  width: calc(26 * var(--cm));
  height: calc(26 * var(--cm));
  overflow: visible;
  pointer-events: none;
}
.angles path { fill: none; stroke: rgb(var(--print) / .3); stroke-width: 1.3px; vector-effect: non-scaling-stroke; }
.angles text { font: 600 34px var(--sans); fill: rgb(var(--print) / .62); }
.angles--br { left: auto; top: auto; right: 0; bottom: 0; rotate: 180deg; }

.cuts { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; pointer-events: none; }

/* ---------- Bordet og tingene ---------- */

.bench {
  --messy: 1;
  position: relative;
  font-size: 1rem;
  line-height: 1.45;
}
.bench.is-tidy { --messy: 0; }

.zone { display: contents; }

.obj {
  --sh: 1px 1px 1.5px rgba(5, 22, 16, .36), 2px 5px 9px rgba(5, 22, 16, .28), 6px 13px 24px rgba(5, 22, 16, .14);
  --fsh: drop-shadow(1px 1.5px 1px rgba(5, 22, 16, .42)) drop-shadow(3px 7px 7px rgba(5, 22, 16, .28));
  margin: 0;
  z-index: var(--z, 2);
  scale: 1;
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  cursor: grab;
  transition: scale .3s cubic-bezier(.3, 1.5, .5, 1), rotate .34s cubic-bezier(.3, 1.4, .5, 1);
  animation: land .5s cubic-bezier(.2, .8, .3, 1) backwards;
  animation-delay: calc(var(--i, 0) * 45ms);
}
.obj.is-held {
  --sh: 2px 3px 4px rgba(5, 22, 16, .14), 12px 26px 38px rgba(5, 22, 16, .36), 24px 46px 64px rgba(5, 22, 16, .2);
  --fsh: drop-shadow(3px 5px 3px rgba(5, 22, 16, .18)) drop-shadow(14px 28px 22px rgba(5, 22, 16, .4));
  scale: 1.04;
  transition-duration: .16s, .2s;
}
.obj.is-dragging { cursor: grabbing; }
.bench.is-sorting .obj { transition: none; }
.obj:focus-visible { outline-offset: 5px; }
.obj img { -webkit-user-drag: none; user-drag: none; }

@keyframes land {
  from { opacity: 0; scale: 1.1; }
}

/* Etikettmaskin: navnet */
.dymo {
  display: grid;
  justify-items: start;
  gap: .13em;
  font: 700 1.72em/1 var(--sans);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: #f4f3ee;
}
.dymo span {
  display: block;
  padding: .32em .5em .32em .7em;
  white-space: nowrap;
  border-radius: .05em;
  background: linear-gradient(180deg, #3a3b40 0, #1c1d20 9%, #0d0e10 50%, #1b1c1f 90%, #35363b 100%);
  box-shadow: var(--sh);
  text-shadow: 0 0 .03em #fff, 0 .05em .03em rgba(0, 0, 0, .95), 0 -.035em .06em rgba(255, 255, 255, .34);
  transition: box-shadow .25s;
}
.dymo span + span { margin-left: .72em; rotate: 1.2deg; }

/* Maskeringstape med tusj */
.tape-label {
  font: 400 1.5em/1.12 var(--hand);
  color: var(--ink);
  filter: drop-shadow(0 1px 1px rgba(5, 22, 16, .35));
  transition: scale .3s cubic-bezier(.3, 1.5, .5, 1), rotate .34s cubic-bezier(.3, 1.4, .5, 1), filter .25s;
}
.tape-label.is-held { filter: drop-shadow(8px 16px 12px rgba(5, 22, 16, .4)); }
.tape-label > span,
.tp {
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .1) 0 2px, transparent 2px 6px),
    linear-gradient(180deg, rgba(255, 255, 255, .16), transparent 30%, rgba(120, 96, 40, .1)),
    var(--tape);
  clip-path: polygon(0 0, 100% 0, calc(100% - .14em) 17%, 100% 34%, calc(100% - .16em) 52%, 100% 68%, calc(100% - .1em) 85%, 100% 100%, 0 100%, .13em 84%, 0 66%, .16em 49%, 0 33%, .1em 15%);
}
.tape-label > span { display: block; padding: .3em 1em .22em .9em; }
.tape-label--h { font-size: 1.95em; }
.tape-label--h > span { padding: .26em 1.1em .18em 1em; }
.tape-label--hint { color: #3a3a34; }
.tape-label a { color: inherit; display: inline-flex; align-items: center; min-height: 44px; margin-block: -10px; }
.for-touch { display: none; }
@media (pointer: coarse) {
  .for-mouse { display: none; }
  .for-touch { display: inline; }
}

.tp {
  position: absolute;
  z-index: 3;
  width: 5.2em;
  height: 1.5em;
  pointer-events: none;
}
.tp--tl { left: -1.7em; top: .3em; rotate: -40deg; }
.tp--tr { right: -1.7em; top: .25em; rotate: 37deg; }
.tp--r { right: -1.5em; top: 30%; width: 4.2em; rotate: 86deg; }
.tp--top { left: 50%; top: -.8em; width: 6.2em; margin-left: -3.1em; rotate: -3deg; }
.tp--skew { margin-left: -1.6em; rotate: 4deg; }
.tp--washi {
  left: 50%;
  top: -.72em;
  width: 7.4em;
  margin-left: -3.7em;
  rotate: 2deg;
  background: repeating-linear-gradient(-55deg, rgba(196, 71, 47, .93) 0 .34em, rgba(232, 160, 138, .93) .34em .52em);
}

/* Logomerket */
.sticker {
  width: 3.5em;
  padding: .16em;
  background: #fff;
  border-radius: 24%;
  box-shadow: var(--sh);
  transition: scale .3s cubic-bezier(.3, 1.5, .5, 1), rotate .34s cubic-bezier(.3, 1.4, .5, 1), box-shadow .25s;
}
.sticker img { display: block; width: 100%; height: auto; border-radius: 22%; }

/* Fotoutskrifter */
.print { width: 20em; perspective: 1600px; }
.print__inner {
  display: grid;
  transform-style: preserve-3d;
  transition: transform .7s cubic-bezier(.35, .1, .2, 1);
}
.print.is-flipped .print__inner { transform: rotateY(180deg); }
.face {
  position: relative;
  grid-area: 1 / 1;
  min-width: 0;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  background: var(--paper);
  border-radius: 2px;
  box-shadow: var(--sh);
  transition: box-shadow .25s;
}
.face--front { display: flex; flex-direction: column; padding: .7em .7em 0; }
.face--front img {
  display: block;
  width: 100%;
  height: auto;
  min-height: 0;
  flex: 1 0 auto;
  aspect-ratio: 720 / 508;
  object-fit: cover;
  object-position: 0 0;
  background: #d8dbd4;
  outline: 1px solid rgba(0, 0, 0, .08);
  outline-offset: -1px;
}
.print__cap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .4em;
  min-height: 3.5em;
  padding: 0 0 .1em .25em;
}
.print__cap h3,
.print__cap p { margin: 0; font: 400 1.75em/1 var(--hand); color: var(--pen); }
.print__cap small { margin-left: .2em; font-size: .7em; opacity: .78; }

.flip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35em;
  min-width: 44px;
  min-height: 44px;
  padding: 0 .45em;
  border: 0;
  border-radius: 4px;
  background: none;
  color: #55574f;
  font: 600 .88em/1 var(--sans);
  cursor: pointer;
}
.flip svg { width: 1.35em; height: 1.35em; flex: none; }
.flip:hover { color: var(--red); }
.flip--back { position: absolute; right: .2em; bottom: .15em; }

.face--back {
  display: flex;
  flex-direction: column;
  padding: 1.1em 1.2em .5em;
  transform: rotateY(180deg);
  background: #f4f1e6 linear-gradient(115deg, rgba(255, 255, 255, .5), transparent 40%);
}
.face--back p { margin: 0 0 .55em; line-height: 1.42; }
.face--back .back__title { margin: 0 0 .1em; font: 400 1.9em/1 var(--hand); color: var(--pen); }
.face--back .back__role { font-weight: 700; font-size: .92em; line-height: 1.3; }
.face--back .back__links { display: flex; flex-wrap: wrap; gap: 0 1.3em; margin: auto 2.6em 0 0; font-weight: 600; }
.back__links a { display: inline-flex; align-items: center; min-height: 44px; }
.face--back .back__hand { margin: .3em 0 0; font: 400 1.34em/1.1 var(--hand); color: var(--pen); }

.print--portrait { width: 11em; }
.print--portrait .face--front { padding: .55em .55em 0; }
.print--portrait .face--front img { aspect-ratio: 4 / 5; object-position: 50% 16%; }
.print--portrait .print__cap { min-height: 2.9em; padding-left: .15em; }
.print--portrait .print__cap p { font-size: 1.22em; white-space: nowrap; }
.print--portrait .face--back { padding: .9em .9em .8em; }
.print--portrait .back__title { font-size: 1.55em; margin-right: 1.4em; }
.print--portrait .flip--back { top: 0; right: 0; bottom: auto; }
.clip {
  position: absolute;
  left: 64%;
  top: -1.2em;
  z-index: 3;
  width: 1.5em;
  height: 3.6em;
  rotate: 9deg;
  pointer-events: none;
}

/* Kaffekoppen og ringen etter den */
.coaster { position: relative; }
.ring {
  position: absolute;
  left: -22%;
  top: 14%;
  z-index: 1;
  width: 6.6em;
  aspect-ratio: 1;
  border-radius: 50%;
  pointer-events: none;
  background:
    radial-gradient(closest-side, transparent 79%, rgba(58, 30, 8, .3) 84%, rgba(58, 30, 8, .78) 91%, rgba(58, 30, 8, .45) 95%, transparent 98%),
    conic-gradient(from 40deg, transparent 0 8%, rgba(58, 30, 8, .16) 20% 46%, transparent 60% 100%);
  -webkit-mask: radial-gradient(closest-side, transparent 78%, #000 83%, #000 97%, transparent 99%), conic-gradient(from 200deg, #000 0 74%, transparent 80% 86%, #000 92%);
  mask: radial-gradient(closest-side, transparent 78%, #000 83%, #000 97%, transparent 99%), conic-gradient(from 200deg, #000 0 74%, transparent 80% 86%, #000 92%);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}
.mug { width: 7.4em; }
.mug, .pencil, .knife, .tag {
  filter: var(--fsh);
  transition: scale .3s cubic-bezier(.3, 1.5, .5, 1), rotate .34s cubic-bezier(.3, 1.4, .5, 1), filter .25s;
}
.mug svg, .pencil svg, .knife svg, .ruler svg { display: block; width: 100%; height: auto; }

.pencil { width: 19em; }
.knife { width: calc(8.6 * var(--cm)); }
.ruler {
  width: calc(10.8 * var(--cm));
  border-radius: 2px;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .12) 0 1px, transparent 1px 3px),
    linear-gradient(180deg, #f1f3f4 0, #cfd4d8 16%, #e3e6e8 44%, #b3babf 100%);
  box-shadow: var(--sh), inset 0 0 0 1px rgba(60, 68, 74, .35);
  transition: scale .3s cubic-bezier(.3, 1.5, .5, 1), rotate .34s cubic-bezier(.3, 1.4, .5, 1), box-shadow .25s;
}

/* Kartotekkort */
.card {
  background-color: var(--card);
  border-radius: 3px;
  box-shadow: var(--sh);
  transition: scale .3s cubic-bezier(.3, 1.5, .5, 1), rotate .34s cubic-bezier(.3, 1.4, .5, 1), box-shadow .25s;
}
.card--intro {
  --lh: 1.72em;
  --head: 3.7em;
  width: 19.6em;
  padding: 0 1.3em 1.2em;
  font-family: var(--type);
  background-image:
    linear-gradient(rgba(196, 71, 47, .6), rgba(196, 71, 47, .6)),
    linear-gradient(var(--card), var(--card)),
    linear-gradient(to bottom, transparent calc(100% - 1px), rgba(64, 116, 168, .36) calc(100% - 1px));
  background-size: 100% 1.5px, 100% var(--head), 100% var(--lh);
  background-position: 0 var(--head), 0 0, 0 var(--head);
  background-repeat: no-repeat, no-repeat, repeat-y;
}
.card--intro h2 {
  display: flex;
  align-items: flex-end;
  height: calc(3.7em / 2.15);
  margin: 0;
  padding-bottom: .16em;
  font: 400 2.15em/1 var(--hand);
  color: var(--pen);
}
.card--intro p { margin: 0; padding-top: .36em; line-height: 1.72; }

.card--list { width: 19.6em; padding: 1.2em 1.3em .7em; }
.card--list h3 { margin: 0 0 .5em; font: 400 1.95em/1 var(--hand); color: var(--pen); }
.card--list ul { margin: 0; padding: 0; list-style: none; font-family: var(--type); line-height: 1.38; }
.card--list li { display: grid; grid-template-columns: 1.35em 1fr; gap: .55em; padding: .42em 0; border-bottom: 1px solid rgba(64, 116, 168, .3); }
.card--list li svg { width: 1.35em; height: 1.25em; margin-top: .05em; color: var(--red); }
.card__links { display: flex; flex-wrap: wrap; gap: 0 1.4em; margin: .25em 0 0; font-weight: 600; }
.card__links a { display: inline-flex; align-items: center; min-height: 44px; }

/* Lappen ved kaffekoppen */
.scrap {
  width: 10.4em;
  padding: 1.15em .85em .8em;
  background: #fdfcf6 linear-gradient(178deg, rgba(0, 0, 0, .04), transparent 14%);
  box-shadow: var(--sh);
  font: 400 1.4em/1.14 var(--hand);
  color: var(--pen);
  transition: scale .3s cubic-bezier(.3, 1.5, .5, 1), rotate .34s cubic-bezier(.3, 1.4, .5, 1), box-shadow .25s;
}
.scrap .tp { font-size: .72em; }

/* Potetrykk */
.paws {
  width: 13.5em;
  padding: .8em .9em .75em;
  background: var(--paper);
  box-shadow: var(--sh);
  transition: scale .3s cubic-bezier(.3, 1.5, .5, 1), rotate .34s cubic-bezier(.3, 1.4, .5, 1), box-shadow .25s;
}
.paws__sets { display: grid; grid-template-columns: 1fr 1fr; gap: .8em; }
.paws__set { text-align: center; }
.paws__set svg { display: block; width: 100%; height: auto; opacity: .86; }
.paws__set--a svg { fill: #25345f; }
.paws__set--b svg { fill: #b23e28; }
.paws__set span { display: block; font: 400 1.4em/1 var(--hand); color: var(--pen); }
.paws figcaption { margin-top: .55em; padding-top: .5em; border-top: 1px dashed rgba(35, 35, 31, .3); font: 400 1em/1.3 var(--type); text-align: center; }

/* Gule lapper */
.sticky {
  width: 15.5em;
  aspect-ratio: 1;
  padding: 1.5em 1.15em 1.2em;
  background: linear-gradient(176deg, #e9cb4f 0, #f3d962 10%, #f6de70 100%);
  border-radius: 1px 1px 2.8em 1px / 1px 1px .6em 1px;
  box-shadow: var(--sh);
  transition: scale .3s cubic-bezier(.3, 1.5, .5, 1), rotate .34s cubic-bezier(.3, 1.4, .5, 1), box-shadow .25s;
}
.sticky--b { background: linear-gradient(176deg, #ecd25c 0, #f6df73 10%, #f8e37f 100%); border-radius: 1px 1px 1px 2.6em / 1px 1px 1px .55em; }
.sticky--c { background: linear-gradient(176deg, #e6c646 0, #f1d558 10%, #f4da66 100%); }
.sticky h3 { margin: 0 0 .4em; font: 400 1.78em/1.02 var(--hand); color: var(--ink); }
.sticky p { margin: 0; line-height: 1.42; color: #2d2a16; }

/* Prislapper i kraftpapir */
.tag { width: 9.7em; padding-top: .9em; }
.tag__twine { position: absolute; left: 50%; top: -1.1em; z-index: 1; width: 3em; height: 3.5em; margin-left: -1.5em; max-width: none; pointer-events: none; }
.tag__paper {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 11.8em;
  padding: 2.6em .8em .9em;
  text-align: center;
  color: #2a1c0e;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='k'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9 .35' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .3 0 0 0 0 .2 0 0 0 0 .08 0 0 0 .55 -.16'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23k)'/%3E%3C/svg%3E"),
    linear-gradient(160deg, #d2ae7b, var(--kraft) 55%, #bd965f);
  clip-path: polygon(26% 0, 74% 0, 100% 2.1em, 100% 100%, 0 100%, 0 2.1em);
  -webkit-mask: radial-gradient(circle at 50% 1.1em, transparent .3em, #000 .34em);
  mask: radial-gradient(circle at 50% 1.1em, transparent .3em, #000 .34em);
}
.tag__paper::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 1.1em;
  width: 1.5em;
  height: 1.5em;
  translate: -50% -50%;
  border: .43em solid #ead9b6;
  border-radius: 50%;
}
.tag h3 { margin: 0; font: 700 1.06em/1.2 var(--sans); }
.tag__note { margin: .35em 0 0; font-size: .9em; line-height: 1.25; }
.tag__price { margin: auto 0 0; padding-top: .5em; font: 400 1.62em/1 var(--hand); white-space: nowrap; }

/* Visittkort */
.bizcard {
  display: flex;
  align-items: center;
  gap: .9em;
  width: 19.6em;
  padding: 1em 1.1em;
  background: #fcfbf7;
  border-radius: 3px;
  box-shadow: var(--sh);
  transition: scale .3s cubic-bezier(.3, 1.5, .5, 1), rotate .34s cubic-bezier(.3, 1.4, .5, 1), box-shadow .25s;
}
.bizcard img { flex: none; width: 2.9em; height: auto; border-radius: 22%; }
.bizcard p { margin: 0; }
.bizcard__name { font-weight: 700; font-size: 1.14em; letter-spacing: -.01em; }
.bizcard__role { font-size: .94em; line-height: 1.3; color: #55564e; }
.bizcard__lines { display: grid; justify-items: start; margin-top: .2em !important; font-weight: 600; }
.bizcard__lines a { display: inline-flex; align-items: center; min-height: 44px; }

/* Rutearket med nettsidesjekken */
.pad {
  width: 18.5em;
  padding: 2.5em 1.3em .7em;
  background-color: #fcfcf9;
  background-image:
    radial-gradient(circle at 50% 50%, var(--mat-deep) 0 .26em, transparent .3em),
    linear-gradient(to right, rgba(64, 116, 168, .17) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(64, 116, 168, .17) 1px, transparent 1px);
  background-size: 1.6em 1.5em, .8em .8em, .8em .8em;
  background-position: .2em .25em, 0 0, 0 0;
  background-repeat: repeat-x, repeat, repeat;
  box-shadow: var(--sh);
  transition: scale .3s cubic-bezier(.3, 1.5, .5, 1), rotate .34s cubic-bezier(.3, 1.4, .5, 1), box-shadow .25s;
}
.pad h3 {
  display: inline-block;
  margin: 0 0 .35em;
  padding-bottom: .12em;
  font: 400 2.1em/1 var(--hand);
  color: var(--pen);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 8' preserveAspectRatio='none'%3E%3Cpath d='M2 5c30-4 62 3 96-1s66-2 100 1' fill='none' stroke='%23c4472f' stroke-width='2.6' stroke-linecap='round'/%3E%3C/svg%3E") 0 100% / 100% .22em no-repeat;
}
.pad p { margin: 0 0 .5em; line-height: 1.45; }
.pad__link { font-weight: 700; }
.pad__link a { display: inline-flex; align-items: center; min-height: 44px; }

/* Trykket på matta (bunntekst) */
.matprint {
  position: relative;
  padding: 1.5rem .5rem 5.5rem;
  color: rgb(var(--print) / .94);
  font-size: 1rem;
  line-height: 1.5;
}
.matprint p { margin: 0 0 .2rem; max-width: 34rem; }
.matprint__brand { font-weight: 700; font-size: 1.35rem; letter-spacing: -.01em; }
.matprint__brand i { display: inline-block; width: .34em; height: .34em; margin-left: .12em; border-radius: 50%; background: #e2603f; }
.matprint__links { display: flex; flex-wrap: wrap; gap: 0 1.5rem; }
.matprint a { display: inline-flex; align-items: center; min-height: 44px; color: inherit; }
.matprint__geo { margin-top: .6rem !important; font-weight: 600; letter-spacing: .14em; color: rgb(var(--print) / .7); }

/* Etikettmaskin: knappen */
.tidy {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 2000;
  min-height: 48px;
  padding: .95em 1em .95em 1.2em;
  border: 0;
  border-radius: 3px;
  background: linear-gradient(180deg, #e8795f 0, #cf4d33 10%, #b83f28 50%, #c4472f 90%, #e06d53 100%);
  box-shadow: 1px 2px 2px rgba(5, 22, 16, .4), 4px 9px 16px rgba(5, 22, 16, .38);
  color: #fff8f1;
  font: 700 .9rem/1 var(--sans);
  letter-spacing: .17em;
  text-transform: uppercase;
  text-shadow: 0 0 .04em #fff, 0 .06em .04em rgba(70, 10, 0, .85), 0 -.04em .06em rgba(255, 255, 255, .4);
  rotate: -2deg;
  cursor: pointer;
  transition: rotate .3s cubic-bezier(.3, 1.5, .5, 1), scale .15s;
}
.tidy:hover { scale: 1.03; }
.tidy:active { scale: .97; }
.tidy.is-on { rotate: 0deg; }
.tidy:focus-visible { outline-offset: 4px; }

/* ---------- Flytende oppsett: mobil og nettbrett ---------- */

@media (max-width: 1179.98px) {
  .bench {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem .4rem;
    justify-items: center;
    align-items: center;
    padding: .6rem 0 2.5rem;
  }
  .obj {
    position: relative;
    grid-column: 1 / -1;
    max-width: 100%;
    translate: calc(var(--mx, 0) * var(--messy) * 1px + var(--ux, 0px)) var(--uy, 0px);
    rotate: calc(var(--fr, var(--r, 0deg)) * var(--messy) + var(--ur, 0deg));
  }
  .obj.is-held { rotate: calc((var(--fr, var(--r, 0deg)) * var(--messy) + var(--ur, 0deg)) * .35); }

  .sticker { grid-row: 1; justify-self: end; align-self: start; margin: .5rem .7rem 0 0; }
  .dymo { grid-row: 1; justify-self: start; margin: .9rem 0 0 .4rem; }
  .tape-label--sub { justify-self: start; margin-left: 1.1rem; font-size: 1.3em; }
  .tape-label--hint { max-width: 100%; font-size: 1.22em; }
  .print--portrait .print__cap p { font-size: 1.1em; }
  .face--back .back__role, .tag__note, .bizcard__role { font-size: 1em; }
  .print--portrait .face--back { padding: .8em .75em .6em; }
  .print--portrait .face--back .back__hand { font-size: 1.16em; line-height: 1.08; margin-top: .25em; }
  .print--portrait .face--back .back__title { font-size: 1.4em; }
  .print--portrait { grid-column: 1; justify-self: end; margin-right: .2rem; }
  .coaster { grid-column: 2; justify-self: start; margin-left: 1.4rem; }
  .scrap { justify-self: end; margin-right: .7rem; }
  .paws { justify-self: start; margin-left: .7rem; }
  .tape-label--h { justify-self: start; margin: 2.6rem 0 .2rem .3rem; font-size: 1.72em; }
  .print__cap h3 { font-size: 1.62em; }
  .knife { justify-self: start; margin: .5rem 0 .2rem .6rem; }
  .sticky { justify-self: start; margin-left: .5rem; }
  .sticky--b { justify-self: end; margin: -1.2rem .5rem 0 0; }
  .sticky--c { margin-top: -1.2rem; }
  .tag { grid-column: span 1; margin-top: .7rem; }
  .tag:nth-of-type(5) { grid-column: 1 / -1; margin-top: -.4rem; }

  .bench.is-tidy .obj,
  .bench.is-tidy .coaster { justify-self: center; margin-left: 0; margin-right: 0; }
  .bench.is-tidy .print--portrait,
  .bench.is-tidy .coaster { grid-column: 1 / -1; }
  .bench.is-tidy .sticker,
  .bench.is-tidy .dymo { grid-row: auto; }
  .bench.is-tidy .sticky,
  .bench.is-tidy .tag:nth-of-type(5) { margin-top: .7rem; }
}

@media (min-width: 700px) and (max-width: 1179.98px) {
  :root { --edge: 30px; --gap: 10px; }
  .sheet { --n: 20; }
  .nums { font-size: 10px; }
  .bench { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2.4rem 1rem; padding: 1.2rem 1rem 3rem; font-size: 1.0625rem; }
  .obj { grid-column: span 2; }
  .sticker, .dymo, .tape-label--h { grid-column: 1 / -1; }
  .dymo { font-size: 2.3em; }
  .tape-label--h { font-size: 1.95em; }
  .print__cap h3 { font-size: 1.75em; }
  .print--portrait { grid-column: span 2; }
  .coaster { grid-column: span 2; }
  .tag, .tag:nth-of-type(5) { grid-column: span 1; margin-top: 0; }
  .tag__price { font-size: 1.36em; }
  .print__cap small { font-size: .62em; }
  .sticky--b, .sticky--c { margin-top: 0; }
  .bench.is-tidy .print--portrait,
  .bench.is-tidy .coaster { grid-column: span 2; }
  .bench.is-tidy .tag:nth-of-type(5),
  .bench.is-tidy .sticky { margin-top: 0; }
  .tidy { right: 22px; bottom: 20px; }
}
@media (min-width: 940px) and (max-width: 1179.98px) {
  .sheet { --n: 26; }
}

/* ---------- Komponert oppsett: desktop ---------- */

@media (min-width: 1180px) {
  :root { --edge: 36px; --gap: 14px; }
  .mat { border-radius: 20px; }
  .sheet { --n: 36; }
  .nums { font-size: 10.5px; }
  .bench {
    height: calc(90 * var(--cm));
    font-size: max(14px, calc(var(--cm) * .45));
  }
  .coaster { display: contents; }
  .obj {
    position: absolute;
    left: calc((var(--x) * var(--messy) + var(--gx) * (1 - var(--messy))) * var(--cm));
    top: calc((var(--y) * var(--messy) + var(--gy) * (1 - var(--messy))) * var(--cm));
    width: calc(var(--w) * var(--cm));
    translate: var(--ux, 0px) var(--uy, 0px);
    rotate: calc(var(--r, 0deg) * var(--messy) + var(--ur, 0deg));
  }
  .obj.is-held { rotate: calc((var(--r, 0deg) * var(--messy) + var(--ur, 0deg)) * .35); }
  .ring { left: calc(16.5 * var(--cm)); top: calc(16.1 * var(--cm)); width: calc(4.5 * var(--cm)); }
  .dymo { font-size: 2.7em; }
  .tape-label { white-space: nowrap; }
  .matprint { padding: 0 calc(2 * var(--cm)) 2.2rem; font-size: 1.02rem; }
  .matprint__geo { position: absolute; right: calc(2 * var(--cm)); bottom: 2.4rem; }
  .tidy { right: auto; left: 28px; bottom: 26px; font-size: .95rem; }
}

/* ---------- Uten skript: vis baksidene under bildene ---------- */

@media (scripting: none) {
  .print__inner { display: block; }
  .face--back { transform: none; margin-top: .4em; }
  .flip { display: none; }
  .obj { cursor: auto; animation: none; }
  .tidy, .tape-label--hint { display: none; }
}

/* ---------- Redusert bevegelse ---------- */

@media (prefers-reduced-motion: reduce) {
  .obj, .obj.is-held, .print__inner, .tidy, .face { animation: none; transition: none; }
}
