:root {
  --bg: #f3ead9;
  --bg-deep: #d7dfcf;
  --cloth: #f1e7d6;
  --cloth-check: rgba(57, 93, 138, 0.09);
  --paper: #fbf4e7;
  --paper-deep: #f0e2c8;
  --paper-shadow: #cab28d;
  --moss: #6d816b;
  --moss-deep: #4f6558;
  --wicker: #c9ab7b;
  --wood: #b98c59;
  --wood-deep: #906843;
  --ink: #324038;
  --ink-soft: #5e6a60;
  --indigo: #355c92;
  --indigo-soft: #6c8cb6;
  --sage: #dde3d0;
  --cream: #fff9f0;
  --tape: #f0dcc4;
  --line: rgba(76, 95, 78, 0.16);
  --line-strong: rgba(53, 92, 146, 0.28);
  --warning: #a4693f;
  --danger: #b85c52;
  --ok: #5f8b65;
  --shadow-soft: 0 16px 44px rgba(86, 66, 42, 0.14);
  --shadow-panel: 0 22px 70px rgba(96, 75, 46, 0.16);
  --shadow-stage: 0 28px 80px rgba(50, 63, 51, 0.22);
  --hole-size: 22px;
  --impact-shadow-size: 18px;
  --punch-accent-glow: rgba(58, 101, 170, 0.08);
  --punch-color-shift: 0deg;
  --punch-color-sat: 1;
  --punch-color-bright: 1;
  --scroll-drift-a: 0px;
  --scroll-drift-b: 0px;
  --scroll-drift-c: 0px;
  --scroll-drift-d: 0px;
  --scroll-drift-e: 0px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Source Sans 3", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(255, 251, 245, 0.92), transparent 28rem),
    radial-gradient(circle at 88% 14%, rgba(119, 151, 110, 0.22), transparent 22rem),
    linear-gradient(180deg, #f5efdf 0%, #eadfca 48%, #dfe5d6 100%);
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -5;
}

body::before {
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.18) 0 2px, transparent 2px 38px),
    repeating-linear-gradient(90deg, rgba(56, 94, 139, 0.08) 0 2px, transparent 2px 38px);
  opacity: 0.55;
}

body::after {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0) 28%),
    radial-gradient(circle at 50% 0%, rgba(255, 247, 232, 0.76), transparent 42%);
  z-index: -4;
}

.desk-aura,
.paper-speckles {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.desk-aura {
  z-index: -3;
}

.desk-aura::before {
  content: "";
  position: absolute;
  border-radius: 999px;
  filter: blur(72px);
}

.desk-aura-indigo::before {
  width: 26rem;
  height: 26rem;
  left: -6rem;
  top: 16%;
  background: rgba(53, 92, 146, 0.14);
}

.desk-aura-moss::before {
  width: 22rem;
  height: 22rem;
  right: -2rem;
  bottom: 12%;
  background: rgba(98, 134, 91, 0.18);
}

.paper-speckles {
  z-index: -2;
  opacity: 0.18;
  background-image: radial-gradient(circle, rgba(105, 83, 48, 0.7) 0 1px, transparent 1px);
  background-size: 12px 12px;
  mix-blend-mode: multiply;
}

a {
  color: inherit;
}

button,
textarea {
  font: inherit;
}

.page {
  width: min(1380px, calc(100% - 1.4rem));
  margin: 0 auto;
  padding: 1.1rem 0 2.8rem;
}

.masthead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.brand-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.9rem;
  padding: 0.75rem 1.15rem;
  border-radius: 999px;
  border: 1px solid rgba(75, 88, 68, 0.15);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.64), rgba(244, 233, 213, 0.92)),
    var(--paper);
  box-shadow: 0 10px 28px rgba(90, 68, 42, 0.1);
  color: var(--ink);
  text-decoration: none;
  font-family: "Patrick Hand", cursive;
  font-size: 1.05rem;
  letter-spacing: 0.06em;
}

.masthead-copy {
  max-width: 28rem;
  padding: 0.2rem 0.2rem 0 0;
  text-align: right;
}

.masthead-kicker {
  margin: 0;
  font-family: "Patrick Hand", cursive;
  font-size: 1.1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--indigo);
}

.masthead-note {
  margin: 0.25rem 0 0;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.45;
}

.workbench {
  display: grid;
  grid-template-columns: minmax(18rem, 0.95fr) minmax(0, 1.5fr) minmax(18rem, 1fr);
  gap: 1rem 0.4rem;
  align-items: start;
  position: relative;
  isolation: isolate;
}

.studio-rail {
  display: grid;
  gap: 1.1rem;
  margin-top: 2.1rem;
  margin-left: -0.45rem;
  transform: translate3d(0, var(--scroll-drift-c), 0);
  position: relative;
  z-index: 2;
}

.panel-card {
  position: relative;
  border: 1px solid rgba(90, 86, 63, 0.14);
  border-radius: 2rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.68), rgba(255, 255, 255, 0.22)),
    linear-gradient(135deg, rgba(255, 255, 255, 0.48), rgba(255, 255, 255, 0)),
    var(--paper);
  box-shadow: var(--shadow-panel);
  overflow: hidden;
  will-change: transform;
  animation: paper-appear 720ms cubic-bezier(0.2, 0.78, 0.24, 1) both;
}

.panel-card::before {
  content: "";
  position: absolute;
  left: 1rem;
  right: 1rem;
  top: 0.9rem;
  height: 0.45rem;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(53, 92, 146, 0), rgba(53, 92, 146, 0.18), rgba(53, 92, 146, 0));
  opacity: 0.6;
  pointer-events: none;
}

.maker-note,
.stage-panel,
.studio-panel,
.library-panel {
  padding: 1.35rem;
}

.maker-note {
  margin-right: -0.55rem;
  transform: translate3d(-0.08rem, calc(1.35rem + var(--scroll-drift-a)), 0) rotate(-0.85deg);
  animation-delay: 100ms;
  z-index: 1;
}

