html,
body {
  background-color: #f8f3e8;
}

body {
  background-image: none;
}

.masthead .brand-mark {
  width: 40px;
  height: 40px;
  flex: none;
  display: block;
  object-fit: contain;
}

#cash-slogan-field {
  margin-top: 16px;
}

#cash-slogan {
  width: 100%;
  height: 52px;
  padding: 0 13px;
  border: 1px solid #756750;
  border-radius: 0;
  color: #29251f;
  background: #efe4ce;
  font: 800 13px Mono, monospace;
}

#cash-format-note {
  padding-left: 10px;
  border-left: 3px solid #f7931a;
}

.studio-workbench {
  display: grid;
  grid-template-columns: minmax(310px, 360px) minmax(0, 1fr);
  align-items: start;
  gap: clamp(32px, 4vw, 66px);
}

.studio-controls {
  min-width: 0;
}

.product-icon.ostrich {
  overflow: hidden;
  background: transparent;
}

.product-icon.ostrich img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-icon.sats {
  overflow: visible;
  background: transparent;
  border: 0;
}

.product-icon.sats img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.studio-controls .essential-fields {
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
}

.studio-mode-selector {
  margin: 0;
  padding: 0 0 20px;
  border: 0;
  border-bottom: 1px solid #756750;
}

.studio-mode-selector legend {
  margin-bottom: 9px;
  padding: 0;
  font: 850 12px var(--sans);
  text-transform: uppercase;
}

.studio-mode-selector > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.studio-mode-selector label {
  min-width: 0;
  position: relative;
  cursor: pointer;
}

.studio-mode-selector input {
  position: absolute;
  opacity: 0;
}

.studio-mode-selector label > span {
  min-height: 72px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 8px 10px 8px 8px;
  border: 1px solid #756750;
  color: #29251f;
  background: #efe4ce;
}

.studio-mode-selector .mode-icons {
  width: 48px;
  height: 54px;
  position: relative;
  display: grid;
  place-items: center;
}

.studio-mode-selector .mode-icons img {
  max-width: 100%;
  max-height: 100%;
  display: block;
  object-fit: contain;
}

.studio-mode-selector .mode-icons-both img {
  width: 38px;
  height: 44px;
  position: absolute;
}

.studio-mode-selector .mode-icons-both img:first-child {
  left: 0;
  top: 0;
}

.studio-mode-selector .mode-icons-both img:last-child {
  right: -2px;
  bottom: 0;
}

.studio-mode-selector .mode-copy {
  min-width: 0;
  display: block;
}

.studio-mode-selector b,
.studio-mode-selector small {
  display: block;
}

.studio-mode-selector b {
  font: 850 12px/1.15 var(--sans);
  text-transform: uppercase;
}

.studio-mode-selector small {
  margin-top: 5px;
  color: #665e50;
  font: 700 8px/1 Mono, monospace;
  text-transform: uppercase;
}

.studio-mode-selector input:checked + span {
  color: #f8f3e8;
  background: #3f6863;
  border-color: #29251f;
}

.studio-mode-selector input:checked + span small {
  color: #e9dcc2;
}

.studio-mode-selector input:focus-visible + span {
  outline: 3px solid #875044;
  outline-offset: 2px;
}

.studio-mode-selector input:focus-visible {
  outline: 0;
}

.studio-controls .essential-fields > section,
.studio-controls .essential-fields > section > label,
.studio-controls .essential-fields #cash-slogan-field {
  width: 100%;
}

.studio-controls .create-button {
  width: 100%;
  min-height: 58px;
  justify-content: space-between;
  gap: 20px;
}

.create-total {
  display: flex;
  align-items: center;
  gap: 14px;
  font-style: normal;
}

.create-total b {
  font: 800 clamp(24px, 2.4vw, 32px)/1.1 Mono, monospace;
  white-space: nowrap;
}

.create-total i {
  font: 900 20px/1 var(--sans);
  font-style: normal;
}

.bulk-toggle input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: #3f6863;
}

.live-preview {
  position: sticky;
  top: 24px;
  container-type: inline-size;
}

.live-preview > header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 9px;
  border-bottom: 1px solid #756750;
  font: 800 8px/1 Mono, monospace;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.live-preview > header b {
  color: #875044;
}

.live-preview > p {
  margin: 12px 0 0;
  color: #665e50;
  font: 600 9px/1.5 Mono, monospace;
}

.live-snippet {
  width: 100%;
  aspect-ratio: 57 / 83.68;
  position: relative;
  color: #29251f;
  background: #efe4ce;
  border: 0;
  box-shadow: 8px 8px 0 rgba(41, 37, 31, .16);
}

