:root {
  --paper: #f4f0df;
  --ink: #17130f;
  --yellow: #f5c842;
  --red: #f24a32;
  --blue: #7db9d8;
  --acid: #d8ef57;
  --violet: #9a77d6;
  --muted: #6a655b;
  --line: rgba(23, 19, 15, .25);
  --mono: "DM Mono", monospace;
  --display: "Gasoek One", Impact, sans-serif;
  --header-height: 72px;
  --side-width: 250px;
  --operation-width: 260px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { color-scheme: light; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100svh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--mono);
}
button, input, select { font: inherit; }
button, select { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible {
  outline: 3px solid var(--violet);
  outline-offset: 3px;
}

.app-shell[data-app-state="loading"] > :not(.startup-screen),
.app-shell[data-app-state="error"] > :not(.startup-screen) {
  visibility: hidden;
}

.startup-screen {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 40px;
  overflow: hidden;
  padding: clamp(28px, 5vw, 76px);
  background:
    linear-gradient(rgba(23, 19, 15, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 19, 15, .055) 1px, transparent 1px),
    var(--paper);
  background-size: 36px 36px;
  opacity: 1;
  transition: opacity .22s ease, visibility .22s step-start;
}
.startup-screen::before {
  position: absolute;
  inset: 0 0 auto;
  height: 12px;
  background: var(--yellow);
  border-bottom: 2px solid var(--ink);
  content: "";
}
.startup-brand,
.startup-status {
  position: relative;
  z-index: 1;
}
.startup-brand {
  align-self: end;
  display: grid;
  gap: clamp(18px, 3vw, 36px);
}
.startup-brand > span {
  font-size: clamp(9px, 1vw, 13px);
  font-weight: 500;
  letter-spacing: .16em;
}
.startup-brand > strong {
  max-width: 10ch;
  font: 400 clamp(5.8rem, 18vw, 18rem)/.72 var(--display);
  letter-spacing: -.035em;
}
.startup-status {
  display: flex;
  align-items: center;
  gap: 18px;
  width: min(100%, 520px);
  padding-top: 20px;
  border-top: 2px solid var(--ink);
}
.startup-status > div {
  display: grid;
  gap: 5px;
}
.startup-status strong {
  font-size: 11px;
  text-transform: uppercase;
}
.startup-status p {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}
.startup-pulse {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--yellow);
  animation: startup-pulse .85s ease-in-out infinite alternate;
}
.app-shell[data-app-state="error"] .startup-screen::before,
.app-shell[data-app-state="error"] .startup-pulse {
  background: var(--red);
}
.app-shell[data-app-state="ready"] .startup-screen {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease, visibility 0s step-start .22s;
}

.app-shell {
  min-height: 100svh;
  display: grid;
  grid-template:
    "header header header" var(--header-height)
    "side workspace operation" minmax(calc(100svh - var(--header-height)), auto)
    / var(--side-width) minmax(0, 1fr) var(--operation-width);
}

.app-header {
  grid-area: header;
  position: sticky;
  z-index: 50;
  top: 0;
  display: grid;
  grid-template-columns: var(--side-width) 1fr auto;
  align-items: center;
  min-height: var(--header-height);
  border-bottom: 2px solid var(--ink);
  background: var(--paper);
}
.wordmark {
  height: 100%;
  display: flex;
  align-items: center;
  padding-inline: 24px;
  border-right: 1px solid var(--line);
  color: inherit;
  font: 400 1.18rem var(--display);
  letter-spacing: .015em;
  text-decoration: none;
}
.network-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-inline: 24px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .1em;
}
.network-dot {
  width: 10px;
  height: 10px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: var(--violet);
  box-shadow: 0 0 0 4px rgba(154, 119, 214, .18);
}
.wallet-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  height: 100%;
  padding: 0 20px;
  border-left: 1px solid var(--line);
}
.wallet-address {
  max-width: 160px;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.side-rail {
  grid-area: side;
  position: sticky;
  top: var(--header-height);
  height: calc(100svh - var(--header-height));
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: #ebe5d2;
}
.rail-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 17px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--violet);
  font-size: 9px;
}
.rail-label strong { font-size: 14px; }
.workspace-nav { display: grid; }
.workspace-nav button {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 62px;
  padding: 0 18px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: inherit;
  text-align: left;
  transition: padding .18s, background .18s;
}
.workspace-nav button:hover { padding-left: 23px; background: rgba(245, 200, 66, .45); }
.workspace-nav button[aria-current="page"] { background: var(--yellow); }
.workspace-nav span, .workspace-nav i {
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
}
.workspace-nav strong { font-size: 11px; text-transform: uppercase; }
.workspace-nav i {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
}
.rail-foot {
  margin-top: auto;
  padding: 18px;
  border-top: 1px solid var(--line);
  font-size: 8px;
  line-height: 1.55;
  text-transform: uppercase;
}
.rail-foot p { margin: 0 0 12px; color: var(--muted); }
.rail-foot a { color: inherit; }

