:root {
  --bg: #07111f;
  --surface: #0f1c2e;
  --surface-2: #162942;
  --surface-3: #0a1728;
  --ink: #f4f7fb;
  --muted: #aeb9c8;
  --accent: #63a8ff;
  --accent-2: #c7d0dc;
  --danger: #e56b7a;
  --line: #304359;
  --focus: #9cc9ff;
  --shadow: rgb(0 8 24 / 0.4);
  --nft-card-width: 220px;
  --page-max-width: 1680px;
  --page-padding-x: 24px;
  --selection-action-offset: 0px;
}

* {
  box-sizing: border-box;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

html {
  height: 100%;
}

body {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  margin: 0;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
}

body::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  z-index: -1;
  height: 42rem;
  background:
    radial-gradient(circle at 18% 0%, rgb(42 103 178 / 0.32), transparent 34rem),
    linear-gradient(180deg, #09182a 0%, var(--bg) 100%);
  content: "";
  pointer-events: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
  padding: 10px 14px;
  transition:
    background-color 140ms ease,
    border-color 140ms ease,
    color 140ms ease,
    transform 140ms ease;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

button:not(:disabled):hover {
  transform: translateY(-1px);
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-3);
  color: var(--ink);
  padding: 10px 12px;
}

textarea {
  min-height: 150px;
  resize: vertical;
}

select {
  color-scheme: dark;
}

input::placeholder {
  color: #7d8da1;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgb(14 31 52 / 0.98), rgb(10 22 38 / 0.96));
}

.header-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  max-width: var(--page-max-width);
  margin: 0 auto;
  padding: 12px 0 0;
}

.brand-block {
  display: grid;
  gap: 8px;
}

.app-header h1 {
  margin: 0;
  color: #f7fbff;
  font-size: clamp(1.35rem, 3vw, 2.3rem);
  font-weight: 850;
  line-height: 0.95;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-link:hover {
  color: #ffffff;
}

.brand-logo {
  width: 46px;
  height: 46px;
  object-fit: contain;
}

.brand-title {
  width: min(340px, 52vw);
  height: auto;
  max-height: 58px;
  object-fit: contain;
}

.app-header p {
  margin: 5px 0 0;
  color: var(--muted);
}

.header-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
}

.header-nav-secondary {
  justify-content: flex-end;
}

.header-nav-button {
  display: inline-flex;
  align-items: center;
  position: relative;
  min-height: 34px;
  border-radius: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  padding: 0 12px 2px;
  font-weight: 700;
  text-decoration: none;
}

.header-nav-separator {
  width: 1px;
  height: 24px;
  margin: 0 8px;
  background: var(--line);
}

.header-nav-button.active,
.header-nav-button:hover,
.header-nav-button:focus-visible {
  border-bottom-color: var(--accent);
  background: var(--surface-2);
  color: var(--ink);
  transform: none;
}

.wallet-panel,
.button-row,
.section-header,
.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.wallet-panel {
  position: relative;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.status-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-3);
  color: #d7e1ee;
  padding: 8px 12px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.82rem;
}

.wallet-menu {
  position: relative;
}

.wallet-menu-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.wallet-menu-button::after {
  content: "▾";
  color: var(--accent);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 0.75rem;
}

.wallet-menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  display: none;
  min-width: 180px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 18px 42px rgb(0 0 0 / 0.58);
  padding: 8px;
}

.wallet-menu.open .wallet-menu-panel {
  display: grid;
  gap: 6px;
}

.wallet-menu-panel button,
.wallet-menu-panel a {
  display: block;
  width: 100%;
  background: transparent;
  color: var(--ink);
  padding: 8px 10px;
  text-align: left;
  text-decoration: none;
}

.wallet-menu-panel button:hover,
.wallet-menu-panel a:hover {
  background: var(--surface-2);
  transform: none;
}

.wallet-menu-panel .danger {
  background: var(--danger);
  color: #21070c;
  text-align: center;
}

.wallet-menu-panel .danger:hover {
  background: #f07f8c;
}

.terms-meta {
  margin: -8px 0 18px;
  overflow-wrap: anywhere;
}