.live-snippet[data-flippable="true"] {
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease;
}

.live-snippet[data-flippable="true"]:hover {
  transform: translate(-2px, -2px);
  box-shadow: 10px 10px 0 rgba(63, 104, 99, .28);
}

.live-snippet[data-flippable="true"]:focus-visible {
  outline: 3px solid #3f6863;
  outline-offset: 4px;
}

.live-panel {
  position: relative;
  height: 100%;
  min-height: 0;
  padding: 0;
  overflow: hidden;
}

.live-panel-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.live-panel:has(.live-panel-canvas) > :not(.live-panel-canvas):not(.preview-qr-link) {
  display: none !important;
}

.live-panel:has(.live-panel-canvas)::after {
  display: none;
}

.live-panel[hidden] {
  display: none;
}

.live-panel::after {
  content: "";
  position: absolute;
  inset: 6.14cqw;
  z-index: 4;
  border: 1px solid #29251f;
  pointer-events: none;
}

.live-panel small {
  display: block;
  font: 800 clamp(6px, 2.2cqw, 8px)/1.25 Mono, monospace;
  letter-spacing: .04em;
}

.live-secret {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0;
  text-align: center;
}

.live-secret-meta {
  width: auto;
  position: absolute;
  top: 11.05cqw;
  left: 10.53cqw;
  right: 10.53cqw;
  display: flex;
  justify-content: space-between;
  gap: 3cqw;
}

.live-secret-meta small {
  font: 400 2.97cqw/1 Mono, monospace;
  letter-spacing: 0;
}

.live-secret-meta small:last-child { text-align: right; }

.live-secret > strong {
  margin-top: 17cqw;
  font: 800 clamp(18px, 6.6cqw, 24px)/1 Mono, monospace;
}

.live-mnemonic {
  width: calc(100% - 21cqw);
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(4, auto);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1cqw 2cqw;
  margin: 5cqw 0 4cqw;
  padding: 0;
  list-style-position: inside;
  text-align: left;
  font: 800 clamp(6px, 2.1cqw, 8px)/1.2 Mono, monospace;
}

.live-secret-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: 4cqw;
  margin: auto 0;
}

.live-secret-grid:has(figure[hidden]) {
  grid-template-columns: minmax(0, 64%);
  justify-content: center;
}

.live-secret figure {
  min-width: 0;
  margin: 0;
}

.live-secret figure[hidden] { display: none; }

.live-secret img {
  width: 100%;
  aspect-ratio: 1;
  display: block;
  background: transparent;
  mix-blend-mode: multiply;
}

.live-secret figcaption {
  margin-top: 2.5cqw;
  font: 800 clamp(7px, 2.4cqw, 9px)/1.2 Mono, monospace;
}

.live-secret code {
  display: block;
  margin-top: 1.5cqw;
  overflow-wrap: anywhere;
  font: 700 clamp(4px, 1.55cqw, 6px)/1.25 Mono, monospace;
  text-align: left;
}

.live-secret p {
  margin: 0 8cqw 7cqw;
  font: 800 clamp(8px, 2.7cqw, 10px)/1.35 Mono, monospace;
  text-transform: uppercase;
}