.workspace { grid-area: workspace; min-width: 0; }
.workspace-view { min-height: calc(100svh - var(--header-height)); animation: view-in .28s ease-out both; }
.workspace-heading {
  display: grid;
  grid-template-columns: minmax(340px, 1.45fr) minmax(230px, .55fr);
  gap: 6vw;
  align-items: end;
  padding: clamp(42px, 6vw, 84px);
  border-bottom: 1px solid var(--line);
}
.workspace-heading h1 {
  margin: 16px 0 0;
  font: 400 clamp(4.5rem, 8vw, 9rem)/.8 var(--display);
  letter-spacing: -.035em;
}
.workspace-heading > p {
  max-width: 440px;
  margin: 0;
  font-size: 12px;
  line-height: 1.7;
}
.studio-heading-actions {
  display: grid;
  justify-items: start;
  gap: 18px;
  max-width: 440px;
}
.studio-heading-actions p {
  margin: 0;
  font-size: 12px;
  line-height: 1.7;
}
.studio-heading-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}
.studio-heading-actions .text-control:disabled {
  cursor: default;
  opacity: .35;
}
.compact-heading { padding-block: clamp(38px, 5vw, 70px); }
.compact-heading h1 { font-size: clamp(4rem, 7vw, 7.5rem); }
.eyebrow {
  margin: 0;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.mint-floor {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(320px, .8fr);
  min-height: 620px;
}
.mint-figure {
  position: relative;
  min-height: 610px;
  overflow: hidden;
  display: grid;
  place-items: end center;
  border-right: 1px solid var(--line);
  background: var(--yellow);
}
.mint-figure::before {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(23,19,15,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(23,19,15,.08) 1px, transparent 1px);
  background-size: 36px 36px;
  content: "";
}
.mint-figure > img {
  position: relative;
  z-index: 1;
  display: block;
  width: min(90%, 630px);
  max-height: 570px;
  object-fit: contain;
  filter: drop-shadow(10px 13px 0 rgba(23, 19, 15, .14));
  transform-origin: bottom;
  animation: guy-arrives .6s cubic-bezier(.2,.9,.2,1.18) both;
}
.mint-figure > [data-mint-fixture-preview] {
  position: relative;
  z-index: 1;
  width: min(94%, 660px);
  align-self: center;
  animation: guy-arrives .6s cubic-bezier(.2,.9,.2,1.18) both;
}
.mint-figure > [data-mint-fixture-preview] .composition-stack { width: 100%; }
.mint-figure .v2-core-cover {
  display: block;
  width: min(78%, 620px);
  margin: auto;
  border: 2px solid var(--ink);
  box-shadow: 14px 14px 0 var(--ink);
  transform: rotate(-1deg);
}
.mint-figure > p {
  position: absolute;
  z-index: 3;
  right: 18px;
  bottom: 14px;
  max-width: 240px;
  margin: 0;
  font-size: 8px;
  line-height: 1.5;
  text-align: right;
  text-transform: uppercase;
}
.figure-stamp {
  position: absolute;
  z-index: 3;
  top: 24px;
  left: 24px;
  padding: 13px 10px;
  border: 2px solid;
  border-radius: 50%;
  font-size: 9px;
  line-height: 1.25;
  text-align: center;
  transform: rotate(-10deg);
}
.mint-controls { align-self: center; padding: clamp(34px, 5vw, 72px); }
.system-line {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  margin: 0;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
  font-size: 9px;
}
.system-line:first-child { border-top: 1px solid var(--line); }
.system-line span { color: var(--muted); }

.ink-button, .outline-button, .text-control {
  border: 0;
  color: inherit;
  text-transform: uppercase;
}
.ink-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 46px;
  padding: 13px 16px;
  background: var(--ink);
  color: var(--paper);
  font-size: 10px;
  transition: transform .18s, background .18s, color .18s;
}
.ink-button:hover { background: var(--red); color: var(--ink); transform: translateX(4px); }
.ink-button:disabled, .outline-button:disabled {
  cursor: not-allowed;
  opacity: .35;
  transform: none;
}
.ink-button.compact { min-height: 38px; padding: 10px 13px; }
.ink-button.jumbo { width: 100%; min-height: 62px; margin-top: 30px; padding: 17px 20px; }
.outline-button {
  padding: 10px 13px;
  border: 1px solid var(--ink);
  background: transparent;
  font-size: 9px;
  transition: background .18s, color .18s;
}
.outline-button:hover { background: var(--ink); color: var(--paper); }
.text-control {
  padding: 5px 0;
  border-bottom: 1px solid;
  background: transparent;
  font-size: 9px;
}
.microcopy { margin: 10px 0 0; color: var(--muted); font-size: 8px; line-height: 1.5; }
.faucet-block {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px 20px;
  align-items: center;
  margin-top: 50px;
  padding: 20px;
  border: 1px solid;
  background: var(--acid);
  box-shadow: 7px 7px 0 var(--ink);
  transform: rotate(.5deg);
}
.faucet-block[aria-disabled="true"] { background: #ded9c8; box-shadow: none; transform: none; }
.faucet-tag { grid-column: 1 / -1; font-size: 8px; letter-spacing: .12em; }
.faucet-block strong { font: 400 1.15rem var(--display); letter-spacing: .015em; }
.faucet-block p { margin: 5px 0 0; font-size: 8px; line-height: 1.5; }
.faucet-block small { grid-column: 1 / -1; color: var(--muted); font-size: 8px; }

.collection-toolbar, .inventory-key, .board-heading, .parts-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px clamp(24px, 4vw, 55px);
  border-bottom: 1px solid var(--line);
  font-size: 9px;
  text-transform: uppercase;
}
.guy-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.guy-card {
  min-width: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.guy-card:nth-child(3n) { border-right: 0; }
.guy-image {
  position: relative;
  overflow: hidden;
  width: 100%;
  padding: 0;
  border: 0;
  aspect-ratio: 1;
  display: grid;
  place-items: end center;
  background: var(--blue);
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.guy-card:nth-child(3n + 2) .guy-image { background: var(--yellow); }
.guy-card:nth-child(3n + 3) .guy-image { background: var(--acid); }
.guy-image > .token-guy-image { display: block; width: 98%; max-height: 100%; object-fit: contain; transition: transform .25s; }
.guy-image .composition-stack { width: 100%; transition: transform .25s; }
.guy-card:hover .guy-image > .token-guy-image,
.guy-card:hover .guy-image .composition-stack { transform: scale(1.035) rotate(-1deg); }
.guy-art-unavailable {
  display: grid;
  place-content: center;
  gap: 8px;
  min-height: 240px;
  width: 100%;
  padding: 24px;
  color: var(--ink);
  background:
    linear-gradient(135deg, transparent 0 48%, rgb(23 19 15 / 8%) 48% 52%, transparent 52%),
    var(--paper);
  text-align: center;
}
.guy-art-unavailable strong { font: 400 clamp(20px, 3vw, 38px)/1 var(--display); }
.guy-art-unavailable span { font-weight: 700; }
.guy-art-unavailable small { color: var(--muted); }
.token-origin {
  position: absolute;
  z-index: 4;
  top: 12px;
  left: 12px;
  padding: 6px 8px;
  border: 1px solid;
  background: var(--paper);
  font-size: 8px;
  text-transform: uppercase;
}
.view-guy-label {
  position: absolute;
  z-index: 4;
  right: 12px;
  bottom: 12px;
  padding: 7px 9px;
  border: 1px solid;
  background: var(--paper);
  font-size: 8px;
}
.composition-stack {
  position: relative;
  width: min(90%, 650px);
  aspect-ratio: 1;
  overflow: hidden;
}
.composition-stack > img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  animation: composition-snap .22s ease-out both;
}
.composition-stack[data-composition-ready="false"] > img {
  visibility: hidden;
  animation: none;
}
.composition-stack.is-compact { width: 100%; }
.composition-missing {
  position: absolute;
  z-index: 5;
  right: 7%;
  bottom: 8%;
  left: 7%;
  padding: 10px;
  border: 1px solid;
  background: var(--paper);
  font-size: 8px;
  text-align: left;
}
@keyframes composition-snap {
  from { opacity: 0; transform: translateY(6px) scale(.985); }
  to { opacity: 1; transform: none; }
}
.card-body { padding: 18px; }
.card-title { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.card-title strong { font: 400 1.25rem var(--display); letter-spacing: .015em; }
.card-title span { color: var(--muted); font-size: 9px; }
.card-meta { margin: 10px 0 0; color: var(--muted); font-size: 8px; line-height: 1.5; }
.metadata-state {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 13px;
  padding: 9px;
  border: 1px solid var(--line);
  background: var(--acid);
  font-size: 8px;
  text-transform: uppercase;
}
.metadata-state[data-metadata-status="pending"] { background: var(--yellow); }
.metadata-state .outline-button { padding: 7px 9px; font-size: 7px; }
.card-objkt-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 13px;
  text-decoration: none;
}
.inline-transfer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 15px;
}
.inline-transfer input {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  font-size: 9px;
}

