.header-inner > .deal-inbox-link {
  position: relative;
  width: 42px;
  height: 42px;
  padding: 0;
  justify-content: center;
}

.deal-inbox-link .deal-unread-count {
  position: absolute;
  top: 0;
  right: -5px;
}

.deal-history-list {
  display: grid;
  gap: 10px;
}

.deal-history-row {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #29373b;
  border-radius: 8px;
  background: #121a1d;
  padding-right: 8px;
}

.deal-history-open {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex: 1 1 0;
  min-width: 0;
  border: 0;
  border-radius: 6px;
  color: var(--text);
  background: transparent;
  padding: 12px;
  text-align: left;
  cursor: pointer;
}

.deal-history-open:hover,
.deal-history-open:focus-visible {
  background: #182226;
}

.deal-history-open > svg,
.market-icon-action {
  flex: none;
}

.deal-history-open > svg {
  color: var(--cyan);
}

.deal-history-main {
  display: grid;
  gap: 5px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.deal-history-meta,
.seller-listing-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
}

.deal-history-meta small,
.deal-history-message {
  color: var(--muted);
}

.deal-history-status {
  padding: 2px 6px;
  border-radius: 5px;
  background: #29363a;
  color: #e2eded;
  font-size: 0.75rem;
}

.deal-history-status.is-completed { background: #17392e; color: #a3e5c3; }
.deal-history-status.is-dispute { background: #4a2d36; color: #ffbaca; }
.deal-history-status.is-waiting_seller { background: #44371e; color: #f5d58c; }

.deal-history-message {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.market-icon-action,
.table-row .market-icon-action {
  display: inline-grid;
  width: 40px;
  height: 40px;
  padding: 0;
  place-items: center;
  border-radius: 6px;
  border: 1px solid #365156;
  background: #101719;
  color: var(--text);
  cursor: pointer;
}

.table-row .market-remove-action {
  color: #ff9aac;
}

.seller-managed-listing {
  --listing-thumb-size: 42px;
  grid-template-columns: var(--listing-thumb-size) minmax(0, 1fr) auto;
}

.seller-managed-listing > img {
  display: block;
  width: var(--listing-thumb-size);
  height: var(--listing-thumb-size);
  border-radius: 0;
  object-fit: contain;
}

.seller-managed-listing > span {
  display: grid;
  gap: 4px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.seller-listing-actions {
  min-width: 0;
}

.seller-listing-editor {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.seller-listing-editor label {
  display: grid;
  gap: 4px;
}

.seller-listing-editor input,
.seller-listing-editor textarea {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  padding: 8px;
  border: 1px solid #365156;
  border-radius: 6px;
  background: #101719;
  color: var(--text);
}

html[data-route="buyer-deals"] .galaxy-guide .guide-character-stage,
html[data-route="buyer-deals"] .galaxy-guide .guide-impact,
html[data-route="seller-deals"] .galaxy-guide .guide-character-stage,
html[data-route="seller-deals"] .galaxy-guide .guide-impact,
html[data-route="seller-products"] .galaxy-guide .guide-character-stage,
html[data-route="seller-products"] .galaxy-guide .guide-impact {
  visibility: hidden;
}

@media (max-width: 760px) {
  .seller-managed-listing {
    grid-template-columns: var(--listing-thumb-size) minmax(0, 1fr);
  }

  .seller-listing-actions {
    grid-column: 1 / -1;
  }
}

@media (max-width: 620px) {
  .home-page .hero {
    /* Match the 1536 x 1024 artwork so the cannon fits at full width. */
    --mobile-hero-art: calc(100vw * 2 / 3);
    padding-top: 22px;
    padding-bottom: calc(var(--mobile-hero-art) + 12px);
    min-height: 0;
    isolation: isolate;
  }

  .home-page .hero::before {
    top: auto;
    height: var(--mobile-hero-art);
    background: #050809 url("/assets/hero-objects.webp") center bottom / contain no-repeat;
  }

  .home-page .hero::after {
    content: "";
    position: absolute;
    inset: 0 calc(50% - 50vw);
    z-index: -1;
    background: #050809;
  }

  .home-page .hero h1 {
    inline-size: min-content;
    font-size: 3.35rem;
    line-height: 0.95;
  }

  .home-page .hero-copy p {
    margin-top: 16px;
    font-size: 1rem;
  }

  .home-page .hero-actions {
    gap: 10px;
    margin-top: 18px;
  }

  .home-page .hero-actions > :is(button, a) {
    min-height: 46px;
  }

  .home-page .hero-actions .home-free-link {
    background: #141512;
  }
}