.profile-summary {
  margin-bottom: 18px;
}

.profile-card {
  display: grid;
  gap: 16px;
}

.profile-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.profile-wallet-block {
  display: grid;
  flex: 1;
  gap: 8px;
  min-width: 0;
}

.profile-wallet-block h3 {
  margin: 0;
  font-size: 1rem;
}

.profile-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.profile-details {
  display: grid;
  gap: 10px;
  margin: 0;
}

.profile-details div {
  display: grid;
  grid-template-columns: minmax(120px, 0.28fr) 1fr;
  gap: 12px;
  align-items: start;
}

.profile-details dt {
  color: var(--muted);
}

.profile-details dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.hash-value {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.86rem;
}

.full-address {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.profile-terms-history {
  display: grid;
  gap: 12px;
  width: min(100%, 720px);
}

.profile-terms-history h3 {
  margin: 0;
  font-size: 1rem;
}

.profile-terms-version {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 16px 28px;
}

.profile-terms-version summary {
  cursor: pointer;
  font-weight: 800;
}

.profile-terms-version summary span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 600;
}

.profile-terms-meta {
  display: grid;
  gap: 6px;
  margin: 12px 0;
}

.profile-terms-meta span,
.profile-terms-meta code {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.55;
}

.profile-terms-text {
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.profile-terms-text .terms-signature-section p {
  max-width: 64ch;
}

.primary {
  background: var(--accent);
  color: #041321;
}

.secondary {
  background: var(--accent-2);
  color: #07111f;
}

.danger {
  background: var(--danger);
  color: #21070c;
}

.primary:hover {
  background: #87bbff;
}

.secondary:hover {
  background: #dce4ee;
}

.danger:hover {
  background: #f07f8c;
}

.icon-button {
  width: 36px;
  height: 36px;
  background: transparent;
  color: var(--muted);
  font-size: 1.5rem;
  line-height: 1;
  padding: 0;
}

main {
  width: 100%;
  flex: 1;
  overflow-y: auto;
  scrollbar-gutter: stable;
  padding: 24px var(--page-padding-x) calc(24px + var(--selection-action-offset));
}

main>.message,
main>.view {
  max-width: var(--page-max-width);
  margin-right: auto;
  margin-left: auto;
}

.message {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  margin-bottom: 18px;
  padding: 12px;
}

.message.busy,
.selection-action-status.busy {
  display: flex;
  align-items: center;
  gap: 10px;
}

body.app-error main>.view {
  display: none;
}

.work-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-weight: 700;
  margin-top: 12px;
}

.spinner {
  width: 18px;
  height: 18px;
  border: 3px solid #31455d;
  border-top-color: var(--accent);
  border-radius: 999px;
  animation: spin 0.8s linear infinite;
}

.hidden {
  display: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.section-header {
  justify-content: space-between;
  margin-bottom: 14px;
}

.section-title-row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.section-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.section-header h2,
.panel h2 {
  margin: 0 0 12px;
  font-size: 1.05rem;
}

.section-header h2 {
  margin: 0;
}

.section-lead {
  max-width: 780px;
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.collection-title-icon {
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid #2e5e91;
  border-radius: 8px;
  background: rgb(8 22 40 / 0.78);
  box-shadow: 0 16px 34px rgb(0 8 24 / 0.42);
}

.collection-title-icon .market-image,
.collection-title-icon .nft-image-fallback {
  width: 100%;
  height: 100%;
}

.collection-title-icon .market-image {
  object-fit: cover;
  transform: scale(1.75);
}

#terms .section-header,
#terms .section-lead {
  max-width: 760px;
}

.market-sections {
  display: grid;
  gap: 28px;
}

.collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}

.collection-card {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  min-height: 320px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 0;
  text-align: left;
  box-shadow: 0 14px 28px var(--shadow);
}

.collection-card:hover,
.collection-card:focus-visible {
  border-color: #6dafff;
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgb(0 8 24 / 0.58);
}

.collection-media {
  aspect-ratio: 1;
  border-bottom: 1px solid #2d435d;
  background: var(--surface-2);
}