.live-public {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.live-public > small {
  align-self: stretch;
  text-align: left;
}

.live-fake-qr {
  width: 72px;
  aspect-ratio: 1;
  margin: auto 0 10px;
  border: 6px solid #efe4ce;
  outline: 1px solid #29251f;
  background: conic-gradient(from 90deg, #29251f 25%, transparent 0 50%, #29251f 0 75%, transparent 0) 0 / 12px 12px,
    repeating-linear-gradient(45deg, transparent 0 4px, #29251f 4px 7px);
}

.live-public strong {
  max-width: 100%;
  overflow: hidden;
  font: 900 19px/.9 var(--sans);
  text-overflow: ellipsis;
}

.live-public span {
  max-width: 100%;
  margin-top: 6px;
  overflow: hidden;
  font: 700 6px/1.2 Mono, monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-front {
  display: block;
}

.live-front > * {
  position: absolute;
  z-index: 2;
}

.live-front > #preview-number,
.live-front > .preview-note {
  top: 11.05cqw;
  font: 400 2.97cqw/1 Mono, monospace;
  letter-spacing: 0;
}

.live-front > #preview-number { left: 10.53cqw; }
.live-front > .preview-note { right: 10.53cqw; }

.live-front > #preview-alias {
  display: none;
}

.live-front > #preview-alias {
  margin-top: clamp(14px, 5cqw, 19px);
  font: 900 clamp(22px, 8.5cqw, 31px)/.9 var(--sans);
  text-transform: uppercase;
}

.live-preview-art {
  width: 59.65cqw;
  height: 59.65cqw;
  left: 20.18cqw;
  top: calc(17cqw + 20px);
  display: grid;
  place-items: center;
  margin: 0;
  overflow: hidden;
  color: #e9dcc2;
  background: #29251f;
}

.live-preview-art i {
  position: absolute;
  width: 90px;
  height: 90px;
  border: 2px solid currentColor;
  transform: rotate(45deg);
}

.live-preview-art i:nth-child(2) { width: 58px; height: 58px; }
.live-preview-art i:nth-child(3) { width: 27px; height: 27px; }
.live-preview-art.art-paper { background: transparent url("/assets/nostrsun.png?v=bitcoin-orange") center / contain no-repeat; }
.live-snippet[data-mode="identity"] .mode-art { background: transparent url("/assets/card-nostr-ostrich.png") center / contain no-repeat; }
.live-snippet[data-mode="wallet"] .mode-art { background: transparent url("/assets/card-sats.png") center / auto 115% no-repeat; }
.live-snippet[data-mode="both"] .mode-art { background: transparent url("/assets/nostrsun.png?v=bitcoin-orange") center / contain no-repeat; }
.live-snippet .mode-art i { display: none; }

.live-wallet-qr {
  width: 26cqw;
  height: 26cqw;
  position: absolute;
  right: 10.53cqw;
  bottom: 7.6cqw;
  z-index: 2;
  border: 0;
  outline: 0;
  background: transparent;
  mix-blend-mode: multiply;
  image-rendering: pixelated;
}

.live-wallet-qr[hidden] { display: none; }

.live-snippet .live-preview-art {
  width: 59.65cqw;
  height: 59.65cqw;
  margin: 0;
}

.live-snippet .live-preview-art.art-paper {
  background-size: contain;
}

.live-snippet .live-front > #preview-slogan {
  left: 10.53cqw;
  top: calc(80.5cqw + 35px);
  max-width: 78.94cqw;
  font: 800 calc(5.88cqw + 1px)/.985 Mono, monospace;
  white-space: pre-line;
}

.live-snippet .live-front > #preview-amount {
  left: 10.53cqw;
  right: 10.53cqw;
  top: 101cqw;
  max-width: none;
  margin: 0;
  color: #111;
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 3.2cqw;
  font: 800 10.5cqw/1 Mono, monospace;
  letter-spacing: 0;
}

.live-snippet #preview-amount-unit {
  position: static;
  font: 800 3cqw/1 Mono, monospace;
  letter-spacing: 0;
}

.live-snippet #preview-amount-unit[hidden] { display: none; }
.live-snippet #preview-amount[hidden] { display: none; }

.live-snippet[data-mode="both"] .live-front > #preview-amount {
  top: auto;
  bottom: 10.53cqw;
}

.live-snippet[data-mode="both"] .live-secret-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3cqw;
  margin: 0 0 auto;
}

.live-snippet[data-mode="both"] .live-secret figcaption {
  margin-top: 1.2cqw;
}

.cash-slip-art {
  background: #e9dcc2 url("/assets/nostrsun.png?v=bitcoin-orange") center / contain no-repeat;
}

.cash-slip-art i,
.cash-slip-art b {
  display: none;
}

.cash-demo-qr {
  width: 76px;
  height: 76px;
  display: block;
  margin: 14px auto 9px;
  border: 6px solid #e9dcc2;
  outline: 1px solid #29251f;
  background: #e9dcc2;
  image-rendering: pixelated;
}

/* Hero-Demo: dieselbe Frontpanel-Geometrie wie Identity + Wallet im Studio. */
.cash-slip-visual {
  padding: 0;
  container-type: inline-size;
}

.identity-slip-visual {
  overflow: hidden;
}

.identity-slip-visual #hero-identity-front {
  width: 100%;
  height: 100%;
  display: block;
}

.cash-slip-frame {
  position: absolute;
  inset: 6.14cqw;
  z-index: 4;
  border: 1px solid #29251f;
  pointer-events: none;
}

.cash-slip-visual .cash-slip-top { margin: 0; }

.cash-slip-visual .cash-slip-top span {
  position: absolute;
  top: 11.05cqw;
  z-index: 2;
  font: 400 2.97cqw/1 Mono, monospace;
  letter-spacing: 0;
}