.inventory-key { justify-content: flex-start; gap: 30px; }
.inventory-key span { display: flex; align-items: center; gap: 7px; }
.usage-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border: 1px solid var(--ink);
  border-radius: 50%;
}
.usage-dot.unlimited { background: var(--acid); }
.usage-dot.finite { background: var(--yellow); }
.usage-dot.exclusive { background: var(--red); }
.trait-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.trait-row {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  min-height: 150px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.trait-row:nth-child(2n) { border-right: 0; }
.trait-preview {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border-right: 1px solid var(--line);
  background: var(--yellow);
}
.trait-preview img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 115px;
  object-fit: contain;
}
.trait-preview > span {
  position: absolute;
  top: 7px;
  left: 7px;
  padding: 4px 5px;
  border: 1px solid;
  background: var(--paper);
  font-size: 7px;
}
.trait-preview.is-missing {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 7px;
  padding: 8px;
  text-align: center;
}
.trait-preview.is-missing > span { position: static; font: 400 1.8rem var(--display); }
.trait-preview.is-missing small { font-size: 7px; }
.trait-row[data-usage-kind="unlimited"] .trait-preview { background: var(--acid); }
.trait-row[data-usage-kind="exclusive"] .trait-preview { background: var(--red); }
.trait-details { padding: 17px; }
.trait-details header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.trait-details h2 { margin: 0; font: 400 1.08rem var(--display); letter-spacing: .015em; }
.trait-details header span { font-size: 8px; text-transform: uppercase; }
.trait-uses { margin: 10px 0; font-size: 9px; }

.studio-workbench {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(340px, .85fr);
  min-height: 650px;
}
.studio-canvas {
  position: sticky;
  top: var(--header-height);
  align-self: start;
  min-height: calc(100svh - var(--header-height));
  overflow: hidden;
  display: grid;
  place-items: center;
  border-right: 1px solid var(--line);
  background: var(--red);
}
.studio-canvas::before {
  position: absolute;
  inset: 7%;
  border: 1px dashed rgba(23,19,15,.42);
  content: "";
}
.studio-canvas > [data-studio-composition] {
  position: relative;
  z-index: 1;
  width: 100%;
  display: grid;
  place-items: center;
}
.studio-canvas .composition-stack { max-height: 72svh; }
.canvas-toolbar {
  position: absolute;
  z-index: 3;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  padding: 13px 16px;
  border-bottom: 1px solid var(--ink);
  background: var(--paper);
  font-size: 8px;
}
.selected-trait-tape {
  position: absolute;
  z-index: 3;
  right: 18px;
  bottom: 18px;
  left: 18px;
  padding: 12px;
  border: 1px solid;
  background: var(--paper);
  font-size: 8px;
  line-height: 1.5;
}
.studio-parts { padding: clamp(30px, 4vw, 55px); }
.parts-heading { padding: 0 0 17px; }
.studio-trait-picker { display: grid; }
.studio-option {
  display: grid;
  grid-template-columns: auto 64px minmax(0, 1fr) auto;
  gap: 13px;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
  font-size: 9px;
}
.studio-option input { width: 18px; height: 18px; accent-color: var(--ink); }
.studio-option small { color: var(--muted); }
.studio-option .trait-preview {
  width: 64px;
  height: 64px;
  border: 1px solid var(--line);
}
.studio-option .trait-preview img { min-height: 0; }