.collection-media .market-image {
  object-fit: contain;
}

.collection-card-body {
  display: grid;
  gap: 14px;
  padding: 14px;
}

.collection-card h3 {
  margin: 0 0 4px;
  font-size: 1.08rem;
}

.collection-stats {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.collection-stats span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid rgb(255 255 255 / 0.06);
  padding-top: 6px;
}

.collection-stats strong {
  color: var(--ink);
  font-weight: 800;
  text-align: right;
}

.collection-stats-multi {
  align-items: flex-start;
}

.collection-stats-multi strong {
  display: grid;
  gap: 2px;
}

.collection-stats-multi strong span {
  display: block;
  border-top: 0;
  padding-top: 0;
}

.collection-stats-panel {
  max-width: 520px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgb(7 17 31 / 0.42);
  margin-bottom: 18px;
  padding: 14px;
}

.collection-card .collection-stats-panel {
  max-width: none;
  border: 0;
  border-radius: 0;
  background: transparent;
  margin-bottom: 0;
  padding: 0;
}

.collection-detail-stats {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  max-width: none;
  gap: 10px;
  border: 0;
  background: transparent;
  margin-bottom: 18px;
  padding: 0;
}

.collection-detail-stats>span {
  min-height: 72px;
  display: grid;
  align-content: center;
  justify-content: stretch;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(circle at 16% 18%, rgb(50 143 255 / 0.18), transparent 3rem),
    rgb(8 22 40 / 0.72);
  padding: 12px;
}

.collection-detail-stats>span>strong {
  text-align: left;
  font-size: 1.05rem;
}

.collection-action-button {
  min-width: 124px;
}

.market-section {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgb(7 17 31 / 0.42);
}

.collection-listing-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  padding: 0 18px;
}

.collection-filter-button {
  position: relative;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  padding: 16px 4px 14px;
  font-weight: 850;
}

.collection-filter-button::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: transparent;
  content: "";
}

.collection-filter-button:hover,
.collection-filter-button:focus-visible,
.collection-filter-button.active {
  background: transparent;
  color: var(--accent);
  transform: none;
}

.collection-filter-button.active::after {
  background: var(--accent);
}

.market-currency-row {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.market-currency-row+.market-currency-row {
  border-top: 1px solid var(--line);
}

.collection-listing-empty {
  margin: 18px;
}

.market-currency-header {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 800;
}

.market-currency-title {
  color: var(--ink);
  font-size: 1.08rem;
}

.market-currency-meta {
  color: var(--muted);
  font-size: 0.92rem;
}

.market-currency-meta strong {
  color: var(--accent);
}

.market-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, var(--nft-card-width));
  gap: 18px;
  align-items: start;
}

.market-card {
  position: relative;
  display: grid;
  gap: 12px;
  width: var(--nft-card-width);
  min-height: 292px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 10px;
  box-shadow: 0 14px 28px var(--shadow);
  transition:
    border-color 140ms ease,
    transform 140ms ease,
    box-shadow 140ms ease;
}

.market-card:hover,
.market-card:focus-within {
  border-color: #6dafff;
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgb(0 8 24 / 0.58);
}

.market-card.own-listing {
  border-color: #26394d;
  background:
    linear-gradient(180deg, rgb(14 28 45 / 0.96), rgb(9 20 34 / 0.98)),
    var(--surface-3);
  box-shadow: 0 10px 20px rgb(0 8 24 / 0.3);
}

.market-card.own-listing:not(.selected):hover,
.market-card.own-listing:not(.selected):focus-within {
  border-color: #42617e;
  box-shadow: 0 14px 26px rgb(0 8 24 / 0.42);
}

.market-card.own-listing:not(.selected) .market-image-wrap {
  opacity: 0.76;
  filter: saturate(0.72);
}

.market-card.own-listing:not(.selected) .market-card-row {
  color: #c3ceda;
}

.market-card.own-listing:not(.selected) .price {
  color: #d5e0ec;
}

.listing-selection-card,
.wallet-selection-card {
  cursor: pointer;
}

