html:has(body.page-profile),
body.page-profile {
  background:
    radial-gradient(circle at 12% 8%, rgba(0, 255, 102, 0.12), transparent 28rem),
    radial-gradient(circle at 88% 18%, rgba(255, 184, 0, 0.07), transparent 26rem),
    #070a09 !important;
  color: #f3f3f3 !important;
}

.page-profile .bg-scan {
  background:
    repeating-linear-gradient(0deg, rgba(0, 255, 102, 0.045) 0 1px, transparent 1px 4px),
    linear-gradient(90deg, rgba(0, 255, 102, 0.035), transparent 34%, rgba(255, 184, 0, 0.02));
  opacity: 0.38;
}

.page-profile .header,
.page-profile .footer {
  background: #1f2422 !important;
  color: #f3f3f3;
}

.page-profile .footer {
  border-top: 4px solid #000;
}

.page-profile .nav-links a,
.page-profile .sb-footer-links a {
  color: rgba(243, 243, 243, 0.76);
}

.page-profile .nav-links a:hover,
.page-profile .sb-footer-links a:hover {
  color: #ffb800;
}

.console-shell {
  max-width: 1680px;
  padding: clamp(5rem, 8vw, 7rem) 0 4rem;
}

.console-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: end;
  margin-bottom: 1.25rem;
}

.console-hero h1 {
  margin: 0.35rem 0 0.75rem;
  font-family: "Press Start 2P", var(--mono);
  font-size: clamp(1.55rem, 3.6vw, 3.75rem);
  line-height: 1.12;
  letter-spacing: 0;
  text-transform: uppercase;
  text-shadow: 5px 5px 0 #000;
}

.console-hero p {
  max-width: 760px;
  color: rgba(234, 230, 242, 0.68);
  font-weight: 700;
}

.console-status,
.console-mini-button,
.console-panel-head,
.console-agent-id,
.console-tool-card,
.console-form span,
.console-output-label,
.profile-overview strong,
.profile-overview span,
.profile-overview small,
.console-output-metric span,
.console-output-section h3,
.console-output-details summary {
  font-family: "Press Start 2P", var(--mono);
  letter-spacing: 0;
  text-transform: uppercase;
}

.console-status {
  border: 3px solid #000;
  box-shadow: 5px 5px 0 #000;
  background: #24282a;
  color: #00ff66;
  padding: 0.9rem 1rem;
  font-size: 0.58rem;
  white-space: nowrap;
}

.console-status:hover {
  filter: brightness(1.08);
}

.profile-identity {
  display: grid;
  grid-template-columns: minmax(360px, 0.85fr) minmax(0, 1.15fr);
  gap: 1rem;
  margin: 0 0 1.25rem;
}

.profile-card,
.profile-picker {
  border: 5px solid #000;
  box-shadow: 7px 7px 0 #000;
  background:
    linear-gradient(135deg, rgba(0, 255, 102, 0.07), rgba(255, 184, 0, 0.035) 42%, rgba(0, 0, 0, 0)),
    #222628;
}

.profile-card {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  min-height: 230px;
  padding: 1.15rem;
}

.profile-avatar-frame {
  width: 132px;
  height: 132px;
  border: 4px solid #00ff66;
  background: #050808;
  box-shadow: 5px 5px 0 #000;
  overflow: hidden;
}

.profile-avatar-frame img {
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  object-fit: cover;
}

.profile-card-label,
.profile-picker-head span,
.profile-picker-head strong,
.profile-avatar-card strong,
.profile-avatar-card small {
  font-family: "Press Start 2P", var(--mono);
  letter-spacing: 0;
  text-transform: uppercase;
}

.profile-card-label,
.profile-picker-head span {
  color: #ffb800;
  font-size: 0.58rem;
}

.profile-card h2 {
  margin: 0.45rem 0 0.55rem;
  font-family: "Press Start 2P", var(--mono);
  font-size: clamp(0.95rem, 1.8vw, 1.35rem);
  line-height: 1.28;
  text-transform: uppercase;
  text-shadow: 3px 3px 0 #000;
}

.profile-card p {
  margin: 0;
  color: rgba(234, 230, 242, 0.68);
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.55;
  word-break: break-word;
}

.profile-x-status {
  display: inline-grid;
  gap: 0.32rem;
  width: fit-content;
  margin-top: 0.8rem;
  border: 2px solid rgba(0, 255, 102, 0.45);
  background: rgba(0, 255, 102, 0.07);
  box-shadow: 3px 3px 0 #000;
  padding: 0.55rem 0.65rem;
}

.profile-x-status span,
.profile-x-status strong {
  font-family: "Press Start 2P", var(--mono);
  letter-spacing: 0;
  text-transform: uppercase;
}

.profile-x-status span {
  color: #9a9fa4;
  font-size: 0.42rem;
}

.profile-x-status strong {
  color: #00ff66;
  font-size: 0.54rem;
  line-height: 1.45;
}

.profile-edit-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  align-items: end;
  margin-top: 1rem;
}

.profile-edit-form label {
  display: grid;
  gap: 0.35rem;
  grid-column: 1 / -1;
  min-width: 0;
}

.profile-edit-form label span,
.profile-edit-form small {
  color: #9a9fa4;
  font-family: "Press Start 2P", var(--mono);
  font-size: 0.46rem;
  line-height: 1.5;
  text-transform: uppercase;
}

.profile-edit-form input {
  min-width: 0;
  border: 3px solid #000;
  background: #111516;
  box-shadow: 3px 3px 0 #000;
  color: #00ff66;
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 900;
  padding: 0.72rem 0.78rem;
}

.profile-edit-form input:disabled {
  background: #121617 !important;
  color: rgba(234, 230, 242, 0.38);
  opacity: 1;
}

.profile-edit-form button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.profile-edit-form .console-mini-button {
  width: 100%;
  min-width: 0;
  min-height: 2.7rem;
  overflow-wrap: anywhere;
  padding-inline: 0.45rem;
}

.profile-x-disconnect {
  background: #3b1d24;
  color: #ff8ea0;
}

.profile-x-disconnect[hidden] {
  display: none !important;
}