.stage-panel {
  margin-left: -0.15rem;
  margin-right: -0.15rem;
  transform: translate3d(0, calc(0.12rem + var(--scroll-drift-b)), 0) rotate(0.18deg);
  animation-delay: 180ms;
  z-index: 6;
}

.studio-panel {
  transform: translate3d(-0.18rem, calc(-0.15rem + var(--scroll-drift-d)), 0) rotate(0.7deg);
  animation-delay: 260ms;
  z-index: 2;
}

.library-panel {
  transform: translate3d(0.18rem, calc(0.55rem + var(--scroll-drift-e)), 0) rotate(-0.62deg);
  animation-delay: 340ms;
  z-index: 1;
}

.eyebrow {
  margin: 0;
  font-family: "Patrick Hand", cursive;
  font-size: 1rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--indigo);
}

.maker-note h1,
.panel-heading h2,
.studio-panel h2,
.library-panel h2 {
  margin: 0.5rem 0 0;
  font-family: "Cormorant Garamond", serif;
  font-weight: 600;
  line-height: 0.94;
  letter-spacing: -0.03em;
  color: #2d3c34;
}

.maker-note h1 {
  font-size: clamp(2.9rem, 4.6vw, 4.8rem);
  text-wrap: balance;
}

.panel-heading h2,
.studio-panel h2,
.library-panel h2 {
  font-size: clamp(2rem, 3vw, 3rem);
}

.lede {
  margin: 1rem 0 0;
  color: var(--ink-soft);
  font-size: 1.05rem;
  line-height: 1.7;
}

.signal-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.3rem;
}

.signal-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 3rem;
  padding: 0.78rem 1rem;
  border-radius: 1.25rem;
  border: 1px solid rgba(100, 119, 99, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.74), rgba(247, 238, 224, 0.98)),
    var(--paper);
  box-shadow: 0 10px 28px rgba(91, 72, 48, 0.08);
  color: var(--ink);
  font-family: "Patrick Hand", cursive;
  font-size: 1.02rem;
  line-height: 1.2;
}

.signal-pill-count {
  color: var(--indigo);
}

.signal-dot {
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 50%;
  background: var(--indigo);
  box-shadow: 0 0 0 0.45rem rgba(83, 118, 163, 0.14);
  flex: 0 0 auto;
}

.paper-notes {
  display: grid;
  gap: 0.85rem;
  margin-top: 1.35rem;
}

.note-scrap {
  position: relative;
  padding: 1rem 1rem 0.95rem;
  border-radius: 1.4rem;
  border: 1px solid rgba(115, 124, 91, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.74), rgba(245, 233, 214, 0.98)),
    var(--paper);
  box-shadow: var(--shadow-soft);
  animation: paper-appear 820ms cubic-bezier(0.2, 0.78, 0.24, 1) both, paper-float 8.8s ease-in-out infinite;
}

.note-scrap:nth-child(1) {
  transform: rotate(-1deg);
  animation-delay: 220ms, 0s;
}

.note-scrap:nth-child(2) {
  transform: rotate(0.6deg);
  animation-delay: 300ms, 1.1s;
}

.note-scrap:nth-child(3) {
  transform: rotate(-0.4deg);
  animation-delay: 380ms, 2.1s;
}

.note-scrap::before {
  content: "";
  position: absolute;
  top: 0.75rem;
  right: 1rem;
  width: 3.6rem;
  height: 0.95rem;
  border-radius: 0.25rem;
  background: rgba(240, 220, 196, 0.72);
  transform: rotate(6deg);
}

.note-scrap-title {
  margin: 0;
  font-family: "Patrick Hand", cursive;
  font-size: 1.08rem;
  color: var(--indigo);
}

.note-scrap p:last-child {
  margin: 0.35rem 0 0;
  color: var(--ink-soft);
  line-height: 1.5;
}

.stage-panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.16)),
    linear-gradient(135deg, rgba(100, 128, 97, 0.1), rgba(53, 92, 146, 0.04)),
    #f8f0df;
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.95rem;
}

.stage-caption {
  max-width: 15rem;
  margin: 0.2rem 0 0;
  font-family: "Patrick Hand", cursive;
  font-size: 1.02rem;
  line-height: 1.25;
  color: var(--ink-soft);
  text-align: right;
}

.stage-frame {
  padding: 0.95rem;
  border-radius: 2rem;
  border: 1px solid rgba(127, 104, 71, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0)),
    repeating-linear-gradient(90deg, rgba(164, 134, 96, 0.09) 0 12px, rgba(203, 172, 123, 0.14) 12px 24px),
    linear-gradient(180deg, #dcc29d, #c7a478);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.36);
  position: relative;
  z-index: 2;
}

.stage {
  position: relative;
  min-height: 37rem;
  border-radius: 1.6rem;
  overflow: hidden;
  isolation: isolate;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0) 18%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.08) 0 2px, rgba(255, 255, 255, 0) 2px 18px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0 2px, rgba(255, 255, 255, 0) 2px 18px),
    radial-gradient(circle at 50% 10%, rgba(255, 245, 227, 0.32), transparent 28%),
    linear-gradient(180deg, #809378 0%, #6d826b 38%, #5a7166 100%);
  perspective: 1800px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
  --impact-x: 0.5;
  --impact-y: 0.5;
  --card-rotate-x: 0deg;
  --card-rotate-y: 0deg;
  --card-scale-x: 1;
  --card-scale-y: 1;
  --card-lift: 0;
  --card-flip: 0;
}

.stage[data-punch-size="small"] {
  --punch-accent-glow: rgba(58, 101, 170, 0.1);
  --punch-color-shift: 0deg;
  --punch-color-sat: 1;
  --punch-color-bright: 1;
}

.stage[data-punch-size="medium"] {
  --punch-accent-glow: rgba(79, 144, 83, 0.12);
  --punch-color-shift: 54deg;
  --punch-color-sat: 1.08;
  --punch-color-bright: 0.98;
}