.guy-gallery {
  width: min(1180px, calc(100vw - 42px));
  max-width: none;
  max-height: calc(100svh - 42px);
  padding: 0;
  border: 1px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 16px 16px 0 rgba(23,19,15,.78);
}
.guy-gallery::backdrop { background: rgba(23,19,15,.72); backdrop-filter: blur(5px); }
.guy-gallery-heading {
  position: sticky;
  z-index: 6;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.guy-gallery-heading h2 { margin: 4px 0 0; font: 400 clamp(1.8rem, 4vw, 4rem)/.9 var(--display); }
.gallery-close {
  width: 46px;
  height: 46px;
  border: 1px solid;
  background: var(--red);
  font-size: 28px;
  cursor: pointer;
}
.guy-gallery-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(330px, .9fr); }
.guy-gallery-art {
  position: sticky;
  top: 83px;
  min-height: min(680px, calc(100svh - 126px));
  display: grid;
  place-items: center;
  align-self: start;
  border-right: 1px solid var(--line);
  background: var(--blue);
}
.guy-gallery-art .composition-stack { width: min(94%, 720px); }
.guy-gallery-art > img { display: block; max-width: 96%; max-height: 680px; object-fit: contain; }
.guy-gallery-data > section { padding: 25px; border-bottom: 1px solid var(--line); }
.guy-trait-list { margin: 16px 0 0; padding: 0; list-style: none; }
.guy-trait-list li {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) auto;
  gap: 13px;
  align-items: center;
  min-height: 76px;
  border-top: 1px solid var(--line);
}
.guy-trait-list li:last-child { border-bottom: 1px solid var(--line); }
.guy-trait-list .trait-preview { width: 70px; height: 75px; border-left: 1px solid var(--line); }
.guy-trait-list .trait-preview img { min-height: 0; }
.guy-trait-list strong { font: 400 .95rem var(--display); }
.guy-trait-list small { display: block; margin-top: 4px; color: var(--muted); font-size: 7px; text-transform: uppercase; }
.guy-trait-list > li > span { padding-right: 10px; color: var(--muted); font-size: 8px; }
.guy-metadata dl { margin: 16px 0 22px; }
.guy-metadata dl div { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 16px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 8px; }
.guy-metadata dl div:last-child { border-bottom: 1px solid var(--line); }
.guy-metadata dt { color: var(--muted); text-transform: uppercase; }
.guy-metadata dd { margin: 0; overflow-wrap: anywhere; }
.gallery-chain-link { display: inline-block; text-decoration: none; }

.pack-layout {
  display: grid;
  grid-template-columns: minmax(260px, .55fr) minmax(0, 1fr);
  min-height: 580px;
}
.pack-spec { padding: clamp(30px, 4vw, 55px); border-right: 1px solid var(--line); background: var(--blue); }
.pack-spec > p { font-size: 9px; letter-spacing: .12em; }
.pack-spec ol { margin: 45px 0 0; padding: 0; list-style: none; }
.pack-spec li {
  display: grid;
  grid-template-columns: 80px 1fr;
  align-items: center;
  padding: 20px 0;
  border-top: 1px solid;
}
.pack-spec li:last-child { border-bottom: 1px solid; }
.pack-spec li strong { font: 400 2.2rem var(--display); }
.pack-spec li span { font-size: 10px; text-transform: uppercase; }
.pack-inventory { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start; }
.pack-card { min-height: 290px; padding: 24px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.pack-card:nth-child(2n) { border-right: 0; }
.pack-visual {
  min-height: 165px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border: 2px solid;
  background: var(--yellow);
  box-shadow: 7px 7px 0 var(--ink);
  font: 400 3.2rem/.85 var(--display);
  text-align: center;
  transform: rotate(-1deg);
}
.pack-card:nth-child(2n) .pack-visual { background: var(--violet); transform: rotate(1deg); }
.pack-receipt {
  grid-column: 1 / -1;
  margin-top: 24px;
  padding: 20px clamp(24px, 4vw, 55px) 28px;
  border-top: 3px solid var(--ink);
}
.pack-receipt[hidden] { display: none; }
.pack-receipt > header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 12px;
}
.pack-receipt h2 { margin: 3px 0 0; font: 400 clamp(1.25rem, 3vw, 2.2rem) var(--display); }
.pack-receipt > header > span,
.pack-receipt > a { font-size: 9px; letter-spacing: .08em; }
.pack-receipt ol {
  margin: 0 0 14px;
  padding: 0;
  border-bottom: 1px solid var(--ink);
  list-style: none;
}
.pack-receipt li {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-top: 1px solid var(--ink);
}
.pack-receipt li > b,
.pack-receipt li > i { font-size: 9px; font-style: normal; }
.pack-receipt li span { display: grid; gap: 2px; }
.pack-receipt li small { color: var(--muted); }

.exchange-balance {
  display: flex;
  align-items: center;
  gap: 25px;
  padding: 18px clamp(24px, 4vw, 55px);
  border-bottom: 1px solid var(--line);
  background: var(--acid);
  font-size: 9px;
}
.exchange-balance strong { margin-right: auto; font-size: 10px; }
.exchange-balance b { font: 400 1.8rem var(--display); }
.exchange-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; min-height: 560px; }
.market-board { border-right: 1px solid var(--line); }
.listing-list { display: grid; }
.listing-row {
  display: grid;
  grid-template-columns: minmax(140px, 1.4fr) .55fr .55fr auto;
  gap: 20px;
  align-items: center;
  padding: 18px clamp(24px, 4vw, 55px);
  border-bottom: 1px solid var(--line);
  font-size: 9px;
}
.listing-row strong { font: 400 1rem var(--display); letter-spacing: .015em; }
.listing-row small { display: block; margin-top: 4px; color: var(--muted); }
.listing-form { align-self: start; padding: 28px; }
.listing-form label {
  display: grid;
  gap: 8px;
  margin-top: 22px;
  font-size: 9px;
  text-transform: uppercase;
}
.listing-form input, .listing-form select {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
  color: inherit;
}
.listing-form .ink-button { width: 100%; margin-top: 28px; }