.profile-x-disconnect:not([hidden]) {
  grid-column: 1 / -1;
}

.profile-edit-form small {
  grid-column: 1 / -1;
  min-height: 0.8rem;
  color: #00ff66;
}

.profile-picker {
  min-width: 0;
  padding: 1rem;
}

.profile-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 3px solid #000;
  padding-bottom: 0.85rem;
  margin-bottom: 0.85rem;
}

.profile-picker-head div {
  display: grid;
  gap: 0.35rem;
}

.profile-picker-head strong {
  color: #f3f3f3;
  font-size: 0.62rem;
}

.profile-avatar-list {
  display: flex;
  gap: 0.75rem;
  min-height: 118px;
  overflow-x: auto;
  padding: 0.15rem 0.15rem 0.35rem;
}

.profile-avatar-card {
  display: grid;
  grid-template-columns: 82px;
  gap: 0.5rem;
  flex: 0 0 116px;
  align-content: start;
  justify-items: start;
  border: 3px solid #000;
  background: #090d09;
  color: #f4f4f4;
  box-shadow: 4px 4px 0 #000;
  cursor: pointer;
  padding: 0.55rem;
  text-align: left;
}

.profile-avatar-card:hover,
.profile-avatar-card:focus-visible {
  outline: 3px solid #ffb800;
}

.profile-avatar-card.is-active {
  outline: 3px solid #00ff66;
  background: #001b0a;
}

.profile-avatar-card img {
  width: 82px;
  height: 82px;
  border: 2px solid #00ff66;
  background: #000;
  image-rendering: pixelated;
  object-fit: cover;
}

.profile-avatar-card strong {
  max-width: 94px;
  color: #f3f3f3;
  font-size: 0.48rem;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-avatar-card small {
  max-width: 94px;
  color: #00ff66;
  font-size: 0.42rem;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-avatar-card em {
  border-top: 2px solid rgba(255, 255, 255, 0.08);
  color: #ffb800;
  font-family: var(--mono);
  font-size: 0.58rem;
  font-style: normal;
  font-weight: 900;
  padding-top: 0.35rem;
  text-transform: uppercase;
}

.profile-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0 0 1.25rem;
}

.profile-overview article {
  display: grid;
  gap: 0.5rem;
  min-height: 116px;
  border: 3px solid #000;
  box-shadow: 5px 5px 0 #000;
  background:
    linear-gradient(180deg, rgba(0, 255, 102, 0.05), rgba(0, 0, 0, 0)),
    #202426;
  padding: 1rem;
}

.profile-overview span,
.profile-overview small {
  color: #9a9fa4;
  font-size: 0.58rem;
  line-height: 1.5;
}

.profile-overview strong {
  color: #00ff66;
  font-size: clamp(0.95rem, 2vw, 1.35rem);
  line-height: 1.25;
}

.console-grid {
  display: grid;
  grid-template-columns: minmax(280px, 330px) minmax(340px, 430px) minmax(0, 1fr);
  gap: 1.1rem;
  align-items: start;
}

.console-panel {
  min-width: 0;
  border: 5px solid #000;
  background: #222628;
  box-shadow: 8px 8px 0 #000;
  padding: 1.05rem;
}

.console-panel--output {
  min-width: 0;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(0, 255, 102, 0.04), rgba(0, 0, 0, 0) 35%),
    #222628;
}

.console-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 3px solid #000;
  margin-bottom: 1rem;
  padding-bottom: 0.85rem;
  color: #f3f3f3;
  font-size: 0.62rem;
}

.console-mini-button {
  min-height: 2.4rem;
  border: 3px solid #000;
  background: #2f3335;
  color: #f3f3f3;
  box-shadow: 3px 3px 0 #000;
  cursor: pointer;
  font-size: 0.52rem;
  padding: 0.62rem 0.72rem;
}

.console-mini-button:hover,
.console-mini-button:focus-visible {
  background: #ffb800;
  color: #000;
}

.autonomy-onboarding {
  flex-basis: 100%;
  margin-top: 0.5rem;
  padding: 0.6rem 0.72rem;
  border: 2px solid #000;
  background: rgba(6, 12, 15, 0.5);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.56rem;
  line-height: 1.4;
  color: #cdd8d2;
}
.autonomy-onboarding .autonomy-check strong {
  color: #e7ddc7;
}

.console-agent-list,
.console-tool-list,
.console-output {
  display: grid;
  gap: 0.75rem;
  min-width: 0;
}

.console-agent-list,
.console-tool-list {
  overflow: auto;
  padding-right: 0.35rem;
}

.console-agent-list {
  max-height: min(720px, calc(100vh - 260px));
}

.console-tool-list {
  max-height: 430px;
}

.console-identity {
  border: 3px solid #000;
  background: #111516;
  box-shadow: 4px 4px 0 #000;
  color: rgba(234, 230, 242, 0.72);
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.6;
  margin-bottom: 0.85rem;
  padding: 0.85rem;
}

.console-identity strong {
  color: #00ff66;
}

.console-identity.is-pending strong {
  color: #ffb800;
}

/* The agent's vaults on chains other than Ethereum. */
.agent-vault-chains {
  border-top: 2px solid rgba(234, 230, 242, 0.16);
  margin-top: 0.7rem;
  padding-top: 0.6rem;
}

.agent-vault-row + .agent-vault-row {
  margin-top: 0.5rem;
}

.agent-vault-row.is-muted {
  color: rgba(234, 230, 242, 0.45);
}

/* Where the assets live and where a withdrawal can send them. Informational,
   not a warning: the holder can get these out, they just do it through the
   agent rather than straight from their own wallet. */
.agent-vault-note {
  color: rgba(234, 230, 242, 0.5);
  display: block;
  font-style: normal;
  font-weight: 600;
  line-height: 1.45;
  margin-top: 0.25rem;
}

.agent-vault-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.45rem;
}

/* What the agent bought for itself. These tokens have no art to show — the one
   we checked returns an empty tokenURI — so the tile is typographic rather than
   a picture frame waiting on an image that may never load. */
