/* NQN v1.3 marketplace — pages 40–45. Tokens stay in nqn.css. */

.nq-market-head .nq-viewpill a {
  display: inline-flex;
  align-items: center;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #51705A;
  font-weight: 800;
  font-size: 0.9775rem;
  line-height: 1.2;
  padding: 0.29rem 1.04rem;
  text-decoration: none;
}

.nq-market-head .nq-viewpill a[aria-current="page"] {
  background: #51705A;
  color: #fff;
}

.nq-market-head .nq-viewpill a:hover,
.nq-market-head .nq-viewpill a:focus-visible,
.nq-market-head .nq-viewpill a[aria-current="page"]:hover,
.nq-market-head .nq-viewpill a[aria-current="page"]:focus-visible {
  background: #83B692;
  color: #51705A;
}

.nq-market-create {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.nq-market-create a {
  color: var(--ink);
}

.nq-market-filters {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 8px 22px rgba(17, 24, 39, 0.04);
  padding: 1rem 1.1rem 1.15rem;
  margin: 0 0 1.25rem;
}

.nq-market-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 0.85rem;
}

.nq-market-pills a.is-on {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.nq-market-range-label {
  margin: 0 0 0.35rem;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 700;
}

.nq-range {
  position: relative;
  height: 42px;
}

.nq-range-track,
.nq-range-fill {
  position: absolute;
  top: 19px;
  height: 4px;
  border-radius: 999px;
  pointer-events: none;
}

.nq-range-track {
  left: 0;
  right: 0;
  background: #E5E7EB;
}

.nq-range-fill {
  background: var(--ink);
}

.nq-range input[type="range"] {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 42px;
  margin: 0;
  background: none;
  pointer-events: none;
  -webkit-appearance: none;
  appearance: none;
}

.nq-range input[type="range"]:focus {
  outline: none;
}

.nq-range input[type="range"]:focus-visible::-webkit-slider-thumb {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.nq-range input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  background: transparent;
  border: 0;
}

.nq-range input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  pointer-events: auto;
  width: 22px;
  height: 22px;
  margin-top: -9px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--ink);
  cursor: pointer;
}

.nq-range input[type="range"]::-moz-range-track {
  height: 4px;
  background: transparent;
  border: 0;
}

.nq-range input[type="range"]::-moz-range-thumb {
  pointer-events: auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--ink);
  cursor: pointer;
}

.nq-market-card .nq-cardhit {
  background: transparent;
  border: 0;
  padding: 0;
}

.nq-market-card .nq-card-body {
  padding-bottom: 4.4rem;
}

.nq-market-card .nq-kicker {
  font-size: 0.8rem;
}

.nq-market-rate {
  margin: 0 0 0.15rem;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.nq-market-card .nq-card-actions {
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: calc(100% - 12px);
  gap: 6px;
}

.nq-market-card .nq-iconbtn svg {
  width: 18px;
  height: 18px;
}

.nq-owner-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  background: #F3F4F6;
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1.2;
  padding: 0.28rem 0.45rem;
}

.nq-getad {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 42px;
  padding: 0 0.9rem;
  border: 0;
  border-radius: 999px;
  background: #E8F3EC;
  color: #5A9A7A;
  font: inherit;
  font-weight: 800;
  font-size: 0.92rem;
  cursor: pointer;
}

.nq-getad svg {
  width: 14px;
  height: 14px;
  display: block;
}

.nq-getad:hover,
.nq-getad:focus-visible {
  background: #E8F3EC;
  color: #5A9A7A;
}

#nq-apply-dialog .nqn-modal-card,
#nq-ad-dialog .nqn-modal-card {
  width: min(520px, calc(100vw - 1.5rem));
  max-width: 520px;
  max-height: calc(100vh - 2rem);
  overflow: auto;
}

#nq-apply-dialog h2,
#nq-ad-dialog h2 {
  margin: 0 0 0.85rem;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.nq-market-readonly {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  color: var(--ink);
  padding: 12px 14px;
  font-weight: 700;
}

.nq-market-paper,
.nq-market-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
}

.nq-market-paper a,
.nq-market-note a {
  color: var(--ink);
  font-weight: 800;
}

.nq-ad-facts {
  margin: 0 0 0.85rem;
}

.nq-ad-facts div {
  margin: 0 0 0.75rem;
}

.nq-ad-facts dt {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
}

.nq-ad-facts dd {
  margin: 0.15rem 0 0;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.nq-ad-facts div[hidden] {
  display: none;
}

#nq-apply-dialog .nqn-modal-card button#nq-apply-submit,
#nq-apply-dialog .nqn-modal-card button#nq-apply-submit:hover,
#nq-apply-dialog .nqn-modal-card button#nq-apply-submit:focus-visible {
  width: 100%;
  align-self: stretch;
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

#nq-apply-dialog .nqn-modal-card button#nq-apply-submit[disabled] {
  opacity: 0.45;
}

@media (max-width: 575px) {
  .nq-market-filters {
    border-radius: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nq-market-card,
  .nq-getad,
  .nq-range input[type="range"] {
    transition: none;
  }
}

/* t809 market shell */
.nq-account-main .nq-market-head { display: none; }
.nq-account-panel .nq-market-filters {
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0 0 1rem;
}
.nq-account-panel .nq-market {
  padding: 0;
}
.nq-market-card {
  padding: 0;
  overflow: hidden;
}
.nq-market-card .nq-kicker {
  margin: 0 0 0.2rem;
  font-size: 0.72rem;
  font-weight: 800;
  color: #6B7280;
}
.nq-market-card .nq-card-title {
  margin: 0;
  font-size: 1rem;
  line-height: 1.25;
}
.nq-market-card .nq-getad {
  z-index: 4;
  position: relative;
}
@media (max-width: 719px) {
  .nq-market,
  .nq-market-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}