.empty-state {
  grid-column: 1 / -1;
  min-height: 260px;
  display: grid;
  place-items: center;
  padding: 50px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.65;
  text-align: center;
}
.empty-state strong { display: block; margin-bottom: 8px; color: var(--ink); font: 400 1.65rem var(--display); }

.operation-rail {
  grid-area: operation;
  position: sticky;
  top: var(--header-height);
  height: calc(100svh - var(--header-height));
  padding: 22px;
  border-left: 1px solid var(--line);
  background: var(--ink);
  color: var(--paper);
}
.operation-rail > div { display: flex; align-items: center; gap: 10px; }
.operation-light {
  width: 10px;
  height: 10px;
  border: 1px solid var(--paper);
  border-radius: 50%;
  background: var(--acid);
}
.operation-rail[data-status="pending"] .operation-light { background: var(--yellow); animation: operation-pulse 1s infinite; }
.operation-rail[data-status="error"] .operation-light { background: var(--red); }
.operation-rail > strong {
  display: block;
  min-block-size: 2.5em;
  margin-top: 32px;
  font: 400 1.35rem var(--display);
  letter-spacing: .015em;
}
.operation-rail > p { color: #c4bcaa; font-size: 9px; line-height: 1.65; }
.operation-rail > p[data-operation-message] { min-block-size: 5em; }
.operation-rail a { color: var(--acid); font-size: 9px; text-transform: uppercase; }

@keyframes view-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes guy-arrives { from { opacity: 0; transform: translateY(70px) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes operation-pulse { 50% { opacity: .35; transform: scale(.72); } }
@keyframes startup-pulse {
  from { transform: scale(.72); }
  to { transform: scale(1); box-shadow: 0 0 0 7px rgba(245, 200, 66, .22); }
}

@media (max-width: 1180px) {
  :root { --operation-width: 0px; }
  .app-shell { grid-template-columns: var(--side-width) minmax(0, 1fr); grid-template-areas: "header header" "side workspace"; }
  .app-header { grid-template-columns: var(--side-width) 1fr auto; }
  .operation-rail {
    position: fixed;
    z-index: 45;
    right: 18px;
    bottom: 18px;
    top: auto;
    width: min(360px, calc(100vw - 36px));
    height: auto;
    min-height: 116px;
    border: 1px solid var(--paper);
    box-shadow: 8px 8px 0 var(--violet);
  }
  .operation-rail strong { margin-top: 16px; }
  .operation-rail > p { margin-bottom: 0; }
}

@media (max-width: 820px) {
  :root { --header-height: 64px; }
  .app-shell {
    display: block;
    padding-bottom: 70px;
  }
  .app-header {
    grid-template-columns: 1fr auto;
    min-height: var(--header-height);
  }
  .wordmark { border-right: 0; padding-inline: 16px; }
  .network-identity { display: none; }
  .wallet-controls { border-left: 0; padding-inline: 12px; }
  .wallet-address { display: none; }
  .side-rail {
    position: fixed;
    z-index: 40;
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 68px;
    border-top: 2px solid var(--ink);
    border-right: 0;
  }
  .operation-rail {
    bottom: 86px;
    max-height: 185px;
    overflow: auto;
  }
  .rail-label, .rail-foot { display: none; }
  .workspace-nav {
    height: 100%;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
  }
  .workspace-nav button {
    min-height: 0;
    height: 100%;
    display: grid;
    grid-template-columns: 1fr;
    place-items: center;
    gap: 4px;
    padding: 5px 2px;
    border-right: 1px solid var(--line);
    border-bottom: 0;
    text-align: center;
  }
  .workspace-nav button:hover { padding: 5px 2px; }
  .workspace-nav button > span, .workspace-nav button > i { display: none; }
  .workspace-nav strong { font-size: clamp(6px, 1.8vw, 8px); }
  .workspace-heading, .mint-floor, .studio-workbench, .pack-layout, .exchange-layout {
    grid-template-columns: 1fr;
  }
  .workspace-heading { gap: 28px; padding: 50px 22px; }
  .workspace-heading > * { min-width: 0; }
  .workspace-heading h1 { overflow-wrap: anywhere; font-size: clamp(3.7rem, 17vw, 7rem); }
  .workspace-heading > p { font-size: 10px; }
  .mint-figure { min-height: 500px; border-right: 0; border-bottom: 1px solid var(--line); }
  .mint-controls { padding: 38px 22px 70px; }
  .guy-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .guy-card:nth-child(3n) { border-right: 1px solid var(--line); }
  .guy-card:nth-child(2n) { border-right: 0; }
  .trait-list { grid-template-columns: 1fr; }
  .trait-row { border-right: 0; }
  .studio-canvas { position: relative; top: auto; min-height: 540px; border-right: 0; border-bottom: 1px solid var(--line); }
  .guy-gallery { width: calc(100vw - 22px); max-height: calc(100svh - 22px); box-shadow: 8px 8px 0 rgba(23,19,15,.78); }
  .guy-gallery-layout { grid-template-columns: 1fr; }
  .guy-gallery-art { position: relative; top: auto; min-height: min(88vw, 560px); border-right: 0; border-bottom: 1px solid var(--line); }
  .pack-spec { border-right: 0; border-bottom: 1px solid var(--line); }
  .market-board { border-right: 0; border-bottom: 1px solid var(--line); }
  .listing-row { grid-template-columns: 1fr 1fr auto; padding-inline: 22px; }
  .listing-row > div:first-child { grid-column: 1 / -1; }
}

@media (max-width: 520px) {
  .startup-screen { padding: 28px 22px 38px; }
  .startup-brand > strong { font-size: clamp(5.2rem, 29vw, 9rem); }
  .ink-button.compact { font-size: 8px; }
  .wallet-controls { gap: 8px; }
  .wallet-controls .text-control { font-size: 7px; }
  .mint-figure { min-height: 430px; }
  .guy-grid, .pack-inventory { grid-template-columns: 1fr; }
  .guy-card, .guy-card:nth-child(3n) { border-right: 0; }
  .pack-card { border-right: 0; }
  .inventory-key { flex-wrap: wrap; gap: 12px 20px; }
  .trait-row { grid-template-columns: 92px 1fr; }
  .studio-canvas { min-height: 450px; }
  .studio-option { grid-template-columns: auto 54px minmax(0, 1fr); }
  .studio-option > small:last-child { grid-column: 2 / -1; }
  .studio-option .trait-preview { width: 54px; height: 54px; }
  .guy-gallery-heading { padding: 14px; }
  .guy-gallery-data > section { padding: 18px; }
  .exchange-balance { flex-wrap: wrap; }
  .exchange-balance strong { margin-right: 0; }
  .exchange-balance .outline-button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* Customer workshop refinements */
.skip-link {
  position: fixed;
  z-index: 2000;
  top: 10px;
  left: 10px;
  padding: 12px 16px;
  border: 2px solid var(--ink);
  background: var(--acid);
  color: var(--ink);
  font-size: 12px;
  text-transform: uppercase;
  transform: translateY(-160%);
}
.skip-link:focus { transform: none; }

button,
input,
select,
.outline-button,
.text-control {
  min-height: 44px;
}

.mint-figure > [data-mint-preview] {
  position: relative;
  z-index: 1;
  width: min(94%, 660px);
  align-self: center;
  animation: guy-arrives .6s cubic-bezier(.2,.9,.2,1.18) both;
}
.mint-figure > [data-mint-preview] .v2-core-cover {
  display: block;
  width: min(78%, 620px);
  margin: auto;
  border: 2px solid var(--ink);
  box-shadow: 14px 14px 0 var(--ink);
  transform: rotate(-1deg);
}

.collection-filters {
  display: grid;
  grid-template-columns: minmax(180px, 1.5fr) repeat(4, minmax(130px, 1fr));
  gap: 1px;
  padding: 1px;
  border-bottom: 1px solid var(--line);
  background: var(--line);
}
.collection-filters label {
  display: grid;
  gap: 7px;
  padding: 12px 14px;
  background: var(--paper);
  font-size: 10px;
  text-transform: uppercase;
}
.collection-filters input,
.collection-filters select {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
}

.trait-list { display: block; }
.trait-category,
.studio-category {
  border-bottom: 1px solid var(--ink);
}
.trait-category > summary,
.studio-category > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 52px;
  padding: 10px clamp(18px, 3vw, 38px);
  background: #e9e3cf;
  cursor: pointer;
  list-style: none;
  text-transform: uppercase;
}
.trait-category > summary::-webkit-details-marker,
.studio-category > summary::-webkit-details-marker { display: none; }
.trait-category > summary::after,
.studio-category > summary::after {
  content: "+";
  font-size: 20px;
}
.trait-category[open] > summary::after,
.studio-category[open] > summary::after { content: "−"; }
.trait-category > summary strong,
.studio-category > summary strong { font: 400 1.1rem var(--display); }
.trait-category > summary span,
.studio-category > summary span {
  margin-left: auto;
  color: var(--muted);
  font-size: 10px;
}
.trait-category > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.trait-row {
  min-height: 260px;
  grid-template-columns: 150px minmax(0, 1fr);
}
.trait-row[data-mode="unlimited"] .trait-preview { background: var(--acid); }
.trait-row[data-mode="exclusive"] .trait-preview { background: var(--red); }
.trait-details h3 {
  margin: 0;
  font: 400 1.08rem var(--display);
  letter-spacing: .015em;
}
.trait-details > p {
  margin: 10px 0;
  font-size: 10px;
  line-height: 1.55;
}
.trait-mode-copy { color: var(--muted); }
.trait-quantities {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 14px 0;
  background: var(--line);
}
.trait-quantities div {
  min-width: 0;
  padding: 9px;
  background: var(--paper);
  text-align: center;
}
.trait-quantities dt {
  color: var(--muted);
  font-size: 8px;
  text-transform: uppercase;
}
.trait-quantities dd {
  margin: 4px 0 0;
  font: 400 1.25rem var(--display);
}
.token-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 12px;
}
.token-links a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: inherit;
  font-size: 10px;
  text-transform: uppercase;
}
.inline-transfer {
  grid-template-columns: minmax(88px, .35fr) minmax(160px, 1fr) auto;
  align-items: end;
}
.inline-transfer label,
.listing-row form label,
.pack-product form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 9px;
  text-transform: uppercase;
}
.inline-transfer input { min-height: 44px; }