.stage[data-punch-size="large"] {
  --punch-accent-glow: rgba(182, 78, 65, 0.13);
  --punch-color-shift: 132deg;
  --punch-color-sat: 1.12;
  --punch-color-bright: 0.98;
}

.stage::before,
.stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.stage::before {
  background:
    radial-gradient(circle at 16% 18%, rgba(255, 255, 255, 0.12), transparent 20%),
    radial-gradient(circle at 82% 22%, rgba(53, 92, 146, 0.12), transparent 18%),
    radial-gradient(circle at 72% 88%, rgba(224, 230, 210, 0.2), transparent 16%);
  opacity: 0.9;
}

.stage::after {
  inset: 1rem;
  border-radius: 1.25rem;
  border: 1px solid rgba(252, 249, 242, 0.14);
}

.stage-floor {
  position: absolute;
  inset: auto 7% 7% 7%;
  height: 28%;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(71, 92, 79, 0.28) 0 18%, rgba(47, 65, 55, 0.18) 36%, rgba(47, 65, 55, 0) 72%);
  filter: blur(18px);
  transform: translateZ(-120px);
}

.card-rig {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(92%, 46rem);
  aspect-ratio: 5 / 3.12;
  transform-style: preserve-3d;
  transform-origin: calc(var(--impact-x) * 100%) calc(var(--impact-y) * 100%);
  transform:
    translate(-50%, -50%)
    translateY(calc(var(--card-lift) * -1px))
    rotateX(var(--card-rotate-x))
    rotateY(var(--card-rotate-y))
    scaleX(var(--card-scale-x))
    scaleY(var(--card-scale-y));
  transition: transform 640ms cubic-bezier(0.22, 0.78, 0.24, 1);
  z-index: 10;
}

.card-shadow {
  position: absolute;
  inset: 11% 4% -13%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(66, 65, 46, 0.36), transparent 72%);
  transform: translateZ(-88px) scale(0.98);
  filter: blur(30px);
  opacity: 0.72;
}

.card-body {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transform: rotateY(calc(var(--card-flip) * 180deg)) translateZ(10px);
  cursor: none;
  outline: none;
  transition: transform 760ms cubic-bezier(0.22, 0.78, 0.24, 1);
}

.card-body:focus-visible .card-face {
  box-shadow:
    0 0 0 4px rgba(53, 92, 146, 0.2),
    0 18px 42px rgba(79, 62, 39, 0.18);
}

.card-face {
  position: absolute;
  inset: 0;
  border-radius: 1.7rem;
  overflow: hidden;
  backface-visibility: hidden;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.32),
    0 18px 42px rgba(79, 62, 39, 0.18);
}

.card-face-front {
  transform: translateZ(11px);
  border: 1px solid rgba(248, 241, 230, 0.66);
}

.card-face-back {
  transform: rotateY(180deg) translateZ(11px);
  border: 1px solid rgba(152, 164, 141, 0.38);
}

.card-face::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.38),
    inset 0 -4px 0 rgba(110, 89, 58, 0.12);
}

.card-art {
  display: block;
  width: 100%;
  height: 100%;
}

.front-panel {
  fill: rgba(53, 92, 146, 0.94);
}

.front-label {
  fill: rgba(243, 247, 252, 0.72);
}

.front-botanical,
.front-botanical-soft {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.front-botanical {
  stroke: rgba(247, 250, 253, 0.92);
  stroke-width: 16;
}

.front-botanical-soft {
  stroke: rgba(232, 241, 250, 0.8);
  stroke-width: 12;
}

.front-sun {
  fill: rgba(250, 246, 234, 0.18);
  stroke: rgba(248, 242, 229, 0.7);
  stroke-width: 8;
}

.face-rule {
  fill: none;
  stroke: rgba(89, 89, 66, 0.24);
  stroke-linecap: round;
  stroke-width: 10;
}

.face-rule-soft {
  stroke-width: 8;
  opacity: 0.64;
}

.back-note-line {
  fill: none;
  stroke: rgba(90, 110, 124, 0.3);
  stroke-linecap: round;
  stroke-width: 8;
}

.back-stamp {
  fill: rgba(73, 101, 137, 0.16);
  stroke: rgba(67, 91, 123, 0.28);
  stroke-width: 7;
}

.back-seal {
  fill: rgba(53, 92, 146, 0.12);
  stroke: rgba(53, 92, 146, 0.22);
  stroke-width: 7;
}

.stage.is-flipped {
  --card-flip: 1;
}

.stage.is-flipped .card-shadow {
  opacity: 0.62;
}

.punch-hole-proxy {
  position: absolute;
  width: var(--hole-size);
  height: var(--hole-size);
  border-radius: 50%;
}

.punch-anchor {
  position: absolute;
  left: 50%;
  top: 50%;
  width: clamp(6.5rem, 12vw, 8rem);
  height: clamp(9.8rem, 18vw, 11.8rem);
  transform: translate(-50%, -50%);
  transform-style: preserve-3d;
  pointer-events: none;
}

.punch-top-assembly {
  z-index: 14;
  isolation: isolate;
}

.punch-bottom-assembly {
  z-index: 6;
}

.punch-guide {
  position: absolute;
  left: 50%;
  top: 28%;
  bottom: 28%;
  width: 0.12rem;
  transform: translateX(-50%);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 249, 238, 0), rgba(255, 249, 238, 0.58) 20%, rgba(213, 189, 157, 0.22) 50%, rgba(255, 249, 238, 0.46) 80%, rgba(255, 249, 238, 0));
  box-shadow:
    0 0 0 1px rgba(255, 248, 236, 0.08),
    0 0 0.35rem rgba(109, 83, 55, 0.05);
  opacity: 0.12;
}

.punch-guide::before,
.punch-guide::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 0.36rem;
  height: 0.36rem;
  transform: translateX(-50%);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 250, 243, 0.72), rgba(214, 191, 160, 0.18) 62%, rgba(214, 191, 160, 0) 100%);
  box-shadow:
    0 0 0.45rem rgba(113, 84, 54, 0.06);
  opacity: 0.16;
}