.market-card.selected {
  border-color: var(--accent);
  background:
    linear-gradient(180deg, rgb(39 79 126 / 0.62), rgb(20 42 69 / 0.92)),
    var(--surface-2);
  box-shadow:
    0 0 0 2px rgb(99 168 255 / 0.5),
    0 22px 42px rgb(0 8 24 / 0.64);
}

.market-card.selected .market-card-row {
  color: #f8fbff;
}

.market-card.selection-disabled {
  border-color: #263646;
}

.market-card.selection-disabled .market-image-wrap,
.market-card.selection-disabled .market-card-row {
  filter: grayscale(0.85);
  opacity: 0.42;
}

.market-card.selection-disabled:hover,
.market-card.selection-disabled:focus-within {
  border-color: #263646;
  box-shadow: 0 14px 28px var(--shadow);
  transform: none;
}

.market-card.selection-disabled .market-actions {
  display: none;
}

.market-sections.has-selection .market-actions {
  display: none;
}

.market-card.selection-disabled[data-tooltip]::after {
  position: absolute;
  right: 10px;
  bottom: calc(100% - 12px);
  left: 10px;
  z-index: 5;
  display: none;
  border: 1px solid #6e91b7;
  border-radius: 8px;
  background: #050e19;
  color: var(--ink);
  content: attr(data-tooltip);
  filter: none;
  opacity: 1;
  padding: 10px;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.35;
  white-space: normal;
}

.market-card.selection-disabled[data-tooltip]:hover::after,
.market-card.selection-disabled[data-tooltip]:focus-within::after {
  display: block;
}

.market-image-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  aspect-ratio: 1;
  background: var(--surface-2);
  border: 1px solid #2d435d;
}

.market-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  color: transparent;
  font-size: 0;
  line-height: 0;
  padding: 18px;
}

.no-image {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 650;
  line-height: 1.25;
  background: linear-gradient(135deg, #0b1828, #12243a);
}

.market-actions {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: linear-gradient(180deg, rgb(7 17 31 / 0) 35%, rgb(7 17 31 / 0.86));
  opacity: 0;
  padding: 12px;
  transition: opacity 140ms ease;
}

.market-card:hover .market-actions,
.market-card:focus-within .market-actions {
  opacity: 1;
}

.market-card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  font-weight: 800;
  min-height: 44px;
}

.market-card-row span {
  min-width: 0;
}

.market-card-row span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nft-group {
  display: grid;
  gap: 10px;
  margin-bottom: 20px;
}

.nft-group h3 {
  scroll-margin-top: 128px;
}

.nft-group h3:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 6px;
}

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

.transactions-toolbar {
  display: flex;
  justify-content: flex-end;
}

.transactions-tabs {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 4px;
  margin: 6px 0 18px;
}

.transaction-tab {
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
}

.transaction-tab.active,
.transaction-tab:hover,
.transaction-tab:focus-visible {
  background: var(--surface-2);
  color: var(--ink);
  transform: none;
}

.transaction-panel {
  display: none;
}

.transaction-panel.active {
  display: grid;
}

.wallet-history-table {
  min-width: 1040px;
}

.wallet-history-table tr.is-unread-sale {
  background: rgb(78 151 255 / 0.14);
  cursor: pointer;
}

.wallet-history-table tr.is-unread-sale td:first-child {
  border-left: 3px solid var(--accent);
}

.nft-group h3 {
  margin: 0;
  font-size: 1rem;
}

.profile-collection-link {
  color: var(--ink);
  text-decoration: none;
}

.profile-collection-link:hover,
.profile-collection-link:focus-visible {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 14px;
  box-shadow: 0 12px 24px var(--shadow);
}

.price {
  flex: 0 0 auto;
  color: var(--accent);
  font-size: 1.2rem;
  font-weight: 800;
}

.price-with-usd {
  position: relative;
  display: inline-block;
}

.has-inline-tooltip {
  position: relative;
  display: inline-block;
}