.agent-collection {
  border-top: 2px solid rgba(234, 230, 242, 0.16);
  margin-top: 0.7rem;
  padding-top: 0.6rem;
}

.agent-collection-head {
  color: rgba(234, 230, 242, 0.5);
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

.agent-collection-grid {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}

.agent-collection-item {
  background: #0d1112;
  border: 2px solid #000;
  box-shadow: 3px 3px 0 #000;
  color: inherit;
  display: block;
  padding: 0.6rem 0.7rem;
  text-decoration: none;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.agent-collection-item:hover {
  box-shadow: 5px 5px 0 #000;
  transform: translate(-2px, -2px);
}

.aci-id {
  color: #00ff66;
  display: block;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.1;
}

.aci-name {
  display: block;
  margin-top: 0.25rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.aci-meta {
  color: rgba(234, 230, 242, 0.45);
  display: block;
  font-size: 0.72rem;
  margin-top: 0.2rem;
}

.agent-os-identity {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.9rem;
  align-items: center;
  border-color: rgba(0, 255, 102, 0.55);
}

.agent-os-identity[hidden] {
  display: none;
}

.agent-os-identity-copy {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.agent-os-identity-copy > span,
.agent-os-identity-copy > small {
  overflow-wrap: anywhere;
}

.agent-os-identity-actions {
  display: flex;
  gap: 0.45rem;
  align-items: center;
}

@media (max-width: 720px) {
  .agent-os-identity {
    grid-template-columns: 1fr;
  }

  .agent-os-identity-actions {
    flex-wrap: wrap;
  }
}

.console-agent-card {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 0.85rem;
  width: 100%;
  border: 3px solid #000;
  background: #090d09;
  box-shadow: 4px 4px 0 #000;
  color: #f5f5f5;
  cursor: pointer;
  padding: 0.7rem;
  text-align: left;
  transition: transform 0.16s ease, background 0.16s ease, outline-color 0.16s ease;
}

.console-agent-card:hover {
  transform: translateY(-1px);
  background: #101711;
}

.console-agent-card.is-active {
  outline: 3px solid #00ff66;
  background: #001b0a;
}

.console-agent-card img {
  width: 76px;
  height: 76px;
  border: 2px solid #00ff66;
  background: #000;
  image-rendering: pixelated;
  object-fit: cover;
}

.console-agent-id {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.56rem;
}

.console-agent-meta {
  color: #00ff66;
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.42;
}

.console-tool-card {
  display: grid;
  gap: 0.45rem;
  border: 3px solid #000;
  background: #111516;
  color: #f7f7f7;
  box-shadow: 4px 4px 0 #000;
  cursor: pointer;
  font-size: 0.58rem;
  padding: 0.85rem;
  text-align: left;
  transition: transform 0.16s ease, background 0.16s ease, outline-color 0.16s ease;
}

.console-tool-card:hover:not(.is-locked) {
  transform: translateY(-1px);
  background: #151c1a;
}

.console-tool-card small {
  color: rgba(234, 230, 242, 0.62);
  font-family: var(--mono);
  line-height: 1.45;
  text-transform: none;
}

.console-tool-card.is-active {
  outline: 3px solid #ffb800;
}

.console-tool-card.is-locked {
  opacity: 0.45;
  cursor: not-allowed;
}

.console-tool-access {
  color: #00ff66;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 900;
}

.console-tool-card.is-locked .console-tool-access {
  color: #ff5b45;
}

.console-form {
  display: grid;
  gap: 0.85rem;
  margin-top: 1rem;
  border-top: 3px solid #000;
  padding-top: 1rem;
}

.console-field[hidden] {
  display: none !important;
}

.console-param-note {
  border: 3px solid #000;
  background: rgba(0, 255, 102, 0.06);
  box-shadow: 3px 3px 0 #000;
  color: rgba(234, 230, 242, 0.72);
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 900;
  line-height: 1.55;
  padding: 0.75rem 0.85rem;
}

.console-form label {
  display: grid;
  gap: 0.45rem;
}

.console-form span {
  color: #9a9fa4;
  font-size: 0.5rem;
}

.console-form input,
.console-form select,
.console-static-field {
  width: 100%;
  border: 3px solid #000;
  appearance: none;
  background: #111516 !important;
  color: #00ff66 !important;
  box-shadow: 3px 3px 0 #000 !important;
  font-family: var(--mono);
  font-weight: 800;
  padding: 0.78rem 0.85rem;
}

.console-form input:focus,
.console-form select:focus {
  outline: 2px solid #00ff66;
  outline-offset: 2px;
}

.console-form button:disabled {
  cursor: not-allowed;
  filter: grayscale(0.45);
  opacity: 0.55;
}

.console-static-field {
  cursor: default;
  user-select: none;
}

.console-toggle {
  grid-template-columns: auto 1fr;
  align-items: center;
}

.console-toggle input {
  width: 1.35rem;
  height: 1.35rem;
  accent-color: #00ff66;
  box-shadow: none !important;
  padding: 0;
}

.console-empty,
.console-error,
.console-brief,
.console-output-section,
.console-output-details,
.console-json {
  border: 3px solid #000;
  background: #111516;
  box-shadow: 4px 4px 0 #000;
  padding: 1rem;
}

.console-empty {
  color: rgba(234, 230, 242, 0.58);
  font-weight: 800;
}

.console-error {
  color: #ff5b45;
  font-family: var(--mono);
  font-weight: 900;
}

.console-brief {
  min-width: 0;
  color: #f5f5f5;
  font-weight: 800;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.console-output-label {
  display: block;
  color: #ffb800;
  font-size: 0.55rem;
  margin-bottom: 0.55rem;
}

.console-usage {
  justify-self: start;
  border: 2px solid rgba(0, 255, 102, 0.55);
  background: rgba(0, 255, 102, 0.08);
  color: #00ff66;
  box-shadow: 3px 3px 0 #000;
  padding: 0.65rem 0.8rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.console-output-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.console-output-metric {
  border: 3px solid #000;
  background: #171c1d;
  box-shadow: 4px 4px 0 #000;
  padding: 0.85rem;
}

.console-output-metric span,
.console-output-section h3,
.console-output-details summary {
  color: #9a9fa4;
  font-size: 0.52rem;
  line-height: 1.5;
}

.console-output-metric strong {
  display: block;
  margin-top: 0.55rem;
  color: #00ff66;
  font-family: "Press Start 2P", var(--mono);
  font-size: 0.78rem;
  line-height: 1.45;
}

.console-output-section {
  display: grid;
  gap: 0.75rem;
  min-width: 0;
}

.console-output-section h3 {
  margin: 0;
  color: #ffb800;
}

.console-result-list {
  display: grid;
  gap: 0.65rem;
}

.console-result-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.9rem;
  align-items: center;
  border: 2px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.22);
  padding: 0.8rem;
  min-width: 0;
}

.console-result-item strong {
  display: block;
  color: #f7f7f7;
  font-family: var(--mono);
  font-size: 0.9rem;
  line-height: 1.35;
}

.console-result-item span,
.console-result-item small {
  color: rgba(234, 230, 242, 0.62);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.console-result-item a {
  border: 2px solid #000;
  background: #24292a;
  box-shadow: 3px 3px 0 #000;
  color: #00ff66;
  font-family: var(--mono);
  font-size: 0.64rem;
  font-weight: 900;
  padding: 0.55rem 0.65rem;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Allowlist Scan — stage-first timeline */
.allowlist-results {
  gap: 1rem;
}

.allowlist-results-head,
.allowlist-drop-head,
.allowlist-stage-head,
.allowlist-stage-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.allowlist-results-head {
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.allowlist-results-head span,
.allowlist-drop-head span {
  color: rgba(234, 230, 242, 0.5);
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 800;
}

.allowlist-drop-list {
  display: grid;
  gap: 1rem;
}

.allowlist-drop {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(145deg, rgba(20, 27, 26, 0.96), rgba(9, 13, 13, 0.98));
  padding: 1rem;
  min-width: 0;
}

.allowlist-drop.has-match {
  border-color: rgba(0, 255, 102, 0.38);
  box-shadow: inset 3px 0 0 #00ff66, 0 16px 38px rgba(0, 0, 0, 0.18);
}

.allowlist-drop-head {
  align-items: flex-start;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.allowlist-drop-head h3 {
  margin: 0 0 0.25rem;
  color: #f7f9f8;
  font-family: var(--mono);
  font-size: 0.92rem;
  line-height: 1.35;
}

.allowlist-drop-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
}

.allowlist-opensea-link {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border: 1px solid rgba(32, 129, 226, 0.58);
  background: rgba(32, 129, 226, 0.1);
  color: #79baff;
  font-family: var(--mono);
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  padding: 0.35rem 0.55rem;
  text-decoration: none;
  text-transform: uppercase;
}

.allowlist-opensea-link span {
  color: inherit;
  font-size: 0.7rem;
}

.allowlist-status {
  flex: 0 0 auto;
  border: 1px solid currentColor;
  padding: 0.36rem 0.48rem;
  font-family: var(--mono);
  font-size: 0.55rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
}

.allowlist-status.is-eligible {
  background: rgba(0, 255, 102, 0.08);
  color: #00ff66;
}

.allowlist-status.is-public {
  background: rgba(255, 184, 0, 0.08);
  color: #ffb800;
}

.allowlist-status.is-ineligible,
.allowlist-status.is-unavailable {
  background: rgba(255, 255, 255, 0.025);
  color: rgba(234, 230, 242, 0.46);
}

.allowlist-timeline {
  position: relative;
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-left: 1.65rem;
}

.allowlist-timeline::before {
  content: "";
  position: absolute;
  top: 1rem;
  bottom: 1rem;
  left: 0.43rem;
  width: 1px;
  background: rgba(255, 255, 255, 0.16);
}

.allowlist-stage {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.2);
  padding: 0.9rem;
}

.allowlist-stage.is-eligible {
  border-color: rgba(0, 255, 102, 0.42);
  background: linear-gradient(105deg, rgba(0, 255, 102, 0.1), rgba(0, 0, 0, 0.18) 64%);
}

.allowlist-stage-dot {
  position: absolute;
  top: 1.05rem;
  left: -1.52rem;
  width: 0.66rem;
  height: 0.66rem;
  border: 2px solid rgba(234, 230, 242, 0.38);
  border-radius: 50%;
  background: #0c1110;
}

.allowlist-stage.is-eligible .allowlist-stage-dot {
  border-color: #00ff66;
  background: #00ff66;
  box-shadow: 0 0 16px rgba(0, 255, 102, 0.72);
}

.allowlist-stage.is-public .allowlist-stage-dot {
  border-color: #ffb800;
}

.allowlist-stage-type {
  color: rgba(234, 230, 242, 0.48);
  font-family: var(--mono);
  font-size: 0.56rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.allowlist-stage h4 {
  margin: 0.3rem 0 0;
  color: #f4f7f5;
  font-family: var(--mono);
  font-size: 0.94rem;
  line-height: 1.3;
}

.allowlist-stage-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.7rem;
  margin-top: 1rem;
}

.allowlist-stage-facts small,
.allowlist-stage-facts b {
  display: block;
  font-family: var(--mono);
}

.allowlist-stage-facts small {
  color: rgba(234, 230, 242, 0.4);
  font-size: 0.52rem;
  font-weight: 900;
  text-transform: uppercase;
}

.allowlist-stage-facts b {
  margin-top: 0.2rem;
  color: rgba(244, 247, 245, 0.86);
  font-size: 0.7rem;
}

.allowlist-public-note {
  margin: 0.8rem 0 0;
  color: rgba(234, 230, 242, 0.52);
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 700;
}

.allowlist-stage-actions {
  justify-content: flex-start;
  margin-top: 1rem;
}

.allowlist-stage-actions a {
  display: inline-grid;
  place-items: center;
  min-height: 44px;
  border: 2px solid #000;
  background: #24292a;
  box-shadow: 3px 3px 0 #000;
  color: #00ff66;
  font-family: var(--mono);
  font-size: 0.64rem;
  font-weight: 900;
  padding: 0.55rem 0.75rem;
  text-transform: uppercase;
}

.allowlist-primary-action {
  min-height: 44px;
  background: #00ff66;
  color: #061009;
}

@media (hover: hover) and (pointer: fine) {
  .allowlist-opensea-link:hover,
  .allowlist-stage-actions a:hover,
  .allowlist-primary-action:hover {
    transform: translateY(-1px);
  }

  .allowlist-opensea-link:hover {
    border-color: #2081e2;
    background: rgba(32, 129, 226, 0.18);
    color: #a8d3ff;
  }
}

@media (prefers-reduced-motion: reduce) {
  .allowlist-opensea-link,
  .allowlist-stage-actions a,
  .allowlist-primary-action {
    transition: none;
  }
}

@media (max-width: 640px) {
  .allowlist-results-head,
  .allowlist-drop-head,
  .allowlist-stage-head,
  .allowlist-stage-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .allowlist-status {
    align-self: flex-start;
  }

  .allowlist-drop-actions {
    width: 100%;
    justify-content: space-between;
  }

  .allowlist-timeline {
    padding-left: 1.35rem;
  }

  .allowlist-stage-dot {
    left: -1.22rem;
  }

  .allowlist-stage-actions > * {
    width: 100%;
  }
}

.b20-token-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.75rem;
  min-width: 0;
}

.b20-token-card {
  display: grid;
  gap: 0.75rem;
  border: 2px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.28);
  padding: 0.85rem;
  min-width: 0;
}

.b20-token-card.is-live {
  border-color: rgba(0, 255, 102, 0.55);
  background: rgba(0, 255, 102, 0.06);
}

.b20-token-card.is-pending {
  border-color: rgba(255, 184, 0, 0.35);
}

.b20-token-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
}

.b20-token-head strong {
  color: #f7f7f7;
  font-family: var(--mono);
  font-size: 0.95rem;
  overflow-wrap: anywhere;
}

.b20-token-head span {
  border: 1px solid rgba(255, 184, 0, 0.65);
  color: #ffb800;
  font-family: var(--mono);
  font-size: 0.58rem;
  font-weight: 900;
  padding: 0.25rem 0.35rem;
  text-transform: uppercase;
  white-space: nowrap;
}

.b20-token-card code {
  color: #00ff66;
  font-family: var(--mono);
  font-size: 0.66rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.b20-token-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.4rem;
}

.b20-token-stats span {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(234, 230, 242, 0.6);
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 800;
  padding-top: 0.4rem;
  text-transform: uppercase;
}

.b20-token-stats b {
  display: block;
  color: #f5f5f5;
  font-size: 0.66rem;
  margin-top: 0.22rem;
  overflow-wrap: anywhere;
  text-transform: none;
}

.b20-token-card a {
  justify-self: start;
  border: 2px solid #000;
  background: #24292a;
  box-shadow: 3px 3px 0 #000;
  color: #00ff66;
  font-family: var(--mono);
  font-size: 0.64rem;
  font-weight: 900;
  padding: 0.55rem 0.65rem;
  text-transform: uppercase;
}

.console-missions {
  display: grid;
  gap: 0.65rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.console-missions li {
  border-left: 4px solid #00ff66;
  background: rgba(0, 255, 102, 0.06);
  color: #d9ffe5;
  font-family: var(--mono);
  font-weight: 800;
  padding: 0.75rem 0.85rem;
}

.console-output-details {
  padding: 0;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

.console-output-details summary {
  cursor: pointer;
  list-style: none;
  padding: 0.9rem 1rem;
}

.console-output-details summary::-webkit-details-marker {
  display: none;
}

.console-json {
  max-height: 460px;
  margin: 0;
  overflow: auto;
  border: 0;
  box-shadow: none;
  color: #00ff66;
  font-family: var(--mono);
  font-size: 0.74rem;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.console-json-scroll {
  max-width: 100%;
  overflow: auto;
}

@media (max-width: 1180px) {
  .profile-identity {
    grid-template-columns: 1fr;
  }

  .console-grid {
    grid-template-columns: 1fr 1fr;
  }

  .console-panel--output {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .console-hero,
  .console-grid {
    grid-template-columns: 1fr;
  }

  .profile-card {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .profile-avatar-frame {
    width: 96px;
    height: 96px;
  }

  .profile-edit-form {
    grid-template-columns: 1fr;
  }

  .profile-overview,
  .console-output-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .console-status {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .profile-card {
    grid-template-columns: 1fr;
    gap: 0.85rem;
    padding: 0.85rem;
  }

  .profile-card-copy,
  .profile-identity,
  .profile-identity--single {
    min-width: 0;
  }

  .profile-card h2,
  .profile-card p {
    overflow-wrap: anywhere;
  }

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

  .profile-chip {
    min-width: 0;
    padding-inline: 0.55rem;
  }

  .profile-flow-hint {
    line-height: 1.7;
    overflow-wrap: anywhere;
  }

  .profile-overview,
  .console-output-grid,
  .console-result-item {
    grid-template-columns: 1fr;
  }
}

/* --- Simplified profile layout (v2) --- */
.profile-flow-hint {
  margin: 0 0 1rem;
  font-family: "Press Start 2P", var(--mono);
  font-size: 0.55rem;
  color: rgba(234, 230, 242, 0.55);
  letter-spacing: 0;
}

.profile-identity--single {
  grid-template-columns: 1fr;
}

.profile-identity--single .profile-card {
  min-height: 0;
  align-items: start;
}

.profile-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.85rem;
}

.profile-chip {
  min-width: 104px;
  padding: 0.45rem 0.7rem;
  border: 3px solid #000;
  background: #1a1d1f;
  box-shadow: 3px 3px 0 #000;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.profile-chip span {
  font-family: "Press Start 2P", var(--mono);
  font-size: 0.5rem;
  color: #ffb800;
  text-transform: uppercase;
}

.profile-chip strong {
  font-family: "Press Start 2P", var(--mono);
  font-size: 0.7rem;
  color: #00ff66;
}

.profile-chip small {
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 700;
  color: rgba(234, 230, 242, 0.5);
}

.profile-disclosure {
  margin-top: 0.75rem;
  border: 3px solid #000;
  background: #1a1d1f;
  box-shadow: 3px 3px 0 #000;
}

.profile-disclosure summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem 0.75rem;
  font-family: "Press Start 2P", var(--mono);
  font-size: 0.55rem;
  color: #ffb800;
  text-transform: uppercase;
  user-select: none;
}

.profile-disclosure summary::-webkit-details-marker {
  display: none;
}

.profile-disclosure summary::after {
  content: "+";
  color: #00ff66;
  font-size: 0.7rem;
}

.profile-disclosure[open] summary::after {
  content: "-";
}

.profile-disclosure-body {
  padding: 0.65rem 0.75rem 0.85rem;
  border-top: 3px solid #000;
}

.console-step {
  display: inline-block;
  margin-right: 0.5rem;
  padding: 0.12rem 0.35rem;
  border: 3px solid #000;
  background: #00ff66;
  color: #000;
  box-shadow: 2px 2px 0 #000;
  font-size: 0.55rem;
}

#agent-rules-panel textarea {
  border: 3px solid #000;
  background: #14171a;
  color: #eae6f2;
  font-family: var(--mono);
  font-weight: 600;
  font-size: 0.8rem;
  padding: 0.6rem;
  box-shadow: inset 3px 3px 0 rgba(0, 0, 0, 0.55);
}

#agent-rules-panel textarea:focus {
  outline: 3px solid #00ff66;
  outline-offset: -3px;
}

#rules-count {
  font-family: "Press Start 2P", var(--mono);
  font-size: 0.55rem;
  color: rgba(234, 230, 242, 0.55);
}

#rules-status {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.72rem;
  color: #6bdc8b;
}

/* --- v2 console layout: roster left, run+output stacked right, rules full width --- */
.console-grid {
  grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
  grid-template-areas:
    "agents tools"
    "agents output";
}

.console-panel--agents { grid-area: agents; }
.console-panel--tools { grid-area: tools; }
.console-panel--output { grid-area: output; }

/* Tools spread into columns instead of one long scrolling stack */
.console-tool-list {
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  max-height: none;
  overflow: visible;
  padding-right: 0;
}

.console-output {
  min-height: 110px;
}

@media (max-width: 1180px) {
  .console-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "agents"
      "tools"
      "output";
  }

  .console-agent-list {
    max-height: 340px;
  }
}

/* --- Agent workspace tabs --- */
.console-tabs {
  display: flex;
  gap: 0.5rem;
  margin: 0 0 0.9rem;
}

.console-tab {
  border: 3px solid #000;
  background: #2f3335;
  color: rgba(234, 230, 242, 0.75);
  box-shadow: 3px 3px 0 #000;
  padding: 0.5rem 0.9rem;
  font-family: "Press Start 2P", var(--mono);
  font-size: 0.55rem;
  text-transform: uppercase;
  cursor: pointer;
}

.console-tab.is-active {
  background: #00ff66;
  color: #000;
}

.console-tab:not(.is-active):hover {
  background: #3a3f42;
}

/* --- Avatar picker modal + clickable avatar --- */
button.profile-avatar-frame {
  position: relative;
  cursor: pointer;
  padding: 0;
  display: block;
}

.profile-avatar-hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.25rem 0;
  background: rgba(0, 0, 0, 0.78);
  color: #00ff66;
  font-family: "Press Start 2P", var(--mono);
  font-size: 0.5rem;
  text-align: center;
  opacity: 0;
  transition: opacity 0.12s ease;
}

button.profile-avatar-frame:hover .profile-avatar-hint,
button.profile-avatar-frame:focus-visible .profile-avatar-hint {
  opacity: 1;
}

.avatar-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.avatar-modal[hidden] {
  display: none;
}

.avatar-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
}