.punch-guide::before {
  top: 0;
}

.punch-guide::after {
  bottom: 0;
}

.punch-top,
.punch-bottom {
  position: absolute;
  left: 50%;
  width: 100%;
  height: 100%;
  aspect-ratio: 1;
  transform-style: preserve-3d;
  transition: transform 280ms cubic-bezier(0.22, 0.78, 0.24, 1), filter 220ms ease;
  will-change: transform;
}

.punch-top {
  top: 50%;
  transform:
    translate(-50%, calc(-50% - 1.12rem))
    scale(0.78, 0.72);
}

.punch-bottom {
  top: 50%;
  transform:
    translate(-50%, calc(-50% + 0.7rem))
    scale(0.22, 0.18);
  opacity: 0.14;
}

.punch-top-halo,
.punch-bottom-halo {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 96%;
  height: 62%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  pointer-events: none;
}

.punch-top-halo {
  background: radial-gradient(circle, var(--punch-accent-glow), rgba(79, 117, 169, 0) 72%);
  filter: blur(12px);
}

.punch-bottom-halo {
  width: 44%;
  height: 44%;
  background: radial-gradient(circle, rgba(67, 53, 39, 0.08), rgba(67, 53, 39, 0) 72%);
  filter: blur(8px);
}

.punch-graphic {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.punch-graphic-top {
  filter:
    hue-rotate(var(--punch-color-shift))
    saturate(var(--punch-color-sat))
    brightness(var(--punch-color-bright))
    drop-shadow(0 0.18rem 0.22rem rgba(255, 248, 233, 0.22))
    drop-shadow(0 0.52rem 0.72rem rgba(86, 61, 32, 0.18));
}

.punch-graphic-bottom {
  filter:
    hue-rotate(var(--punch-color-shift))
    saturate(calc(var(--punch-color-sat) * 0.92))
    brightness(var(--punch-color-bright))
    blur(0.4px)
    drop-shadow(0 0.16rem 0.28rem rgba(78, 58, 35, 0.06));
}

.punch-top-assembly::before,
.punch-top-assembly::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.punch-top-assembly::before {
  z-index: 0;
  width: var(--impact-shadow-size);
  height: var(--impact-shadow-size);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(24, 16, 11, 0.46), rgba(24, 16, 11, 0.22) 34%, rgba(24, 16, 11, 0) 72%);
  filter: blur(3px);
  top: calc(50% + 0.64rem);
  opacity: 0.9;
  transition:
    width 240ms cubic-bezier(0.42, 0, 0.88, 1),
    height 240ms cubic-bezier(0.42, 0, 0.88, 1),
    filter 220ms cubic-bezier(0.42, 0, 0.88, 1),
    opacity 220ms cubic-bezier(0.42, 0, 0.88, 1),
    background 220ms cubic-bezier(0.42, 0, 0.88, 1);
  will-change: width, height, filter, opacity;
}

.punch-top-assembly::after {
  content: none;
}

.stage[data-phase="aim"] .punch-top-assembly::before {
  width: calc(var(--impact-shadow-size) * 1.18);
  height: calc(var(--impact-shadow-size) * 1.18);
  background: radial-gradient(circle, rgba(24, 16, 11, 0.52), rgba(24, 16, 11, 0.22) 38%, rgba(24, 16, 11, 0) 74%);
  opacity: 0.94;
}

.stage[data-phase="clamp"] .punch-top-assembly::before {
  width: calc(var(--impact-shadow-size) * 2.72);
  height: calc(var(--impact-shadow-size) * 2.72);
  background: radial-gradient(circle, rgba(12, 8, 6, 0.86), rgba(12, 8, 6, 0.48) 46%, rgba(12, 8, 6, 0) 84%);
  filter: blur(3.6px);
  opacity: 1;
}

.stage[data-phase="recoil"] .punch-top-assembly::before {
  width: calc(var(--impact-shadow-size) * 1.42);
  height: calc(var(--impact-shadow-size) * 1.42);
  background: radial-gradient(circle, rgba(22, 15, 10, 0.44), rgba(22, 15, 10, 0.18) 40%, rgba(22, 15, 10, 0) 78%);
  filter: blur(3.5px);
  opacity: 0.92;
}

.control-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1rem;
}

.tool-row {
  display: flex;
  justify-content: flex-start;
  margin-top: 1rem;
}

.punch-size-picker {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0.5rem;
  border-radius: 1.4rem;
  border: 1px solid rgba(103, 97, 74, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.74), rgba(245, 232, 209, 0.96)),
    var(--paper);
  box-shadow: 0 10px 22px rgba(94, 72, 43, 0.08);
}

.punch-size-label {
  padding: 0 0.4rem 0 0.55rem;
  color: var(--ink-soft);
  font-family: "Patrick Hand", cursive;
  font-size: 1rem;
  letter-spacing: 0.04em;
}

.punch-size-button {
  --size-accent: rgba(88, 123, 170, 0.92);
  --size-accent-soft: rgba(88, 123, 170, 0.14);
  min-height: 2.45rem;
  padding: 0.55rem 0.88rem;
  border: 1px solid rgba(111, 101, 73, 0.16);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.8), rgba(243, 229, 205, 0.96)),
    var(--paper);
  color: color-mix(in srgb, var(--size-accent) 72%, #314036);
  box-shadow:
    inset 0 0 0 1px var(--size-accent-soft),
    0 8px 18px rgba(94, 72, 43, 0.08);
  cursor: pointer;
  font-family: "Patrick Hand", cursive;
  font-size: 1rem;
  letter-spacing: 0.04em;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, color 180ms ease, background 180ms ease;
}

.punch-size-button[data-punch-size="small"] {
  --size-accent: rgba(58, 101, 170, 0.94);
  --size-accent-soft: rgba(58, 101, 170, 0.16);
}