.usd-price-tooltip {
  position: fixed;
  z-index: 10000;
  display: none;
  border: 1px solid #6e91b7;
  border-radius: 6px;
  background: #050e19;
  color: var(--ink);
  padding: 6px 8px;
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1.15;
  box-shadow: 0 10px 22px rgb(0 0 0 / 0.42);
  pointer-events: none;
  white-space: nowrap;
}

.usd-price-tooltip.visible {
  display: block;
}

.muted,
.meta {
  color: var(--muted);
}

.meta,
.address {
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.78rem;
}

.dialog-list-inputs {
  margin-bottom: 14px;
}

.dialog-list-inputs input {
  text-align: right;
}

.dialog-list-totals {
  margin-bottom: 14px;
}

.explorer-link {
  color: var(--accent);
  text-decoration: none;
}

.explorer-link:hover,
.explorer-link:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.activity-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  min-height: 0;
}

.activity-panel {
  margin-top: 0;
}

.activity-filters {
  align-self: start;
  display: grid;
  gap: 16px;
  border-right: 1px solid var(--line);
  padding-right: 24px;
}

.activity-filter-heading {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 800;
}

.activity-filter-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.activity-filter-button {
  border: 1px solid var(--line);
  background: var(--surface-3);
  color: var(--muted);
  padding: 8px 10px;
}

.activity-filter-button:hover {
  border-color: #5f7896;
  background: var(--surface-3);
  color: var(--muted);
  transform: none;
}

.activity-filter-button.active {
  border-color: #5f7896;
  background: var(--surface-2);
  color: var(--ink);
  transform: none;
}

.activity-reset-filters {
  justify-self: stretch;
  width: 100%;
  margin-top: 16px;
}

.activity-collection-filter-grid {
  display: grid;
  grid-template-columns: 1fr;
}

.activity-collection-filter-grid .activity-filter-button {
  justify-content: flex-start;
  width: 100%;
  text-align: left;
}

.activity-results {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 0;
}

.activity-results-toolbar {
  display: flex;
  justify-content: flex-end;
}

.activity-results-toolbar-top {
  margin: 0 0 14px;
}

.activity-results-toolbar-bottom {
  margin-top: 14px;
  margin-bottom: 48px;
}

.activity-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 24px;
  flex-wrap: wrap;
}

.activity-pagination-top {
  width: 100%;
  justify-content: flex-end;
}

.activity-pagination-bottom {
  width: 100%;
  justify-content: flex-end;
}

.activity-pagination-group {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.activity-pagination-field {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.activity-pagination select,
.activity-page-input {
  min-width: 58px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--ink);
  padding: 7px 10px;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
}

.activity-page-input {
  width: 52px;
}

.activity-page-buttons {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.activity-page-button,
.activity-page-go {
  min-width: auto;
  padding: 6px 10px;
  font-size: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-3);
  color: var(--muted);
}

.activity-page-button:hover,
.activity-page-go:hover {
  border-color: #5f7896;
  background: var(--surface-3);
  color: var(--muted);
}

.activity-page-link.active {
  background: var(--surface-2);
  border-color: #5f7896;
  color: var(--ink);
}

.activity-page-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  color: var(--muted);
}

.activity-page-input::-webkit-outer-spin-button,
.activity-page-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.activity-page-input {
  -moz-appearance: textfield;
  appearance: textfield;
}

.activity-table-wrap {
  max-height: none;
  overflow: visible;
  border: 1px solid var(--line);
  border-radius: 0;
  background: rgb(7 17 31 / 0.72);
}

.activity-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

.activity-table th,
.activity-table td {
  border-bottom: 1px solid var(--line);
  padding: 14px 12px;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

.activity-table th:nth-child(1),
.activity-table td:nth-child(1) {
  width: 11rem;
  min-width: 11rem;
}

.activity-table th:nth-child(2),
.activity-table td:nth-child(2) {
  width: 8rem;
  min-width: 8rem;
}

.activity-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #0a1728;
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.activity-table td {
  color: var(--ink);
  font-weight: 700;
}

.activity-table tbody tr:hover {
  background: var(--surface-2);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 22px;
}

.info-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 14px 28px var(--shadow);
  padding: 18px;
}