.avatar-modal-panel {
  position: relative;
  width: min(720px, 100%);
  max-height: min(80vh, 640px);
  overflow: auto;
}

#avatar-modal-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
}

/* --- Talk tab --- */
.managed-runtime {
  display: grid;
  gap: 0.85rem;
}

.managed-runtime-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border: 3px solid #000;
  background:
    linear-gradient(90deg, rgba(0, 255, 102, 0.08), transparent 42%),
    #171b1d;
  box-shadow: 4px 4px 0 #000;
}

.managed-runtime-header > div,
.managed-runtime-identity > div {
  min-width: 0;
}

.managed-runtime-identity {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 0.85rem;
}

.managed-agent-avatar {
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
  object-fit: cover;
  image-rendering: pixelated;
  border: 3px solid #00ff66;
  background: #0e1214;
  box-shadow: 4px 4px 0 #000;
}

.managed-runtime-actions {
  display: grid;
  justify-items: end;
  gap: 0.5rem;
}

.managed-runtime-health {
  color: #8b9498;
  font: 800 0.58rem/1.4 var(--mono);
  text-transform: uppercase;
}

.managed-runtime-health[data-state="online"] {
  color: #00ff66;
}

.managed-runtime-health[data-state="error"] {
  color: #ff6156;
}

.managed-kicker,
.managed-panel-heading span,
.managed-stats span {
  display: block;
  font-family: var(--mono);
  font-size: 0.58rem;
  font-weight: 800;
  color: #ffb800;
  text-transform: uppercase;
}