.punch-size-button[data-punch-size="medium"] {
  --size-accent: rgba(79, 144, 83, 0.94);
  --size-accent-soft: rgba(79, 144, 83, 0.16);
}

.punch-size-button[data-punch-size="large"] {
  --size-accent: rgba(182, 78, 65, 0.94);
  --size-accent-soft: rgba(182, 78, 65, 0.16);
}

.punch-size-button:hover,
.punch-size-button:focus-visible {
  transform: translateY(-1px);
  border-color: var(--size-accent);
  box-shadow:
    inset 0 0 0 1px var(--size-accent-soft),
    0 12px 22px rgba(84, 65, 40, 0.12);
}

.punch-size-button.is-active {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--size-accent) 84%, white), color-mix(in srgb, var(--size-accent) 94%, black 6%)),
    var(--paper);
  border-color: color-mix(in srgb, var(--size-accent) 76%, white);
  color: #f8fbff;
  box-shadow:
    0 12px 24px color-mix(in srgb, var(--size-accent) 26%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.punch-size-button:disabled {
  cursor: default;
  opacity: 0.5;
  transform: none;
  box-shadow: none;
}

.control-button {
  --paper-tilt: 0deg;
  min-height: 3rem;
  padding: 0.74rem 1.1rem;
  border: 1px solid rgba(111, 101, 73, 0.18);
  border-radius: 1rem 1.1rem 0.92rem 1.06rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(244, 230, 206, 0.98)),
    var(--paper);
  color: var(--ink);
  box-shadow: 0 12px 26px rgba(94, 72, 43, 0.1);
  cursor: pointer;
  font-family: "Patrick Hand", cursive;
  font-size: 1.02rem;
  letter-spacing: 0.04em;
  transform: rotate(var(--paper-tilt));
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
  animation: paper-appear 620ms cubic-bezier(0.2, 0.78, 0.24, 1) both;
}

.control-button:nth-child(1) {
  --paper-tilt: -1deg;
  animation-delay: 420ms;
}

.control-button:nth-child(2) {
  --paper-tilt: 0.5deg;
  animation-delay: 470ms;
}

.control-button:nth-child(3) {
  --paper-tilt: -0.35deg;
  animation-delay: 520ms;
}

.control-button:nth-child(4) {
  --paper-tilt: 0.85deg;
  animation-delay: 570ms;
}

.control-button:hover,
.control-button:focus-visible,
.dock-close:hover,
.dock-close:focus-visible {
  transform: translateY(-2px) rotate(var(--paper-tilt, 0deg));
  border-color: var(--line-strong);
  box-shadow: 0 16px 30px rgba(84, 65, 40, 0.14);
}

.control-button:focus-visible,
.dock-close:focus-visible,
.dock-textarea:focus {
  outline: 2px solid rgba(53, 92, 146, 0.26);
  outline-offset: 2px;
}

.control-button-primary {
  background:
    linear-gradient(180deg, rgba(88, 123, 170, 0.86), rgba(54, 88, 133, 0.96)),
    var(--indigo);
  border-color: rgba(53, 92, 146, 0.28);
  color: #f8fbff;
}

.status-message {
  min-height: 1.5rem;
  margin: 0.95rem 0 0;
  color: var(--ink-soft);
  font-family: "Patrick Hand", cursive;
  font-size: 1.05rem;
  line-height: 1.3;
}

.status-message[data-tone="ok"] {
  color: var(--ok);
}

.status-message[data-tone="warn"] {
  color: var(--warning);
}

.status-message[data-tone="error"] {
  color: var(--danger);
}

.data-dock {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 1.6rem;
  border: 1px solid rgba(121, 122, 100, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(247, 239, 226, 0.98)),
    repeating-linear-gradient(180deg, transparent 0 1.85rem, rgba(92, 118, 149, 0.12) 1.85rem 1.96rem),
    var(--paper);
  box-shadow: var(--shadow-soft);
}

.data-dock-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.8rem;
}

.dock-title,
.dock-hint,
.dock-field {
  margin: 0;
}

.dock-title,
.dock-field {
  font-family: "Patrick Hand", cursive;
  color: var(--indigo);
}

.dock-title {
  font-size: 1.08rem;
  letter-spacing: 0.05em;
}

.dock-hint {
  margin-top: 0.25rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.5;
}

.dock-close {
  min-height: 2.65rem;
  padding: 0.72rem 1rem;
  border: 1px solid rgba(111, 101, 73, 0.16);
  border-radius: 1rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(245, 233, 210, 0.98)),
    var(--paper);
  color: var(--ink);
  cursor: pointer;
  font-family: "Patrick Hand", cursive;
  font-size: 1rem;
  transform: rotate(0.4deg);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.dock-field {
  display: block;
  margin-top: 0.95rem;
  font-size: 1rem;
  letter-spacing: 0.05em;
}

.dock-textarea {
  width: 100%;
  min-height: 12rem;
  margin-top: 0.45rem;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(106, 118, 93, 0.16);
  border-radius: 1.2rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.74), rgba(247, 238, 222, 0.98)),
    var(--cream);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.95rem;
  line-height: 1.6;
  resize: vertical;
  outline: none;
}

.dock-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.8rem;
}

.slug-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 18;
}

.paper-slug {
  position: absolute;
  width: calc(var(--hole-size) * 0.72);
  height: calc(var(--hole-size) * 0.72);
  border-radius: 46% 54% 58% 42% / 42% 48% 52% 58%;
  border: 1px solid rgba(255, 255, 255, 0.6);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(242, 229, 203, 0.98)),
    linear-gradient(180deg, var(--cream), var(--paper));
  transform: translate(-50%, -50%);
  box-shadow: 0 10px 18px rgba(69, 57, 40, 0.16);
  animation: slug-flit 720ms cubic-bezier(0.18, 0.74, 0.24, 1) forwards;
}

.studio-panel,
.library-panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.58), rgba(255, 255, 255, 0.14)),
    linear-gradient(135deg, rgba(127, 161, 124, 0.08), rgba(53, 92, 146, 0.03)),
    #f9f1e0;
}