.info-panel {
  display: grid;
  gap: 10px;
}

.info-panel h3 {
  margin: 0;
  font-size: 1.04rem;
}

.info-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.terms-document {
  display: grid;
  gap: 12px;
  max-width: 760px;
  margin-top: 0;
}

.terms-document section {
  display: grid;
  gap: 10px;
}

.terms-document h3 {
  margin: 0;
  font-size: 1.12rem;
}

.terms-document p {
  max-width: 82ch;
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.faq-search {
  display: grid;
  gap: 7px;
  max-width: 460px;
  margin-bottom: 16px;
  color: var(--ink);
  font-weight: 800;
}

.faq-list {
  display: grid;
  gap: 24px;
  max-width: 760px;
}

.faq-section {
  display: grid;
  gap: 12px;
  padding: 12px 0;
}

.faq-section-title {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--ink);
}

.faq-item details {
  border: none;
  background: transparent;
}

.faq-item summary {
  list-style: none;
  display: block;
  position: relative;
  cursor: pointer;
  padding: 0 24px 0 0;
  margin: 0;
  font-size: 1.06rem;
  font-weight: 800;
  color: var(--ink);
}

.faq-item summary::-webkit-details-marker,
.faq-item summary::marker {
  display: none;
}

.faq-item summary::after {
  content: "▾";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  transition: transform 0.2s ease;
  color: var(--muted);
  font-size: 0.95rem;
}

.faq-item details[open] summary::after {
  transform: rotate(-180deg);
}

.faq-answer {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.faq-item.is-filtered {
  display: none;
}

.faq-item mark {
  border-radius: 3px;
  background: rgb(99 168 255 / 0.28);
  color: var(--ink);
  padding: 0;
}

.app-footer {
  margin-top: auto;
  border-top: 1px solid var(--line);
  background:
    radial-gradient(circle at 50% 0%, rgb(42 171 238 / 0.18), transparent 26rem),
    rgb(7 17 31 / 0.98);
  color: var(--muted);
  font-size: 0.9rem;
  flex-shrink: 0;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  max-width: var(--page-max-width);
  margin: 0 auto;
  min-height: 86px;
  padding: 16px 0;
}

.footer-brand {
  justify-self: start;
}

.telegram-link {
  display: inline-flex;
  align-items: center;
  justify-self: center;
  gap: 10px;
  border: 1px solid rgb(42 171 238 / 0.6);
  border-radius: 999px;
  background: rgb(42 171 238 / 0.16);
  color: #f5fbff;
  font-weight: 900;
  padding: 10px 16px 10px 12px;
  text-decoration: none;
  box-shadow: 0 12px 28px rgb(42 171 238 / 0.14);
}

.telegram-link:hover,
.telegram-link:focus-visible {
  border-color: #8ad7ff;
  background: rgb(42 171 238 / 0.24);
  color: #ffffff;
}

.telegram-link svg {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
}

.selection-action-bar {
  position: fixed;
  right: 24px;
  bottom: 56px;
  left: 24px;
  z-index: 40;
  pointer-events: none;
}

.selection-action-shell {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 14px;
  width: min(640px, 100%);
  min-height: 84px;
  margin: 0 auto;
  border: 2px solid rgb(99 168 255 / 0.72);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgb(39 79 126 / 0.98), rgb(20 42 69 / 0.98)),
    var(--surface-2);
  box-shadow:
    0 0 0 1px rgb(99 168 255 / 0.22),
    0 30px 78px rgb(0 0 0 / 0.72);
  padding: 16px 18px;
  pointer-events: auto;
}

.selection-action-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.selection-action-summary strong {
  font-size: 1.12rem;
}

.selection-action-summary span {
  color: #dbe8f7;
  font-weight: 800;
}

.selection-action-summary.buy-selection {
  display: grid;
  gap: 0;
}

.selection-buy-items {
  display: grid;
  width: 100%;
  max-height: 205px;
  margin-top: 6px;
  padding-right: 12px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: rgb(156 201 255 / 0.72) rgb(9 24 42 / 0.72);
  scrollbar-gutter: stable;
  scrollbar-width: auto;
}