.cash-slip-visual .cash-slip-top span:first-child { left: 10.53cqw; }
.cash-slip-visual .cash-slip-top span:last-child { right: 10.53cqw; }

.cash-slip-visual .cash-slip-art {
  width: 59.65cqw;
  height: 59.65cqw;
  position: absolute;
  left: 20.18cqw;
  top: calc(17cqw + 20px);
  background: transparent url("/assets/nostrsun.png?v=bitcoin-orange") center / contain no-repeat;
}

.cash-slip-visual .cash-slip-title {
  position: absolute;
  left: 10.53cqw;
  top: calc(80.5cqw + 35px);
  z-index: 2;
  max-width: 78.94cqw;
  margin: 0;
  font: 800 calc(5.88cqw + 1px)/.985 Mono, monospace;
  letter-spacing: 0;
}

.cash-slip-visual .cash-slip-value {
  position: absolute;
  left: 10.53cqw;
  right: 10.53cqw;
  top: 101cqw;
  z-index: 2;
  justify-content: flex-end;
  gap: 3.2cqw;
  margin: 0;
}

.cash-slip-visual .cash-slip-value strong {
  font: 800 10.5cqw/1 Mono, monospace;
  letter-spacing: 0;
}

.cash-slip-visual .cash-slip-value span {
  font: 800 3cqw/1 Mono, monospace;
  letter-spacing: 0;
}

.cash-slip-visual .cash-demo-qr {
  width: 26cqw;
  height: 26cqw;
  position: absolute;
  right: 10.53cqw;
  bottom: 7.6cqw;
  z-index: 2;
  margin: 0;
  border: 0;
  outline: 0;
  background: transparent;
  mix-blend-mode: multiply;
}
.live-preview-art.art-paper i { display: none; }

.live-front > strong {
  font: 900 clamp(16px, 6cqw, 22px)/.9 var(--sans);
  text-transform: uppercase;
}

.live-front > b {
  margin-top: 8px;
  color: #875044;
  font: 900 clamp(17px, 6.5cqw, 24px)/.9 var(--sans);
}

.live-front > span {
  margin-top: auto;
  font: 800 clamp(7px, 2.5cqw, 9px)/1 Mono, monospace;
}

.live-back {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.live-back > small {
  align-self: stretch;
  margin-top: 8cqw;
  font: 900 clamp(11px, 4cqw, 15px)/1 var(--sans);
  letter-spacing: .04em;
  text-align: center;
}

.live-back-visuals {
  width: calc(100% - 21.06cqw);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5cqw;
  margin: auto 0 0;
}

.live-back .live-profile-qr,
.live-back .live-profile-avatar {
  width: 100%;
  aspect-ratio: 1;
  border: 0;
  outline: 0;
  background: transparent;
}

.live-back .live-profile-qr {
  mix-blend-mode: multiply;
}

.live-back .live-back-npub {
  width: calc(44cqw + 80px);
  margin: 3px 0 28px;
  padding: 0;
  color: #29251f;
  background: transparent;
  font: 700 clamp(11.5px, 3.4cqw, 13px)/1.24 Mono, monospace;
  letter-spacing: 0;
  text-align: justify;
  text-transform: lowercase;
  overflow-wrap: anywhere;
  white-space: normal;
}

.live-back strong {
  font: 800 clamp(15px, 5.4cqw, 20px)/.985 Mono, monospace;
  text-transform: uppercase;
}

.live-back span {
  margin-top: 7px;
  margin-bottom: auto;
  font: 800 clamp(12px, 4cqw, 15px)/1.2 Mono, monospace;
  letter-spacing: .04em;
}

@media (max-width: 1100px) {
  .studio-workbench {
    grid-template-columns: minmax(260px, 300px) minmax(0, 1fr);
  }

  .studio-controls .essential-fields {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .studio-workbench {
    grid-template-columns: 1fr;
  }

  .live-preview {
    position: static;
  }

  .live-snippet {
    width: min(100%, 300px);
  }

}

@media (max-width: 560px) {
  .studio-mode-selector > div {
    grid-template-columns: 1fr;
  }
}

@media(max-width:600px){.studio-controls .create-button{flex-wrap:wrap;gap:12px}.create-total{margin-left:auto}}

.preview-qr-link{position:absolute;display:block;z-index:5;cursor:pointer;background:transparent;border:0;padding:0;margin:0;appearance:none;touch-action:manipulation}
.preview-qr-link:focus-visible{outline:3px solid #50405e;outline-offset:3px}

.live-preview>#preview-copy-status{font-size:12px;line-height:1.4}
.live-snippet{-webkit-tap-highlight-color:transparent}