.studio-category > summary { padding-inline: 0; background: transparent; }
.studio-category > div { display: grid; }
.studio-option { min-height: 88px; }
.studio-option input { width: 24px; height: 24px; }
.composition-empty {
  position: absolute;
  inset: 50% auto auto 50%;
  width: max-content;
  max-width: 80%;
  padding: 10px 12px;
  border: 1px solid;
  background: var(--paper);
  font-size: 10px;
  transform: translate(-50%, -50%);
}

.pack-layout {
  display: block;
  min-height: 580px;
}
.pack-store,
.pack-inventory-wrap { border-bottom: 1px solid var(--ink); }
.pack-product {
  display: grid;
  grid-template-columns: minmax(140px, 240px) minmax(220px, 1fr) minmax(220px, .65fr);
  gap: clamp(20px, 4vw, 54px);
  align-items: center;
  padding: clamp(24px, 4vw, 48px);
  background: var(--blue);
}
.pack-product > img {
  display: block;
  width: 100%;
  border: 2px solid var(--ink);
  box-shadow: 8px 8px 0 var(--ink);
  transform: rotate(-1deg);
}
.pack-product h3 {
  margin: 0 0 12px;
  font: 400 clamp(1.6rem, 3vw, 3rem)/.9 var(--display);
}
.pack-product p { max-width: 45ch; font-size: 11px; line-height: 1.6; }
.pack-product > div > strong { font: 400 1.5rem var(--display); }
.pack-product form { display: grid; gap: 12px; }
.pack-product input {
  width: 100%;
  padding: 10px;
  border: 1px solid;
  background: var(--paper);
}
.pack-cover {
  display: block;
  width: 100%;
  margin-bottom: 18px;
  border: 2px solid var(--ink);
}