.selection-buy-items::-webkit-scrollbar {
  width: 12px;
}

.selection-buy-items::-webkit-scrollbar-track {
  border: 1px solid rgb(156 201 255 / 0.24);
  border-radius: 999px;
  background: rgb(9 24 42 / 0.82);
}

.selection-buy-items::-webkit-scrollbar-thumb {
  border: 2px solid rgb(9 24 42 / 0.82);
  border-radius: 999px;
  background: rgb(156 201 255 / 0.82);
}

.selection-buy-items::-webkit-scrollbar-thumb:hover {
  background: rgb(156 201 255 / 1);
}

.selection-buy-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgb(215 232 250 / 0.24);
  min-height: 41px;
  padding: 9px 0;
  font-weight: 800;
}

.selection-buy-item strong {
  color: var(--accent);
  white-space: nowrap;
}

.selection-buy-item.is-unavailable {
  color: var(--muted);
}

.selection-buy-item.is-unavailable span {
  text-decoration: line-through;
}

.selection-buy-item.is-unavailable strong {
  color: #ff9aa9;
}

.selection-buy-item span {
  min-width: 0;
}

.selection-list-item {
  min-height: 41px;
  padding: 9px 0;
  color: #dbe8f7;
  font-weight: 800;
}

.selection-list-inputs {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(120px, 170px);
  gap: 10px;
  margin-top: 8px;
}

.selection-list-inputs select,
.selection-list-inputs input {
  width: 100%;
}

.selection-list-inputs input {
  text-align: right;
}

.selection-action-summary .selection-buy-total {
  justify-self: end;
  padding-top: 12px;
  color: var(--ink);
}

.selection-list-totals {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 6px 18px;
  margin-top: 14px;
}

.selection-list-totals span {
  color: #dbe8f7;
  font-weight: 800;
}

.selection-list-totals strong {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.selection-list-currency {
  display: flex;
  grid-column: 1 / -1;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
  color: #dbe8f7;
  font-weight: 800;
}

.selection-action-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.selection-action-controls select {
  min-width: 210px;
}

.selection-action-controls input {
  width: 132px;
}

.selection-action-tooltip {
  position: relative;
  display: inline-flex;
}

.selection-action-tooltip[data-tooltip]::after {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  z-index: 5;
  display: none;
  min-width: 160px;
  border: 1px solid #6e91b7;
  border-radius: 8px;
  background: #050e19;
  color: var(--ink);
  content: attr(data-tooltip);
  padding: 10px;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.35;
  white-space: normal;
  box-shadow: 0 14px 32px rgb(0 0 0 / 0.54);
}

.selection-action-tooltip[data-tooltip]:hover::after,
.selection-action-tooltip[data-tooltip]:focus-within::after {
  display: block;
}

.selection-action-status {
  grid-column: 1 / -1;
  border-top: 1px solid rgb(215 232 250 / 0.24);
  color: #e5eef9;
  padding-top: 14px;
  font-weight: 800;
}

.selection-action-status.error {
  color: #ff9aa7;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-self: end;
  gap: 12px;
  overflow-wrap: anywhere;
}

.footer-links a,
.footer-links span {
  color: var(--muted);
}

.footer-links a {
  text-decoration: none;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--ink);
}

.activity-type {
  color: var(--accent);
  text-transform: capitalize;
}

.activity-unavailable {
  display: inline-flex;
  justify-content: center;
  min-width: 1.75rem;
  margin: 0 -0.25rem;
  padding: 0 0.25rem;
  color: var(--muted);
}

.modal {
  width: min(640px, calc(100vw - 32px));
  border: 0;
  border-radius: 8px;
  background: transparent;
  padding: 0;
}

.modal::backdrop {
  background: rgb(0 0 0 / 0.72);
}

.modal-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 18px;
  box-shadow: 0 24px 80px rgb(0 0 0 / 0.68);
}

.confirmation-card {
  display: grid;
  gap: 16px;
}

.terms-signature-modal {
  width: min(780px, calc(100vw - 32px));
}