.upload-grid {
  display: grid;
  gap: 0.9rem;
  margin-top: 1rem;
}

.upload-slot {
  position: relative;
  padding: 1rem;
  border-radius: 1.5rem;
  border: 1px solid rgba(106, 119, 93, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(245, 235, 220, 0.98)),
    var(--paper);
  box-shadow: var(--shadow-soft);
  animation: paper-appear 760ms cubic-bezier(0.2, 0.78, 0.24, 1) both, paper-float 9.6s ease-in-out infinite;
}

.upload-slot:first-child {
  transform: translateX(-0.45rem) rotate(-1.15deg);
  animation-delay: 320ms, 0.8s;
}

.upload-slot:last-child {
  margin-top: -0.15rem;
  transform: translateX(0.6rem) rotate(0.95deg);
  animation-delay: 420ms, 1.7s;
}

.slot-tab {
  position: absolute;
  top: 0.85rem;
  right: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.45rem;
  padding: 0.12rem 0.62rem;
  border-radius: 999px;
  background: rgba(240, 220, 196, 0.88);
  color: var(--indigo);
  font-family: "Patrick Hand", cursive;
  font-size: 0.96rem;
  letter-spacing: 0.04em;
}

.slot-art {
  aspect-ratio: 4 / 2.45;
  border-radius: 1.15rem;
  border: 1px solid rgba(122, 132, 101, 0.15);
  background-color: var(--sage);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.slot-art-front {
  background:
    radial-gradient(circle at 28% 32%, rgba(249, 251, 253, 0.18), transparent 18%),
    linear-gradient(135deg, rgba(53, 92, 146, 0.98), rgba(74, 115, 166, 0.88)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0));
}

.slot-art-back {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0)),
    repeating-linear-gradient(180deg, transparent 0 1.55rem, rgba(89, 110, 124, 0.18) 1.55rem 1.66rem),
    linear-gradient(135deg, #dce1cd, #c7cfb8);
}

.upload-slot h3 {
  margin: 0.85rem 0 0;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.55rem;
  font-weight: 600;
  color: #344239;
}

.upload-slot p,
.mini-note {
  margin: 0.3rem 0 0;
  color: var(--ink-soft);
  line-height: 1.55;
}

.ghost-chip {
  min-height: 2.55rem;
  margin-top: 0.85rem;
  padding: 0.62rem 0.9rem;
  border: 1px dashed rgba(53, 92, 146, 0.28);
  border-radius: 999px;
  background: rgba(247, 250, 253, 0.78);
  color: var(--indigo);
  font-family: "Patrick Hand", cursive;
  font-size: 1rem;
  cursor: default;
}

.fan-stack {
  position: relative;
  min-height: 13rem;
  margin-top: 1rem;
  perspective: 1200px;
}

.stack-card {
  position: absolute;
  left: 50%;
  top: 0.9rem;
  width: min(100%, 15rem);
  aspect-ratio: 5 / 3.12;
  padding: 0.9rem;
  border-radius: 1.45rem;
  border: 1px solid rgba(96, 109, 89, 0.14);
  box-shadow: 0 18px 36px rgba(84, 67, 42, 0.14);
  transform-origin: center bottom;
  animation: paper-appear 820ms cubic-bezier(0.2, 0.78, 0.24, 1) both, stack-sway 10.5s ease-in-out infinite;
}

.stack-card::before {
  content: "";
  position: absolute;
  top: 0.75rem;
  left: 50%;
  width: 3.9rem;
  height: 0.95rem;
  border-radius: 0.25rem;
  background: rgba(240, 220, 196, 0.76);
  transform: translateX(-50%) rotate(-4deg);
}

.stack-card-one {
  transform: translateX(calc(-50% - 1.8rem)) rotate(-10deg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0)),
    linear-gradient(135deg, #456ea4, #2f537f);
  color: #f7fbff;
  animation-delay: 380ms, 0.3s;
}

.stack-card-two {
  transform: translateX(-50%) rotate(-2deg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0)),
    linear-gradient(135deg, #edf1e3, #d1d7c1);
  color: var(--ink);
  animation-delay: 470ms, 1.6s;
}

.stack-card-three {
  transform: translateX(calc(-50% + 2rem)) rotate(9deg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.48), rgba(255, 255, 255, 0)),
    linear-gradient(135deg, #f3e4ca, #ddc29d);
  color: var(--ink);
  animation-delay: 560ms, 2.8s;
}

.stack-card-label {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 0.95rem;
  font-family: "Patrick Hand", cursive;
  font-size: 1.08rem;
  letter-spacing: 0.04em;
}

.stage[data-phase="aim"] .punch-top-assembly .punch-top {
  transform:
    translate(-50%, calc(-50% - 1.02rem))
    scale(0.78, 0.72);
}

.stage[data-phase="aim"] .punch-bottom-assembly .punch-bottom {
  transform:
    translate(-50%, calc(-50% + 0.68rem))
    scale(0.22, 0.18);
}

.stage[data-phase="clamp"] .punch-top-assembly .punch-top {
  transform:
    translate(-50%, calc(-50% - 0.36rem))
    scale(0.8, 0.74);
  filter: saturate(1.04);
}

.stage[data-phase="clamp"] .punch-bottom-assembly .punch-bottom {
  transform:
    translate(-50%, calc(-50% + 0.32rem))
    scale(0.24, 0.2);
}

.stage[data-phase="recoil"] .punch-top-assembly .punch-top {
  transform:
    translate(-50%, calc(-50% - 0.72rem))
    scale(0.79, 0.73);
}

.stage[data-phase="recoil"] .punch-bottom-assembly .punch-bottom {
  transform:
    translate(-50%, calc(-50% + 0.5rem))
    scale(0.23, 0.19);
}

.stage.is-denied .punch-top-assembly,
.stage.is-denied .punch-bottom-assembly {
  animation: deny-jitter 280ms linear 1;
}

