/* Tags becomes a spacious browse panel when the Tags tab is selected. */
.discovery.mode-tags {
  min-height: calc(100dvh - 180px);
  padding: 24px clamp(24px, 4vw, 72px) 34px;
  background: #242424;
}

.discovery.mode-tags .tag-search { width: min(960px, 100%); height: 52px; }
.discovery.mode-tags .tag-search input { font-size: 14px; }

.discovery.mode-tags .tag-row {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  width: 100%;
  min-height: calc(100dvh - 280px);
  margin: 22px auto 0;
  padding: 0;
  overflow: visible;
  gap: 18px;
  align-content: stretch;
  grid-auto-rows: auto;
  align-items: stretch;
}

.discovery.mode-tags .tag-group {
  min-width: 0;
  min-height: 240px;
  border: 1px solid #4a4a4a;
  display: flex;
  flex-direction: column;
  padding: 16px;
  background: #202020;
}

.discovery.mode-tags .tag-group h3 {
  margin: 0 0 14px;
  color: #f2bc35;
  font: 700 13px/1 var(--mono, "DM Mono", monospace);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.discovery.mode-tags .tag-group-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-content: flex-start;
}

.discovery.mode-tags .tag-group-buttons button {
  width: auto;
  min-height: 46px;
  padding: 10px 14px;
  text-align: left;
  font-size: 15px;
  line-height: 1.15;
}

.discovery.mode-tags .category-row {
  display: none !important;
}

@media (max-width: 680px) {
  .discovery.mode-tags { min-height: 0; padding: 14px 12px 22px; }
  .discovery.mode-tags .tag-row { grid-template-columns: 1fr; min-height: 0; gap: 12px; grid-auto-rows: auto; }
  .discovery.mode-tags .tag-group { padding: 10px; }
  .discovery.mode-tags .tag-group-buttons { gap: 8px; }
  .discovery.mode-tags .tag-group-buttons button { min-height: 42px; padding: 9px 11px; font-size: 13px; }
}