.listing-row {
  grid-template-columns: 92px minmax(180px, 1.4fr) .45fr .55fr auto;
  min-height: 122px;
}
.listing-row > .trait-preview {
  width: 92px;
  height: 92px;
  border: 1px solid var(--line);
}
.listing-row > .trait-preview img { min-height: 0; }
.listing-title .token-links { margin-top: 4px; }
.listing-title .token-links a { min-height: 30px; font-size: 8px; }
.listing-row form {
  display: grid;
  grid-template-columns: 78px auto;
  gap: 8px;
  align-items: end;
}
.listing-row input {
  width: 100%;
  padding: 9px;
  border: 1px solid;
  background: transparent;
}

.guy-actions .inline-transfer { margin-block: 18px 28px; }
.recovery-preview {
  padding: 18px;
  border: 1px solid var(--ink);
  background: var(--yellow);
}
.recovery-preview ul,
.confirm-dialog ul {
  margin: 14px 0 18px;
  padding: 0;
  list-style: none;
}
.recovery-preview li,
.confirm-dialog li {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  font-size: 9px;
}
.recovery-preview li:last-child,
.confirm-dialog li:last-child { border-bottom: 1px solid var(--line); }
.recovery-preview li span,
.confirm-dialog li span { color: var(--muted); text-align: right; }
.danger-button {
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  border: 2px solid var(--ink);
  background: var(--red);
  color: var(--ink);
  font: inherit;
  font-size: 10px;
  text-transform: uppercase;
}
.confirm-dialog {
  width: min(620px, calc(100vw - 30px));
  padding: 0;
  border: 2px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 12px 12px 0 var(--red);
}
.confirm-dialog::backdrop { background: rgba(23,19,15,.76); }
.confirm-dialog form { padding: clamp(22px, 5vw, 44px); }
.confirm-dialog h2 {
  margin: 10px 0 14px;
  font: 400 clamp(2rem, 6vw, 4rem)/.9 var(--display);
}
.confirm-dialog p:not(.eyebrow) { font-size: 11px; line-height: 1.6; }
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}
.dialog-actions > * { min-width: 150px; }