body.is-touch-mode .punch-anchor,
body.is-reduced-motion .punch-anchor {
  transition: left 180ms ease, top 180ms ease, transform 180ms ease;
}

body.is-reduced-motion .card-rig,
body.is-reduced-motion .punch-top,
body.is-reduced-motion .punch-bottom,
body.is-reduced-motion .card-body {
  transition-duration: 180ms;
}

@keyframes slug-flit {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.45) rotate(0deg);
  }
  26% {
    opacity: 1;
    transform: translate(calc(-50% + var(--drift-x, 0px) * 0.34), calc(-50% - 1.1rem)) scale(1) rotate(10deg);
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--drift-x, 0px)), calc(-50% + 2.2rem)) scale(0.72) rotate(124deg);
  }
}

@keyframes deny-jitter {
  0% { transform: translate(-50%, -50%) translateX(0); }
  30% { transform: translate(-50%, -50%) translateX(-5px); }
  60% { transform: translate(-50%, -50%) translateX(5px); }
  100% { transform: translate(-50%, -50%) translateX(0); }
}

@keyframes paper-appear {
  0% {
    opacity: 0;
    filter: blur(5px);
  }
  100% {
    opacity: 1;
    filter: blur(0);
  }
}

@keyframes paper-float {
  0%, 100% {
    box-shadow: var(--shadow-soft);
  }
  50% {
    box-shadow: 0 22px 52px rgba(86, 66, 42, 0.18);
  }
}

@keyframes stack-sway {
  0%, 100% {
    box-shadow: 0 18px 36px rgba(84, 67, 42, 0.14);
  }
  50% {
    box-shadow: 0 24px 42px rgba(84, 67, 42, 0.2);
  }
}

.panel-heading-tight {
  margin-bottom: 0.65rem;
}

.stage-caption-left {
  text-align: left;
}

.library-copy,
.template-copy {
  margin-top: 0.7rem;
}

.card-frame-highlight {
  fill: none;
  stroke: rgba(255, 255, 255, 0.34);
  stroke-width: 5;
}

.saved-stack {
  display: grid;
  gap: 0.85rem;
  margin-top: 1.1rem;
  perspective: 1200px;
}

.library-card,
.template-card {
  position: relative;
  display: grid;
  gap: 0.9rem;
  width: 100%;
  border: 1px solid rgba(103, 112, 84, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(245, 233, 212, 0.98)),
    var(--paper);
  box-shadow: 0 16px 34px rgba(84, 67, 42, 0.12);
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.library-card {
  grid-template-columns: 6.2rem minmax(0, 1fr);
  align-items: center;
  padding: 0.85rem;
  border-radius: 1.45rem;
  transform:
    translateX(calc(var(--stack-order, 0) * 0.2rem))
    rotate(calc((var(--stack-order, 0) * 0.45deg) - 0.7deg));
}

.library-card:nth-child(even) {
  transform:
    translateX(calc(var(--stack-order, 0) * 0.16rem))
    rotate(calc((var(--stack-order, 0) * -0.28deg) + 0.45deg));
}

.library-card:hover,
.library-card:focus-visible,
.template-card:hover,
.template-card:focus-visible {
  transform: translateY(-2px) rotate(0deg);
  border-color: rgba(53, 92, 146, 0.24);
  box-shadow: 0 22px 40px rgba(84, 67, 42, 0.16);
  outline: none;
}

.library-card.is-active {
  border-color: rgba(53, 92, 146, 0.3);
  box-shadow:
    0 20px 40px rgba(84, 67, 42, 0.16),
    0 0 0 0.18rem rgba(53, 92, 146, 0.11);
}

.library-card-preview,
.template-preview {
  border-radius: 1rem;
  border: 1px solid rgba(117, 126, 98, 0.14);
  background:
    radial-gradient(circle at 24% 22%, rgba(255, 255, 255, 0.22), transparent 18%),
    linear-gradient(135deg, #e7dcc3, #cec2aa);
  background-size: cover;
  background-position: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.38);
}

.library-card-preview {
  aspect-ratio: 5 / 3.12;
}

.template-preview {
  width: 5.4rem;
  aspect-ratio: 5 / 3.12;
  flex: 0 0 auto;
}

.library-card-body,
.template-card-body {
  min-width: 0;
}

.library-card-title,
.template-card-title,
.pack-title {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.55rem;
  font-weight: 600;
  line-height: 0.96;
  color: #314036;
}

.library-card-meta,
.template-card-tags,
.pack-description,
.card-editor-meta,
.empty-note,
.panel-warning {
  margin: 0.28rem 0 0;
  color: var(--ink-soft);
  line-height: 1.45;
}

.library-card-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.7rem;
}

.library-card-count,
.library-card-badge,
.pack-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.8rem;
  padding: 0.18rem 0.72rem;
  border-radius: 999px;
  font-family: "Patrick Hand", cursive;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
}

.library-card-count,
.pack-count {
  background: rgba(226, 216, 197, 0.84);
  color: var(--ink-soft);
}

.library-card-badge {
  background: rgba(53, 92, 146, 0.13);
  color: var(--indigo);
}

.card-editor {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 1.45rem;
  border: 1px solid rgba(102, 117, 88, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(246, 236, 217, 0.98)),
    var(--paper);
  box-shadow: var(--shadow-soft);
}

.card-editor-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.8rem;
}

.card-name-input {
  width: 100%;
  min-height: 3rem;
  margin-top: 0.4rem;
  padding: 0.78rem 0.95rem;
  border: 1px solid rgba(106, 118, 93, 0.16);
  border-radius: 1rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(247, 238, 223, 0.98)),
    var(--cream);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.54);
}

.card-name-input:focus {
  outline: 2px solid rgba(53, 92, 146, 0.22);
  outline-offset: 2px;
}

.ghost-chip-action {
  cursor: pointer;
}

.template-packs {
  display: grid;
  gap: 0.85rem;
  margin-top: 1rem;
}