/* Deeper, near-black marketplace palette. */
html body{background:#050506!important;color:#eee9df!important}html body .app-shell{background:#090a0b!important;box-shadow:0 0 0 1px #1d2023,0 28px 90px #000c!important}html body .masthead{background:#0d0e10!important;border-bottom-color:#26292d!important}html body .mode-tabs,html body .discovery{background:#0a0b0d!important}html body .market-stage,html body .ad,html body .listing-stream{background:#08090a!important}html body .listing{background:#0c0d0f!important;border-color:#22252a!important;box-shadow:0 15px 38px #0009!important}html body .collector-head{background:#141619!important}html body .listing-copy,html body .listing footer,html body .listing-copy p,html body .media{background:#090a0b!important}html body .bottom-nav{background:#090a0ce8!important;border-top-color:#282b2f!important}html body .tag-group,html body .chat-sidebar,html body .chat-secondary,html body .conversation-workspace,html body .account-workspace,html body .delivery-workspace{background:#0c0d0f!important;border-color:#282b2f!important}html body dialog,html body .comment-dialog{background:#101215!important;border-color:#32353a!important}html body .search,html body .tag-search,html body .modal-form input,html body .modal-form textarea,html body .modal-form select{background:#070809!important;border-color:#303338!important}
html body .tag-group-buttons button,html body .tag-row button,html body .category-row button,html body .header-nav button:not(.curator-cta),html body .header-sell,html body .listing-action:not(.action-buy),html body .comment-button,html body .comment-reply,html body .bottom-nav button,html body .chat-conversation-row,html body .suggestion-card,html body .delivery-row{background:#0a0b0d!important;border-color:#2a2d31!important;color:#b9c7da!important}html body .tag-group-buttons button:hover,html body .tag-row button:hover,html body .category-row button:hover,html body .header-nav button:not(.curator-cta):hover,html body .header-sell:hover,html body .listing-action:not(.action-buy):hover,html body .bottom-nav button:hover,html body .chat-conversation-row:hover,html body .suggestion-card:hover,html body .delivery-row:hover{background:#15171a!important;border-color:#5b513d!important;color:#f1dfb2!important}html body .tag-group-buttons button.active,html body .tag-row button.active,html body .category-row button.active,html body .bottom-nav button.active{background:#17130d!important;border-color:#806b42!important;color:#f1dfb2!important}
html body .mode-tabs button.is-active,html body .tag-row button.active{background:#12100c!important;color:#e6cd8b!important;border-color:#625236!important;box-shadow:inset 0 -2px #8a7144!important;text-shadow:none!important}
html body .market-head{background:#090a0c!important;border-bottom-color:#282b2f!important;color:#b8c2d0!important}html body .listing footer{background:#08090b!important;border-top-color:#282b2f!important}html body .listing-actions{background:#08090b!important}

/* Tag matching switch beside the tag search field. */
html body .tag-search{display:flex;align-items:center;gap:8px;padding-right:4px}
html body .tag-search input{flex:1 1 auto;width:auto!important}
html body .tag-match-mode{display:inline-flex;flex:0 0 auto;overflow:hidden;border:1px solid #2f3338;border-radius:5px}
html body .tag-match-mode button{min-width:44px;height:28px;padding:0 8px;border:0;border-right:1px solid #2f3338;background:#08090b;color:#8e9bab;font:700 9px "DM Mono",monospace;letter-spacing:.08em;cursor:pointer}
html body .tag-match-mode button:last-child{border-right:0}
html body .tag-match-mode button.active{background:#17130d;color:#e6cd8b;box-shadow:inset 0 -2px #8a7144}
@media(max-width:680px){html body .tag-search{gap:4px}html body .tag-match-mode button{min-width:39px;padding:0 5px;font-size:8px}}

/* Long-press tag locks remain required while normal tags use Any / All matching. */
html body .tag-group-buttons button.locked{border-color:#8e7542!important;background:#1b160d!important;color:#f2d78e!important;box-shadow:inset 0 0 0 1px #5f4d2c!important}
html body .tag-group-buttons button.locked::after{content:' LOCK';margin-left:6px;color:#b7a16b;font:700 7px "DM Mono",monospace;letter-spacing:.05em}
html body .tag-group-buttons button.void{border-color:#874d63!important;background:#1e1016!important;color:#eda8bd!important;box-shadow:inset 0 0 0 1px #613342!important}
html body .tag-group-buttons button.void::after{content:' VOID';margin-left:6px;color:#d986a1;font:700 7px "DM Mono",monospace;letter-spacing:.05em}
html body button:focus-visible,html body a:focus-visible,html body input:focus-visible,html body select:focus-visible,html body textarea:focus-visible{outline:2px solid #f3cf58!important;outline-offset:3px;box-shadow:0 0 0 4px #000!important}
#numpad-cursor{position:fixed;z-index:2147483647;pointer-events:none;border:2px solid #f3cf58;border-radius:4px;box-shadow:0 0 0 3px #000d,0 0 18px #f3cf5877;transition:left .08s ease,top .08s ease,width .08s ease,height .08s ease}#numpad-cursor::after{content:'NUM';position:absolute;right:-2px;top:-20px;padding:3px 5px;background:#f3cf58;color:#090a0b;font:700 9px "DM Mono",monospace;letter-spacing:.08em}
html body .collector-head{background:#0a0b0d!important;border-bottom-color:#292c30!important}html body .collector-head>b{background:#070809!important;border-color:#3a3e44!important}
/* Compact audience group beside the tag search instead of a duplicate full card. */
.audience-quick-tags{display:none}.discovery.mode-tags .tag-search-layout{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:stretch;gap:12px;width:min(1180px,100%);margin:0 auto}.tag-remove{min-height:52px;padding:0 15px;border:1px solid #42464b;background:#111315;color:#d7dbe1;font:700 10px "DM Mono",monospace;letter-spacing:.06em;text-transform:uppercase;cursor:pointer}.tag-remove:hover,.tag-remove:focus-visible{border-color:#8e7542;background:#17130d;color:#f1dfb2;outline:0}.discovery.mode-tags .tag-search-layout .tag-search{width:100%;margin:0}.discovery.mode-tags .audience-quick-tags{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:9px;min-width:260px;padding:7px 10px;border:1px solid #42464b;background:#111315}.audience-quick-tags>b{color:#e6cd8b;font:700 9px "DM Mono",monospace;letter-spacing:.08em;text-transform:uppercase}.audience-quick-tags>div{display:flex;flex-wrap:wrap;gap:5px}.audience-quick-tags button{min-height:28px;padding:4px 8px;border:1px solid #34383d;background:#0b0c0e;color:#b9c7da;font:700 9px "DM Mono",monospace;cursor:pointer}.audience-quick-tags button:hover,.audience-quick-tags button.active{border-color:#806b42;background:#17130d;color:#f1dfb2}.audience-quick-tags button.locked{border-color:#8e7542;background:#1b160d;color:#f2d78e}.audience-quick-tags button.void{border-color:#874d63;background:#1e1016;color:#eda8bd}@media(max-width:760px){.discovery.mode-tags .tag-search-layout{grid-template-columns:1fr;gap:8px}.tag-remove{min-height:42px}.discovery.mode-tags .audience-quick-tags{min-width:0;grid-template-columns:1fr}.audience-quick-tags>div{gap:6px}.audience-quick-tags button{flex:1 1 0;text-align:center}}