.terms-signature-card {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
  max-height: min(92vh, 980px);
  overflow: hidden;
  padding: 0;
}

.terms-signature-scroll {
  display: grid;
  gap: 16px;
  overflow: auto;
  padding: 18px;
}

.terms-signature-actions {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 14px 18px;
}

.terms-signature-sign-help {
  display: inline-flex;
}

.terms-signature-status {
  display: grid;
  gap: 10px;
  padding: 0 18px 14px;
}

.terms-signature-body {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 14px;
}

.terms-signature-section {
  display: grid;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.terms-signature-section:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.terms-signature-section h3,
.terms-signature-section p {
  margin: 0;
}

.terms-signature-section h3 {
  font-size: 0.98rem;
}

.terms-signature-section p {
  color: var(--muted);
  line-height: 1.55;
}

.terms-signature-hash {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-3);
  padding: 12px;
}

.terms-signature-hash p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.terms-signature-hash code {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.5;
}

.terms-signature-version {
  display: grid;
  gap: 4px;
}

.confirmation-message {
  display: grid;
  gap: 12px;
}

.confirmation-status {
  display: grid;
  gap: 10px;
}

.confirmation-purchase-items {
  display: grid;
  gap: 0;
  color: var(--ink);
  font-weight: 800;
}

.confirmation-purchase-item {
  border-bottom: 1px solid var(--line);
  padding: 8px 0;
}

.confirmation-history-link {
  justify-self: start;
  font-weight: 800;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.modal-header h2,
.modal-header p {
  margin: 0;
}

.modal-header p {
  margin-top: 4px;
}

.checkbox-label {
  grid-template-columns: auto 1fr;
  align-items: start;
  color: var(--ink);
}

.checkbox-label input {
  width: auto;
  margin-top: 4px;
}

.checkbox-label small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-weight: 500;
  line-height: 1.4;
}

.form-help {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 500;
}

.dialog-actions {
  justify-content: flex-end;
}

.dialog-actions+.message {
  margin-top: 12px;
  margin-bottom: 0;
}

.dialog-actions+.message+.work-status,
.dialog-actions+.work-status {
  margin-top: 12px;
}

@media (max-width: 720px) {

  .header-inner,
  .section-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-actions {
    justify-content: flex-start;
  }

  .section-title-row {
    align-items: flex-start;
  }

  .collection-title-icon {
    width: 48px;
    height: 48px;
  }

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

  .header-inner {
    gap: 10px;
    padding-top: 12px;
  }

  .header-nav {
    width: 100%;
  }

  .header-nav-button {
    flex: 1;
    min-width: 96px;
  }

  .wallet-panel {
    align-self: flex-start;
    align-items: flex-start;
    width: 100%;
  }

  .profile-terms-version {
    padding: 14px 16px;
  }

  .header-nav-secondary {
    justify-content: flex-start;
    width: 100%;
  }

  .wallet-panel,
  .button-row {
    flex-wrap: wrap;
  }

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

  .activity-filters {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding-right: 0;
    padding-bottom: 16px;
  }

  .activity-results-toolbar {
    justify-content: center;
  }

  .activity-pagination {
    width: 100%;
    justify-content: center;
  }

  .market-grid {
    grid-template-columns: repeat(auto-fill, minmax(var(--nft-card-width), 1fr));
  }

  .market-card {
    width: 100%;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    align-items: flex-start;
    gap: 12px;
  }

  .footer-brand,
  .telegram-link,
  .footer-links {
    justify-self: start;
  }

  .selection-action-bar {
    right: 12px;
    bottom: 32px;
    left: 12px;
  }

  .selection-action-shell {
    grid-template-columns: 1fr;
  }

  .selection-action-controls {
    justify-content: flex-end;
  }

  .selection-list-inputs {
    grid-template-columns: 1fr;
  }

  .selection-action-controls input,
  .selection-action-controls select {
    width: 100%;
  }
}

.activity-layout .activity-filters {
  border-right: none !important;
  box-shadow: none !important;
}

.activity-layout .activity-results {
  border-left: none !important;
}