.managed-runtime-header strong {
  display: block;
  margin-top: 0.35rem;
  font-family: "Press Start 2P", var(--mono);
  font-size: 0.86rem;
  line-height: 1.55;
  color: #f4f1f7;
}

.managed-runtime-header p {
  max-width: 720px;
  margin: 0.45rem 0 0;
  color: #9fa6a9;
  font-size: 0.82rem;
  line-height: 1.55;
}

.managed-runtime-header .btn {
  flex: 0 0 auto;
  min-width: 150px;
}

.managed-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 3px solid #000;
  background: #000;
  gap: 3px;
  box-shadow: 4px 4px 0 #000;
}

.managed-stats article {
  min-width: 0;
  padding: 0.85rem;
  background: #202527;
}

.managed-stats strong {
  display: block;
  margin-top: 0.45rem;
  color: #00ff66;
  font-family: "Press Start 2P", var(--mono);
  font-size: 0.78rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.managed-console {
  min-width: 0;
  border: 3px solid #000;
  background: #171b1d;
  box-shadow: 4px 4px 0 #000;
}

.managed-nav {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 3px;
  padding: 3px;
  background: #000;
}

.managed-nav-button {
  min-width: 0;
  min-height: 48px;
  border: 0;
  padding: 0.65rem 0.75rem;
  background: #242a2c;
  color: #a5adb0;
  cursor: pointer;
  font: 800 0.62rem/1.35 var(--mono);
  text-align: left;
  text-transform: uppercase;
}

.managed-nav-button span {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-right: 0.35rem;
  background: #111517;
  color: #00ff66;
  border: 2px solid #080a0b;
}

.managed-nav-button:hover,
.managed-nav-button:focus-visible {
  color: #fff;
  background: #303739;
  outline: none;
}

.managed-nav-button.is-active {
  background: #173524;
  color: #fff;
  box-shadow: inset 0 -3px 0 #00ff66;
}

.managed-view-stack {
  min-width: 0;
  padding: 0.85rem;
}

.managed-view[hidden] {
  display: none;
}

.managed-view.is-active {
  display: block;
}

.managed-overview-grid,
.managed-runtime-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.managed-overview-card,
.managed-runtime-card {
  min-width: 0;
  min-height: 138px;
  padding: 0.9rem;
  border: 3px solid #080a0b;
  background: #202527;
}

.managed-overview-card--wide {
  grid-column: span 2;
}

.managed-overview-card > span,
.managed-runtime-card > span {
  display: block;
  color: #ffb800;
  font: 800 0.56rem/1.35 var(--mono);
  text-transform: uppercase;
}

.managed-overview-card > strong,
.managed-runtime-card > strong {
  display: block;
  margin-top: 0.65rem;
  color: #f4f1f7;
  font-family: "Press Start 2P", var(--mono);
  font-size: 0.72rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.managed-overview-card > p,
.managed-runtime-card > p {
  margin: 0.6rem 0 0;
  color: #8f999d;
  font: 700 0.66rem/1.5 var(--mono);
}

.managed-activity-panel {
  margin-top: 0.75rem;
}

.managed-activity-list,
.managed-diagnostics {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.75rem;
}

.managed-activity,
.managed-diagnostic {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.65rem;
  align-items: center;
  min-width: 0;
  padding: 0.65rem;
  border: 2px solid #080a0b;
  background: #15191b;
}

.managed-activity-mark {
  width: 10px;
  height: 10px;
  background: #00ff66;
  box-shadow: 2px 2px 0 #000;
}

.managed-activity[data-type="error"] .managed-activity-mark {
  background: #ff6156;
}

.managed-activity strong,
.managed-diagnostic strong {
  display: block;
  color: #f4f1f7;
  font: 800 0.7rem/1.4 var(--mono);
}

.managed-activity p,
.managed-diagnostic p {
  margin: 0.2rem 0 0;
  color: #849095;
  font: 650 0.62rem/1.45 var(--mono);
  overflow-wrap: anywhere;
}

.managed-activity time {
  color: #697378;
  font: 700 0.56rem/1.35 var(--mono);
  white-space: nowrap;
}

.managed-task-layout {
  display: grid;
  grid-template-columns: minmax(250px, 0.75fr) minmax(0, 1.25fr);
  gap: 0.85rem;
}

.managed-side {
  display: grid;
  gap: 0.85rem;
}

.managed-panel {
  min-width: 0;
  padding: 0.85rem;
  border: 3px solid #000;
  background: #202527;
  box-shadow: 4px 4px 0 #000;
}

.managed-view > .managed-panel {
  box-shadow: none;
}

.managed-panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #080a0b;
}

.managed-panel-heading strong {
  display: block;
  margin-top: 0.3rem;
  color: #f4f1f7;
  font-family: "Press Start 2P", var(--mono);
  font-size: 0.64rem;
  line-height: 1.55;
}

.managed-panel-heading small,
.managed-runtime-note,
#managed-task-status {
  color: #7f8a8f;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.45;
}