.template-pack {
  border-radius: 1.45rem;
  border: 1px solid rgba(104, 117, 88, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.74), rgba(244, 232, 211, 0.96)),
    var(--paper);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.pack-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  width: 100%;
  padding: 0.9rem 1rem;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.pack-toggle-copy {
  min-width: 0;
}

.pack-toggle[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.22);
}

.pack-body {
  display: grid;
  gap: 0.7rem;
  padding: 0 1rem 1rem;
}

.pack-body[hidden] {
  display: none;
}

.template-card {
  grid-template-columns: 4.9rem minmax(0, 1fr);
  align-items: center;
  padding: 0.65rem;
  border-radius: 1rem;
}

.template-card-tags {
  font-size: 0.88rem;
}

.template-card-title {
  font-size: 1.35rem;
}

.template-packs {
  max-height: min(56vh, 36rem);
  overflow-y: auto;
  padding-right: 0.4rem;
  margin-right: -0.18rem;
  align-content: start;
}

.template-packs::-webkit-scrollbar {
  width: 0.7rem;
}

.template-packs::-webkit-scrollbar-thumb {
  border: 0.18rem solid rgba(0, 0, 0, 0);
  border-radius: 999px;
  background: rgba(126, 122, 103, 0.34);
  background-clip: padding-box;
}

.template-packs::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.26);
  border-radius: 999px;
}

.empty-note {
  margin-top: 0.9rem;
  padding: 0.9rem 1rem;
  border-radius: 1.15rem;
  background: rgba(247, 241, 230, 0.8);
}

.panel-warning {
  margin-top: 0.85rem;
  padding: 0.75rem 0.9rem;
  border-radius: 1rem;
  background: rgba(169, 105, 63, 0.1);
  color: var(--warning);
}

.stage-empty {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(26rem, calc(100% - 2.6rem));
  padding: 1.2rem 1.25rem;
  border-radius: 1.55rem;
  border: 1px dashed rgba(250, 248, 240, 0.34);
  background: rgba(49, 67, 59, 0.28);
  box-shadow: 0 22px 40px rgba(29, 38, 34, 0.18);
  color: rgba(248, 245, 235, 0.92);
  text-align: center;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 22;
  backdrop-filter: blur(6px);
}

.stage-empty-title {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2rem, 4vw, 2.5rem);
  line-height: 0.94;
}

.stage-empty-copy {
  margin: 0.55rem 0 0;
  font-size: 1rem;
  line-height: 1.55;
  color: rgba(242, 239, 230, 0.84);
}

.stage.is-empty .card-rig {
  opacity: 0.28;
  transform:
    translate(-50%, -50%)
    scale(0.96)
    rotateX(12deg)
    rotateY(-7deg);
}

.stage.is-empty .punch-top-assembly,
.stage.is-empty .punch-bottom-assembly {
  opacity: 0.2;
}

.stage.is-empty .card-body {
  cursor: default;
}

.stage.is-drop-target::after {
  border-color: rgba(248, 244, 232, 0.44);
  box-shadow: 0 0 0 0.4rem rgba(255, 247, 229, 0.14);
}

.stage.is-drop-target .stage-empty {
  transform: translate(-50%, -50%) scale(1.02);
  background: rgba(53, 92, 146, 0.34);
}

@media (max-width: 1180px) {
  .workbench {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }

  .stage-panel {
    grid-column: 1 / -1;
  }

  .maker-note,
  .stage-panel,
  .studio-panel,
  .library-panel,
  .studio-rail {
    transform: none;
  }
}

@media (max-width: 980px) {
  .masthead,
  .panel-heading,
  .data-dock-head {
    flex-direction: column;
  }

  .masthead-copy,
  .stage-caption {
    text-align: left;
  }

  .stage-caption {
    max-width: none;
  }

  .stage {
    min-height: 31rem;
  }

  .template-packs {
    max-height: none;
    overflow: visible;
    padding-right: 0;
    margin-right: 0;
  }
}

@media (max-width: 760px) {
  .page {
    width: min(100% - 0.85rem, 1380px);
    padding-bottom: 2rem;
  }

  .workbench {
    display: flex;
    flex-direction: column;
  }

  .maker-note {
    order: 2;
  }

  .stage-panel {
    order: 1;
  }

  .studio-rail {
    order: 3;
    margin-top: 0;
    transform: none;
  }

  .panel-card,
  .stage-frame {
    border-radius: 1.6rem;
  }

  .stage {
    min-height: 27rem;
  }

  .card-rig {
    width: min(96%, 32rem);
  }

  .studio-rail,
  .maker-note {
    margin-left: 0;
    margin-right: 0;
  }

  .control-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .maker-note,
  .stage-panel,
  .studio-panel,
  .library-panel,
  .upload-slot:first-child,
  .upload-slot:last-child {
    transform: none;
  }

  .control-button {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .page {
    width: calc(100% - 0.65rem);
  }

  .maker-note,
  .stage-panel,
  .studio-panel,
  .library-panel {
    padding: 1rem;
  }

  .stage-frame {
    padding: 0.75rem;
  }

  .stage {
    min-height: 22rem;
  }

  .signal-row,
  .control-row {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .stack-card-one {
    transform: translateX(calc(-50% - 1rem)) rotate(-7deg);
  }

  .stack-card-three {
    transform: translateX(calc(-50% + 1rem)) rotate(7deg);
  }

  .panel-heading h2,
  .studio-panel h2,
  .library-panel h2 {
    font-size: clamp(1.85rem, 8vw, 2.4rem);
  }

  .masthead-kicker,
  .eyebrow {
    font-size: 0.94rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .paper-slug {
    display: none;
  }

  .note-scrap,
  .control-button,
  .dock-close,
  .stack-card,
  .upload-slot,
  .maker-note,
  .stage-panel,
  .studio-panel,
  .library-panel,
  .studio-rail {
    transform: none;
    animation: none;
  }

  .stage.is-denied .punch-top-assembly,
  .stage.is-denied .punch-bottom-assembly {
    animation-duration: 120ms;
  }
}