.operation-actions {
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px !important;
  margin-top: 16px;
}
.operation-rail .text-control {
  color: var(--acid);
  border-color: currentColor;
}
.activity-log {
  margin-top: 24px;
  border-top: 1px solid rgba(244,240,223,.35);
  padding-top: 14px;
}
.activity-log summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-size: 9px;
  text-transform: uppercase;
}
.activity-log summary::after {
  content: "⌄";
  font-size: 14px;
  transition: transform .16s ease;
}
.activity-log[open] summary::after { transform: rotate(180deg); }
.activity-log ol {
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
  max-height: min(52vh, 520px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.activity-log li {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
  padding: 9px 0;
  border-top: 1px solid rgba(244,240,223,.2);
  font-size: 8px;
}
.activity-log li > time { color: #c4bcaa; padding-top: 1px; }
.activity-entry-copy { display: grid; gap: 3px; min-width: 0; }
.activity-entry-copy > strong { margin: 0; font: 600 8px var(--mono); }
.activity-entry-copy > small {
  color: #c4bcaa;
  font: 500 8px/1.45 var(--mono);
  text-transform: none;
}
.activity-log li > a { min-height: 32px; display: grid; place-items: center; }

.worn-preview {
  margin: 12px 0;
  border: 1px solid var(--line);
  background: var(--paper);
}
.worn-preview > summary {
  display: flex;
  min-height: 44px;
  align-items: center;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
}
.worn-preview > div {
  position: relative;
  width: min(220px, 100%);
  border-top: 1px solid var(--line);
}
.worn-preview > div > span {
  position: absolute;
  z-index: 4;
  top: 7px;
  left: 7px;
  padding: 4px 6px;
  border: 1px solid var(--line);
  background: var(--paper);
  font-size: 6px;
}
.worn-preview .composition-stack {
  width: 100%;
  aspect-ratio: 1;
  background: var(--blue);
}
.worn-preview-unavailable {
  margin: 10px 0 !important;
  color: var(--muted);
  font-size: 8px !important;
}
.listing-title .worn-preview { max-width: 220px; }

@media (max-width: 1080px) {
  .collection-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .pack-product {
    grid-template-columns: 180px minmax(0, 1fr);
  }
  .pack-product form { grid-column: 1 / -1; }
}

@media (max-width: 820px) {
  .collection-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .trait-category > div { grid-template-columns: 1fr; }
  .trait-row { border-right: 0; }
  .pack-product { grid-template-columns: minmax(120px, .55fr) 1fr; }
  .listing-row {
    grid-template-columns: 78px minmax(0, 1fr) auto;
    gap: 12px;
  }
  .listing-row > .trait-preview { width: 78px; height: 78px; }
  .listing-row > div.trait-preview:first-child { grid-column: 1; }
  .listing-row > div:nth-of-type(2) { grid-column: 2; }
  .listing-row > div:nth-of-type(3) { grid-column: 3; }
  .listing-row form,
  .listing-row > button { grid-column: 2 / -1; }
  .inline-transfer {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .inline-transfer button { grid-column: 1 / -1; }
}

@media (max-width: 520px) {
  .collection-filters { grid-template-columns: 1fr; }
  .trait-row { grid-template-columns: 100px minmax(0, 1fr); }
  .trait-quantities { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pack-product {
    grid-template-columns: 1fr;
    padding: 24px 18px 34px;
  }
  .pack-product form { grid-column: auto; }
  .listing-row {
    grid-template-columns: 72px minmax(0, 1fr);
    padding-inline: 16px;
  }
  .listing-row > div:nth-of-type(2),
  .listing-row > div:nth-of-type(3) { grid-column: auto; }
  .listing-row form,
  .listing-row > button { grid-column: 1 / -1; }
  .inline-transfer { grid-template-columns: 1fr; }
  .inline-transfer button { grid-column: auto; }
  .dialog-actions { flex-direction: column-reverse; }
  .dialog-actions > * { width: 100%; }
}

@media (forced-colors: active) {
  button,
  input,
  select,
  a,
  summary {
    forced-color-adjust: auto;
  }
  .network-dot,
  .operation-light { border: 2px solid currentColor; }
}

/* Compact activity inspector and trait inventory */
.app-shell[data-operation-panel="collapsed"] {
  --operation-width: 0px;
}
.app-shell[data-operation-panel="collapsed"] .operation-rail {
  display: none;
}
.operation-panel-toggle {
  position: fixed;
  z-index: 60;
  top: calc(var(--header-height) + 12px);
  right: 12px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  border: 1px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  box-shadow: 4px 4px 0 var(--ink);
}
.operation-panel-toggle .operation-light {
  width: 8px;
  height: 8px;
  border-color: var(--ink);
}
.operation-panel-toggle[data-status="pending"] .operation-light {
  background: var(--yellow);
  animation: operation-pulse 1s infinite;
}
.operation-panel-toggle[data-status="error"] .operation-light { background: var(--red); }
.operation-panel-toggle[data-status="success"] .operation-light { background: var(--acid); }
.app-shell[data-operation-panel="expanded"] .operation-panel-toggle {
  background: var(--acid);
  box-shadow: none;
}
.app-shell[data-operation-panel="expanded"] .operation-rail {
  padding-top: 64px;
}
.operation-toast-region {
  position: fixed;
  z-index: 59;
  top: calc(var(--header-height) + 60px);
  right: 12px;
  width: min(390px, calc(100vw - 24px));
}
.operation-toast {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px 12px;
  align-items: start;
  padding: 16px;
  border: 2px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 8px 8px 0 var(--violet);
  animation: toast-in .22s ease-out both;
}
.operation-toast-region[data-status="error"] .operation-toast { box-shadow: 8px 8px 0 var(--red); }
.operation-toast-region[data-status="pending"] .operation-toast { box-shadow: 8px 8px 0 var(--yellow); }
.operation-toast .operation-light {
  margin-top: 3px;
  border-color: var(--ink);
}
.operation-toast-region[data-status="pending"] .operation-light {
  background: var(--yellow);
  animation: operation-pulse 1s infinite;
}
.operation-toast-region[data-status="error"] .operation-light { background: var(--red); }
.operation-toast strong {
  display: block;
  font: 400 1rem var(--display);
  letter-spacing: .015em;
}
.operation-toast p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.55;
}
.operation-toast a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  color: inherit;
  font-size: 8px;
  text-transform: uppercase;
}
.operation-toast > button:not(.toast-panel-link) {
  width: 30px;
  height: 30px;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 22px;
  line-height: 1;
}
.toast-panel-link {
  grid-column: 2 / -1;
  justify-self: start;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--ink);
  background: transparent;
  color: inherit;
  font-size: 8px;
  text-transform: uppercase;
}

.trait-category > div {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr));
}
.trait-row {
  min-height: 220px;
  grid-template-columns: 210px minmax(0, 1fr);
  content-visibility: auto;
  contain-intrinsic-size: 540px 220px;
}
.trait-row > .trait-preview {
  align-self: start;
  width: 100%;
  height: 220px;
  min-height: 220px;
}
.trait-row > .trait-preview img {
  min-height: 0;
  object-fit: contain;
}
.trait-details {
  min-width: 0;
  padding: 14px;
}
.trait-details h3 {
  font-size: 1rem;
  line-height: 1.05;
}
.trait-quantities {
  margin: 10px 0 6px;
}
.trait-quantities div { padding: 7px 5px; }
.trait-quantities dd { font-size: 1.05rem; }
.trait-details .token-links {
  gap: 5px 12px;
  margin-top: 2px;
}
.trait-details .token-links a {
  min-height: 32px;
  font-size: 8px;
}
.trait-manage {
  margin-top: 4px;
  border-top: 1px solid var(--line);
}
.trait-manage > summary {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  list-style: none;
  font-size: 8px;
  font-weight: 500;
  text-transform: uppercase;
}
.trait-manage > summary::-webkit-details-marker { display: none; }
.trait-manage > summary::after { content: "+"; font-size: 15px; }
.trait-manage[open] > summary::after { content: "−"; }
.trait-manage > div {
  padding-top: 2px;
  border-top: 1px solid var(--line);
}
.trait-manage > div > p {
  margin: 10px 0;
  font-size: 9px;
  line-height: 1.5;
}
.trait-manage .inline-transfer {
  grid-template-columns: minmax(70px, .35fr) minmax(120px, 1fr);
  margin-top: 12px;
}
.trait-manage .inline-transfer button { grid-column: 1 / -1; }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(-8px) scale(.98); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 820px) {
  .operation-panel-toggle {
    top: calc(var(--header-height) + 9px);
    right: 9px;
  }
  .operation-toast-region {
    top: calc(var(--header-height) + 54px);
    right: 9px;
    width: min(390px, calc(100vw - 18px));
  }
  .trait-row {
    grid-template-columns: 210px minmax(0, 1fr);
  }
}

@media (max-width: 520px) {
  .trait-row {
    min-height: 176px;
    grid-template-columns: 136px minmax(0, 1fr);
  }
  .trait-row > .trait-preview {
    height: 176px;
    min-height: 176px;
  }
  .trait-details { padding: 11px; }
  .trait-details header { gap: 7px; }
  .trait-details h3 { font-size: .86rem; }
  .trait-quantities { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trait-details .token-links a { min-height: 28px; }
}