.managed-runtime-note {
  min-height: 1em;
  color: #6bdc8b;
}

.talk-log {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  min-height: 330px;
  max-height: 520px;
  overflow-y: auto;
  padding: 0.75rem;
  border: 3px solid #000;
  background: #14171a;
  box-shadow: inset 3px 3px 0 rgba(0, 0, 0, 0.55);
  margin: 0.75rem 0;
}

.talk-msg {
  max-width: 85%;
  padding: 0.55rem 0.75rem;
  border: 3px solid #000;
  font-family: var(--mono);
  font-weight: 600;
  font-size: 0.82rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.talk-msg--you {
  align-self: flex-end;
  background: #2f3335;
  color: #eae6f2;
}

.talk-msg--agent {
  align-self: flex-start;
  background: #0d2a18;
  color: #d6ffe6;
  box-shadow: 3px 3px 0 #000;
}

.talk-msg-name {
  display: block;
  font-family: "Press Start 2P", var(--mono);
  font-size: 0.5rem;
  color: #00ff66;
  margin-bottom: 0.3rem;
}

.talk-msg--you .talk-msg-name {
  color: #ffb800;
}

.talk-msg--typing {
  opacity: 0.7;
  font-style: italic;
}

.talk-form {
  display: flex;
  gap: 0.5rem;
}

.talk-form input {
  flex: 1;
  min-width: 0;
  border: 3px solid #000;
  background: #14171a;
  color: #eae6f2;
  font-family: var(--mono);
  font-weight: 600;
  font-size: 0.82rem;
  padding: 0.55rem 0.7rem;
  box-shadow: inset 3px 3px 0 rgba(0, 0, 0, 0.55);
}

.talk-form input:focus {
  outline: 3px solid #00ff66;
  outline-offset: -3px;
}

#talk-status {
  display: block;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.72rem;
  color: #6bdc8b;
}

.managed-task-form {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.managed-task-form input,
.managed-task-form textarea,
.managed-task-form select {
  width: 100%;
  border: 3px solid #000;
  background: #14171a;
  color: #eae6f2;
  font: 700 0.75rem/1.5 var(--mono);
  padding: 0.6rem;
  resize: vertical;
}

.managed-task-form input:focus,
.managed-task-form textarea:focus,
.managed-task-form select:focus {
  outline: 2px solid #00ff66;
  outline-offset: -2px;
}

.managed-task-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.managed-task-controls label {
  display: grid;
  gap: 6px;
}

.managed-task-controls label > span {
  color: var(--muted);
  font: 10px/1 var(--mono);
  text-transform: uppercase;
}

.managed-task-controls select {
  width: 100%;
  min-height: 38px;
}

.managed-channel .is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

.managed-task-list,
.managed-channel-list {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.75rem;
}

.managed-task-layout .managed-task-list {
  align-content: start;
}

.managed-task {
  display: grid;
  gap: 0.45rem;
  padding: 0.65rem;
  border: 2px solid #080a0b;
  background: #15191b;
}

.managed-task-head,
.managed-task-actions,
.managed-channel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.managed-task-head strong,
.managed-channel strong {
  min-width: 0;
  color: #f4f1f7;
  font-family: var(--mono);
  font-size: 0.75rem;
  overflow-wrap: anywhere;
}

.managed-task p {
  margin: 0;
  color: #9fa6a9;
  font: 600 0.68rem/1.5 var(--mono);
}

.managed-task-state {
  flex: 0 0 auto;
  color: #00ff66;
  font: 800 0.56rem/1.3 var(--mono);
  text-transform: uppercase;
}

.managed-task-state[data-state="failed"] {
  color: #ff6156;
}

.managed-task-actions {
  justify-content: flex-end;
}

.managed-task-actions .console-mini-button {
  padding: 0.45rem 0.6rem;
  font-size: 0.5rem;
}

.managed-channel {
  padding: 0.65rem;
  border: 2px solid #080a0b;
  background: #15191b;
}

.managed-channel > div {
  min-width: 0;
}

.managed-channel span {
  display: block;
  margin-top: 0.25rem;
  color: #7f8a8f;
  font: 700 0.64rem/1.4 var(--mono);
}

.managed-channel .console-mini-button {
  flex: 0 0 auto;
}

@media (max-width: 980px) {
  .managed-overview-grid,
  .managed-runtime-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .managed-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .managed-task-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .managed-runtime-header {
    align-items: stretch;
    flex-direction: column;
  }

  .managed-runtime-header .btn {
    width: 100%;
  }

  .managed-runtime-actions {
    justify-items: stretch;
  }

  .managed-stats {
    grid-template-columns: 1fr 1fr;
  }

  .managed-nav {
    display: flex;
    overflow-x: auto;
  }

  .managed-nav-button {
    flex: 0 0 138px;
  }

  .managed-overview-grid,
  .managed-runtime-grid {
    grid-template-columns: 1fr;
  }

  .managed-overview-card--wide {
    grid-column: auto;
  }

  .managed-activity {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .managed-activity time {
    grid-column: 2;
  }

  .talk-form,
  .managed-channel {
    align-items: stretch;
    flex-direction: column;
  }

  .talk-form .btn,
  .managed-channel .console-mini-button {
    width: 100%;
  }
}

/* --- External agent apps --- */
.agent-app-intro,
.agent-app-card {
  border: 3px solid #000;
  background: #171b1d;
  box-shadow: 4px 4px 0 #000;
}

.agent-app-list {
  display: grid;
  gap: 0.75rem;
}

.agent-app-intro {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  padding: 0.9rem 1rem;
  margin-bottom: 0.75rem;
}

.agent-app-intro strong,
.agent-app-copy strong {
  display: block;
  font-family: "Press Start 2P", var(--mono);
  color: #eae6f2;
  line-height: 1.55;
}

.agent-app-intro strong {
  font-size: 0.68rem;
}

.agent-app-intro p {
  margin: 0.45rem 0 0;
  color: #9ca2a4;
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.55;
}

.agent-app-card {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.9rem;
  padding: 0.9rem;
}

.agent-app-mark {
  width: 180px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 3px solid #000;
  background: #090b0d;
  box-shadow: 3px 3px 0 #000;
  overflow: hidden;
}

.agent-app-mark img {
  display: block;
  width: calc(100% - 12px);
  height: auto;
  max-height: calc(100% - 10px);
  object-fit: contain;
}

.agent-app-mark-square img {
  width: 48px;
  height: 48px;
  max-height: 48px;
  object-fit: cover;
}

.agent-app-copy {
  min-width: 0;
}

.agent-app-copy strong {
  font-size: 0.62rem;
}

.agent-app-copy span {
  display: block;
  margin-top: 0.45rem;
  color: #9ca2a4;
  font-family: var(--mono);
  font-size: 0.72rem;
  line-height: 1.45;
}

.agent-app-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.agent-app-actions .btn,
.agent-app-actions .console-mini-button {
  min-height: 40px;
  white-space: nowrap;
}

.agent-app-disconnect {
  color: #ff6a55;
}

.agent-app-footnote {
  margin: 0.8rem 0 0;
  color: #727b7e;
  font-family: var(--mono);
  font-size: 0.68rem;
  line-height: 1.5;
}

/* --- Locked workspace tabs (unregistered agents) --- */
.console-tab.is-locked {
  opacity: 0.4;
  cursor: not-allowed;
  filter: grayscale(1);
}

.console-tab.is-locked::after {
  content: " 🔒";
  font-size: 0.6rem;
}

.console-identity a {
  color: #ffb800;
  text-decoration: underline;
  white-space: nowrap;
}

.console-identity.is-pending {
  border-color: #ffb800;
}

@media (max-width: 560px) {
  .profile-chips {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-chip {
    min-width: 0;
  }

  .agent-app-card {
    grid-template-columns: 140px minmax(0, 1fr);
  }

  .agent-app-mark {
    width: 140px;
    height: 50px;
  }

  .agent-app-actions {
    grid-column: 1 / -1;
    justify-content: stretch;
  }

  .agent-app-actions > * {
    flex: 1 1 100%;
  }
}
